summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/doc
diff options
context:
space:
mode:
authorDan Klein <danklei@cisco.com>2015-10-04 18:39:11 +0300
committerDan Klein <danklei@cisco.com>2015-10-04 18:39:11 +0300
commitc7ba20f4f7c4521fdf50238c7e4ccc50f13b248e (patch)
tree3487f061d8c5960906d1fe6abf0955f3d5142d35 /scripts/automation/trex_control_plane/doc
parent1c43d1c6eb10ccff6b26fac6d3588bb5a1439997 (diff)
Updated packet export doc
Diffstat (limited to 'scripts/automation/trex_control_plane/doc')
-rwxr-xr-xscripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml72
-rwxr-xr-xscripts/automation/trex_control_plane/doc/packet_generator/index.rst1
-rwxr-xr-xscripts/automation/trex_control_plane/doc/packet_generator/stream_export.rst10
3 files changed, 53 insertions, 30 deletions
diff --git a/scripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml b/scripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml
index 86ae4bc1..9f8c8f7b 100755
--- a/scripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml
+++ b/scripts/automation/trex_control_plane/doc/packet_generator/export_format.yaml
@@ -1,27 +1,47 @@
-router:
- model : 1RU
- hostname : ASR1001_T-Rex
- ip_address : 10.56.199.247
- image : asr1001-universalk9.BLD_V155_2_S_XE315_THROTTLE_LATEST_20150121_110036-std.bin
- line_password : lab
- en_password : lab
- mgmt_interface : GigabitEthernet0/0/0
- clean_config : /Configurations/danklei/asr1001_TRex_clean_config.cfg
- intf_masking : 255.255.255.0
- ipv6_mask : 64
- interfaces :
- - client :
- name : GigabitEthernet0/0/1
- src_mac_addr : 0000.0001.0000
- dest_mac_addr : 0000.0001.0000
- server :
- name : GigabitEthernet0/0/2
- src_mac_addr : 0000.0001.0000
- dest_mac_addr : 0000.0001.0000
- vrf_name : null
+####################################################
+#### TRex packet export format ####
+####################################################
-tftp:
- hostname : ats-asr-srv-1
- ip_address : 10.56.128.23
- root_dir : /auto/avc-devtest/
- images_path : /images/1RU/ \ No newline at end of file
+# PACKET REP - OPTION #1
+packet:
+ is_pcap : YES/NO # <1>
+ binary : [] # <2>
+ pcap : path/to/pcap/file.pcap # <3>
+ meta : any metadata wished to # <4>
+
+# PACKET REP - OPTION #2
+packet:
+ data : [] / path/to/pcap/file.pcap # <5>
+ meta : any metadata wished to # <4>
+
+vm: # <6>
+ - vm instruction #1
+ - vm instruction #2
+ ...
+ - vm instruction #N
+
+
+###################################
+#### Comments ####
+###################################
+#
+# <1>: is_pcap is a boolean field that indicates if packet is transferred by pcap referencs
+# ('YES') or binary representation ('NO').
+#
+# <2>: binary field encodes the packet in binary representation. in a sequence (array) data.
+# Each array item is an integer ranging 0-255.
+# **LEAVE BLANK IF USING PCAP REFERENCE**
+#
+# <3>: path to the linked pcap file. Make sure to provide path with reading credentials.
+# **LEAVE BLANK IF USING BINARY REP FOR THE PACKET**
+#
+# <4>: meta data is any JSON formatted data ment to be passed on.
+#
+# <5>: data field can be both binary representation or pcap file refernce,
+# without the need for user's explicit typing.
+# The application logic differs between the cases by the object type
+# (array/string ending in '.pcap')
+# Less configuration, little more confusing, LESS similar to RPC spec
+#
+# <6>: vm instructions passed in array representation (sequence).
+# Each instruction is deifned according to the structures of the supported VM instructions. \ No newline at end of file
diff --git a/scripts/automation/trex_control_plane/doc/packet_generator/index.rst b/scripts/automation/trex_control_plane/doc/packet_generator/index.rst
index f3cf46ff..ed1d460d 100755
--- a/scripts/automation/trex_control_plane/doc/packet_generator/index.rst
+++ b/scripts/automation/trex_control_plane/doc/packet_generator/index.rst
@@ -12,6 +12,7 @@ The packet generator module does extensive usage with `dkpt <https://github.com/
.. toctree::
:maxdepth: 0
+ :titlesonly:
examples
stream_export \ No newline at end of file
diff --git a/scripts/automation/trex_control_plane/doc/packet_generator/stream_export.rst b/scripts/automation/trex_control_plane/doc/packet_generator/stream_export.rst
index 8d5ad5be..21efbee9 100755
--- a/scripts/automation/trex_control_plane/doc/packet_generator/stream_export.rst
+++ b/scripts/automation/trex_control_plane/doc/packet_generator/stream_export.rst
@@ -12,16 +12,18 @@ The TRex Packet Builder module supports (using ___ method) the export of built s
Guidelines
----------
-1. One
-2. Two
-3. Three
+1. The YAML file can either contain Byte representation of the packet of refer to a .pcap file that conatains it.
+2. The YAML file is similar as much as possible to the `add_stream method <http://trex-tgn.cisco.com/trex/doc/trex_rpc_server_spec.html#_add_stream>`_ of TRex RPC server spec, which defines the raw interaction with TRex server.
+3. Only packet binary data and VM instructinos are to be saved. Any meta-data packet builder module used while creating the packet will be stripped out.
Export Format
-------------
.. literalinclude:: export_format.yaml
+ :lines: 4-
+ :linenos:
Example
-------
-Whenever TRex is publishing live data, it uses JSON notation to describe the data-object.
+The following files snapshot represents each of the options.