VPP_Device - add baseline tests - part IIb)
[csit.git] / tests / vpp / device / container_memif / eth2p-eth-l2xcbase-eth-2memif-1dcr-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/l2/l2_xconnect.robot
16 | Resource | resources/libraries/robot/l2/l2_traffic.robot
17 | Resource | resources/libraries/robot/shared/default.robot
18 | Resource | resources/libraries/robot/shared/memif.robot
19 | Resource | resources/libraries/robot/shared/testing_path.robot
20 | ...
21 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
22 | ... | FUNCTEST | L2XCFWD | BASE | ETH | MEMIF | DOCKER
23 | ...
24 | Test Setup | Set up VPP device test
25 | ...
26 | Test Teardown | Run Keywords
27 | ... | Tear down functional test with container
28 | ... | AND | Tear down VPP device test
29 | ... | AND | Show Memif on all DUTs | ${nodes}
30 | ...
31 | Documentation | *L2 cross-connect test cases with memif interface*
32 | ...
33 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
34 | ... | single links between nodes.
35 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
36 | ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6.
37 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect \
38 | ... | (L2XC) switching. Container is connected to VPP via Memif interface. \
39 | ... | Container is running same VPP version as running on DUT.
40 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
41 | ... | are sent in both directions by TG on links to DUT1 and via container; \
42 | ... | on receive TG verifies packets for correctness and their IPv4 (IPv6) \
43 | ... | src-addr, dst-addr and MAC addresses.
44 | ... | *[Ref] Applicable standard specifications:* RFC792
45
46 *** Variables ***
47 # Memif
48 | ${sock_base}= | memif-DUT1_CNF1
49 # Container
50 | ${container_engine}= | Docker
51 | ${container_chain_topology}= | chain_functional
52
53 # TODO: Add update of VPP PIDs after container creation
54 *** Test Cases ***
55 | tc01-eth2p-ethip4-l2xcbase-eth-2memif-1dcr-device
56 | | [Documentation]
57 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \
58 | | ... | two L2 cross-connects (L2XC), each with one untagged interface \
59 | | ... | to TG and untagged i/f to docker over memif. [Ver] Make \
60 | | ... | TG send ICMPv4 Echo Reqs in both directions between two of its \
61 | | ... | i/fs to be switched by DUT to and from docker; verify all packets \
62 | | ... | are received. [Ref]
63 | | ...
64 | | Given Configure path in 2-node circular topology
65 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
66 | | And Set up functional test with containers
67 | | And Configure interfaces in path up
68 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
69 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
70 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
71 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${memif_if1}
72 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${memif_if2}
73 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
74 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
75
76 | tc02-eth2p-ethip6-l2xcbase-eth-2memif-1dcr-device
77 | | [Documentation]
78 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure\
79 | | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG\
80 | | ... | and untagged i/f to docker over memif. [Ver] Make TG send\
81 | | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to\
82 | | ... | be switched by DUT to and from docker; verify all packets are\
83 | | ... | received. [Ref]
84 | | ...
85 | | Given Configure path in 2-node circular topology
86 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
87 | | And Set up functional test with containers
88 | | And Configure interfaces in path up
89 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
90 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
91 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
92 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${memif_if1}
93 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${memif_if2}
94 | | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
95 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}