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