VPP_Device - add baseline tests - part IIb)
[csit.git] / tests / vpp / device / container_memif / eth2p-eth-l2bdbasemaclrn-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_bridge_domain.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 | L2BDMACLRN | 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 bridge-domain test cases with memif interface*
32 | ...
33 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
34 | ... | with 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 use. Both apply to all \
37 | ... | links.
38 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-domain \
39 | ... | switching. Container is connected to VPP via Memif interface. \
40 | ... | Container is running same VPP version as running on DUT.
41 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
42 | ... | are sent in both directions by TG on links to DUT1 and via container; \
43 | ... | on receive TG verifies packets for correctness and their IPv4 (IPv6) \
44 | ... | src-addr, dst-addr and MAC addresses.pecifications:* RFC792
45
46 *** Variables ***
47 # L2BD
48 | ${bd_id1}= | 1
49 | ${bd_id2}= | 2
50 # Memif
51 | ${sock_base}= | memif-DUT1_CNF1
52 # Container
53 | ${container_engine}= | Docker
54 | ${container_chain_topology}= | chain_functional
55
56 # TODO: Add update of VPP PIDs after container creation
57 *** Test Cases ***
58 | tc01-eth2p-ethip4-l2bdbase-eth-2memif-1dcr-device
59 | | [Documentation]
60 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv4-ICMPv4. [Cfg] Configure two \
61 | | ... | L2 bridge-domains (L2BD) with MAC learning enabled on DUT1, each \
62 | | ... | with one untagged interface to TG and untagged i/f to docker over \
63 | | ... | memif. [Ver] Make TG send ICMPv4 Echo Req in both directions between \
64 | | ... | two of its interfaces to be switched by DUT1; verify all packets are \
65 | | ... | received.
66 | | ...
67 | | Given Configure path in 2-node circular topology
68 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
69 | | And Set up functional test with containers
70 | | And Configure interfaces in path up
71 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
72 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
73 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
74 | | And Create bridge domain | ${dut_node} | ${bd_id1}
75 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
76 | | ... | ${bd_id1}
77 | | And Add interface to bridge domain | ${dut_node} | ${memif_if1}
78 | | ... | ${bd_id1}
79 | | And Create bridge domain | ${dut_node} | ${bd_id2}
80 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
81 | | ... | ${bd_id2}
82 | | And Add interface to bridge domain | ${dut_node} | ${memif_if2}
83 | | ... | ${bd_id2}
84 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
85 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
86
87 | tc02-eth2p-ethip6-l2bdbase-eth-2memif-1dcr-device
88 | | [Documentation]
89 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv6-ICMPv6. [Cfg] Configure two \
90 | | ... | L2 bridge-domains (L2BD) with MAC learning enabled on DUT1, each \
91 | | ... | with one untagged interface to TG and untagged i/f to docker over \
92 | | ... | memif. [Ver] Make TG send ICMPv4 Echo Req in both directions between \
93 | | ... | two of its interfaces to be switched by DUT1; verify all packets are \
94 | | ... | received.
95 | | ...
96 | | Given Configure path in 2-node circular topology
97 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
98 | | And Set up functional test with containers
99 | | And Configure interfaces in path up
100 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
101 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
102 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
103 | | And Create bridge domain | ${dut_node} | ${bd_id1}
104 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
105 | | ... | ${bd_id1}
106 | | And Add interface to bridge domain | ${dut_node} | ${memif_if1}
107 | | ... | ${bd_id1}
108 | | And Create bridge domain | ${dut_node} | ${bd_id2}
109 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
110 | | ... | ${bd_id2}
111 | | And Add interface to bridge domain | ${dut_node} | ${memif_if2}
112 | | ... | ${bd_id2}
113 | | Then Send ICMPv6 bidirectionally and verify received packets
114 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}