FIX: Exclude softwire func tests from execution
[csit.git] / tests / vpp / func / interfaces / eth2p-ethip4-ip4base-eth-1tap-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/shared/default.robot
16 | Resource | resources/libraries/robot/ip/ip4.robot
17 | Resource | resources/libraries/robot/ip/ip6.robot
18 | Resource | resources/libraries/robot/shared/interfaces.robot
19 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
20 | Resource | resources/libraries/robot/shared/testing_path.robot
21 | Resource | resources/libraries/robot/shared/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 | ...
27 | Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO
28 | ...
29 | Test Setup | Set up TAP functional test
30 | ...
31 | Test Teardown | Tear down TAP functional test
32 | ...
33 | Documentation | *Tap Interface Traffic Tests*
34 | ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links
35 | ... | between nodes.
36 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of
37 | ... | IPv4.
38 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
39 | ... | bridge-domain (L2BD) MAC learning enabled; Split Horizon Groups (SHG)
40 | ... | are set depending on test case; Namespaces (NM)
41 | ... | are set on DUT1 with attached linux-TAP.
42 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets
43 | ... | are sent by TG on link to DUT1; On receipt TG verifies packets
44 | ... | for correctness and their IPv4 src-addr, dst-addr, and MAC addresses.
45 | ... | *[Ref] Applicable standard specifications:*
46
47 *** Variables ***
48 | ${tap1_VPP_ip}= | 16.0.10.1
49 | ${tap1_NM_ip}= | 16.0.10.2
50 | ${tap1_NM_mac}= | 02:00:00:00:00:02
51 | ${tap_int1}= | tap_int1
52
53 | ${namespace1}= | nmspace1
54
55 | ${dut_ip_address}= | 192.168.0.1
56 | ${tg_ip_address}= | 192.168.0.2
57 | ${tg_ip_address_GW}= | 192.168.0.0
58 | ${prefix}= | 24
59
60 *** Test Cases ***
61 | TC01: Tap Interface IP Ping Without Namespace
62 | | [Documentation]
63 | | ... | [Top] TG-DUT1-TG.
64 | | ... | [Enc] Eth-IPv4-ICMPv4.
65 | | ... | [Cfg] On DUT1 configure two interface addresses with IPv4 of which\
66 | | ... | one is TAP interface (dut_to_tg_if and TAP) and one is linux-TAP.
67 | | ... | [Ver] Packet sent from TG gets to the destination and ICMP-reply is\
68 | | ... | received on TG.
69 | | ...
70 | | Given Configure path in 2-node circular topology | ${nodes['TG']}
71 | | ... | ${nodes['DUT1']} | ${nodes['TG']}
72 | | And Set interfaces in 2-node circular topology up
73 | | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} |
74 | | And Set Interface Address
75 | | ... | ${dut_node} | ${int1} | ${tap1_VPP_ip} | ${prefix}
76 | | And Set Interface Address
77 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip_address} | ${prefix}
78 | | And Set Interface State | ${dut_node} | ${int1} | up
79 | | And Set Linux Interface MAC | ${dut_node} | ${tap_int1} | ${tap1_NM_mac}
80 | | And Set Linux Interface IP | ${dut_node}
81 | | ... | ${tap_int1} | ${tap1_NM_ip} | ${prefix}
82 | | And Add Route | ${dut_node}
83 | | ... | ${tg_ip_address_GW} | ${prefix} | ${tap1_VPP_ip}
84 | | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1}
85 | | ... | ${tg_ip_address} | ${tg_to_dut_if1_mac}
86 | | And Add Arp On Dut | ${dut_node} | ${int1}
87 | | ... | ${tap1_NM_ip} | ${tap1_NM_mac}
88 | | Then Send ICMP echo request and verify answer | ${tg_node}
89 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac}
90 | | ... | ${tap1_NM_ip} | ${tg_ip_address}
91
92 | TC02: Tap Interface IP Ping With Namespace
93 | | [Documentation]
94 | | ... | [Top] TG-DUT1-TG.
95 | | ... | [Enc] Eth-IPv4-ICMPv4.
96 | | ... | [Cfg] On DUT1 configure two interface addresses with IPv4 of which\
97 | | ... | one is TAP interface (dut_to_tg_if and TAP) and one is linux-TAP in\
98 | | ... | namespace.
99 | | ... | [Ver] Packet sent from TG gets to the destination and ICMP-reply is\
100 | | ... | received on TG.
101 | | ...
102 | | Given Configure path in 2-node circular topology | ${nodes['TG']}
103 | | ... | ${nodes['DUT1']} | ${nodes['TG']}
104 | | And Set interfaces in 2-node circular topology up
105 | | ${int1}= | And Add Tap Interface | ${dut_node} | ${tap_int1} |
106 | | And Set Interface Address
107 | | ... | ${dut_node} | ${int1} | ${tap1_VPP_ip} | ${prefix}
108 | | And Set Interface Address
109 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_ip_address} | ${prefix}
110 | | And Set Interface State | ${dut_node} | ${int1} | up
111 | | When Create Namespace | ${dut_node} | ${namespace1}
112 | | And Attach Interface To Namespace | ${dut_node}
113 | | ... | ${namespace1} | ${tap_int1}
114 | | And Set Linux Interface MAC | ${dut_node}
115 | | ... | ${tap_int1} | ${tap1_NM_mac} | ${namespace1}
116 | | And Set Linux Interface IP | ${dut_node}
117 | | ... | ${tap_int1} | ${tap1_NM_ip} | ${prefix} | ${namespace1}
118 | | And Add Arp On Dut | ${dut_node} | ${dut_to_tg_if1}
119 | | ... | ${tg_ip_address} | ${tg_to_dut_if1_mac}
120 | | And Add Arp On Dut | ${dut_node} | ${int1}
121 | | ... | ${tap1_NM_ip} | ${tap1_NM_mac}
122 | | And Add Route | ${dut_node}
123 | | ... | ${tg_ip_address_GW} | ${prefix} | ${tap1_VPP_ip} | ${namespace1}
124 | | Then Send ICMP echo request and verify answer | ${tg_node}
125 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac}
126 | | ... | ${tap1_NM_ip} | ${tg_ip_address}