aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/traffic.robot
diff options
context:
space:
mode:
authorMatej Klotton <mklotton@cisco.com>2017-01-31 14:56:40 +0100
committerJan Gelety <jgelety@cisco.com>2017-03-29 12:14:55 +0000
commit16a5302ab334ff2757200f9d17d2a58e6e7499ba (patch)
tree59b710d41f70089d370ee0e7b398c27af4a5bc2a /resources/libraries/robot/traffic.robot
parent80a11ac1d0f9da305bb9ec97507294f56c794496 (diff)
Virl test: dot1q ip4base
Change-Id: I070bdbb0ea9cb609cb367ad744f7ad569b7115b9 Signed-off-by: Matej Klotton <mklotton@cisco.com>
Diffstat (limited to 'resources/libraries/robot/traffic.robot')
-rw-r--r--resources/libraries/robot/traffic.robot26
1 files changed, 26 insertions, 0 deletions
diff --git a/resources/libraries/robot/traffic.robot b/resources/libraries/robot/traffic.robot
index f21831fe5a..18db071e01 100644
--- a/resources/libraries/robot/traffic.robot
+++ b/resources/libraries/robot/traffic.robot
@@ -46,6 +46,16 @@
| | ... | - rx_port - Interface of TG-if1. Type: string
| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string
| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string
+| | ... | - encaps_tx - Expected encapsulation on TX side: Dot1q or Dot1ad
+| | ... | (Optional). Type: string
+| | ... | - vlan_tx - VLAN (inner) tag on TX side (Optional). Type: integer
+| | ... | - vlan_outer_tx - .1AD VLAN (outer) tag on TX side (Optional).
+| | ... | Type: integer
+| | ... | - encaps_rx - Expected encapsulation on RX side: Dot1q or Dot1ad
+| | ... | (Optional). Type: string
+| | ... | - vlan_rx - VLAN (inner) tag on RX side (Optional). Type: integer
+| | ... | - vlan_outer_rx - .1AD VLAN (outer) tag on RX side (Optional).
+| | ... | Type: integer
| | ...
| | ... | *Return:*
| | ... | - No value returned
@@ -59,12 +69,28 @@
| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port} |
| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac}
| | ... | ${rx_dst_mac}
+| | ... | ${encaps_tx}=${EMPTY} | ${vlan_tx}=${EMPTY} | ${vlan_outer_tx}=${EMPTY}
+| | ... | ${encaps_rx}=${EMPTY} | ${vlan_rx}=${EMPTY} | ${vlan_outer_rx}=${EMPTY}
| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port}
| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port}
| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac |
| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac |
| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip} |
| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name}
+| | ${args}= | Run Keyword If | '${encaps_tx}' == '${EMPTY}'
+| | | ... | Set Variable | ${args}
+| | ... | ELSE | Catenate
+| | ... | ${args} | --encaps_tx ${encaps_tx} | --vlan_tx ${vlan_tx}
+| | ${args}= | Run Keyword If | '${encaps_rx}' == '${EMPTY}'
+| | | ... | Set Variable | ${args}
+| | ... | ELSE | Catenate
+| | ... | ${args} | --encaps_rx ${encaps_rx} | --vlan_rx ${vlan_rx}
+| | ${args}= | Run Keyword If | '${vlan_outer_tx}' == '${EMPTY}'
+| | | ... | Set Variable | ${args}
+| | ... | ELSE | Catenate | ${args} | --vlan_outer_tx ${vlan_outer_tx}
+| | ${args}= | Run Keyword If | '${vlan_outer_rx}' == '${EMPTY}'
+| | | ... | Set Variable | ${args}
+| | ... | ELSE | Catenate | ${args} | --vlan_outer_rx ${vlan_outer_rx}
| | Run Traffic Script On Node | send_icmp_check_headers.py | ${tg_node} |
| | ... | ${args}