Introduce simple VAT history per test case
[csit.git] / tests / func / tap / eth2p-eth-l2bdbasemaclrn-eth-2tap-func.robot
1 # Copyright (c) 2016 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/default.robot
16 | Resource | resources/libraries/robot/ipv4.robot
17 | Resource | resources/libraries/robot/ipv6.robot
18 | Resource | resources/libraries/robot/interfaces.robot
19 | Resource | resources/libraries/robot/bridge_domain.robot
20 | Resource | resources/libraries/robot/testing_path.robot
21 | Resource | resources/libraries/robot/traffic.robot
22 | Library  | resources.libraries.python.Trace
23 | Library  | resources.libraries.python.Tap
24 | Library  | resources.libraries.python.Namespaces
25 | Library  | resources.libraries.python.IPUtil
26 | Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO
27 | Test Setup | Run Keywords | Func Test Setup
28 | ...        | AND          | Clean Up Namespaces | ${nodes['DUT1']}
29 | Test Teardown | Run Keywords | Func Test Teardown
30 | ... | AND | Linux Del Bridge | ${nodes['DUT1']} | ${bid_TAP}
31 | ... | AND | Clean Up Namespaces | ${nodes['DUT1']}
32 | Documentation | *Tap Interface Traffic Tests*
33 | ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links
34 | ... | between nodes.
35 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of
36 | ... | IPv4.
37 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
38 | ... | bridge-domain (L2BD) MAC learning enabled; Split Horizon Groups (SHG)
39 | ... | are set depending on test case; Namespaces (NM)
40 | ... | are set on DUT1 with attached linux-TAP.
41 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets
42 | ... | are sent by TG on link to DUT1; On receipt TG verifies packets
43 | ... | for correctness and their IPv4 src-addr, dst-addr, and MAC addresses.
44 | ... | *[Ref] Applicable standard specifications:*
45
46 *** Variables ***
47 | ${bid_from_TG}= | 19
48 | ${bid_to_TG}= | 20
49 | ${bid_TAP}= | tapBr
50
51 | ${tap_int1}= | tap_int1
52 | ${tap_int2}= | tap_int2
53
54 *** Test Cases ***
55 | TC01: Tap Interface Simple BD
56 | | [Documentation]
57 | | ... | [Top] TG-DUT1-TG.
58 | | ... | [Enc] Eth-IPv4-ICMPv4.
59 | | ... | [Cfg] On DUT1 configure two
60 | | ... | L2BD with two if's for each L2BD with MAC learning and one L2BD
61 | | ... | joining two linux-TAP interfaces created by VPP located in namespace.
62 | | ... | [Ver] Packet sent from TG is passed through all L2BD and received
63 | | ... | back on TG. Then src_ip, dst_ip and MAC are checked.
64 | | ...
65 | | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']}
66 | | ... | ${nodes['TG']}
67 | | And Interfaces in 2-node path are up
68 | | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1}
69 | | ${int2}= | And Add Tap Interface | ${dut_node} | ${tap_int2}
70 | | And Set Interface State | ${dut_node} | ${int1} | up
71 | | And Set Interface State | ${dut_node} | ${int2} | up
72 | | And Bridge domain on DUT node is created | ${dut_node}
73 | | ... | ${bid_from_TG} | learn=${TRUE}
74 | | And Bridge domain on DUT node is created | ${dut_node}
75 | | ... | ${bid_to_TG} | learn=${TRUE}
76 | | And Linux Add Bridge | ${dut_node}
77 | | ... | ${bid_TAP} | ${tap_int1} | ${tap_int2}
78 | | And Interface is added to bridge domain | ${dut_node}
79 | | ... | ${int1} | ${bid_to_TG} | 0
80 | | And Interface is added to bridge domain | ${dut_node}
81 | | ... | ${dut_to_tg_if1} | ${bid_to_TG} | 0
82 | | And Interface is added to bridge domain | ${dut_node}
83 | | ... | ${int2} | ${bid_from_TG} | 0
84 | | And Interface is added to bridge domain | ${dut_node}
85 | | ... | ${dut_to_tg_if2} | ${bid_from_TG} | 0
86 | | Then Send and receive ICMP Packet | ${tg_node}
87 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}