6f3f9b4df1855b2c7e63b236e967301fac1db301
[csit.git] / tests / suites / l2_xconnect / l2_xconnect_untagged.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/l2_xconnect.robot
17 | Resource | resources/libraries/robot/l2_traffic.robot
18 | Resource | resources/libraries/robot/testing_path.robot
19 | Resource | resources/libraries/robot/interfaces.robot
20 | Resource | resources/libraries/robot/bridge_domain.robot
21 | Resource | resources/libraries/robot/qemu.robot
22 | Library  | resources.libraries.python.Trace
23 | Library | resources.libraries.python.NodePath
24 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV
25 | Test Setup | Setup all DUTs before test
26 | Suite Setup | Setup all TGs before traffic script
27
28 *** Variables ***
29 | ${sock1}= | /tmp/sock1
30 | ${sock2}= | /tmp/sock2
31
32 *** Test Cases ***
33 | Vpp forwards ICMPv4 packets via L2 xconnect in circular topology
34 | | [Documentation] | Setup single link path with X-connect
35 | | ...             | and send ICMPv4 packet.
36 | | Given Path for 3-node testing is set
37 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
38 | | And Interfaces in 3-node path are up
39 | | And L2 setup xconnect on DUT
40 | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_dut2}
41 | | And L2 setup xconnect on DUT
42 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
43 | | When All Vpp Interfaces Ready Wait | ${nodes}
44 | | Then Send and receive ICMPv4 bidirectionally
45 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
46
47 | Vpp forwards ICMPv6 packets via L2 xconnect in circular topology
48 | | [Documentation] | Setup single link path with X-connect
49 | | ...             | and send ICMPv6 packet.
50 | | Given Path for 3-node testing is set
51 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
52 | | And Interfaces in 3-node path are up
53 | | And L2 setup xconnect on DUT
54 | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_dut2}
55 | | And L2 setup xconnect on DUT
56 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
57 | | When All Vpp Interfaces Ready Wait | ${nodes}
58 | | Then Send and receive ICMPv6 bidirectionally
59 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
60
61 | VPP forwards ICMPv4 packets through VM via L2 x-connect
62 | | [Documentation] | Setup double link path with X-connect via Vhost user
63 | | ...             | and send ICMPv4 packet.
64 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
65 | | Given Path for 2-node testing is set
66 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
67 | | And Interfaces in 2-node path are up
68 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
69 | | ...                                                     | ${sock1}
70 | | ...                                                     | ${sock2}
71 | | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
72 | | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
73 | | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
74 | | ...                                       | ${sock2}
75 | | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
76 | | ...                                          | ${tg_to_dut_if2}
77 | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
78 | | ...        | AND          | Stop and Clear QEMU | ${dut_node} | ${vm_node}
79
80 | VPP forwards ICMPv6 packets through VM via L2 x-connect
81 | | [Documentation] | Setup double link path with X-connect via Vhost user
82 | | ...             | and send ICMPv6 packet.
83 | | [Tags] | 3_NODE_DOUBLE_LINK_TOPO | VPP_VM_ENV
84 | | Given Path for 2-node testing is set
85 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
86 | | And Interfaces in 2-node path are up
87 | | When VPP Vhost interfaces for L2BD forwarding are setup | ${dut_node}
88 | | ...                                                     | ${sock1}
89 | | ...                                                     | ${sock2}
90 | | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
91 | | And L2 Setup Xconnect on DUT | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
92 | | And VM for Vhost L2BD forwarding is setup | ${dut_node} | ${sock1}
93 | | ...                                       | ${sock2}
94 | | Then Send and receive ICMPv6 bidirectionally | ${tg_node} | ${tg_to_dut_if1}
95 | | ...                                          | ${tg_to_dut_if2}
96 | | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
97 | | ...        | AND          | Stop and Clear QEMU | ${dut_node} | ${vm_node}
98