Improve test tag string parsing
[csit.git] / tests / honeycomb / func / mgmt-cfg-intip4-intip6-apihc-apivat-func.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 *** Variables ***
15 # Interface to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17 | ${interface2}= | ${node['interfaces']['port2']['name']}
18 | ${interface3}= | ${node['interfaces']['port3']['name']}
19
20 *** Settings ***
21 | Resource | resources/libraries/robot/shared/default.robot
22 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
23 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
24 | Resource | resources/libraries/robot/honeycomb/fib.robot
25 | Resource | resources/libraries/robot/shared/testing_path.robot
26 | Resource | resources/libraries/robot/ip/ip6.robot
27 | Variables | resources/test_data/honeycomb/interface_ip.py
28 | ...
29 | Force Tags | HC_FUNC
30 | ...
31 | Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
32 | ...
33 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
34 | ...
35 | Documentation | *Honeycomb interface management test suite.*
36
37 *** Test Cases ***
38 | TC01: Honeycomb configures and reads interface state
39 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
40 | | ... | VPP interfaces.
41 | | ...
42 | | Given Interface state from Honeycomb should be
43 | | ... | ${node} | ${interface} | down
44 | | And Interface state from VAT should be | ${node} | ${interface} | down
45 | | When Honeycomb configures interface state | ${node} | ${interface} | up
46 | | Then Interface state from Honeycomb should be
47 | | ... | ${node} | ${interface} | up
48 | | And Interface state from VAT should be | ${node} | ${interface} | up
49 | | When Honeycomb configures interface state | ${node} | ${interface} | down
50 | | Then Interface state from Honeycomb should be
51 | | ... | ${node} | ${interface} | down
52 | | And Interface state from VAT should be | ${node} | ${interface} | down
53
54 | TC02: Honeycomb modifies interface IPv4 address with netmask
55 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
56 | | ... | with address and netmask provided.
57 | | ...
58 | | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface}
59 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
60 | | When Honeycomb sets interface IPv4 address | ${node} | ${interface}
61 | | ... | ${ipv4_address} | ${ipv4_mask}
62 | | Then IPv4 address from Honeycomb should be
63 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
64 | | And IPv4 address from VAT should be
65 | | ... | ${node} | ${interface} | ${ipv4_address}
66 | | ... | ${ipv4_prefix} | ${ipv4_mask}
67
68 | TC03: Honeycomb removes IPv4 address from interface
69 | | [Documentation] | Check if Honeycomb API can remove configured ipv4\
70 | | ... | addresses from interface.
71 | | ...
72 | | Given IPv4 address from Honeycomb should be
73 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
74 | | And IPv4 address from VAT should be
75 | | ... | ${node} | ${interface} | ${ipv4_address}
76 | | ... | ${ipv4_prefix} | ${ipv4_mask}
77 | | When Honeycomb removes interface IPv4 addresses | ${node} | ${interface}
78 | | Then IPv4 address from Honeycomb should be empty | ${node} | ${interface}
79 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
80
81 | TC04: Honeycomb modifies interface IPv4 address with prefix
82 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
83 | | ... | with address and prefix provided.
84 | | ...
85 | | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node}
86 | | ... | ${interface}
87 | | ...
88 | | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface}
89 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
90 | | When Honeycomb sets interface IPv4 address with prefix
91 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
92 | | Then IPv4 address from Honeycomb should be
93 | | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix}
94 | | And IPv4 address from VAT should be
95 | | ... | ${node} | ${interface} | ${ipv4_address2}
96 | | ... | ${ipv4_prefix} | ${ipv4_mask}
97
98 | TC05: Honeycomb modifies IPv4 neighbor table
99 | | [Documentation] | Check if Honeycomb API can add and remove ARP entries.
100 | | ...
101 | | [Teardown] | Honeycomb clears all interface IPv4 neighbors
102 | | ... | ${node} | ${interface}
103 | | ...
104 | | Given IPv4 neighbor from Honeycomb should be empty
105 | | ... | ${node} | ${interface}
106 | | When Honeycomb adds interface IPv4 neighbor
107 | | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac}
108 | | Then IPv4 neighbor from Honeycomb should be
109 | | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac}
110
111 | TC06: Honeycomb modifies interface configuration - IPv6
112 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
113 | | ...
114 | | [Teardown] | Honeycomb removes interface IPv6 addresses | ${node}
115 | | ... | ${interface}
116 | | ...
117 | | Given IPv6 address from Honeycomb should be empty
118 | | ... | ${node} | ${interface}
119 | | And IPv6 address from VAT should be empty
120 | | ... | ${node} | ${interface}
121 | | When Honeycomb sets interface IPv6 address
122 | | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix}
123 | | Then IPv6 address from Honeycomb should contain
124 | | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix}
125 | | And IPv6 address from VAT should contain
126 | | ... | ${node} | ${interface} | ${ipv6_address}
127 | | ... | ${ipv6_prefix} | ${ipv6_mask}
128
129 | TC07: Honeycomb modifies IPv6 neighbor table
130 | | [Documentation] | Check if Honeycomb API can add and remove ARP entries.
131 | | ...
132 | | [Teardown] | Honeycomb clears all interface IPv6 neighbors
133 | | ... | ${node} | ${interface}
134 | | ...
135 | | Given IPv6 neighbor from Honeycomb should be empty
136 | | ... | ${node} | ${interface}
137 | | When Honeycomb adds interface IPv6 neighbor
138 | | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac}
139 | | Then IPv6 neighbor from Honeycomb should be
140 | | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac}
141
142 | TC08: Honeycomb modifies interface configuration - MTU
143 | | [Documentation] | Check if Honeycomb API can configure interface\
144 | | ... | MTU value.
145 | | ...
146 | | When Honeycomb sets interface ethernet configuration
147 | | ... | ${node} | ${interface} | ${ethernet}
148 | | Then Interface ethernet Operational Data From Honeycomb Should Be
149 | | ... | ${node} | ${interface} | ${ethernet}
150 | | ${mtu}= | Create List | ${ethernet['mtu']} | ${0} | ${0} | ${0}
151 | | And Interface ethernet Operational Data From VAT Should Be
152 | | ... | ${node} | ${interface} | ${mtu}
153
154 | TC09: Honeycomb modifies interface configuration - vrf
155 | | [Documentation] | Check if Honeycomb API can configure interface\
156 | | ... | vrf ID.
157 | | ...
158 | | [Teardown] | Honeycomb interface VRF Test Teardown | ${node} | ${interface}
159 | | ...
160 | | Honeycomb configures FIB table | ${node} | ipv4 | ${1}
161 | | When Honeycomb sets interface VRF ID
162 | | ... | ${node} | ${interface} | ${1} | ipv4
163 | | Then Interface VRF ID from Honeycomb should be
164 | | ... | ${node} | ${interface} | ${1} | ipv4
165 | | And Interface VRF ID from VAT should be
166 | | ... | ${node} | ${interface} | ${1}
167
168 | TC10: Honeycomb can configure multiple IP addresses on one interface
169 | | [Documentation] | [Top] TG=DUT1=TG.
170 | | ... | [Enc] Eth-IPv4-ICMP; Eth-IPv6-ICMPv6
171 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set two IPv4 addresses\
172 | | ... | and two IPv6 addresses on first interfaces to TG and add ARP entries\
173 | | ... | for each address.
174 | | ... | [Ver] Send ICMP packets from TG to DUT, using different sets\
175 | | ... | of source and destination IP addresses. Receive an ICMP reply\
176 | | ... | for every packet sent.
177 | | ...
178 | | [Teardown] | Multiple IP Address Test Teardown | ${node} | ${dut_to_tg_if1}
179 | | Given Configure path in 2-node circular topology
180 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
181 | | When Honeycomb sets interface IPv4 address with prefix
182 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address} | ${ipv4_prefix}
183 | | And Honeycomb adds interface IPv4 address
184 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address2} | ${ipv4_prefix}
185 | | And Honeycomb sets interface IPv6 address
186 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix}
187 | | And Honeycomb adds interface IPv6 address
188 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address2} | ${ipv6_prefix}
189 | | Then IPv4 address from Honeycomb should be
190 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address} | ${ipv4_prefix}
191 | | And IPv4 address from VAT should be
192 | | ... | ${dut_node} | ${interface2} | ${ipv4_address}
193 | | ... | ${ipv4_prefix} | ${ipv4_mask}
194 | | And IPv6 address from Honeycomb should contain
195 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix}
196 | | And IPv6 address from VAT should contain
197 | | ... | ${dut_node} | ${interface2} | ${ipv6_address}
198 | | ... | ${ipv6_prefix} | ${ipv6_mask}
199 | | And Honeycomb configures interface state
200 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
201 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
202 | | ... | ${ipv4_neighbor} | ${neighbor_mac}
203 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
204 | | ... | ${ipv4_neighbor2} | ${neighbor_mac2}
205 | | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1}
206 | | ... | ${ipv6_neighbor} | ${neighbor_mac}
207 | | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1}
208 | | ... | ${ipv6_neighbor2} | ${neighbor_mac2}
209 | | And Vpp All Ra Suppress Link Layer | ${nodes}
210 | | Then Ping and Verify IP address | ${nodes['TG']}
211 | | ... | ${ipv4_neighbor} | ${ipv4_address}
212 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
213 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
214 | | And Ping and Verify IP address | ${nodes['TG']}
215 | | ... | ${ipv4_neighbor2} | ${ipv4_address2}
216 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
217 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
218 | | And Ping and Verify IP address | ${nodes['TG']}
219 | | ... | ${ipv6_neighbor} | ${ipv6_address}
220 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
221 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
222 | | And Ping and Verify IP address | ${nodes['TG']}
223 | | ... | ${ipv6_neighbor2} | ${ipv6_address2}
224 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
225 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
226
227 | TC11: Honeycomb fails to configure two IPv4 addresses from the same subnet
228 | | [Documentation] | Check if Honeycomb can configure two IPv4 addresses in\
229 | | ... | the same subnet onto a single interface. It should not be possible.
230 | | ...
231 | | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node}
232 | | ... | ${interface}
233 | | ...
234 | | When Honeycomb sets interface IPv4 address with prefix
235 | | ... | ${node} | ${interface} | 192.168.0.1 | ${9}
236 | | Then Honeycomb fails to add interface IPv4 address
237 | | ... | ${node} | ${interface} | 192.168.0.2 | ${9}
238 | | And Honeycomb fails to add interface IPv4 address
239 | | ... | ${node} | ${interface} | 192.232.0.2 | ${9}
240
241 | TC12: Honeycomb fails to configure two IPv6 addresses from the same subnet
242 | | [Documentation] | Check if Honeycomb can configure two IPv6 addresses in\
243 | | ... | the same subnet onto a single interface. It should not be possible.
244 | | ...
245 | | [Teardown] | Honeycomb removes interface IPv6 addresses | ${node}
246 | | ... | ${interface}
247 | | When Honeycomb sets interface IPv6 address
248 | | ... | ${node} | ${interface} | 10::FF10 | ${64}
249 | | Then Honeycomb fails to add interface IPv6 address
250 | | ... | ${node} | ${interface} | 10::FF11 | ${64}
251 | | And Honeycomb fails to add interface IPv6 address
252 | | ... | ${node} | ${interface} | 10::FFFF | ${64}
253
254 | TC13: Honeycomb can configure unnumbered interface
255 | | [Documentation] | Check if Honeycomb can configure an unnumbered interface\
256 | | ... | on a physical interface, borrowing the IP address of another physical\
257 | | ... | interface.
258 | | ...
259 # CSIT-1210: Adapt HC unnumbered interface tests to VPP 18.07 api changes
260 | | [Tags] | EXPECTED_FAILING
261 | | ...
262 | | Given Honeycomb sets interface IPv4 address | ${node}
263 | | ... | ${interface3} | ${ipv4_address} | ${ipv4_prefix}
264 | | When Honeycomb adds unnumbered configuration to interface
265 | | ... | ${node} | ${interface} | ${interface3}
266 | | Then Wait until Keyword succeeds | 10s | 2s
267 | | ... | IPv4 address from Honeycomb should be
268 | | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix}
269 | | And IPv4 address from VAT should be
270 | | ... | ${node} | ${interface3} | ${ipv4_address}
271 | | ... | ${ipv4_prefix} | ${ipv4_mask}
272 | | And IPv4 address from Honeycomb should be
273 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
274 | | And IPv4 address from VAT should be
275 | | ... | ${node} | ${interface} | ${ipv4_address}
276 | | ... | ${ipv4_prefix} | ${ipv4_mask}
277
278 | TC14: Honeycomb removes interface unnumbered configuration
279 | | [Documentation] | Check if Honeycomb can remove unnumbered configuration\
280 | | ... | from an interface.
281 | | ...
282 # CSIT-1210: Adapt HC unnumbered interface tests to VPP 18.07 api changes
283 | | [Tags] | EXPECTED_FAILING
284 | | ...
285 | | Given IPv4 address from Honeycomb should be
286 | | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix}
287 | | And IPv4 address from VAT should be
288 | | ... | ${node} | ${interface3} | ${ipv4_address}
289 | | ... | ${ipv4_prefix} | ${ipv4_mask}
290 | | And IPv4 address from Honeycomb should be
291 | | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix}
292 | | And IPv4 address from VAT should be
293 | | ... | ${node} | ${interface} | ${ipv4_address}
294 | | ... | ${ipv4_prefix} | ${ipv4_mask}
295 | | When Honeycomb removes unnumbered configuration from interface
296 | | ... | ${node} | ${interface}
297 | | Then Wait until Keyword succeeds | 10s | 2s
298 | | ... | IPv4 address from Honeycomb should be
299 | | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix}
300 | | And IPv4 address from VAT should be
301 | | ... | ${node} | ${interface3} | ${ipv4_address}
302 | | ... | ${ipv4_prefix} | ${ipv4_mask}
303 | | And IPv4 address from Honeycomb should be empty | ${node} | ${interface}
304 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
305
306 *** Keywords ***
307 | Multiple IP Address Test Teardown
308 | | [Arguments] | ${node} | ${interface}
309 | | Honeycomb removes interface IPv4 addresses | ${node} | ${interface}
310 | | Honeycomb removes interface IPv6 addresses | ${node} | ${interface}
311 | | Honeycomb clears all interface IPv4 neighbors | ${node} | ${interface}
312 | | Honeycomb clears all interface IPv6 neighbors | ${node} | ${interface}
313
314 | Honeycomb interface VRF Test Teardown
315 | | [Arguments] | ${node} | ${interface}
316 | | Honeycomb sets interface VRF ID | ${node} | ${interface} | ${0} | ipv4
317 | | Honeycomb removes FIB configuration | ${node} | ipv4 | ${1}