blob: 60b678d67564ce388c7e2ee9af7de6b793ee1336 [file] [log] [blame]
Prashanth Kattif58cce02019-02-06 03:05:14 -06001*** Settings ***
2Documentation Network interface configuration and verification
3 ... tests.
4
George Keishing5d467552019-02-08 23:30:48 -06005Resource ../../lib/bmc_redfish_resource.robot
6Resource ../../lib/bmc_network_utils.robot
7Resource ../../lib/openbmc_ffdc.robot
Prashanth Katti747ce9d2019-02-07 07:23:48 -06008Library ../../lib/bmc_network_utils.py
Vijayde3bf7b2019-04-16 04:56:09 -05009Library Collections
Prashanth Kattif58cce02019-02-06 03:05:14 -060010
11Test Setup Test Setup Execution
12Test Teardown Test Teardown Execution
Prashanth Kattib478d902020-05-08 10:05:32 -050013Suite Setup Suite Setup Execution
Prashanth Kattif58cce02019-02-06 03:05:14 -060014
Prashanth Kattif34fafa2019-06-20 05:04:40 -050015Force Tags Network_Conf_Test
16
Prashanth Katti23efc6e2019-03-13 06:07:15 -050017*** Variables ***
Vijayde3bf7b2019-04-16 04:56:09 -050018${test_hostname} openbmc
19${test_ipv4_addr} 10.7.7.7
20${test_ipv4_invalid_addr} 0.0.1.a
21${test_subnet_mask} 255.255.0.0
Prashanth Kattib36a7522019-05-22 05:32:39 -050022${broadcast_ip} 10.7.7.255
23${loopback_ip} 127.0.0.2
24${multicast_ip} 224.6.6.6
25${out_of_range_ip} 10.7.7.256
Prashanth Katti568df5f2020-05-15 06:00:37 -050026${test_ipv4_addr2} 10.7.7.8
Prashanth Katti23efc6e2019-03-13 06:07:15 -050027
George Keishing16b3c7b2021-01-28 09:23:37 -060028# Valid netmask is 4 bytes long and has continuous block of 1s.
Prashanth Katti040c8c12019-05-31 04:42:05 -050029# Maximum valid value in each octet is 255 and least value is 0.
30# 253 is not valid, as binary value is 11111101.
31${invalid_netmask} 255.255.253.0
32${alpha_netmask} ff.ff.ff.ff
33# Maximum value of octet in netmask is 255.
34${out_of_range_netmask} 255.256.255.0
35${more_byte_netmask} 255.255.255.0.0
36${less_byte_netmask} 255.255.255
Prashanth Kattic6ad6472019-06-14 03:33:39 -050037${threshold_netmask} 255.255.255.255
38${lowest_netmask} 128.0.0.0
39
40# There will be 4 octets in IP address (e.g. xx.xx.xx.xx)
41# but trying to configure xx.xx.xx
42${less_octet_ip} 10.3.36
43
44# For the address 10.6.6.6, the 10.6.6.0 portion describes the
45# network ID and the 6 describe the host.
46
47${network_id} 10.7.7.0
48${hex_ip} 0xa.0xb.0xc.0xd
49${negative_ip} 10.-7.-7.7
Prashanth Katti7098c972019-07-03 06:56:42 -050050@{static_name_servers} 10.5.5.5
Prashanth Katti3c7b6432019-07-26 06:53:37 -050051@{null_value} null
Prashanth Kattiafe16b72019-08-02 00:29:45 -050052@{empty_dictionary} {}
53@{string_value} aa.bb.cc.dd
54
Prashanth Kattif58cce02019-02-06 03:05:14 -060055*** Test Cases ***
56
57Get IP Address And Verify
58 [Documentation] Get IP Address And Verify.
George Keishing5d467552019-02-08 23:30:48 -060059 [Tags] Get_IP_Address_And_Verify
Prashanth Kattif58cce02019-02-06 03:05:14 -060060
Sushil Singh50621142020-06-16 11:12:21 -050061 FOR ${network_configuration} IN @{network_configurations}
62 Verify IP On BMC ${network_configuration['Address']}
63 END
Prashanth Katti747ce9d2019-02-07 07:23:48 -060064
Prashanth Kattif58cce02019-02-06 03:05:14 -060065Get Netmask And Verify
66 [Documentation] Get Netmask And Verify.
George Keishing5d467552019-02-08 23:30:48 -060067 [Tags] Get_Netmask_And_Verify
Prashanth Kattif58cce02019-02-06 03:05:14 -060068
Sushil Singh50621142020-06-16 11:12:21 -050069 FOR ${network_configuration} IN @{network_configurations}
70 Verify Netmask On BMC ${network_configuration['SubnetMask']}
71 END
Prashanth Katti747ce9d2019-02-07 07:23:48 -060072
Prashanth Katti2ec9d8b2019-02-12 05:20:19 -060073Get Gateway And Verify
74 [Documentation] Get gateway and verify it's existence on the BMC.
75 [Tags] Get_Gateway_And_Verify
76
Sushil Singh50621142020-06-16 11:12:21 -050077 FOR ${network_configuration} IN @{network_configurations}
78 Verify Gateway On BMC ${network_configuration['Gateway']}
79 END
Prashanth Katti2ec9d8b2019-02-12 05:20:19 -060080
81Get MAC Address And Verify
82 [Documentation] Get MAC address and verify it's existence on the BMC.
83 [Tags] Get_MAC_Address_And_Verify
84
Tony Lee412c6682020-04-01 17:34:30 +080085 ${active_channel_config}= Get Active Channel Config
86 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
87
88 ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
Prashanth Katti2ec9d8b2019-02-12 05:20:19 -060089 ${macaddr}= Get From Dictionary ${resp.dict} MACAddress
90 Validate MAC On BMC ${macaddr}
Prashanth Kattif58cce02019-02-06 03:05:14 -060091
Prashanth Katti2c5c3bb2019-02-14 04:23:07 -060092Verify All Configured IP And Netmask
93 [Documentation] Verify all configured IP and netmask on BMC.
94 [Tags] Verify_All_Configured_IP_And_Netmask
95
Sushil Singh50621142020-06-16 11:12:21 -050096 FOR ${network_configuration} IN @{network_configurations}
97 Verify IP And Netmask On BMC ${network_configuration['Address']}
98 ... ${network_configuration['SubnetMask']}
99 END
Prashanth Katti2c5c3bb2019-02-14 04:23:07 -0600100
Prashanth Katti23efc6e2019-03-13 06:07:15 -0500101Get Hostname And Verify
102 [Documentation] Get hostname via Redfish and verify.
103 [Tags] Get_Hostname_And_Verify
104
105 ${hostname}= Redfish_Utils.Get Attribute ${REDFISH_NW_PROTOCOL_URI} HostName
106
107 Validate Hostname On BMC ${hostname}
108
109Configure Hostname And Verify
110 [Documentation] Configure hostname via Redfish and verify.
111 [Tags] Configure_Hostname_And_Verify
shrsuman123578276c2020-08-04 04:28:58 -0500112 [Teardown] Run Keywords
113 ... Configure Hostname ${hostname} AND Validate Hostname On BMC ${hostname}
Prashanth Katti23efc6e2019-03-13 06:07:15 -0500114
Prashanth Kattiadf0b4e2019-06-10 04:20:30 -0500115 ${hostname}= Redfish_Utils.Get Attribute ${REDFISH_NW_PROTOCOL_URI} HostName
Prashanth Katti23efc6e2019-03-13 06:07:15 -0500116
Prashanth Kattiadf0b4e2019-06-10 04:20:30 -0500117 Configure Hostname ${test_hostname}
Prashanth Katti23efc6e2019-03-13 06:07:15 -0500118 Validate Hostname On BMC ${test_hostname}
119
Prashanth Kattiadf0b4e2019-06-10 04:20:30 -0500120
Vijayde3bf7b2019-04-16 04:56:09 -0500121Add Valid IPv4 Address And Verify
122 [Documentation] Add IPv4 Address via Redfish and verify.
George Keishing0c8100f2022-01-13 00:24:57 -0600123 [Tags] Add_Valid_IPv4_Address_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500124 [Teardown] Run Keywords
125 ... Delete IP Address ${test_ipv4_addr} AND Test Teardown Execution
Vijayde3bf7b2019-04-16 04:56:09 -0500126
127 Add IP Address ${test_ipv4_addr} ${test_subnet_mask} ${test_gateway}
Vijayde3bf7b2019-04-16 04:56:09 -0500128
129Add Invalid IPv4 Address And Verify
130 [Documentation] Add Invalid IPv4 Address via Redfish and verify.
George Keishing0c8100f2022-01-13 00:24:57 -0600131 [Tags] Add_Invalid_IPv4_Address_And_Verify
Vijayde3bf7b2019-04-16 04:56:09 -0500132
133 Add IP Address ${test_ipv4_invalid_addr} ${test_subnet_mask}
134 ... ${test_gateway} valid_status_codes=${HTTP_BAD_REQUEST}
135
Prashanth Kattib36a7522019-05-22 05:32:39 -0500136Configure Out Of Range IP
137 [Documentation] Configure out-of-range IP address.
138 [Tags] Configure_Out_Of_Range_IP
139 [Template] Add IP Address
140
141 # ip subnet_mask gateway valid_status_codes
142 ${out_of_range_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
143
144Configure Broadcast IP
145 [Documentation] Configure broadcast IP address.
146 [Tags] Configure_Broadcast_IP
147 [Template] Add IP Address
Prashanth Kattic6ad6472019-06-14 03:33:39 -0500148 [Teardown] Clear IP Settings On Fail ${broadcast_ip}
Prashanth Kattib36a7522019-05-22 05:32:39 -0500149
150 # ip subnet_mask gateway valid_status_codes
151 ${broadcast_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
152
153Configure Multicast IP
154 [Documentation] Configure multicast IP address.
155 [Tags] Configure_Multicast_IP
156 [Template] Add IP Address
Prashanth Kattic6ad6472019-06-14 03:33:39 -0500157 [Teardown] Clear IP Settings On Fail ${multicast_ip}
Prashanth Kattib36a7522019-05-22 05:32:39 -0500158
159 # ip subnet_mask gateway valid_status_codes
160 ${multicast_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
161
162Configure Loopback IP
163 [Documentation] Configure loopback IP address.
164 [Tags] Configure_Loopback_IP
165 [Template] Add IP Address
Prashanth Kattic6ad6472019-06-14 03:33:39 -0500166 [Teardown] Clear IP Settings On Fail ${loopback_ip}
Prashanth Kattib36a7522019-05-22 05:32:39 -0500167
168 # ip subnet_mask gateway valid_status_codes
169 ${loopback_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
170
171Add Valid IPv4 Address And Check Persistency
172 [Documentation] Add IPv4 address and check peristency.
George Keishing0c8100f2022-01-13 00:24:57 -0600173 [Tags] Add_Valid_IPv4_Address_And_Check_Persistency
Prashanth Kattib36a7522019-05-22 05:32:39 -0500174
175 Add IP Address ${test_ipv4_addr} ${test_subnet_mask} ${test_gateway}
176
177 # Reboot BMC and verify persistency.
178 OBMC Reboot (off)
George Keishing5c498742019-08-09 02:14:44 -0500179 Redfish.Login
Prashanth Kattib36a7522019-05-22 05:32:39 -0500180 Verify IP On BMC ${test_ipv4_addr}
Anves Kumar rayankulaf179f262021-06-09 08:02:15 -0500181 Delete IP Address ${test_ipv4_addr}
Vijayde3bf7b2019-04-16 04:56:09 -0500182
Prashanth Katti6cedca22019-05-30 02:31:11 -0500183Add Fourth Octet Threshold IP And Verify
184 [Documentation] Add fourth octet threshold IP and verify.
185 [Tags] Add_Fourth_Octet_Threshold_IP_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500186 [Teardown] Run Keywords
187 ... Delete IP Address 10.7.7.254 AND Test Teardown Execution
Prashanth Katti6cedca22019-05-30 02:31:11 -0500188
189 Add IP Address 10.7.7.254 ${test_subnet_mask} ${test_gateway}
Prashanth Katti6cedca22019-05-30 02:31:11 -0500190
191Add Fourth Octet Lowest IP And Verify
192 [Documentation] Add fourth octet lowest IP and verify.
193 [Tags] Add_Fourth_Octet_Lowest_IP_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500194 [Teardown] Run Keywords
195 ... Delete IP Address 10.7.7.1 AND Test Teardown Execution
Prashanth Katti6cedca22019-05-30 02:31:11 -0500196
197 Add IP Address 10.7.7.1 ${test_subnet_mask} ${test_gateway}
Prashanth Katti6cedca22019-05-30 02:31:11 -0500198
199Add Third Octet Threshold IP And Verify
200 [Documentation] Add third octet threshold IP and verify.
201 [Tags] Add_Third_Octet_Threshold_IP_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500202 [Teardown] Run Keywords
203 ... Delete IP Address 10.7.255.7 AND Test Teardown Execution
Prashanth Katti6cedca22019-05-30 02:31:11 -0500204
205 Add IP Address 10.7.255.7 ${test_subnet_mask} ${test_gateway}
Prashanth Katti6cedca22019-05-30 02:31:11 -0500206
207Add Third Octet Lowest IP And Verify
208 [Documentation] Add third octet lowest IP and verify.
209 [Tags] Add_Third_Octet_Lowest_IP_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500210 [Teardown] Run Keywords
211 ... Delete IP Address 10.7.0.7 AND Test Teardown Execution
Prashanth Katti6cedca22019-05-30 02:31:11 -0500212
213 Add IP Address 10.7.0.7 ${test_subnet_mask} ${test_gateway}
Prashanth Katti6cedca22019-05-30 02:31:11 -0500214
215Add Second Octet Threshold IP And Verify
216 [Documentation] Add second octet threshold IP and verify.
217 [Tags] Add_Second_Octet_Threshold_IP_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500218 [Teardown] Run Keywords
219 ... Delete IP Address 10.255.7.7 AND Test Teardown Execution
Prashanth Katti6cedca22019-05-30 02:31:11 -0500220
221 Add IP Address 10.255.7.7 ${test_subnet_mask} ${test_gateway}
Prashanth Katti6cedca22019-05-30 02:31:11 -0500222
223Add Second Octet Lowest IP And Verify
224 [Documentation] Add second octet lowest IP and verify.
225 [Tags] Add_Second_Octet_Lowest_IP_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500226 [Teardown] Run Keywords
227 ... Delete IP Address 10.0.7.7 AND Test Teardown Execution
Prashanth Katti6cedca22019-05-30 02:31:11 -0500228
229 Add IP Address 10.0.7.7 ${test_subnet_mask} ${test_gateway}
Prashanth Katti6cedca22019-05-30 02:31:11 -0500230
231Add First Octet Threshold IP And Verify
232 [Documentation] Add first octet threshold IP and verify.
233 [Tags] Add_First_Octet_Threshold_IP_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500234 [Teardown] Run Keywords
Anves Kumar rayankulaf757b102020-07-27 20:41:36 -0500235 ... Delete IP Address 223.7.7.7 AND Test Teardown Execution
Prashanth Katti6cedca22019-05-30 02:31:11 -0500236
237 Add IP Address 223.7.7.7 ${test_subnet_mask} ${test_gateway}
Prashanth Katti6cedca22019-05-30 02:31:11 -0500238
239Add First Octet Lowest IP And Verify
240 [Documentation] Add first octet lowest IP and verify.
241 [Tags] Add_First_Octet_Lowest_IP_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500242 [Teardown] Run Keywords
243 ... Delete IP Address 1.7.7.7 AND Test Teardown Execution
Prashanth Katti6cedca22019-05-30 02:31:11 -0500244
245 Add IP Address 1.7.7.7 ${test_subnet_mask} ${test_gateway}
Prashanth Katti6cedca22019-05-30 02:31:11 -0500246
Prashanth Katti040c8c12019-05-31 04:42:05 -0500247Configure Invalid Netmask
248 [Documentation] Verify error while setting invalid netmask.
249 [Tags] Configure_Invalid_Netmask
250 [Template] Add IP Address
251
252 # ip subnet_mask gateway valid_status_codes
253 ${test_ipv4_addr} ${invalid_netmask} ${test_gateway} ${HTTP_BAD_REQUEST}
254
255Configure Out Of Range Netmask
256 [Documentation] Verify error while setting out of range netmask.
257 [Tags] Configure_Out_Of_Range_Netmask
258 [Template] Add IP Address
259
260 # ip subnet_mask gateway valid_status_codes
261 ${test_ipv4_addr} ${out_of_range_netmask} ${test_gateway} ${HTTP_BAD_REQUEST}
262
263Configure Alpha Netmask
264 [Documentation] Verify error while setting alpha netmask.
265 [Tags] Configure_Alpha_Netmask
266 [Template] Add IP Address
267
268 # ip subnet_mask gateway valid_status_codes
269 ${test_ipv4_addr} ${alpha_netmask} ${test_gateway} ${HTTP_BAD_REQUEST}
270
271Configure More Byte Netmask
272 [Documentation] Verify error while setting more byte netmask.
273 [Tags] Configure_More_Byte_Netmask
274 [Template] Add IP Address
275
276 # ip subnet_mask gateway valid_status_codes
277 ${test_ipv4_addr} ${more_byte_netmask} ${test_gateway} ${HTTP_BAD_REQUEST}
278
279Configure Less Byte Netmask
280 [Documentation] Verify error while setting less byte netmask.
281 [Tags] Configure_Less_Byte_Netmask
282 [Template] Add IP Address
283
284 # ip subnet_mask gateway valid_status_codes
285 ${test_ipv4_addr} ${less_byte_netmask} ${test_gateway} ${HTTP_BAD_REQUEST}
286
Prashanth Kattic6ad6472019-06-14 03:33:39 -0500287Configure Threshold Netmask And Verify
288 [Documentation] Configure threshold netmask and verify.
George Keishing5236ec52022-01-31 12:07:58 -0600289 [Tags] Configure_Threshold_Netmask_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500290 [Teardown] Run Keywords
291 ... Delete IP Address ${test_ipv4_addr} AND Test Teardown Execution
Prashanth Kattic6ad6472019-06-14 03:33:39 -0500292
293 Add IP Address ${test_ipv4_addr} ${threshold_netmask} ${test_gateway}
Prashanth Kattic6ad6472019-06-14 03:33:39 -0500294
295Configure Lowest Netmask And Verify
296 [Documentation] Configure lowest netmask and verify.
George Keishing5236ec52022-01-31 12:07:58 -0600297 [Tags] Configure_Lowest_Netmask_And_Verify
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500298 [Teardown] Run Keywords
299 ... Delete IP Address ${test_ipv4_addr} AND Test Teardown Execution
Prashanth Kattic6ad6472019-06-14 03:33:39 -0500300
301 Add IP Address ${test_ipv4_addr} ${lowest_netmask} ${test_gateway}
Prashanth Kattic6ad6472019-06-14 03:33:39 -0500302
303Configure Network ID
304 [Documentation] Verify error while configuring network ID.
305 [Tags] Configure_Network_ID
306 [Template] Add IP Address
307 [Teardown] Clear IP Settings On Fail ${network_id}
308
309 # ip subnet_mask gateway valid_status_codes
310 ${network_id} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
311
312Configure Less Octet IP
313 [Documentation] Verify error while Configuring less octet IP address.
314 [Tags] Configure_Less_Octet_IP
315 [Template] Add IP Address
316
317 # ip subnet_mask gateway valid_status_codes
318 ${less_octet_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
319
320Configure Empty IP
321 [Documentation] Verify error while Configuring empty IP address.
322 [Tags] Configure_Empty_IP
323 [Template] Add IP Address
324
325 # ip subnet_mask gateway valid_status_codes
326 ${EMPTY} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
327
328Configure Special Char IP
329 [Documentation] Configure invalid IP address containing special chars.
330 [Tags] Configure_Special_Char_IP
331 [Template] Add IP Address
332
333 # ip subnet_mask gateway valid_status_codes
334 @@@.%%.44.11 ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
335
336Configure Hexadecimal IP
337 [Documentation] Configure invalid IP address containing hex value.
338 [Tags] Configure_Hexadecimal_IP
339 [Template] Add IP Address
340
341 # ip subnet_mask gateway valid_status_codes
342 ${hex_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
343
344Configure Negative Octet IP
345 [Documentation] Configure invalid IP address containing negative octet.
346 [Tags] Configure_Negative_Octet_IP
347 [Template] Add IP Address
348
349 # ip subnet_mask gateway valid_status_codes
350 ${negative_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST}
351
Prashanth Katti5cad5a02019-06-20 07:27:10 -0500352Configure Incomplete IP For Gateway
353 [Documentation] Configure incomplete IP for gateway and expect an error.
354 [Tags] Configure_Incomplete_IP_For_Gateway
355 [Template] Add IP Address
356
357 # ip subnet_mask gateway valid_status_codes
358 ${test_ipv4_addr} ${test_subnet_mask} ${less_octet_ip} ${HTTP_BAD_REQUEST}
359
360Configure Special Char IP For Gateway
361 [Documentation] Configure special char IP for gateway and expect an error.
362 [Tags] Configure_Special_Char_IP_For_Gateway
363 [Template] Add IP Address
364
365 # ip subnet_mask gateway valid_status_codes
366 ${test_ipv4_addr} ${test_subnet_mask} @@@.%%.44.11 ${HTTP_BAD_REQUEST}
367
368Configure Hexadecimal IP For Gateway
369 [Documentation] Configure hexadecimal IP for gateway and expect an error.
370 [Tags] Configure_Hexadecimal_IP_For_Gateway
371 [Template] Add IP Address
372
373 # ip subnet_mask gateway valid_status_codes
374 ${test_ipv4_addr} ${test_subnet_mask} ${hex_ip} ${HTTP_BAD_REQUEST}
375
Prashanth Katti7098c972019-07-03 06:56:42 -0500376Get DNS Server And Verify
377 [Documentation] Get DNS server via Redfish and verify.
378 [Tags] Get_DNS_Server_And_Verify
379
380 Verify CLI and Redfish Nameservers
381
382Configure DNS Server And Verify
383 [Documentation] Configure DNS server and verify.
384 [Tags] Configure_DNS_Server_And_Verify
Prashanth Kattic85957c2019-07-09 02:01:20 -0500385 [Setup] DNS Test Setup Execution
Prashanth Katti7098c972019-07-03 06:56:42 -0500386 [Teardown] Run Keywords
387 ... Configure Static Name Servers AND Test Teardown Execution
388
Prashanth Katti7098c972019-07-03 06:56:42 -0500389 Configure Static Name Servers ${static_name_servers}
390 Verify CLI and Redfish Nameservers
391
Prashanth Kattic85957c2019-07-09 02:01:20 -0500392Delete DNS Server And Verify
393 [Documentation] Delete DNS server and verify.
394 [Tags] Delete_DNS_Server_And_Verify
395 [Setup] DNS Test Setup Execution
396 [Teardown] Run Keywords
397 ... Configure Static Name Servers AND Test Teardown Execution
398
399 Delete Static Name Servers
400 Verify CLI and Redfish Nameservers
401
402Configure DNS Server And Check Persistency
403 [Documentation] Configure DNS server and check persistency on reboot.
404 [Tags] Configure_DNS_Server_And_Check_Persistency
405 [Setup] DNS Test Setup Execution
406 [Teardown] Run Keywords
407 ... Configure Static Name Servers AND Test Teardown Execution
408
409 Configure Static Name Servers ${static_name_servers}
410 # Reboot BMC and verify persistency.
411 OBMC Reboot (off)
Anves Kumar rayankula8c628b72021-02-05 05:03:45 -0600412 Redfish.Login
Prashanth Kattic85957c2019-07-09 02:01:20 -0500413 Verify CLI and Redfish Nameservers
414
Prashanth Katti3063ffe2019-07-25 04:35:25 -0500415Configure Loopback IP For Gateway
416 [Documentation] Configure loopback IP for gateway and expect an error.
417 [Tags] Configure_Loopback_IP_For_Gateway
418 [Template] Add IP Address
419 [Teardown] Clear IP Settings On Fail ${test_ipv4_addr}
420
421 # ip subnet_mask gateway valid_status_codes
422 ${test_ipv4_addr} ${test_subnet_mask} ${loopback_ip} ${HTTP_BAD_REQUEST}
423
424Configure Network ID For Gateway
425 [Documentation] Configure network ID for gateway and expect an error.
426 [Tags] Configure_Network_ID_For_Gateway
427 [Template] Add IP Address
428 [Teardown] Clear IP Settings On Fail ${test_ipv4_addr}
429
430 # ip subnet_mask gateway valid_status_codes
431 ${test_ipv4_addr} ${test_subnet_mask} ${network_id} ${HTTP_BAD_REQUEST}
432
433Configure Multicast IP For Gateway
434 [Documentation] Configure multicast IP for gateway and expect an error.
435 [Tags] Configure_Multicast_IP_For_Gateway
436 [Template] Add IP Address
437 [Teardown] Clear IP Settings On Fail ${test_ipv4_addr}
438
439 # ip subnet_mask gateway valid_status_codes
Tony Lee412c6682020-04-01 17:34:30 +0800440 ${test_ipv4_addr} ${test_subnet_mask} ${multicast_ip} ${HTTP_BAD_REQUEST}
Prashanth Katti3063ffe2019-07-25 04:35:25 -0500441
442Configure Broadcast IP For Gateway
443 [Documentation] Configure broadcast IP for gateway and expect an error.
444 [Tags] Configure_Broadcast_IP_For_Gateway
445 [Template] Add IP Address
446 [Teardown] Clear IP Settings On Fail ${test_ipv4_addr}
447
448 # ip subnet_mask gateway valid_status_codes
449 ${test_ipv4_addr} ${test_subnet_mask} ${broadcast_ip} ${HTTP_BAD_REQUEST}
Prashanth Kattic85957c2019-07-09 02:01:20 -0500450
Prashanth Katti3c7b6432019-07-26 06:53:37 -0500451Configure Null Value For DNS Server
452 [Documentation] Configure null value for DNS server and expect an error.
453 [Tags] Configure_Null_Value_For_DNS_Server
454 [Setup] DNS Test Setup Execution
455 [Teardown] Run Keywords
456 ... Configure Static Name Servers AND Test Teardown Execution
457
458 Configure Static Name Servers ${null_value} ${HTTP_BAD_REQUEST}
459
Prashanth Kattiafe16b72019-08-02 00:29:45 -0500460Configure Empty Value For DNS Server
461 [Documentation] Configure empty value for DNS server and expect an error.
462 [Tags] Configure_Empty_Value_For_DNS_Server
463 [Setup] DNS Test Setup Execution
464 [Teardown] Run Keywords
465 ... Configure Static Name Servers AND Test Teardown Execution
466
467 Configure Static Name Servers ${empty_dictionary} ${HTTP_BAD_REQUEST}
468
469Configure String Value For DNS Server
470 [Documentation] Configure string value for DNS server and expect an error.
471 [Tags] Configure_String_Value_For_DNS_Server
472 [Setup] DNS Test Setup Execution
473 [Teardown] Run Keywords
474 ... Configure Static Name Servers AND Test Teardown Execution
475
476 Configure Static Name Servers ${string_value} ${HTTP_BAD_REQUEST}
477
Prashanth Katti568df5f2020-05-15 06:00:37 -0500478Modify IPv4 Address And Verify
479 [Documentation] Modify IP address via Redfish and verify.
George Keishing0c8100f2022-01-13 00:24:57 -0600480 [Tags] Modify_IPv4_Address_And_Verify
Prashanth Katti568df5f2020-05-15 06:00:37 -0500481 [Teardown] Run Keywords
Anves Kumar rayankula045814b2020-10-09 09:17:05 -0500482 ... Delete IP Address ${test_ipv4_addr2} AND Test Teardown Execution
Prashanth Katti568df5f2020-05-15 06:00:37 -0500483
484 Add IP Address ${test_ipv4_addr} ${test_subnet_mask} ${test_gateway}
485
486 Update IP Address ${test_ipv4_addr} ${test_ipv4_addr2} ${test_subnet_mask} ${test_gateway}
487
Anvesh Kumar9c7238d2020-04-21 03:56:21 -0500488
Anves Kumar rayankula6b9fcd12020-12-18 01:03:19 -0600489Configure Invalid Values For DNS Server
490 [Documentation] Configure invalid values for DNS server and expect an error.
George Keishing5236ec52022-01-31 12:07:58 -0600491 [Tags] Configure_Invalid_Values_For_DNS_Server
Anves Kumar rayankula6b9fcd12020-12-18 01:03:19 -0600492 [Setup] DNS Test Setup Execution
493 [Template] Configure Static Name Servers
494 [Teardown] Run Keywords
495 ... Configure Static Name Servers AND Test Teardown Execution
496
497 # static_name_servers valid_status_codes
498 0xa.0xb.0xc.0xd ${HTTP_BAD_REQUEST}
499 10.-7.-7.-7 ${HTTP_BAD_REQUEST}
500 10.3.36 ${HTTP_BAD_REQUEST}
501 @@@.%%.44.11 ${HTTP_BAD_REQUEST}
502
503
504Config Multiple DNS Servers And Verify
505 [Documentation] Config multiple DNS servers and verify.
506 [Tags] Config_Multiple_DNS_Servers_And_Verify
507 [Setup] DNS Test Setup Execution
508 [Teardown] Run Keywords
509 ... Configure Static Name Servers AND Test Teardown Execution
510
511 @{list_name_servers}= Create List 10.5.5.10 10.20.5.10 10.5.6.7
512 Configure Static Name Servers ${list_name_servers}
513 Verify CLI and Redfish Nameservers
514
515
Anves Kumar rayankulad4cdd8c2021-01-11 04:10:05 -0600516Configure And Verify Multiple Static IPv4 Addresses
517 [Documentation] Configure multiple static ipv4 address via Redfish and verify.
518 [Tags] Configure_And_Verify_Multiple_Static_IPv4_Addresses
519 [Teardown] Run Keywords Delete Multiple Static IPv4 Addresses ${test_ipv4_addresses}
520 ... AND Test Teardown Execution
521
522 ${test_ipv4_addresses}= Create List ${test_ipv4_addr} ${test_ipv4_addr2}
523 Configure Multiple Static IPv4 Addresses ${test_ipv4_addresses} ${test_subnet_mask} ${test_gateway}
524
525
526Configure Multiple Static IPv4 Addresses And Check Persistency
527 [Documentation] Configure multiple static ipv4 address via Redfish and check persistency.
528 [Tags] Configure_Multiple_Static_IPv4_Addresses_And_Check_Persistency
529 [Teardown] Run Keywords Delete Multiple Static IPv4 Addresses ${test_ipv4_addresses}
530 ... AND Test Teardown Execution
531
532 ${test_ipv4_addresses}= Create List ${test_ipv4_addr} ${test_ipv4_addr2}
533 Configure Multiple Static IPv4 Addresses ${test_ipv4_addresses} ${test_subnet_mask} ${test_gateway}
534
535 # Reboot BMC and verify persistency.
536 OBMC Reboot (off)
Anves Kumar rayankula8c628b72021-02-05 05:03:45 -0600537 Redfish.Login
Anves Kumar rayankulad4cdd8c2021-01-11 04:10:05 -0600538 FOR ${ip} IN @{test_ipv4_addresses}
539 Verify IP And Netmask On BMC ${ip} ${test_subnet_mask}
540 END
541
542
Anves Kumar rayankula43e93e12021-01-27 03:52:37 -0600543Configure And Verify Multiple IPv4 Addresses
544 [Documentation] Configure multiple IPv4 addresses and verify.
George Keishing0c8100f2022-01-13 00:24:57 -0600545 [Tags] Configure_And_Verify_Multiple_IPv4_Addresses
Anves Kumar rayankula43e93e12021-01-27 03:52:37 -0600546 [Teardown] Run Keywords
547 ... Delete IP Address ${test_ipv4_addr} AND Delete IP Address ${test_ipv4_addr2}
548 ... AND Test Teardown Execution
549
550 ${ip1}= Create dictionary Address=${test_ipv4_addr}
551 ... SubnetMask=255.255.0.0 Gateway=${test_gateway}
552 ${ip2}= Create dictionary Address=${test_ipv4_addr2}
553 ... SubnetMask=255.255.252.0 Gateway=${test_gateway}
554
555 ${empty_dict}= Create Dictionary
556 ${patch_list}= Create List
557 ${network_configurations}= Get Network Configuration
558 ${num_entries}= Get Length ${network_configurations}
559
560 FOR ${INDEX} IN RANGE 0 ${num_entries}
561 Append To List ${patch_list} ${empty_dict}
562 END
563
564 # We need not check for existence of IP on BMC while adding.
565 Append To List ${patch_list} ${ip1} ${ip2}
566 ${payload}= Create Dictionary IPv4StaticAddresses=${patch_list}
567 ${active_channel_config}= Get Active Channel Config
568 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
569 Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} body=&{payload}
Anves Kumar rayankula53b80302021-05-21 01:50:03 -0500570 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
Anves Kumar rayankula43e93e12021-01-27 03:52:37 -0600571
572 # Note: Network restart takes around 15-18s after patch request processing.
573 Sleep ${NETWORK_TIMEOUT}s
574 Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT}
575 Verify IP On BMC ${test_ipv4_addr}
576 Verify IP On BMC ${test_ipv4_addr2}
577
578
Anves Kumar rayankulaeefdb562021-02-08 07:54:11 -0600579Config Multiple DNS Servers And Check Persistency
580 [Documentation] Config multiple DNS and check persistency.
581 [Tags] Config_Multiple_DNS_Servers_And_Check_Persistency
582 [Setup] DNS Test Setup Execution
583 [Teardown] Run Keywords
584 ... Configure Static Name Servers AND Test Teardown Execution
585
586 @{list_name_servers}= Create List 10.5.5.10 10.20.5.10 10.5.6.7
587 Configure Static Name Servers ${list_name_servers}
588
589 # Reboot BMC and verify persistency.
590 OBMC Reboot (off)
591 Redfish.Login
592 Verify CLI and Redfish Nameservers
593
Anves Kumar rayankula2f137eb2021-03-29 01:12:01 -0500594
595Configure Static IP Without Using Gateway And Verify
596 [Documentation] Configure static IP without using gateway and verify error.
597 [Tags] Configure_Static_IP_Without_Using_Gateway_And_Verify
598
599 ${ip}= Create dictionary Address=${test_ipv4_addr}
600 ... SubnetMask=${test_subnet_mask}
601 ${empty_dict}= Create Dictionary
602 ${patch_list}= Create List
603 ${network_configurations}= Get Network Configuration
604
605 ${num_entries}= Get Length ${network_configurations}
606 FOR ${INDEX} IN RANGE 0 ${num_entries}
607 Append To List ${patch_list} ${empty_dict}
608 END
609
610 # We need not check for existence of IP on BMC while adding.
611 Append To List ${patch_list} ${ip}
612 ${payload}= Create Dictionary IPv4StaticAddresses=${patch_list}
613 ${active_channel_config}= Get Active Channel Config
614 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
615 Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
616 ... body=&{payload} valid_status_codes=[${HTTP_BAD_REQUEST}]
617
Anves Kumar rayankulaac0a7ba2021-03-09 08:10:20 -0600618
619Test Network Response On Specified Host State
620 [Documentation] Verifying the BMC network response when host is on and off.
621 [Tags] Test_Network_Response_On_Specified_Host_State
622 [Template] Verify Network Response On Specified Host State
623
624 # host_state
625 on
626 off
627
Sweta Potthurifb001362022-03-14 02:21:14 -0500628
Prashanth Kattif58cce02019-02-06 03:05:14 -0600629*** Keywords ***
630
631Test Setup Execution
632 [Documentation] Test setup execution.
633
George Keishing97c93942019-03-04 12:45:07 -0600634 Redfish.Login
Prashanth Kattif58cce02019-02-06 03:05:14 -0600635
636 @{network_configurations}= Get Network Configuration
637 Set Test Variable @{network_configurations}
638
639 # Get BMC IP address and prefix length.
640 ${ip_data}= Get BMC IP Info
641 Set Test Variable ${ip_data}
642
Prashanth Katti747ce9d2019-02-07 07:23:48 -0600643
Prashanth Katti747ce9d2019-02-07 07:23:48 -0600644Verify Netmask On BMC
645 [Documentation] Verify netmask on BMC.
Prashanth Kattif58cce02019-02-06 03:05:14 -0600646 [Arguments] ${netmask}
647
648 # Description of the argument(s):
649 # netmask netmask value to be verified.
650
Prashanth Katti747ce9d2019-02-07 07:23:48 -0600651 ${prefix_length}= Netmask Prefix Length ${netmask}
652
653 Should Contain Match ${ip_data} */${prefix_length}
654 ... msg=Prefix length does not exist.
Prashanth Kattif58cce02019-02-06 03:05:14 -0600655
Prashanth Katti2c5c3bb2019-02-14 04:23:07 -0600656Verify IP And Netmask On BMC
657 [Documentation] Verify IP and netmask on BMC.
658 [Arguments] ${ip} ${netmask}
659
660 # Description of the argument(s):
661 # ip IP address to be verified.
662 # netmask netmask value to be verified.
663
664 ${prefix_length}= Netmask Prefix Length ${netmask}
665 @{ip_data}= Get BMC IP Info
666
667 ${ip_with_netmask}= Catenate ${ip}/${prefix_length}
668 Should Contain ${ip_data} ${ip_with_netmask}
669 ... msg=IP and netmask pair does not exist.
670
Prashanth Kattif58cce02019-02-06 03:05:14 -0600671Test Teardown Execution
672 [Documentation] Test teardown execution.
673
674 FFDC On Test Case Fail
George Keishing97c93942019-03-04 12:45:07 -0600675 Redfish.Logout
Prashanth Kattia8442512019-06-07 06:47:09 -0500676
677Clear IP Settings On Fail
678 [Documentation] Clear IP settings on fail.
679 [Arguments] ${ip}
680
681 # Description of argument(s):
682 # ip IP address to be deleted.
683
684 Run Keyword If '${TEST STATUS}' == 'FAIL'
685 ... Delete IP Address ${ip}
686
687 Test Teardown Execution
Prashanth Kattiadf0b4e2019-06-10 04:20:30 -0500688
Prashanth Katti7098c972019-07-03 06:56:42 -0500689Verify CLI and Redfish Nameservers
690 [Documentation] Verify that nameservers obtained via Redfish do not
691 ... match those found in /etc/resolv.conf.
692
Tony Lee412c6682020-04-01 17:34:30 +0800693 ${active_channel_config}= Get Active Channel Config
694 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
695
Anves Kumar rayankula91548ea2020-06-18 00:28:13 -0500696 ${redfish_nameservers}= Redfish.Get Attribute
697 ... ${REDFISH_NW_ETH_IFACE}${ethernet_interface} StaticNameServers
Prashanth Katti7098c972019-07-03 06:56:42 -0500698 ${resolve_conf_nameservers}= CLI Get Nameservers
Michael Walsh39c00512019-07-17 10:54:06 -0500699 Rqprint Vars redfish_nameservers resolve_conf_nameservers
Prashanth Katti7098c972019-07-03 06:56:42 -0500700
Sweta Potthurid77ea982021-07-01 04:30:38 -0500701 List Should Contain Sub List ${resolve_conf_nameservers} ${redfish_nameservers}
702 ... msg=The nameservers obtained via Redfish do not match those found in /etc/resolv.conf.
Prashanth Katti7098c972019-07-03 06:56:42 -0500703
704Configure Static Name Servers
705 [Documentation] Configure DNS server on BMC.
Prashanth Kattic85957c2019-07-09 02:01:20 -0500706 [Arguments] ${static_name_servers}=${original_nameservers}
Prashanth Katti3c7b6432019-07-26 06:53:37 -0500707 ... ${valid_status_codes}=${HTTP_OK}
Prashanth Katti7098c972019-07-03 06:56:42 -0500708
George Keishing9cb2e592019-07-12 09:37:33 -0500709 # Description of the argument(s):
Prashanth Katti7098c972019-07-03 06:56:42 -0500710 # static_name_servers A list of static name server IPs to be
711 # configured on the BMC.
712
Tony Lee412c6682020-04-01 17:34:30 +0800713 ${active_channel_config}= Get Active Channel Config
714 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
715
Anves Kumar rayankula6b9fcd12020-12-18 01:03:19 -0600716 ${type} = Evaluate type($static_name_servers).__name__
717 ${static_name_servers}= Set Variable If '${type}'=='str'
718 ... '${static_name_servers}' ${static_name_servers}
719
Prashanth Katti9d995fc2019-09-24 01:29:06 -0500720 # Currently BMC is sending 500 response code instead of 400 for invalid scenarios.
Anves Kumar rayankula91548ea2020-06-18 00:28:13 -0500721 Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
722 ... body={'StaticNameServers': ${static_name_servers}}
Prashanth Katti9d995fc2019-09-24 01:29:06 -0500723 ... valid_status_codes=[${valid_status_codes}, ${HTTP_INTERNAL_SERVER_ERROR}]
Prashanth Kattic85957c2019-07-09 02:01:20 -0500724
Prashanth Kattif247be32019-10-07 04:40:43 -0500725 # Patch operation takes 1 to 3 seconds to set new value.
726 Sleep 3s
727
Prashanth Katti7f9e60f2019-07-26 01:18:41 -0500728 # Check if newly added DNS server is configured on BMC.
729 ${cli_nameservers}= CLI Get Nameservers
Prashanth Katti3c7b6432019-07-26 06:53:37 -0500730 ${cmd_status}= Run Keyword And Return Status
731 ... List Should Contain Sub List ${cli_nameservers} ${static_name_servers}
732
733 Run Keyword If '${valid_status_codes}' == '${HTTP_OK}'
734 ... Should Be True ${cmd_status} == ${True}
735 ... ELSE Should Be True ${cmd_status} == ${False}
Prashanth Katti7f9e60f2019-07-26 01:18:41 -0500736
Prashanth Kattic85957c2019-07-09 02:01:20 -0500737Delete Static Name Servers
738 [Documentation] Delete static name servers.
739
Anves Kumar rayankula045814b2020-10-09 09:17:05 -0500740 Configure Static Name Servers static_name_servers=@{EMPTY}
Prashanth Kattic85957c2019-07-09 02:01:20 -0500741
742 # Check if all name servers deleted on BMC.
743 ${nameservers}= CLI Get Nameservers
744 Should Be Empty ${nameservers}
745
746DNS Test Setup Execution
747 [Documentation] Do DNS test setup execution.
748
749 Redfish.Login
750
Tony Lee412c6682020-04-01 17:34:30 +0800751 ${active_channel_config}= Get Active Channel Config
752 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
753
Anves Kumar rayankula91548ea2020-06-18 00:28:13 -0500754 ${original_nameservers}= Redfish.Get Attribute
755 ... ${REDFISH_NW_ETH_IFACE}${ethernet_interface} StaticNameServers
Tony Lee412c6682020-04-01 17:34:30 +0800756
Prashanth Kattic85957c2019-07-09 02:01:20 -0500757 Rprint Vars original_nameservers
758 # Set suite variables to trigger restoration during teardown.
759 Set Suite Variable ${original_nameservers}
Prashanth Kattib478d902020-05-08 10:05:32 -0500760
761Suite Setup Execution
762 [Documentation] Do suite setup execution.
763
764 ${test_gateway}= Get BMC Default Gateway
765 Set Suite Variable ${test_gateway}
Prashanth Katti568df5f2020-05-15 06:00:37 -0500766
767Update IP Address
768 [Documentation] Update IP address of BMC.
Anves Kumar rayankula53b80302021-05-21 01:50:03 -0500769 [Arguments] ${ip} ${new_ip} ${netmask} ${gw_ip}
770 ... ${valid_status_codes}=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
Prashanth Katti568df5f2020-05-15 06:00:37 -0500771
772 # Description of argument(s):
773 # ip IP address to be replaced (e.g. "10.7.7.7").
774 # new_ip New IP address to be configured.
775 # netmask Netmask value.
776 # gw_ip Gateway IP address.
777 # valid_status_codes Expected return code from patch operation
778 # (e.g. "200"). See prolog of rest_request
779 # method in redfish_plus.py for details.
780
781 ${empty_dict}= Create Dictionary
782 ${patch_list}= Create List
783 ${ip_data}= Create Dictionary Address=${new_ip} SubnetMask=${netmask} Gateway=${gw_ip}
784
785 # Find the position of IP address to be modified.
786 @{network_configurations}= Get Network Configuration
787 FOR ${network_configuration} IN @{network_configurations}
788 Run Keyword If '${network_configuration['Address']}' == '${ip}'
789 ... Append To List ${patch_list} ${ip_data}
790 ... ELSE Append To List ${patch_list} ${empty_dict}
791 END
792
793 ${ip_found}= Run Keyword And Return Status List Should Contain Value
794 ... ${patch_list} ${ip_data} msg=${ip} does not exist on BMC
795 Pass Execution If ${ip_found} == ${False} ${ip} does not exist on BMC
796
797 # Run patch command only if given IP is found on BMC
798 ${data}= Create Dictionary IPv4StaticAddresses=${patch_list}
799
Anves Kumar rayankulaabf68542021-06-23 00:14:54 -0500800 ${active_channel_config}= Get Active Channel Config
801 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
802
803 Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
804 ... body=&{data} valid_status_codes=${valid_status_codes}
Prashanth Katti568df5f2020-05-15 06:00:37 -0500805
806 # Note: Network restart takes around 15-18s after patch request processing.
807 Sleep ${NETWORK_TIMEOUT}s
808 Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT}
809
810 Verify IP On BMC ${new_ip}
811 Validate Network Config On BMC
Anves Kumar rayankulad4cdd8c2021-01-11 04:10:05 -0600812
813Configure Multiple Static IPv4 Addresses
814 [Documentation] Configure multiple static ipv4 address via Redfish and verify.
815 [Arguments] ${ip_addreses} ${subnet_mask} ${gateway}
816
817 # Description of argument(s):
818 # ip_addreses A list of IP addresses to be added (e.g.["10.7.7.7"]).
819 # subnet_mask Subnet mask for the IP to be added (e.g. "255.255.0.0").
820 # gateway Gateway for the IP to be added (e.g. "10.7.7.1").
821
822 FOR ${ip} IN @{ip_addreses}
823 Add IP Address ${ip} ${subnet_mask} ${gateway}
824 END
825 Validate Network Config On BMC
826
827
828Delete Multiple Static IPv4 Addresses
829 [Documentation] Delete multiple static ipv4 address via Redfish.
830 [Arguments] ${ip_addreses}
831
832 # Description of argument(s):
833 # ip_addreses A list of IP addresses to be deleted (e.g.["10.7.7.7"]).
834
835 FOR ${ip} IN @{ip_addreses}
836 Delete IP Address ${ip}
837 END
838 Validate Network Config On BMC
Anves Kumar rayankulaac0a7ba2021-03-09 08:10:20 -0600839
840Verify Network Response On Specified Host State
841 [Documentation] Verifying the BMC network response when host is on and off.
842 [Arguments] ${host_state}
843
844 # Description of argument(s):
845 # host_state if host_state is on then host is booted to operating system.
846 # if host_state is off then host is power off.
847 # (eg. on, off).
848
849 ${active_channel_config}= Get Active Channel Config
850 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
851
852 Run Keyword If '${host_state}' == 'on'
853 ... Redfish Power On stack_mode=skip
854 ... ELSE
855 ... Redfish Power off stack_mode=skip
856
857 Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
858 Ping Host ${OPENBMC_HOST}
859