From c672af25d70b9e2f64330d5ad68e64493ac9626f Mon Sep 17 00:00:00 2001 From: sridharkn Date: Wed, 10 Feb 2016 10:42:56 +0530 Subject: pkt_gen: Adding Support of testcenter traffic generation using STC REST API. Stcrestclient package based script is added. Support for RFC22544 backtoback, latency, frameloss are also added, along with the throughput. Comments Addressed: 1. Parameter name consistency. Ex: use duration (refer dummy.py). 2. Moved 'only the necessary contents of README to configguide/trafficgen.rst. 3. Removed README file 4. Commit message format (pkt_gen: and linewrap) 5. Merged 4 scripts (throughput/backtoback/latency/frameloss) that were rest-based into one single script. Name: testcenter-rfc2544-test.py 6. Changed year to 2016 7. Moved imports to the top (testcenter-rfc2544-rest.py) 8. Changed prints to Log (testcenter-rfc2544-rest.py) 9. Reporting the frame loss percentage. 10. Calls to frameloss and latency are not added as the 'caller' class TrafficControllerRFC2544 is only calling backtoback and throughput. 11. Changed Exception, e to Exception as e for python 3 compatibility 12. Remaining prints to debug and logger.error for errors. 13. Moved Session creation under try block. 14. Removed deadcode 15. Fixed missing docstring 16. Generic to specific Exception. 17. if-if to if-elif 18. Debug level logging only under verbose flag. 19. Fixed Arguments mismatch. 20. Ordering of the imports Note: The testcenter-rfc2544-rest.py is spawned as a separate process, and need not be wrapped in a class. JIRA: VSPERF-237 Change-Id: I05d2b24fca1da4ba67bc4d79206c5d755ebf8f20 Signed-off-by: sridharkn --- docs/configguide/trafficgen.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs') diff --git a/docs/configguide/trafficgen.rst b/docs/configguide/trafficgen.rst index 6e7626d8..e47fcffe 100644 --- a/docs/configguide/trafficgen.rst +++ b/docs/configguide/trafficgen.rst @@ -222,3 +222,19 @@ best practice results in deploying STCv, the following is suggested: To get the highest performance and accuracy, Spirent TestCenter hardware is recommended. vsperf can run with either stype test ports. + +Using STC REST Client +~~~~~~~~~~~~~~~~~~~~~ +The stcrestclient package provides the stchttp.py ReST API wrapper module. +This allows simple function calls, nearly identical to those provided by +StcPython.py, to be used to access TestCenter server sessions via the +STC ReST API. Basic ReST functionality is provided by the resthttp module, +and may be used for writing ReST clients independent of STC. + +- Project page: +- Package download: + +To use REST interface, follow the instructions in the Project page to +install the package. Once installed, the scripts named with 'rest' keyword +can be used. For example: testcenter-rfc2544-rest.py can be used to run +RFC 2544 tests using the REST interface. -- cgit 1.2.3-korg