Fix few pylint violations
[csit.git] / tests / vpp / device / crypto / eth2p-ethip6ipsectnl-ip6base-dev.robot
1 # Copyright (c) 2019 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/shared/default.robot
16 | ...
17 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY
18 | ... | NIC_Virtual | IP6FWD | IPSEC | IPSEC_TNL | IP6BASE
19 | ...
20 | Suite Setup | Setup suite single link | scapy
21 | Test Setup | Setup test
22 | Test Teardown | Tear down test | packet_trace
23 | ...
24 | Documentation | *IPv6 IPsec tunnel mode test suite.*
25 | ...
26 | ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\
27 | ... | between nodes.
28 | ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure
29 | ... | loopback an physical interface IPv6 addresses, static ARP record, route
30 | ... | and IPsec manual keyed connection in tunnel mode.
31 | ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet
32 | ... | is received on TG from DUT1.
33 | ... | *[Ref] Applicable standard specifications:* RFC4303.
34
35 *** Variables ***
36 | @{plugins_to_enable}= | dpdk_plugin.so | crypto_ia32_plugin.so
37 | ... | crypto_ipsecmb_plugin.so | crypto_openssl_plugin.so
38 | ${nic_name}= | virtual
39 | ${overhead}= | ${58}
40 | ${tg_spi}= | ${1000}
41 | ${dut_spi}= | ${1001}
42 | ${ESP_PROTO}= | ${50}
43 | ${tg_if_ip6}= | 3ffe:5f::1
44 | ${dut_if_ip6}= | 3ffe:5f::2
45 | ${tg_lo_ip6}= | 3ffe:60::3
46 | ${dut_lo_ip6}= | 3ffe:60::4
47 | ${ip6_plen}= | ${64}
48 | ${ip6_plen_rt}= | ${128}
49
50 *** Test Cases ***
51 | tc01-eth2p-ethip6ipsectnl-ip6base-dev-aes-128-cbc-sha-256-128
52 | | [Documentation]
53 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
54 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in tunnel\
55 | | ... | mode.
56 | | ...
57 | | Set Test Variable | ${frame_size} | ${158}
58 | | Set Test Variable | ${rxq_count_int} | ${1}
59 | | ...
60 | | Given Add PCI devices to all DUTs
61 | | And Set Max Rate And Jumbo And Handle Multi Seg
62 | | And Apply startup configuration on all VPP DUTs
63 | | And VPP Enable Traces On All Duts | ${nodes}
64 | | When Configure topology for IPv6 IPsec testing
65 | | ${encr_alg}= | Crypto Alg AES CBC 128
66 | | ${auth_alg}= | Integ Alg SHA 256 128
67 | | And Generate keys for IPSec | ${encr_alg} | ${auth_alg}
68 | | And Configure manual keyed connection for IPSec
69 | | ... | ${dut1} | ${dut1_if1} | ${encr_alg} | ${encr_key} | ${auth_alg}
70 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip}
71 | | ... | ${dut_tun_ip} | ${tg_tun_ip} | is_ipv6=${TRUE}
72 | | Then Send IPsec Packet and verify ESP encapsulation in received packet
73 | | ... | ${tg} | ${tg_if1} | ${dut1_if1_mac}
74 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
75 | | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip}
76 | | ... | ${dut_tun_ip}
77
78 | tc02-eth2p-ethip6ipsectnl-ip6base-dev-aes-128-cbc-sha-512-256
79 | | [Documentation]
80 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
81 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in tunnel\
82 | | ... | mode.
83 | | ...
84 | | Set Test Variable | ${frame_size} | ${158}
85 | | Set Test Variable | ${rxq_count_int} | ${1}
86 | | ...
87 | | Given Add PCI devices to all DUTs
88 | | And Set Max Rate And Jumbo And Handle Multi Seg
89 | | And Apply startup configuration on all VPP DUTs
90 | | And VPP Enable Traces On All Duts | ${nodes}
91 | | When Configure topology for IPv6 IPsec testing
92 | | ${encr_alg}= | Crypto Alg AES CBC 128
93 | | ${auth_alg}= | Integ Alg SHA 512 256
94 | | And Generate keys for IPSec | ${encr_alg} | ${auth_alg}
95 | | And Configure manual keyed connection for IPSec
96 | | ... | ${dut1} | ${dut1_if1} | ${encr_alg} | ${encr_key} | ${auth_alg}
97 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_src_ip} | ${tg_src_ip}
98 | | ... | ${dut_tun_ip} | ${tg_tun_ip} | is_ipv6=${TRUE}
99 | | Then Send IPsec Packet and verify ESP encapsulation in received packet
100 | | ... | ${tg} | ${tg_if1} | ${dut1_if1_mac}
101 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
102 | | ... | ${dut_spi} | ${tg_src_ip} | ${dut_src_ip} | ${tg_tun_ip}
103 | | ... | ${dut_tun_ip}