aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared/traffic.robot
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-07-11 09:36:44 +0000
committerPeter Mikus <pmikus@cisco.com>2019-07-12 13:20:21 +0000
commit1f2723170ac74555aa505ab3cb772ded76501362 (patch)
tree49000b6b1d1a7f6b6ef5d1efb778de8792fabf0f /resources/libraries/robot/shared/traffic.robot
parent33fb34665214bbbd0a4b3154169b21c2da01f69b (diff)
VPPD: Cop, iACL, Policer
- Alignment with PERF Change-Id: Id7b2cb91c88e44cf9265c3376330f6aa579abf7a Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/robot/shared/traffic.robot')
-rw-r--r--resources/libraries/robot/shared/traffic.robot31
1 files changed, 30 insertions, 1 deletions
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index 4ec5496e84..c930bcf92e 100644
--- a/resources/libraries/robot/shared/traffic.robot
+++ b/resources/libraries/robot/shared/traffic.robot
@@ -17,10 +17,10 @@
| Library | resources.libraries.python.InterfaceUtil
| Library | resources.libraries.python.IPv6Util
| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.Policer
| Library | resources.libraries.python.topology.Topology
| Library | resources.libraries.python.TrafficScriptExecutor
| ...
-| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/shared/counters.robot
| ...
| Documentation | Traffic keywords
@@ -552,3 +552,32 @@
| | ${args}= | Catenate | ${args} | --h_num ${hops} | --src_nh_mac ${src_nh_mac}
| | ... | --dst_nh_mac ${dst_nh_mac} | --is_dst_tg ${is_dst_tg}
| | Run Traffic Script On Node | icmpv6_echo_req_resp.py | ${tx_node} | ${args}
+
+| Send packet and verify marking
+| | [Documentation] | Send packet and verify DSCP of the received packet.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - TG node. Type: dictionary
+| | ... | - tx_if - TG transmit interface. Type: string
+| | ... | - rx_if - TG receive interface. Type: string
+| | ... | - src_mac - Packet source MAC. Type: string
+| | ... | - dst_mac - Packet destination MAC. Type: string
+| | ... | - src_ip - Packet source IP address. Type: string
+| | ... | - dst_ip - Packet destination IP address. Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| Send packet and verify marking \| ${nodes['TG']} \| eth1 \| eth2 \
+| | ... | \| 08:00:27:87:4d:f7 \| 52:54:00:d4:d8:22 \| 192.168.122.2 \
+| | ... | \| 192.168.122.1 \|
+| | ...
+| | [Arguments] | ${node} | ${tx_if} | ${rx_if} | ${src_mac} | ${dst_mac}
+| | ... | ${src_ip} | ${dst_ip}
+| | ...
+| | ${dscp}= | DSCP AF22
+| | ${tx_if_name}= | Get Interface Name | ${node} | ${tx_if}
+| | ${rx_if_name}= | Get Interface Name | ${node} | ${rx_if}
+| | ${args}= | Traffic Script Gen Arg | ${rx_if_name} | ${tx_if_name}
+| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
+| | ${dscp_num}= | Get DSCP Num Value | ${dscp}
+| | ${args}= | Set Variable | ${args} --dscp ${dscp_num}
+| | Run Traffic Script On Node | policer.py | ${node} | ${args}