PapiHistory: Use repr strings for argument values
[csit.git] / tests / vpp / func / ip4 / eth2p-dot1q-ip4base-func.robot
1 # Copyright (c) 2019 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 | Library | resources.libraries.python.IPv6Util
16 | Library | resources.libraries.python.Trace
17 | ...
18 | Resource | resources/libraries/robot/ip/ip4.robot
19 | Resource | resources/libraries/robot/l2/tagging.robot
20 | Resource | resources/libraries/robot/shared/default.robot
21 | Resource | resources/libraries/robot/shared/testing_path.robot
22 | Resource | resources/libraries/robot/shared/traffic.robot
23 | ...
24 | Force Tags | 3_NODE_DOUBLE_LINK_TOPO | VM_ENV | HW_ENV | VPP_VM_ENV
25 | ... | SKIP_VPP_PATCH
26 | Test Setup | Set up functional test
27 | Test Teardown | Tear down functional test
28 | Documentation | *IPv4 with VLAN subinterfaces*
29 | ...
30 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology
31 | ... | with double links between nodes.
32 | ... | *[Enc] Packet encapsulations:* Eth-IPv4-ICMPv4 on TG-DUT1-IF1,
33 | ... | Eth-dot1q-IPv4-ICMPv4 on TG-DUT1-IF2.
34 | ... | *[Cfg] DUT configuration:* DUT1 is configured with 2 Vlan subinterfaces
35 | ... | on DUT1-IF2. The subinterfaces and DUT1-IF1 have IP addresses set and
36 | ... | corresponding IP neighbor entries are configured.
37 | ... | *[Ref] Applicable standard specifications:* IEEE 802.1q.
38
39 *** Variables ***
40
41 | ${ip4_net0_1}= | 192.168.0.1
42 | ${ip4_net0_2}= | 192.168.0.2
43 | ${ip4_net1_1}= | 192.168.100.1
44 | ${ip4_net1_2}= | 192.168.100.2
45 | ${ip4_net2_1}= | 192.168.200.1
46 | ${ip4_net2_2}= | 192.168.200.2
47 | ${ip4_prefix}= | 24
48 | ${tag_1}= | ${10}
49 | ${tag_2}= | ${20}
50
51 *** Test Cases ***
52 | TC01: Process untagged send tagged
53 | | Given Vlan Test Setup
54 | | Then Send packet and verify headers
55 | | ... | ${tg_node} | ${ip4_net0_2} | ${ip4_net2_2} | ${tg_to_dut_if1}
56 | | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2}
57 | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
58 | | ... | encaps_rx=Dot1q | vlan_rx=${tag_2}
59
60 | TC02: Process tagged send untagged
61 | | Given Vlan Test Setup
62 | | Then Send packet and verify headers
63 | | ... | ${tg_node} | ${ip4_net2_2} | ${ip4_net0_2} | ${tg_to_dut_if2}
64 | | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1}
65 | | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if1_mac}
66 | | ... | encaps_tx=Dot1q | vlan_tx=${tag_2}
67
68 | TC03: Process tagged send tagged
69 | | Given Vlan Test Setup
70 | | Then Send packet and verify headers
71 | | ... | ${tg_node} | ${ip4_net1_2} | ${ip4_net2_2} | ${tg_to_dut_if2}
72 | | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2}
73 | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
74 | | ... | encaps_tx=Dot1q | vlan_tx=${tag_1}
75 | | ... | encaps_rx=Dot1q | vlan_rx=${tag_2}
76 | | And Send packet and verify headers
77 | | ... | ${tg_node} | ${ip4_net2_2} | ${ip4_net1_2} | ${tg_to_dut_if2}
78 | | ... | ${tg_to_dut_if2_mac} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2}
79 | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
80 | | ... | encaps_tx=Dot1q | vlan_tx=${tag_2}
81 | | ... | encaps_rx=Dot1q | vlan_rx=${tag_1}
82
83 *** Keywords ***
84 | Vlan Test Setup
85 | | Configure path in 2-node circular topology
86 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
87 | | Set interfaces in 2-node circular topology up
88 | |
89 | | ${vlan1_name} | ${vlan1_index}= | Create vlan sub-interface
90 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${tag_1}
91 | | ${vlan2_name} | ${vlan2_index}= | Create vlan sub-interface
92 | | ... | ${dut_node} | ${dut_to_tg_if2} | ${tag_2}
93 | |
94 | | VPP Interface Set IP Address | ${dut_node}
95 | | ... | ${dut_to_tg_if1} | ${ip4_net0_1} | ${ip4_prefix}
96 | | VPP Interface Set IP Address | ${dut_node}
97 | | ... | ${vlan1_index} | ${ip4_net1_1} | ${ip4_prefix}
98 | | VPP Interface Set IP Address | ${dut_node}
99 | | ... | ${vlan2_index} | ${ip4_net2_1} | ${ip4_prefix}
100 | |
101 | | VPP Add IP Neighbor
102 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${ip4_net0_2} | ${tg_to_dut_if1_mac}
103 | | VPP Add IP Neighbor
104 | | ... | ${dut_node} | ${vlan1_index} | ${ip4_net1_2} | ${tg_to_dut_if2_mac}
105 | | VPP Add IP Neighbor
106 | | ... | ${dut_node} | ${vlan2_index} | ${ip4_net2_2} | ${tg_to_dut_if2_mac}