Add qinq through xconnect tests.
[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/tagging.robot
17 | Resource | resources/libraries/robot/l2_traffic.robot
18 | Library  | resources.libraries.python.Trace
19 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | VM_ENV
20 | Test Setup | Setup all DUTs before test
21 | Suite Setup | Setup all TGs before traffic script
22 | Test Teardown | Show Packet Trace on All DUTs | ${nodes}
23
24 *** Variables ***
25 | ${subid}= | 10
26 | ${outer_vlan_id}= | 100
27 | ${inner_vlan_id}= | 200
28 | ${type_subif}= | two_tags
29 | ${tag_rewrite_method}= | pop-2
30
31 *** Test Cases ***
32 | VPP can push and pop two VLAN tags to traffic transfering through xconnect
33 | | [Documentation] | Push two tags on DUT 1 to traffic sent from TG,
34 | | ...             | pop two tags on DUT 2 from this traffic
35 | | ...             | and receive untagged traffic on TG.
36 | | ...
37 | | Given Node path computed for 3-node topology
38 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
39 | | And Interfaces in path are up
40 | | When VLAN subinterfaces initialized on 3-node topology
41 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
42 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
43 | | And L2 tag rewrite pop 2 tags setup on interfaces
44 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
45 | | ... | ${tag_rewrite_method}
46 | | And Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
47 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
48 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
49 | | Then Send and receive ICMPv4 | ${tg} | ${tg_if1} | ${tg_if2}