HC Test: create Vlan sub-interface using netconf
[csit.git] / resources / libraries / robot / ipsec.robot
index b393fa6..92b292e 100644 (file)
 | | VPP Set If IPv6 Addr | ${dut_node} | ${dut_lo} | ${dut_lo_ip6} | ${ip6_plen}
 | | Add IP Neighbor | ${dut_node} | ${dut_if} | ${tg_if_ip6} | ${tg_if_mac}
 | | Vpp All RA Suppress Link Layer | ${nodes}
-| | Vpp Route Add | ${dut_node} | ${tg_lo_ip6} | ${ip6_plen} | ${tg_if_ip6}
+| | Vpp Route Add | ${dut_node} | ${tg_lo_ip6} | ${ip6_plen_rt} | ${tg_if_ip6}
 | | ...           | ${dut_if}
 | | Set Test Variable | ${dut_tun_ip} | ${dut_if_ip6}
 | | Set Test Variable | ${dut_src_ip} | ${dut_lo_ip6}
 | | ... | - l_tunnel - Local tunnel IP address (optional). Type: string
 | | ... | - r_tunnel - Remote tunnel IP address (optional). Type: string
 | | ...
+| | ... | _NOTE:_ This KW sets following test case variables:
+| | ... | - l_sa_id
+| | ... | - r_sa_id
+| | ...
 | | ... | *Example:*
 | | ... | \| ${encr_alg}= \| Crypto Alg AES CBC 128 \|
 | | ... | \| ${auth_alg}= \| Integ Alg SHA1 96 \|
 | | [Arguments] | ${node} | ${interface} | ${crypto_alg} | ${crypto_key}
 | | ...         | ${integ_alg} | ${integ_key} | ${l_spi} | ${r_spi} | ${l_ip}
 | | ...         | ${r_ip} | ${l_tunnel}=${None} | ${r_tunnel}=${None}
-| | ${l_sa_id}= | Set Variable | ${10}
-| | ${r_sa_id}= | Set Variable | ${20}
+| | Set Test Variable | ${l_sa_id} | ${10}
+| | Set Test Variable | ${r_sa_id} | ${20}
 | | ${spd_id}= | Set Variable | ${1}
 | | ${p_hi}= | Set Variable | ${100}
 | | ${p_lo}= | Set Variable | ${10}
 | | ...                     | sa_id=${l_sa_id} | laddr_range=${l_ip}
 | | ...                     | raddr_range=${r_ip} | inbound=${FALSE}
 
+| VPP Update IPsec SA Keys
+| | [Documentation] | Update IPsec SA keys on VPP node.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - VPP node to update SA keys. Type: dictionary
+| | ... | - l_sa_id - Local SA ID. Type: string
+| | ... | - r_sa_id - Remote SA ID. Type: string
+| | ... | - crypto_key - Encryption key. Type: string
+| | ... | - integ_key - Integrity key. Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| VPP Update IPsec SA Keys \| ${nodes['DUT1']} \
+| | ... | \| 10 \| 20 \| sixteenbytes_key \| twentybytessecretkey \|
+| | [Arguments] | ${node} | ${l_sa_id} | ${r_sa_id} | ${crypto_key}
+| | ...         | ${integ_key}
+| | VPP IPsec SA Set Key | ${dut_node} | ${l_sa_id} | ${crypto_key}
+| | ...                  | ${integ_key}
+| | VPP IPsec SA Set Key | ${dut_node} | ${r_sa_id} | ${crypto_key}
+| | ...                  | ${integ_key}
+
 | Send and Receive IPsec Packet
 | | [Documentation] | Send IPsec packet from TG to DUT. Receive IPsec packet\
 | | ...             | from DUT on TG and verify ESP encapsulation.