aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-07-26 10:47:30 +0000
committerPeter Mikus <pmikus@cisco.com>2019-07-29 05:44:37 +0000
commitb5ee1c015e90ff59c1c5841654206c0576576e4c (patch)
treea4f9529fc0f8ff678049fd9bd46c98e2ecf55c4a /resources/libraries/robot/shared
parent0e853acbf246dde97bf8b376cffca1aefdf1aa7b (diff)
Remove obsolete L2 KW
Change-Id: I9a8aa6f5ccf95d632f4e677c8bf14f50b982d930 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r--resources/libraries/robot/shared/traffic.robot210
1 files changed, 210 insertions, 0 deletions
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index b29f7af49d..173a52ee92 100644
--- a/resources/libraries/robot/shared/traffic.robot
+++ b/resources/libraries/robot/shared/traffic.robot
@@ -630,3 +630,213 @@
| | ... | --rx_vni ${rx_vni}
| | Run Traffic Script On Node | send_vxlan_check_vxlan.py | ${tg_node}
| | ... | ${args}
+
+| Send Packet And Check Received Copies
+| | [Documentation] | Sends an ARP or ICMP packet from TG to DUT using one\
+| | ... | link, then receive a copy of both the sent packet and the DUT's reply\
+| | ... | on the second link.
+| | ...
+| | ... | Used by Honeycomb.
+| | ...
+| | ... | *Arguments:*
+| | ...
+| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
+| | ... | - tx_src_port - First interface on TG. Type: string
+| | ... | - tx_src_mac - MAC address of the first interface on TG. Type: string
+| | ... | - tx_dst_mac - MAC address of the first interface on DUT. Type: string
+| | ... | - rx_port - Second interface on TG. Type: string
+| | ... | - src_ip - Packet source IP address. Type: string
+| | ... | - dst_ip - Packet destination IP address. Type: string
+| | ... | - ptype - Type of payload, ARP, ICMP or ICMPv6. Type: string
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Send Packet And Check Received Copies \| ${nodes['TG']} \| eth1 \
+| | ... | \| 8:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
+| | ... | \| eth3 \| 192.168.0.2 \| 192.168.0.3 \| ARP \|
+| | ...
+| | [Arguments] | ${tg_node} | ${tx_src_port}
+| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port}
+| | ... | ${src_ip} | ${dst_ip} | ${ptype}
+| | ${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} --dut_if1_mac ${tx_dst_mac}
+| | ... | --src_ip ${src_ip} --dst_ip ${dst_ip}
+| | ... | --tx_if ${tx_port_name} --rx_if | ${rx_port_name}
+| | ... | --ptype ${ptype}
+| | Run Traffic Script On Node | span_check.py | ${tg_node} |
+| | ... | ${args}
+
+| Send ICMPv4 and check received GRE header
+| | [Documentation] | Send ICMPv4 packet and check if received packed contains \
+| | ... | correct GRE, IP, MAC headers.
+| | ...
+| | ... | *Arguments:*
+| | ... | - tg_node - Node where to run traffic script. Type: dictionary
+| | ... | - tx_if - Interface from where send ICPMv4 packet. Type: string
+| | ... | - rx_if - Interface where to receive GRE packet. Type: string
+| | ... | - tx_dst_mac - Destination MAC address of ICMP packet. Type: string
+| | ... | - rx_dst_mac - Expected destination MAC address of GRE packet.
+| | ... | Type: string
+| | ... | - inner_src_ip - Source IP address of ICMP packet. Type: string
+| | ... | - inner_dst_ip - Destination IP address of ICMP packet.
+| | ... | Type: string
+| | ... | - outer_src_ip - Source IP address of GRE packet. Type: string
+| | ... | - outer_dst_ip - Destination IP address of GRE packet.
+| | ... | Type: string
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Send ICMPv4 and check received GRE header \
+| | ... | \| ${tg_node} \| ${tg_to_dut_if1} \| ${tg_to_dut_if2} \
+| | ... | \| ${tx_dst_mac} \| ${rx_dst_mac} \| ${net1_host_address} \
+| | ... | \| ${net2_host_address} \| ${dut1_ip_address} \| ${dut2_ip_address} \|
+| | ...
+| | [Arguments] | ${tg_node} | ${tx_if} | ${rx_if}
+| | ... | ${tx_dst_mac} | ${rx_dst_mac}
+| | ... | ${inner_src_ip} | ${inner_dst_ip}
+| | ... | ${outer_src_ip} | ${outer_dst_ip}
+| | ${tx_if_name}= | Get interface name | ${tg_node} | ${tx_if}
+| | ${rx_if_name}= | Get interface name | ${tg_node} | ${rx_if}
+| | ${args}= | Catenate | --tx_if | ${tx_if_name} | --rx_if | ${rx_if_name}
+| | ... | --tx_dst_mac | ${tx_dst_mac} | --rx_dst_mac | ${rx_dst_mac}
+| | ... | --inner_src_ip | ${inner_src_ip} | --inner_dst_ip | ${inner_dst_ip}
+| | ... | --outer_src_ip | ${outer_src_ip} | --outer_dst_ip | ${outer_dst_ip}
+| | Run Traffic Script On Node
+| | ... | send_icmp_check_gre_headers.py | ${tg_node} | ${args}
+
+
+| Send GRE and check received ICMPv4 header
+| | [Documentation] | Send IPv4 ICMPv4 packet encapsulated into GRE and \
+| | ... | check IP, MAC headers on received packed.
+| | ...
+| | ... | *Arguments:*
+| | ... | - tg_node - Node where to run traffic script. Type: dictionary
+| | ... | - tx_if - Interface from where send ICPMv4 packet. Type: string
+| | ... | - rx_if - Interface where receive GRE packet. Type: string
+| | ... | - tx_dst_mac - Destination MAC address of GRE packet. Type: string
+| | ... | - rx_dst_mac - Expected destination MAC address of ICMP packet.
+| | ... | Type: string
+| | ... | - inner_src_ip - Source IP address of ICMP packet. Type: string
+| | ... | - inner_dst_ip - Destination IP address of ICMP packet.
+| | ... | Type: string
+| | ... | - outer_src_ip - Source IP address of GRE packet. Type: string
+| | ... | - outer_dst_ip - Destination IP address of GRE packet.
+| | ... | Type: string
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Send GRE and check received ICMPv4 header \| ${tg_node} \
+| | ... | \| ${tg_to_dut_if2} \| ${tg_to_dut_if1} \| ${tx_dst_mac} \
+| | ... | \| ${rx_dst_mac} \| ${net2_host_address} \| ${net1_host_address} \
+| | ... | \| ${dut2_ip_address} \| ${dut1_ip_address} \|
+| | ...
+| | [Arguments] | ${tg_node} | ${tx_if} | ${rx_if}
+| | ... | ${tx_dst_mac} | ${rx_dst_mac}
+| | ... | ${inner_src_ip} | ${inner_dst_ip}
+| | ... | ${outer_src_ip} | ${outer_dst_ip}
+| | ${tx_if_name}= | Get interface name | ${tg_node} | ${tx_if}
+| | ${rx_if_name}= | Get interface name | ${tg_node} | ${rx_if}
+| | ${args}= | Catenate | --tx_if | ${tx_if_name} | --rx_if | ${rx_if_name}
+| | ... | --tx_dst_mac | ${tx_dst_mac} | --rx_dst_mac | ${rx_dst_mac}
+| | ... | --inner_src_ip | ${inner_src_ip} | --inner_dst_ip | ${inner_dst_ip}
+| | ... | --outer_src_ip | ${outer_src_ip} | --outer_dst_ip | ${outer_dst_ip}
+| | Run Traffic Script On Node
+| | ... | send_gre_check_icmp_headers.py | ${tg_node} | ${args}
+
+| Send GRE and check received GRE header
+| | [Documentation] | Send IPv4 UDP packet encapsulated into GRE and \
+| | ... | check if received packed contains correct MAC GRE, IP, UDP headers.
+| | ...
+| | ... | *Arguments:*
+| | ... | - tg_node - Node where to run traffic script. Type: dictionary
+| | ... | - tx_if - Interface from where send GRE packet. Type: string
+| | ... | - rx_if - Interface where to receive GRE packet. Type: string
+| | ... | - tx_dst_mac - Destination MAC address of transferred packet.
+| | ... | Type: string
+| | ... | - tx_src_mac - Source MAC address of transferred packet. Type: string
+| | ... | - tx_outer_dst_ip - Destination IP address of GRE packet. Type: string
+| | ... | - tx_outer_src_ip - Source IP address of GRE packet. Type: string
+| | ... | - tx_inner_dst_ip - Destination IP address of UDP packet. Type: string
+| | ... | - tx_inner_src_ip - Source IP address of UDP packet. Type: string
+| | ... | - rx_dst_mac - Expected destination MAC address. Type: string
+| | ... | - rx_src_mac - Expected source MAC address. Type: string
+| | ... | - rx_outer_dst_ip - Expected destination IP address of received GRE
+| | ... | packet. Type: string
+| | ... | - rx_outer_src_ip - Expected source IP address of received GRE
+| | ... | packet. Type: string
+| | ...
+| | ... | __Note:__
+| | ... | rx_inner_dst_ip and rx_inner_src_ip should be same as transferred
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ... | \| Send GRE and check received GRE header \| ${tg_node} \
+| | ... | \| port3 \| port3 \| 08:00:27:f3:be:f0 \| 08:00:27:46:2b:4c \
+| | ... | \| 10.0.0.1 \| 10.0.0.2 \| 192.168.3.100 \| 192.168.2.100 \
+| | ... | \| 08:00:27:46:2b:4c \| 08:00:27:f3:be:f0 \| 10.0.0.3 \| 10.0.0.1 \|
+| | ...
+| | [Arguments] | ${tg_node} | ${tx_if} | ${rx_if}
+| | ... | ${tx_dst_mac} | ${tx_src_mac}
+| | ... | ${tx_outer_dst_ip} | ${tx_outer_src_ip}
+| | ... | ${tx_inner_dst_ip} | ${tx_inner_src_ip}
+| | ... | ${rx_dst_mac} | ${rx_src_mac}
+| | ... | ${rx_outer_dst_ip} | ${rx_outer_src_ip}
+| | ${tx_if_name}= | Get interface name | ${tg_node} | ${tx_if}
+| | ${rx_if_name}= | Get interface name | ${tg_node} | ${rx_if}
+| | ${args}= | Catenate | --tx_if | ${tx_if_name} | --rx_if | ${rx_if_name}
+| | ... | --tx_dst_mac | ${tx_dst_mac} | --tx_src_mac | ${tx_src_mac}
+| | ... | --tx_outer_dst_ip | ${tx_outer_dst_ip}
+| | ... | --tx_outer_src_ip | ${tx_outer_src_ip}
+| | ... | --tx_inner_dst_ip | ${tx_inner_dst_ip}
+| | ... | --tx_inner_src_ip | ${tx_inner_src_ip}
+| | ... | --rx_dst_mac | ${rx_dst_mac}
+| | ... | --rx_src_mac | ${rx_src_mac}
+| | ... | --rx_outer_dst_ip | ${rx_outer_dst_ip}
+| | ... | --rx_outer_src_ip | ${rx_outer_src_ip}
+| | Run Traffic Script On Node
+| | ... | send_gre_check_gre_headers.py | ${tg_node} | ${args}
+
+| Send ICMP echo request and verify answer
+| | [Documentation] | Run traffic script that waits for ICMP reply and ignores
+| | ... | all other packets.
+| | ...
+| | ... | *Arguments:*
+| | ... | - tg_node - TG node where run traffic script. Type: dictionary
+| | ... | - tg_interface - TG interface where send ICMP echo request.
+| | ... | Type: string
+| | ... | - dst_mac - Destination MAC address. Type: string
+| | ... | - src_mac - Source MAC address. Type: string
+| | ... | - dst_ip - Destination IP address. Type: string
+| | ... | - src_ip - Source IP address. Type: string
+| | ... | - timeout - Wait timeout in seconds (Default: 10). Type: integer
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Send ICMP echo request and verify answer \
+| | ... | \| ${nodes['TG']} \| eth2 \
+| | ... | \| 08:00:27:46:2b:4c \| 08:00:27:66:b8:57 \
+| | ... | \| 192.168.23.10 \| 192.168.23.1 \| 10 \|
+| | ...
+| | [Arguments] | ${tg_node} | ${tg_interface}
+| | ... | ${dst_mac} | ${src_mac} | ${dst_ip} | ${src_ip} | ${timeout}=${10}
+| | ...
+| | ${tg_interface_name}= | Get interface name | ${tg_node} | ${tg_interface}
+| | ${args}= | Catenate | --rx_if ${tg_interface_name}
+| | ... | --tx_if ${tg_interface_name} | --dst_mac ${dst_mac}
+| | ... | --src_mac ${src_mac} | --dst_ip ${dst_ip} | --src_ip ${src_ip}
+| | ... | --timeout ${timeout}
+| | Run Traffic Script On Node | send_icmp_wait_for_reply.py
+| | ... | ${tg_node} | ${args} \ No newline at end of file