Remove pkt_trace as global variable
[csit.git] / tests / vpp / func / l2xc / eth2p-eth-l2xcbase-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/l2/l2_xconnect.robot
17 | Resource | resources/libraries/robot/l2/l2_traffic.robot
18 | Resource | resources/libraries/robot/shared/testing_path.robot
19 | Resource | resources/libraries/robot/shared/interfaces.robot
20 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
21 | Resource | resources/libraries/robot/vm/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 | SKIP_VPP_PATCH
25 | Test Setup | Set up functional test
26 | Test Teardown | Tear down functional test
27 | Documentation | *L2 cross-connect test cases*
28 | ...
29 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
30 | ... | with single links between nodes.
31 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of IPv4;
32 | ... | Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all links.
33 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
34 | ... | cross-connect (L2XC) switching.
35 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets are
36 | ... | sent in both directions by TG on links to DUT1 and DUT2; on receive TG
37 | ... | verifies packets for correctness and their IPv4 (IPv6) src-addr,
38 | ... | dst-addr and MAC addresses.
39 | ... | *[Ref] Applicable standard specifications:*
40
41 *** Test Cases ***
42 | TC01: DUT1 and DUT2 with L2XC switch ICMPv4 between two TG links
43 | | [Documentation]
44 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 and \
45 | | ... | DUT2 configure L2 cross-connect (L2XC), each with one interface
46 | | ... | to TG and one Ethernet interface towards the other DUT. [Ver]
47 | | ... | Make TG send ICMPv4 Echo Req in both directions between two of
48 | | ... | its interfaces to be switched by DUT1 and DUT2; verify all
49 | | ... | packets are received. [Ref]
50 | | Given Configure path in 3-node circular topology
51 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
52 | | And Set interfaces in 3-node circular topology up
53 | | And Configure L2XC | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_dut2}
54 | | And Configure L2XC | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
55 | | When All Vpp Interfaces Ready Wait | ${nodes}
56 | | Then Send ICMPv4 bidirectionally and verify received packets
57 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
58
59 | TC02: DUT1 and DUT2 with L2XC switch ICMPv6 between two TG links
60 | | [Documentation]
61 | | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 and \
62 | | ... | DUT2 configure L2 cross-connect (L2XC), each with one interface
63 | | ... | to TG and one Ethernet interface towards the other DUT. [Ver]
64 | | ... | Make TG send ICMPv6 Echo Req in both directions between two of
65 | | ... | its interfaces to be switched by DUT1 and DUT2; verify all
66 | | ... | packets are received. [Ref]
67 | | Given Configure path in 3-node circular topology
68 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
69 | | And Set interfaces in 3-node circular topology up
70 | | And Configure L2XC | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_dut2}
71 | | And Configure L2XC | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg}
72 | | When All Vpp Interfaces Ready Wait | ${nodes}
73 | | Then Send ICMPv6 bidirectionally and verify received packets
74 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}