summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/doc_stl
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-03-31 16:49:55 +0300
committerHanoh Haim <hhaim@cisco.com>2016-03-31 16:49:55 +0300
commit72508ce12379dae35ec41b321d43638135e223ba (patch)
tree101fbd96e46dcfc0c64fb5b8ded2bbc7001b455a /scripts/automation/trex_control_plane/doc_stl
parent7e1049ae12c1cb31bdf9a7aeaf602db5d99dfd51 (diff)
some david sphinx cleanup
Diffstat (limited to 'scripts/automation/trex_control_plane/doc_stl')
-rwxr-xr-xscripts/automation/trex_control_plane/doc_stl/api/client_code.rst21
-rw-r--r--scripts/automation/trex_control_plane/doc_stl/conf.py2
-rw-r--r--scripts/automation/trex_control_plane/doc_stl/index.rst12
3 files changed, 24 insertions, 11 deletions
diff --git a/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst b/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst
index fff3052e..4ae2b9fd 100755
--- a/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst
+++ b/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst
@@ -12,10 +12,13 @@ The protocol is JSON-RPC2 over ZMQ transport.
In addition to the Python API, a console-based API interface is also available.
Python-like example::
-.. c.start(ports = [0, 1], mult = "5mpps", duration = 10)
-
+
+ c.start(ports = [0, 1], mult = "5mpps", duration = 10)
+
Console-like example::
-.. c.start_line (" -f ../../../../stl/udp_1pkt_simple.py -m 10mpps --port 0 1 ")
+
+ c.start_line (" -f stl/udp_1pkt_simple.py -m 10mpps --port 0 1 ")
+
Example 1 - Typical Python API::
@@ -56,7 +59,8 @@ STLClient snippet
-----------------
-Example 1: Minimal example of client interacting with the TRex server::
+.. code-block:: python
+ :caption: Example 1: Minimal example of client interacting with the TRex server
c = STLClient()
@@ -82,8 +86,9 @@ Example 1: Minimal example of client interacting with the TRex server::
c.disconnect()
+.. code-block:: python
+ :caption: Example 2: Client can execute other functions while the TRex server is generating traffic
-Example 2: Client can execute other functions while the TRex server is generating traffic::
c = STLClient()
try:
@@ -106,7 +111,10 @@ Example 2: Client can execute other functions while the TRex server is generatin
c.disconnect()
-Example 3: Console-like API interface::
+
+.. code-block:: python
+ :caption: Example 3: Console-like API interface
+
def simple ():
@@ -155,6 +163,7 @@ Example 3: Console-like API interface::
finally:
c.disconnect()
+
Example 4: Load profile from a file::
def simple ():
diff --git a/scripts/automation/trex_control_plane/doc_stl/conf.py b/scripts/automation/trex_control_plane/doc_stl/conf.py
index fe6b27bc..45738b6e 100644
--- a/scripts/automation/trex_control_plane/doc_stl/conf.py
+++ b/scripts/automation/trex_control_plane/doc_stl/conf.py
@@ -69,7 +69,7 @@ author = u'TRex team, Cisco Systems Inc.'
# The short X.Y version.
version = '1.94'
# The full version, including alpha/beta/rc tags.
-release = '1.7.1'
+release = '2.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/scripts/automation/trex_control_plane/doc_stl/index.rst b/scripts/automation/trex_control_plane/doc_stl/index.rst
index 97a1037a..aa2abd75 100644
--- a/scripts/automation/trex_control_plane/doc_stl/index.rst
+++ b/scripts/automation/trex_control_plane/doc_stl/index.rst
@@ -20,19 +20,23 @@ How to Install
| Put it at any place you like, preferably same place as your scripts.
| (If it's not at same place as your scripts, you will need to ensure trex_client directory is in sys.path)
-Un-pack it using command: tar -xzf trex_client.tar.gz
+Un-pack it using command::
-How to pyATS/v2.0
+ tar -xzf trex_client.tar.gz
+
+
+How to pyATS
==================
.. sectionauthor:: David Shen
pyATS Compatibility
-Trex only supports python2 for now, so it only works for **Python2** pyats.
+TRex supports both Python2 and Python3 pyATS.
-* Install python2 pyats
+* Install python2/python3 pyats
/auto/pyats/bin/pyats-install --python2
+ /auto/pyats/bin/pyats-install --python3
* setenv TREX_PATH to the trex stateless lib path
setenv TREX_PATH <your path>/automation/trex_control_plane/stl