ed0e734c300d305c6ac2eebb0156f51581dfddbc
[csit.git] / tests / suites / tagging / qinq_l2_xconnect.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/testing_path.robot
17 | Resource | resources/libraries/robot/tagging.robot
18 | Resource | resources/libraries/robot/l2_traffic.robot
19 | Library  | resources.libraries.python.Trace
20 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV
21 | Test Setup | Setup all DUTs before test
22 | Suite Setup | Setup all TGs before traffic script
23 | Test Teardown | Show Packet Trace on All DUTs | ${nodes}
24
25 *** Variables ***
26 | ${subid}= | 10
27 | ${outer_vlan_id}= | 100
28 | ${inner_vlan_id}= | 200
29 | ${type_subif}= | two_tags
30 | ${tag_rewrite_method}= | pop-2
31
32 *** Test Cases ***
33 | VPP can push and pop two VLAN tags to traffic transferring through xconnect
34 | | [Documentation] | Push two tags on DUT 1 to traffic sent from TG,
35 | | ...             | pop two tags on DUT 2 from this traffic
36 | | ...             | and receive untagged traffic on TG.
37 | | ...
38 | | Given Path for 3-node testing is set
39 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
40 | | And Interfaces in 3-node path are up
41 | | When VLAN subinterfaces initialized on 3-node topology
42 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut2_node} | ${dut2_to_dut1} | ${subid}
43 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
44 | | And L2 tag rewrite method setup on interfaces
45 | | ... | ${dut1_node} | ${subif_index_1} | ${dut2_node} | ${subif_index_2}
46 | | ... | ${tag_rewrite_method}
47 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
48 | | ... | ${dut1_node} | ${dut1_to_tg} | ${subif_index_1}
49 | | ... | ${dut2_node} | ${dut2_to_tg} | ${subif_index_2}
50 | | Then Send and receive ICMP Packet
51 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}