aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r--resources/libraries/robot/shared/counters.robot10
-rw-r--r--resources/libraries/robot/shared/default.robot2
-rw-r--r--resources/libraries/robot/shared/traffic.robot50
3 files changed, 54 insertions, 8 deletions
diff --git a/resources/libraries/robot/shared/counters.robot b/resources/libraries/robot/shared/counters.robot
index 728e8c8b55..2746a1abc9 100644
--- a/resources/libraries/robot/shared/counters.robot
+++ b/resources/libraries/robot/shared/counters.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -12,15 +12,11 @@
# limitations under the License.
*** Settings ***
-| Documentation | VPP counters keywords
| Library | resources.libraries.python.VppCounters
+| ...
+| Documentation | VPP counters keywords
*** Keywords ***
-| Clear interface counters on all vpp nodes in topology
-| | [Documentation] | Clear interface counters on all VPP nodes in topology
-| | [Arguments] | ${nodes}
-| | Clear Interface Counters on all DUTs | ${nodes}
-
| Clear all counters on all DUTs
| | [Documentation] | Clear runtime, interface, hardware and error counters
| | ... | on all DUTs with VPP instance
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index d867e79da9..751fbc3e6e 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -30,6 +30,7 @@
| Library | resources.libraries.python.PapiHistory
| Library | resources.libraries.python.SchedUtils
| Library | resources.libraries.python.Tap
+| Library | resources.libraries.python.TestConfig
| Library | resources.libraries.python.TGSetup
| Library | resources.libraries.python.topology.Topology
| Library | resources.libraries.python.Trace
@@ -53,6 +54,7 @@
| Resource | resources/libraries/robot/shared/counters.robot
| Resource | resources/libraries/robot/shared/interfaces.robot
| Resource | resources/libraries/robot/shared/container.robot
+| Resource | resources/libraries/robot/shared/memif.robot
| Resource | resources/libraries/robot/shared/suite_teardown.robot
| Resource | resources/libraries/robot/shared/suite_setup.robot
| Resource | resources/libraries/robot/shared/test_teardown.robot
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index 173a52ee92..9a0728a967 100644
--- a/resources/libraries/robot/shared/traffic.robot
+++ b/resources/libraries/robot/shared/traffic.robot
@@ -839,4 +839,52 @@
| | ... | --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
+| | ... | ${tg_node} | ${args}
+
+| Send IPsec Packet and verify ESP encapsulation in received packet
+| | [Documentation] | Send IPsec packet from TG to DUT. Receive IPsec packet\
+| | ... | from DUT on TG and verify ESP encapsulation.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - TG node. Type: dictionary
+| | ... | - interface - TG Interface. Type: string
+| | ... | - dst_mac - Destination MAC. Type: string
+| | ... | - crypto_alg - Encrytion algorithm. Type: enum
+| | ... | - crypto_key - Encryption key. Type: string
+| | ... | - integ_alg - Integrity algorithm. Type: enum
+| | ... | - integ_key - Integrity key. Type: string
+| | ... | - l_spi - Local SPI. Type: integer
+| | ... | - r_spi - Remote SPI. Type: integer
+| | ... | - l_ip - Local IP address. Type: string
+| | ... | - r_ip - Remote IP address. Type: string
+| | ... | - l_tunnel - Local tunnel IP address (optional). Type: string
+| | ... | - r_tunnel - Remote tunnel IP address (optional). Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| ${encr_alg}= \| Crypto Alg AES CBC 128 \|
+| | ... | \| ${auth_alg}= \| Integ Alg SHA1 96 \|
+| | ... | \| Send IPsec Packet and verify ESP encapsulation in received packet\
+| | ... | \| ${nodes['TG']} \| eth1 \
+| | ... | \| 52:54:00:d4:d8:22 \| ${encr_alg} \| sixteenbytes_key \
+| | ... | \| ${auth_alg} \| twentybytessecretkey \| ${1001} \| ${1000} \
+| | ... | \| 192.168.3.3 \| 192.168.4.4 \| 192.168.100.2 \| 192.168.100.3 \|
+| | ...
+| | [Arguments] | ${node} | ${interface} | ${dst_mac} | ${crypto_alg}
+| | ... | ${crypto_key} | ${integ_alg} | ${integ_key} | ${l_spi}
+| | ... | ${r_spi} | ${l_ip} | ${r_ip} | ${l_tunnel}=${None}
+| | ... | ${r_tunnel}=${None}
+| | ...
+| | ${src_mac}= | Get Interface Mac | ${node} | ${interface}
+| | ${if_name}= | Get Interface Name | ${node} | ${interface}
+| | ${args}= | Traffic Script Gen Arg | ${if_name} | ${if_name} | ${src_mac}
+| | ... | ${dst_mac} | ${l_ip} | ${r_ip}
+| | ${crypto_alg_str}= | Get Crypto Alg Scapy Name | ${crypto_alg}
+| | ${integ_alg_str}= | Get Integ Alg Scapy Name | ${integ_alg}
+| | ${args}= | Catenate | ${args} | --crypto_alg ${crypto_alg_str}
+| | ... | --crypto_key ${crypto_key} | --integ_alg ${integ_alg_str}
+| | ... | --integ_key ${integ_key} | --l_spi ${l_spi} | --r_spi ${r_spi}
+| | ${args}= | Set Variable If | "${l_tunnel}" == "${None}" | ${args}
+| | ... | ${args} --src_tun ${l_tunnel}
+| | ${args}= | Set Variable If | "${r_tunnel}" == "${None}" | ${args}
+| | ... | ${args} --dst_tun ${r_tunnel}
+| | Run Traffic Script On Node | ipsec.py | ${node} | ${args}