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