ccf15514df692061d88ebc790c36d76585d248ed
[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 | Suite Setup | Run Keywords | Setup all DUTs before test
20 | ...         | AND          | Setup all TGs before traffic script
21 | ...         | AND          | Update All Interface Data On All Nodes | ${nodes}
22 | ...         | AND          | Setup DUT nodes for IPv4 testing
23 | Test Setup | Clear interface counters on all vpp nodes in topology | ${nodes}
24
25 *** Test Cases ***
26
27 | VPP replies to ICMPv4 echo request
28 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']}
29 | | Compute Path
30 | | ${src_port} | ${src_node}= | First Interface
31 | | ${dst_port} | ${dst_node}= | Last Interface
32 | | ${hops}= | Set Variable | ${0}
33 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
34
35 | TG can route to DUT egress interface
36 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
37 | | Compute Path
38 | | ${src_port} | ${src_node}= | First Interface
39 | | ${dst_port} | ${dst_node}= | Last Egress Interface
40 | | ${hops}= | Set Variable | ${0}
41 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
42
43 | TG can route to DUT2 through DUT1
44 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
45 | | Compute Path
46 | | ${src_port} | ${src_node}= | First Interface
47 | | ${dst_port} | ${dst_node}= | Last Interface
48 | | ${hops}= | Set Variable | ${1}
49 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
50
51 | TG can route to DUT2 egress interface through DUT1
52 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
53 | | Compute Path
54 | | ${src_port} | ${src_node}= | First Interface
55 | | ${dst_port} | ${dst_node}= | Last Egress Interface
56 | | ${hops}= | Set Variable | ${1}
57 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
58
59 | TG can route to TG through DUT1 and DUT2
60 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
61 | | Compute Path
62 | | ${src_port} | ${src_node}= | First Interface
63 | | ${dst_port} | ${dst_node}= | Last Interface
64 | | ${hops}= | Set Variable | ${2}
65 | | Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4
66 | | ${port} | ${node}= | Next Interface
67 | | ${port} | ${node}= | Next Interface
68 | | ${exp_counter_val}= | Set Variable | ${1}
69 | | Vpp dump stats table | ${node}
70 | | Check ipv4 interface counter | ${node} | ${port} | ${exp_counter_val}
71 | | ${port} | ${node}= | Next Interface
72 | | Check ipv4 interface counter | ${node} | ${port} | ${exp_counter_val}
73 | | ${port} | ${node}= | Next Interface
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
79 | VPP can process ICMP echo request from min to max packet size with 1B increment
80 | | Ipv4 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']}
81 | | ...                  | ${nodes['TG']['interfaces']['port3']['name']}
82 | | ...                  | ${nodes['DUT1']['interfaces']['port1']['name']}
83
84 | VPP responds to ARP request
85 | | Send ARP request and validate response | ${nodes['TG']} | ${nodes['DUT1']}