Add hw/vm tags, add single link tag.
[csit.git] / tests / suites / ipv4 / ipv4_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 | Library | resources.libraries.python.topology.Topology
16 | Library | resources.libraries.python.NodePath
17 | Resource | resources/libraries/robot/default.robot
18 | Resource | resources/libraries/robot/ipv4.robot
19 | Force Tags | HW_ENV | VM_ENV
20 | Suite Setup | Run Keywords | Setup all DUTs before test
21 | ...         | AND          | Setup all TGs before traffic script
22 | ...         | AND          | Update All Interface Data On All Nodes | ${nodes}
23 | ...         | AND          | Setup DUT nodes for IPv4 testing
24 | Test Setup | Clear interface counters on all vpp nodes in topology | ${nodes}
25
26 *** Test Cases ***
27
28 | VPP replies to ICMPv4 echo request
29 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
30 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']}
31 | | Compute Path
32 | | ${src_port} | ${src_node}= | First Interface
33 | | ${dst_port} | ${dst_node}= | Last Interface
34 | | ${hops}= | Set Variable | ${0}
35 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
36
37 | TG can route to DUT egress interface
38 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
39 | | Compute Path
40 | | ${src_port} | ${src_node}= | First Interface
41 | | ${dst_port} | ${dst_node}= | Last Egress Interface
42 | | ${hops}= | Set Variable | ${0}
43 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
44
45 | TG can route to DUT2 through DUT1
46 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
47 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
48 | | Compute Path
49 | | ${src_port} | ${src_node}= | First Interface
50 | | ${dst_port} | ${dst_node}= | Last Interface
51 | | ${hops}= | Set Variable | ${1}
52 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
53
54 | TG can route to DUT2 egress interface through DUT1
55 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
56 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
57 | | Compute Path
58 | | ${src_port} | ${src_node}= | First Interface
59 | | ${dst_port} | ${dst_node}= | Last Egress Interface
60 | | ${hops}= | Set Variable | ${1}
61 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
62
63 | TG can route to TG through DUT1 and DUT2
64 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
65 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
66 | | Compute Path
67 | | ${src_port} | ${src_node}= | First Interface
68 | | ${dst_port} | ${dst_node}= | Last Interface
69 | | ${hops}= | Set Variable | ${2}
70 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
71 | | ${port} | ${node}= | Next Interface
72 | | ${port} | ${node}= | Next Interface
73 | | ${exp_counter_val}= | Set Variable | ${1}
74 | | Vpp dump stats table | ${node}
75 | | Check ipv4 interface counter | ${node} | ${port} | ${exp_counter_val}
76 | | ${port} | ${node}= | Next Interface
77 | | Check ipv4 interface counter | ${node} | ${port} | ${exp_counter_val}
78 | | ${port} | ${node}= | Next Interface
79 | | Vpp dump stats table | ${node}
80 | | Check ipv4 interface counter | ${node} | ${port} | ${exp_counter_val}
81 | | ${port} | ${node}= | Next Interface
82 | | Check ipv4 interface counter | ${node} | ${port} | ${exp_counter_val}
83
84 | VPP can process ICMP echo request from min to max packet size with 1B increment
85 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
86 | | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']}
87 | | ...                  | ${nodes['TG']['interfaces']['port3']['name']}
88 | | ...                  | ${nodes['DUT1']['interfaces']['port1']['name']}
89
90 | VPP responds to ARP request
91 | | [Tags] | 3_NODE_SINGLE_LINK_TOPO
92 | | Send ARP request and validate response | ${nodes['TG']} | ${nodes['DUT1']}