CSIT-664: Refactor setups and teardowns
[csit.git] / tests / func / ipsec / eth2p-ethip6ipsectpt-ip6base-func.robot
index 12cc4e4..9c5ab83 100644 (file)
 | Library | resources.libraries.python.Trace
 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
 | ...        | VM_ENV | HW_ENV | SKIP_VPP_PATCH
-| Test Setup | Run Keywords | Set up functional test
-| ...        | AND          | Configure topology for IPv6 IPsec testing
-| Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node}
-| ...           | AND          | Tear down functional test
+| Test Setup | Set up IPv6 IPSec functional test
+| ...
+| Test Teardown | Tear down IPSec functional test | ${dut_node}
+| ...
 | Documentation | *IPv6 IPsec transport mode test suite.*
 | ...
 | ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\
@@ -57,7 +57,8 @@
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
@@ -76,7 +77,8 @@
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
@@ -95,7 +97,8 @@
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | When Configure manual keyed connection for IPSec
 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 | | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto
 | | ${new_auth_key}= | And Get Second Random String | ${auth_alg} | Integ
 | | When Update IPSec SA keys | ${dut_node} | ${l_sa_id} | ${r_sa_id}
 | | ... | ${new_encr_key} | ${new_auth_key}
-| | Then Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | Then Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${new_auth_key}
 | | ... | ${tg_spi} | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
 | | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 | | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto
 | | When Update IPSec SA keys | ${dut_node} | ${l_sa_id} | ${r_sa_id}
 | | ... | ${new_encr_key} | ${new_auth_key}
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${new_auth_key} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
 | | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 | | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto
 | | When Update IPSec SA keys | ${dut_node} | ${l_sa_id} | ${r_sa_id}
 | | ... | ${new_encr_key} | ${new_auth_key}
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${new_encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto
 | | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 | | ${new_encr_key}= | Given Get Second Random String | ${encr_alg} | Crypto
 | | When Update IPSec SA keys | ${dut_node} | ${l_sa_id} | ${r_sa_id}
 | | ... | ${new_encr_key} | ${new_auth_key}
 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
-| | ... | Send IPsec Packet and verify ESP encapsulation in received packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
+| | ... | Send IPsec Packet and verify ESP encapsulation in received packet
+| | ... | ${tg_node} | ${tg_if} | ${dut_if_mac}
 | | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi}
 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
 
 | | [Arguments] | ${req_alg} | ${req_type}
 | | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg}
 | | ${key}= | Set Variable If | '${req_type}' == 'Crypto' | ${encr_key}
-| | ...                       | '${req_type}' == 'Integ' | ${auth_key}
+| | ... | '${req_type}' == 'Integ' | ${auth_key}
 | | :FOR | ${index} | IN RANGE | 100
 | | | ${req_key}= | Generate Random String | ${req_key_len}
 | | | Return From Keyword If | '${req_key}' != '${key}' | ${req_key}