diff options
Diffstat (limited to 'scripts/automation/trex_control_plane/doc_stl')
-rw-r--r-- | scripts/automation/trex_control_plane/doc_stl/index.rst | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/doc_stl/index.rst b/scripts/automation/trex_control_plane/doc_stl/index.rst index f8097b59..2a43061c 100644 --- a/scripts/automation/trex_control_plane/doc_stl/index.rst +++ b/scripts/automation/trex_control_plane/doc_stl/index.rst @@ -18,6 +18,31 @@ How to Install * **TODO** Yaroslav Client zip as self-contain +How to pyATS/v2.0 +================== + +.. sectionauthor:: David Shen + +pyATS Compatibility + +Trex only supports python2 for now, so it only works for **Python2** pyats. + +* Install python2 pyats + /auto/pyats/bin/pyats-install --python2 + +* setenv TREX_PATH to the trex stateless lib path + setenv TREX_PATH <your path>/automation/trex_control_plane/stl + +* In the script or job file, add the TREX_PATH to sys.path:: + + import sys, os; sys.path.append(os.environ['TREX_PATH']) + +* Source trex stateless libs in scripts:: + + from trex_stl_lib.api import * + from scapy.contrib.mpls import * + from trex_stl_lib.trex_stl_hltapi import * + API Reference ============== |