VPP_Device - add baseline tests - part I
[csit.git] / tests / vpp / device / l2bd / eth2p-eth-l2bdbasemaclrn-dev.robot
1 # Copyright (c) 2018 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/interfaces.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 | ICMP
23 | ...
24 | Test Setup | Set up VPP device test
25 | ...
26 | Test Teardown | Tear down VPP device test
27 | ...
28 | Documentation | *L2 bridge-domain test cases*
29 | ...
30 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
31 | ... | with 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 use. Both apply to all\
34 | ... | links.
35 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-domain\
36 | ... | switching.
37 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets\
38 | ... | are sent in both directions by TG on links to DUT1; on receive TG\
39 | ... | verifies packets for correctness and their IPv4 (IPv6) src-addr,\
40 | ... | dst-addr and MAC addresses.
41 | ... | *[Ref] Applicable standard specifications:* RFC792
42
43 *** Variables ***
44 | ${bd_id}= | 1
45
46 *** Test Cases ***
47 | tc01-eth2p-ethicmpv4-l2bdbase-device
48 | | [Documentation]
49 | | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv4-ICMPv4.
50 | | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on\
51 | | ... | DUT1. Add both interfaces towards TG to this L2BD.
52 | | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of\
53 | | ... | its interfaces to be switched by DUT1; verify all packets are\
54 | | ... | received.
55 | | ...
56 | | Given Configure path in 2-node circular topology
57 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
58 | | And Set interfaces in path up
59 | | And Create bridge domain | ${dut_node} | ${bd_id}
60 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
61 | | ... | ${bd_id}
62 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
63 | | ... | ${bd_id}
64 | | When All Vpp Interfaces Ready Wait | ${nodes}
65 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
66 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
67
68 | tc02-eth2p-ethicmpv6-l2bdbase-device
69 | | [Documentation]
70 | | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv6-ICMPv6.
71 | | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on\
72 | | ... | DUT1. Add both interfaces towards TG to this L2BD.
73 | | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of\
74 | | ... | its interfaces to be switched by DUT1; verify all packets are\
75 | | ... | received.
76 | | ...
77 | | Given Configure path in 2-node circular topology
78 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
79 | | And Set interfaces in path up
80 | | And Create bridge domain | ${dut_node} | ${bd_id}
81 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
82 | | ... | ${bd_id}
83 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
84 | | ... | ${bd_id}
85 | | When All Vpp Interfaces Ready Wait | ${nodes}
86 | | Then Send ICMPv6 bidirectionally and verify received packets
87 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}