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