Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Network interface configuration and verification |
| 3 | ... tests. |
| 4 | |
George Keishing | 5d46755 | 2019-02-08 23:30:48 -0600 | [diff] [blame] | 5 | Resource ../../lib/bmc_redfish_resource.robot |
| 6 | Resource ../../lib/bmc_network_utils.robot |
| 7 | Resource ../../lib/openbmc_ffdc.robot |
Prashanth Katti | 747ce9d | 2019-02-07 07:23:48 -0600 | [diff] [blame] | 8 | Library ../../lib/bmc_network_utils.py |
Vijay | de3bf7b | 2019-04-16 04:56:09 -0500 | [diff] [blame] | 9 | Library Collections |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 10 | |
aravinth0510 | ca054ee | 2022-06-16 13:26:15 +0000 | [diff] [blame] | 11 | Suite Setup Suite Setup Execution |
| 12 | Suite Teardown Suite Teardown Execution |
| 13 | Test Setup Test Setup Execution |
| 14 | Test Teardown Test Teardown Execution |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 15 | |
Prashanth Katti | f34fafa | 2019-06-20 05:04:40 -0500 | [diff] [blame] | 16 | Force Tags Network_Conf_Test |
| 17 | |
Prashanth Katti | 23efc6e | 2019-03-13 06:07:15 -0500 | [diff] [blame] | 18 | *** Variables *** |
Vijay | de3bf7b | 2019-04-16 04:56:09 -0500 | [diff] [blame] | 19 | ${test_hostname} openbmc |
| 20 | ${test_ipv4_addr} 10.7.7.7 |
| 21 | ${test_ipv4_invalid_addr} 0.0.1.a |
| 22 | ${test_subnet_mask} 255.255.0.0 |
Prashanth Katti | b36a752 | 2019-05-22 05:32:39 -0500 | [diff] [blame] | 23 | ${broadcast_ip} 10.7.7.255 |
| 24 | ${loopback_ip} 127.0.0.2 |
| 25 | ${multicast_ip} 224.6.6.6 |
| 26 | ${out_of_range_ip} 10.7.7.256 |
Prashanth Katti | 568df5f | 2020-05-15 06:00:37 -0500 | [diff] [blame] | 27 | ${test_ipv4_addr2} 10.7.7.8 |
Prashanth Katti | 23efc6e | 2019-03-13 06:07:15 -0500 | [diff] [blame] | 28 | |
George Keishing | 16b3c7b | 2021-01-28 09:23:37 -0600 | [diff] [blame] | 29 | # Valid netmask is 4 bytes long and has continuous block of 1s. |
Prashanth Katti | 040c8c1 | 2019-05-31 04:42:05 -0500 | [diff] [blame] | 30 | # Maximum valid value in each octet is 255 and least value is 0. |
| 31 | # 253 is not valid, as binary value is 11111101. |
| 32 | ${invalid_netmask} 255.255.253.0 |
| 33 | ${alpha_netmask} ff.ff.ff.ff |
| 34 | # Maximum value of octet in netmask is 255. |
| 35 | ${out_of_range_netmask} 255.256.255.0 |
| 36 | ${more_byte_netmask} 255.255.255.0.0 |
| 37 | ${less_byte_netmask} 255.255.255 |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 38 | ${threshold_netmask} 255.255.255.255 |
| 39 | ${lowest_netmask} 128.0.0.0 |
| 40 | |
| 41 | # There will be 4 octets in IP address (e.g. xx.xx.xx.xx) |
| 42 | # but trying to configure xx.xx.xx |
| 43 | ${less_octet_ip} 10.3.36 |
| 44 | |
| 45 | # For the address 10.6.6.6, the 10.6.6.0 portion describes the |
| 46 | # network ID and the 6 describe the host. |
| 47 | |
| 48 | ${network_id} 10.7.7.0 |
| 49 | ${hex_ip} 0xa.0xb.0xc.0xd |
| 50 | ${negative_ip} 10.-7.-7.7 |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 51 | @{static_name_servers} 10.5.5.5 |
Prashanth Katti | 3c7b643 | 2019-07-26 06:53:37 -0500 | [diff] [blame] | 52 | @{null_value} null |
Prashanth Katti | afe16b7 | 2019-08-02 00:29:45 -0500 | [diff] [blame] | 53 | @{empty_dictionary} {} |
| 54 | @{string_value} aa.bb.cc.dd |
| 55 | |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 56 | *** Test Cases *** |
| 57 | |
| 58 | Get IP Address And Verify |
| 59 | [Documentation] Get IP Address And Verify. |
George Keishing | 5d46755 | 2019-02-08 23:30:48 -0600 | [diff] [blame] | 60 | [Tags] Get_IP_Address_And_Verify |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 61 | |
Sushil Singh | 5062114 | 2020-06-16 11:12:21 -0500 | [diff] [blame] | 62 | FOR ${network_configuration} IN @{network_configurations} |
| 63 | Verify IP On BMC ${network_configuration['Address']} |
| 64 | END |
Prashanth Katti | 747ce9d | 2019-02-07 07:23:48 -0600 | [diff] [blame] | 65 | |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 66 | Get Netmask And Verify |
| 67 | [Documentation] Get Netmask And Verify. |
George Keishing | 5d46755 | 2019-02-08 23:30:48 -0600 | [diff] [blame] | 68 | [Tags] Get_Netmask_And_Verify |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 69 | |
Sushil Singh | 5062114 | 2020-06-16 11:12:21 -0500 | [diff] [blame] | 70 | FOR ${network_configuration} IN @{network_configurations} |
| 71 | Verify Netmask On BMC ${network_configuration['SubnetMask']} |
| 72 | END |
Prashanth Katti | 747ce9d | 2019-02-07 07:23:48 -0600 | [diff] [blame] | 73 | |
Prashanth Katti | 2ec9d8b | 2019-02-12 05:20:19 -0600 | [diff] [blame] | 74 | Get Gateway And Verify |
| 75 | [Documentation] Get gateway and verify it's existence on the BMC. |
| 76 | [Tags] Get_Gateway_And_Verify |
| 77 | |
Sushil Singh | 5062114 | 2020-06-16 11:12:21 -0500 | [diff] [blame] | 78 | FOR ${network_configuration} IN @{network_configurations} |
| 79 | Verify Gateway On BMC ${network_configuration['Gateway']} |
| 80 | END |
Prashanth Katti | 2ec9d8b | 2019-02-12 05:20:19 -0600 | [diff] [blame] | 81 | |
| 82 | Get MAC Address And Verify |
| 83 | [Documentation] Get MAC address and verify it's existence on the BMC. |
| 84 | [Tags] Get_MAC_Address_And_Verify |
| 85 | |
Tony Lee | 412c668 | 2020-04-01 17:34:30 +0800 | [diff] [blame] | 86 | ${active_channel_config}= Get Active Channel Config |
| 87 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 88 | |
| 89 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
Prashanth Katti | 2ec9d8b | 2019-02-12 05:20:19 -0600 | [diff] [blame] | 90 | ${macaddr}= Get From Dictionary ${resp.dict} MACAddress |
| 91 | Validate MAC On BMC ${macaddr} |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 92 | |
Prashanth Katti | 2c5c3bb | 2019-02-14 04:23:07 -0600 | [diff] [blame] | 93 | Verify All Configured IP And Netmask |
| 94 | [Documentation] Verify all configured IP and netmask on BMC. |
| 95 | [Tags] Verify_All_Configured_IP_And_Netmask |
| 96 | |
Sushil Singh | 5062114 | 2020-06-16 11:12:21 -0500 | [diff] [blame] | 97 | FOR ${network_configuration} IN @{network_configurations} |
| 98 | Verify IP And Netmask On BMC ${network_configuration['Address']} |
| 99 | ... ${network_configuration['SubnetMask']} |
| 100 | END |
Prashanth Katti | 2c5c3bb | 2019-02-14 04:23:07 -0600 | [diff] [blame] | 101 | |
Prashanth Katti | 23efc6e | 2019-03-13 06:07:15 -0500 | [diff] [blame] | 102 | Get Hostname And Verify |
| 103 | [Documentation] Get hostname via Redfish and verify. |
| 104 | [Tags] Get_Hostname_And_Verify |
| 105 | |
| 106 | ${hostname}= Redfish_Utils.Get Attribute ${REDFISH_NW_PROTOCOL_URI} HostName |
| 107 | |
| 108 | Validate Hostname On BMC ${hostname} |
| 109 | |
| 110 | Configure Hostname And Verify |
| 111 | [Documentation] Configure hostname via Redfish and verify. |
| 112 | [Tags] Configure_Hostname_And_Verify |
shrsuman123 | 578276c | 2020-08-04 04:28:58 -0500 | [diff] [blame] | 113 | [Teardown] Run Keywords |
| 114 | ... Configure Hostname ${hostname} AND Validate Hostname On BMC ${hostname} |
Prashanth Katti | 23efc6e | 2019-03-13 06:07:15 -0500 | [diff] [blame] | 115 | |
Prashanth Katti | adf0b4e | 2019-06-10 04:20:30 -0500 | [diff] [blame] | 116 | ${hostname}= Redfish_Utils.Get Attribute ${REDFISH_NW_PROTOCOL_URI} HostName |
Prashanth Katti | 23efc6e | 2019-03-13 06:07:15 -0500 | [diff] [blame] | 117 | |
Prashanth Katti | adf0b4e | 2019-06-10 04:20:30 -0500 | [diff] [blame] | 118 | Configure Hostname ${test_hostname} |
Prashanth Katti | 23efc6e | 2019-03-13 06:07:15 -0500 | [diff] [blame] | 119 | Validate Hostname On BMC ${test_hostname} |
| 120 | |
nagarjunb22 | 60784a4 | 2022-06-13 10:39:33 +0530 | [diff] [blame] | 121 | # Verify configured hostname via redfish. |
| 122 | ${new_hostname}= Redfish_Utils.Get Attribute ${REDFISH_NW_PROTOCOL_URI} HostName |
| 123 | Should Be Equal ${new_hostname} ${test_hostname} |
| 124 | |
Prashanth Katti | adf0b4e | 2019-06-10 04:20:30 -0500 | [diff] [blame] | 125 | |
Vijay | de3bf7b | 2019-04-16 04:56:09 -0500 | [diff] [blame] | 126 | Add Valid IPv4 Address And Verify |
| 127 | [Documentation] Add IPv4 Address via Redfish and verify. |
George Keishing | 0c8100f | 2022-01-13 00:24:57 -0600 | [diff] [blame] | 128 | [Tags] Add_Valid_IPv4_Address_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 129 | [Teardown] Run Keywords |
| 130 | ... Delete IP Address ${test_ipv4_addr} AND Test Teardown Execution |
Vijay | de3bf7b | 2019-04-16 04:56:09 -0500 | [diff] [blame] | 131 | |
| 132 | Add IP Address ${test_ipv4_addr} ${test_subnet_mask} ${test_gateway} |
Vijay | de3bf7b | 2019-04-16 04:56:09 -0500 | [diff] [blame] | 133 | |
| 134 | Add Invalid IPv4 Address And Verify |
| 135 | [Documentation] Add Invalid IPv4 Address via Redfish and verify. |
George Keishing | 0c8100f | 2022-01-13 00:24:57 -0600 | [diff] [blame] | 136 | [Tags] Add_Invalid_IPv4_Address_And_Verify |
Vijay | de3bf7b | 2019-04-16 04:56:09 -0500 | [diff] [blame] | 137 | |
| 138 | Add IP Address ${test_ipv4_invalid_addr} ${test_subnet_mask} |
| 139 | ... ${test_gateway} valid_status_codes=${HTTP_BAD_REQUEST} |
| 140 | |
Prashanth Katti | b36a752 | 2019-05-22 05:32:39 -0500 | [diff] [blame] | 141 | Configure Out Of Range IP |
| 142 | [Documentation] Configure out-of-range IP address. |
| 143 | [Tags] Configure_Out_Of_Range_IP |
| 144 | [Template] Add IP Address |
| 145 | |
| 146 | # ip subnet_mask gateway valid_status_codes |
| 147 | ${out_of_range_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 148 | |
| 149 | Configure Broadcast IP |
| 150 | [Documentation] Configure broadcast IP address. |
| 151 | [Tags] Configure_Broadcast_IP |
| 152 | [Template] Add IP Address |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 153 | [Teardown] Clear IP Settings On Fail ${broadcast_ip} |
Prashanth Katti | b36a752 | 2019-05-22 05:32:39 -0500 | [diff] [blame] | 154 | |
| 155 | # ip subnet_mask gateway valid_status_codes |
| 156 | ${broadcast_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 157 | |
| 158 | Configure Multicast IP |
| 159 | [Documentation] Configure multicast IP address. |
| 160 | [Tags] Configure_Multicast_IP |
| 161 | [Template] Add IP Address |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 162 | [Teardown] Clear IP Settings On Fail ${multicast_ip} |
Prashanth Katti | b36a752 | 2019-05-22 05:32:39 -0500 | [diff] [blame] | 163 | |
| 164 | # ip subnet_mask gateway valid_status_codes |
| 165 | ${multicast_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 166 | |
| 167 | Configure Loopback IP |
| 168 | [Documentation] Configure loopback IP address. |
| 169 | [Tags] Configure_Loopback_IP |
| 170 | [Template] Add IP Address |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 171 | [Teardown] Clear IP Settings On Fail ${loopback_ip} |
Prashanth Katti | b36a752 | 2019-05-22 05:32:39 -0500 | [diff] [blame] | 172 | |
| 173 | # ip subnet_mask gateway valid_status_codes |
| 174 | ${loopback_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 175 | |
| 176 | Add Valid IPv4 Address And Check Persistency |
nagarjunb22 | 60784a4 | 2022-06-13 10:39:33 +0530 | [diff] [blame] | 177 | [Documentation] Add IPv4 address and check persistency. |
George Keishing | 0c8100f | 2022-01-13 00:24:57 -0600 | [diff] [blame] | 178 | [Tags] Add_Valid_IPv4_Address_And_Check_Persistency |
nagarjunb22 | 60784a4 | 2022-06-13 10:39:33 +0530 | [diff] [blame] | 179 | [Teardown] Run Keywords |
| 180 | ... Delete IP Address ${test_ipv4_addr} AND Test Teardown Execution |
Prashanth Katti | b36a752 | 2019-05-22 05:32:39 -0500 | [diff] [blame] | 181 | |
| 182 | Add IP Address ${test_ipv4_addr} ${test_subnet_mask} ${test_gateway} |
| 183 | |
| 184 | # Reboot BMC and verify persistency. |
Sweta Potthuri | 63f0b10 | 2022-08-03 23:11:46 -0500 | [diff] [blame] | 185 | Redfish OBMC Reboot (off) stack_mode=skip |
George Keishing | 5c49874 | 2019-08-09 02:14:44 -0500 | [diff] [blame] | 186 | Redfish.Login |
Prashanth Katti | b36a752 | 2019-05-22 05:32:39 -0500 | [diff] [blame] | 187 | Verify IP On BMC ${test_ipv4_addr} |
nagarjunb22 | 60784a4 | 2022-06-13 10:39:33 +0530 | [diff] [blame] | 188 | Verify IP On Redfish URI ${test_ipv4_addr} |
| 189 | |
Vijay | de3bf7b | 2019-04-16 04:56:09 -0500 | [diff] [blame] | 190 | |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 191 | Add Fourth Octet Threshold IP And Verify |
| 192 | [Documentation] Add fourth octet threshold IP and verify. |
| 193 | [Tags] Add_Fourth_Octet_Threshold_IP_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 194 | [Teardown] Run Keywords |
| 195 | ... Delete IP Address 10.7.7.254 AND Test Teardown Execution |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 196 | |
| 197 | Add IP Address 10.7.7.254 ${test_subnet_mask} ${test_gateway} |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 198 | |
| 199 | Add Fourth Octet Lowest IP And Verify |
| 200 | [Documentation] Add fourth octet lowest IP and verify. |
| 201 | [Tags] Add_Fourth_Octet_Lowest_IP_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 202 | [Teardown] Run Keywords |
| 203 | ... Delete IP Address 10.7.7.1 AND Test Teardown Execution |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 204 | |
| 205 | Add IP Address 10.7.7.1 ${test_subnet_mask} ${test_gateway} |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 206 | |
| 207 | Add Third Octet Threshold IP And Verify |
| 208 | [Documentation] Add third octet threshold IP and verify. |
| 209 | [Tags] Add_Third_Octet_Threshold_IP_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 210 | [Teardown] Run Keywords |
| 211 | ... Delete IP Address 10.7.255.7 AND Test Teardown Execution |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 212 | |
| 213 | Add IP Address 10.7.255.7 ${test_subnet_mask} ${test_gateway} |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 214 | |
| 215 | Add Third Octet Lowest IP And Verify |
| 216 | [Documentation] Add third octet lowest IP and verify. |
| 217 | [Tags] Add_Third_Octet_Lowest_IP_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 218 | [Teardown] Run Keywords |
| 219 | ... Delete IP Address 10.7.0.7 AND Test Teardown Execution |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 220 | |
| 221 | Add IP Address 10.7.0.7 ${test_subnet_mask} ${test_gateway} |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 222 | |
| 223 | Add Second Octet Threshold IP And Verify |
| 224 | [Documentation] Add second octet threshold IP and verify. |
| 225 | [Tags] Add_Second_Octet_Threshold_IP_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 226 | [Teardown] Run Keywords |
| 227 | ... Delete IP Address 10.255.7.7 AND Test Teardown Execution |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 228 | |
| 229 | Add IP Address 10.255.7.7 ${test_subnet_mask} ${test_gateway} |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 230 | |
| 231 | Add Second Octet Lowest IP And Verify |
| 232 | [Documentation] Add second octet lowest IP and verify. |
| 233 | [Tags] Add_Second_Octet_Lowest_IP_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 234 | [Teardown] Run Keywords |
| 235 | ... Delete IP Address 10.0.7.7 AND Test Teardown Execution |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 236 | |
| 237 | Add IP Address 10.0.7.7 ${test_subnet_mask} ${test_gateway} |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 238 | |
| 239 | Add First Octet Threshold IP And Verify |
| 240 | [Documentation] Add first octet threshold IP and verify. |
| 241 | [Tags] Add_First_Octet_Threshold_IP_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 242 | [Teardown] Run Keywords |
Anves Kumar rayankula | f757b10 | 2020-07-27 20:41:36 -0500 | [diff] [blame] | 243 | ... Delete IP Address 223.7.7.7 AND Test Teardown Execution |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 244 | |
| 245 | Add IP Address 223.7.7.7 ${test_subnet_mask} ${test_gateway} |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 246 | |
| 247 | Add First Octet Lowest IP And Verify |
| 248 | [Documentation] Add first octet lowest IP and verify. |
| 249 | [Tags] Add_First_Octet_Lowest_IP_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 250 | [Teardown] Run Keywords |
| 251 | ... Delete IP Address 1.7.7.7 AND Test Teardown Execution |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 252 | |
| 253 | Add IP Address 1.7.7.7 ${test_subnet_mask} ${test_gateway} |
Prashanth Katti | 6cedca2 | 2019-05-30 02:31:11 -0500 | [diff] [blame] | 254 | |
Prashanth Katti | 040c8c1 | 2019-05-31 04:42:05 -0500 | [diff] [blame] | 255 | Configure Invalid Netmask |
| 256 | [Documentation] Verify error while setting invalid netmask. |
| 257 | [Tags] Configure_Invalid_Netmask |
| 258 | [Template] Add IP Address |
| 259 | |
| 260 | # ip subnet_mask gateway valid_status_codes |
| 261 | ${test_ipv4_addr} ${invalid_netmask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 262 | |
| 263 | Configure Out Of Range Netmask |
| 264 | [Documentation] Verify error while setting out of range netmask. |
| 265 | [Tags] Configure_Out_Of_Range_Netmask |
| 266 | [Template] Add IP Address |
| 267 | |
| 268 | # ip subnet_mask gateway valid_status_codes |
| 269 | ${test_ipv4_addr} ${out_of_range_netmask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 270 | |
| 271 | Configure Alpha Netmask |
| 272 | [Documentation] Verify error while setting alpha netmask. |
| 273 | [Tags] Configure_Alpha_Netmask |
| 274 | [Template] Add IP Address |
| 275 | |
| 276 | # ip subnet_mask gateway valid_status_codes |
| 277 | ${test_ipv4_addr} ${alpha_netmask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 278 | |
| 279 | Configure More Byte Netmask |
| 280 | [Documentation] Verify error while setting more byte netmask. |
| 281 | [Tags] Configure_More_Byte_Netmask |
| 282 | [Template] Add IP Address |
| 283 | |
| 284 | # ip subnet_mask gateway valid_status_codes |
| 285 | ${test_ipv4_addr} ${more_byte_netmask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 286 | |
| 287 | Configure Less Byte Netmask |
| 288 | [Documentation] Verify error while setting less byte netmask. |
| 289 | [Tags] Configure_Less_Byte_Netmask |
| 290 | [Template] Add IP Address |
| 291 | |
| 292 | # ip subnet_mask gateway valid_status_codes |
| 293 | ${test_ipv4_addr} ${less_byte_netmask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 294 | |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 295 | Configure Threshold Netmask And Verify |
| 296 | [Documentation] Configure threshold netmask and verify. |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 297 | [Tags] Configure_Threshold_Netmask_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 298 | [Teardown] Run Keywords |
| 299 | ... Delete IP Address ${test_ipv4_addr} AND Test Teardown Execution |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 300 | |
| 301 | Add IP Address ${test_ipv4_addr} ${threshold_netmask} ${test_gateway} |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 302 | |
| 303 | Configure Lowest Netmask And Verify |
| 304 | [Documentation] Configure lowest netmask and verify. |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 305 | [Tags] Configure_Lowest_Netmask_And_Verify |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 306 | [Teardown] Run Keywords |
| 307 | ... Delete IP Address ${test_ipv4_addr} AND Test Teardown Execution |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 308 | |
| 309 | Add IP Address ${test_ipv4_addr} ${lowest_netmask} ${test_gateway} |
Prashanth Katti | c6ad647 | 2019-06-14 03:33:39 -0500 | [diff] [blame] | 310 | |
| 311 | Configure Network ID |
| 312 | [Documentation] Verify error while configuring network ID. |
| 313 | [Tags] Configure_Network_ID |
| 314 | [Template] Add IP Address |
| 315 | [Teardown] Clear IP Settings On Fail ${network_id} |
| 316 | |
| 317 | # ip subnet_mask gateway valid_status_codes |
| 318 | ${network_id} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 319 | |
| 320 | Configure Less Octet IP |
| 321 | [Documentation] Verify error while Configuring less octet IP address. |
| 322 | [Tags] Configure_Less_Octet_IP |
| 323 | [Template] Add IP Address |
| 324 | |
| 325 | # ip subnet_mask gateway valid_status_codes |
| 326 | ${less_octet_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 327 | |
| 328 | Configure Empty IP |
| 329 | [Documentation] Verify error while Configuring empty IP address. |
| 330 | [Tags] Configure_Empty_IP |
| 331 | [Template] Add IP Address |
| 332 | |
| 333 | # ip subnet_mask gateway valid_status_codes |
| 334 | ${EMPTY} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 335 | |
| 336 | Configure Special Char IP |
| 337 | [Documentation] Configure invalid IP address containing special chars. |
| 338 | [Tags] Configure_Special_Char_IP |
| 339 | [Template] Add IP Address |
| 340 | |
| 341 | # ip subnet_mask gateway valid_status_codes |
| 342 | @@@.%%.44.11 ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 343 | |
| 344 | Configure Hexadecimal IP |
| 345 | [Documentation] Configure invalid IP address containing hex value. |
| 346 | [Tags] Configure_Hexadecimal_IP |
| 347 | [Template] Add IP Address |
| 348 | |
| 349 | # ip subnet_mask gateway valid_status_codes |
| 350 | ${hex_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 351 | |
| 352 | Configure Negative Octet IP |
| 353 | [Documentation] Configure invalid IP address containing negative octet. |
| 354 | [Tags] Configure_Negative_Octet_IP |
| 355 | [Template] Add IP Address |
| 356 | |
| 357 | # ip subnet_mask gateway valid_status_codes |
| 358 | ${negative_ip} ${test_subnet_mask} ${test_gateway} ${HTTP_BAD_REQUEST} |
| 359 | |
Prashanth Katti | 5cad5a0 | 2019-06-20 07:27:10 -0500 | [diff] [blame] | 360 | Configure Incomplete IP For Gateway |
| 361 | [Documentation] Configure incomplete IP for gateway and expect an error. |
| 362 | [Tags] Configure_Incomplete_IP_For_Gateway |
| 363 | [Template] Add IP Address |
| 364 | |
| 365 | # ip subnet_mask gateway valid_status_codes |
| 366 | ${test_ipv4_addr} ${test_subnet_mask} ${less_octet_ip} ${HTTP_BAD_REQUEST} |
| 367 | |
| 368 | Configure Special Char IP For Gateway |
| 369 | [Documentation] Configure special char IP for gateway and expect an error. |
| 370 | [Tags] Configure_Special_Char_IP_For_Gateway |
| 371 | [Template] Add IP Address |
| 372 | |
| 373 | # ip subnet_mask gateway valid_status_codes |
| 374 | ${test_ipv4_addr} ${test_subnet_mask} @@@.%%.44.11 ${HTTP_BAD_REQUEST} |
| 375 | |
| 376 | Configure Hexadecimal IP For Gateway |
| 377 | [Documentation] Configure hexadecimal IP for gateway and expect an error. |
| 378 | [Tags] Configure_Hexadecimal_IP_For_Gateway |
| 379 | [Template] Add IP Address |
| 380 | |
| 381 | # ip subnet_mask gateway valid_status_codes |
| 382 | ${test_ipv4_addr} ${test_subnet_mask} ${hex_ip} ${HTTP_BAD_REQUEST} |
| 383 | |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 384 | Get DNS Server And Verify |
| 385 | [Documentation] Get DNS server via Redfish and verify. |
| 386 | [Tags] Get_DNS_Server_And_Verify |
| 387 | |
| 388 | Verify CLI and Redfish Nameservers |
| 389 | |
| 390 | Configure DNS Server And Verify |
| 391 | [Documentation] Configure DNS server and verify. |
| 392 | [Tags] Configure_DNS_Server_And_Verify |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 393 | [Setup] DNS Test Setup Execution |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 394 | [Teardown] Run Keywords |
| 395 | ... Configure Static Name Servers AND Test Teardown Execution |
| 396 | |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 397 | Configure Static Name Servers ${static_name_servers} |
| 398 | Verify CLI and Redfish Nameservers |
| 399 | |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 400 | Delete DNS Server And Verify |
| 401 | [Documentation] Delete DNS server and verify. |
| 402 | [Tags] Delete_DNS_Server_And_Verify |
| 403 | [Setup] DNS Test Setup Execution |
| 404 | [Teardown] Run Keywords |
| 405 | ... Configure Static Name Servers AND Test Teardown Execution |
| 406 | |
| 407 | Delete Static Name Servers |
| 408 | Verify CLI and Redfish Nameservers |
| 409 | |
| 410 | Configure DNS Server And Check Persistency |
| 411 | [Documentation] Configure DNS server and check persistency on reboot. |
| 412 | [Tags] Configure_DNS_Server_And_Check_Persistency |
| 413 | [Setup] DNS Test Setup Execution |
| 414 | [Teardown] Run Keywords |
| 415 | ... Configure Static Name Servers AND Test Teardown Execution |
| 416 | |
| 417 | Configure Static Name Servers ${static_name_servers} |
| 418 | # Reboot BMC and verify persistency. |
Sweta Potthuri | 63f0b10 | 2022-08-03 23:11:46 -0500 | [diff] [blame] | 419 | Redfish OBMC Reboot (off) stack_mode=skip |
Anves Kumar rayankula | 8c628b7 | 2021-02-05 05:03:45 -0600 | [diff] [blame] | 420 | Redfish.Login |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 421 | Verify CLI and Redfish Nameservers |
| 422 | |
Prashanth Katti | 3063ffe | 2019-07-25 04:35:25 -0500 | [diff] [blame] | 423 | Configure Loopback IP For Gateway |
| 424 | [Documentation] Configure loopback IP for gateway and expect an error. |
| 425 | [Tags] Configure_Loopback_IP_For_Gateway |
| 426 | [Template] Add IP Address |
| 427 | [Teardown] Clear IP Settings On Fail ${test_ipv4_addr} |
| 428 | |
| 429 | # ip subnet_mask gateway valid_status_codes |
| 430 | ${test_ipv4_addr} ${test_subnet_mask} ${loopback_ip} ${HTTP_BAD_REQUEST} |
| 431 | |
| 432 | Configure Network ID For Gateway |
| 433 | [Documentation] Configure network ID for gateway and expect an error. |
| 434 | [Tags] Configure_Network_ID_For_Gateway |
| 435 | [Template] Add IP Address |
| 436 | [Teardown] Clear IP Settings On Fail ${test_ipv4_addr} |
| 437 | |
| 438 | # ip subnet_mask gateway valid_status_codes |
| 439 | ${test_ipv4_addr} ${test_subnet_mask} ${network_id} ${HTTP_BAD_REQUEST} |
| 440 | |
| 441 | Configure Multicast IP For Gateway |
| 442 | [Documentation] Configure multicast IP for gateway and expect an error. |
| 443 | [Tags] Configure_Multicast_IP_For_Gateway |
| 444 | [Template] Add IP Address |
| 445 | [Teardown] Clear IP Settings On Fail ${test_ipv4_addr} |
| 446 | |
| 447 | # ip subnet_mask gateway valid_status_codes |
Tony Lee | 412c668 | 2020-04-01 17:34:30 +0800 | [diff] [blame] | 448 | ${test_ipv4_addr} ${test_subnet_mask} ${multicast_ip} ${HTTP_BAD_REQUEST} |
Prashanth Katti | 3063ffe | 2019-07-25 04:35:25 -0500 | [diff] [blame] | 449 | |
| 450 | Configure Broadcast IP For Gateway |
| 451 | [Documentation] Configure broadcast IP for gateway and expect an error. |
| 452 | [Tags] Configure_Broadcast_IP_For_Gateway |
| 453 | [Template] Add IP Address |
| 454 | [Teardown] Clear IP Settings On Fail ${test_ipv4_addr} |
| 455 | |
| 456 | # ip subnet_mask gateway valid_status_codes |
| 457 | ${test_ipv4_addr} ${test_subnet_mask} ${broadcast_ip} ${HTTP_BAD_REQUEST} |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 458 | |
Prashanth Katti | 3c7b643 | 2019-07-26 06:53:37 -0500 | [diff] [blame] | 459 | Configure Null Value For DNS Server |
| 460 | [Documentation] Configure null value for DNS server and expect an error. |
| 461 | [Tags] Configure_Null_Value_For_DNS_Server |
| 462 | [Setup] DNS Test Setup Execution |
| 463 | [Teardown] Run Keywords |
| 464 | ... Configure Static Name Servers AND Test Teardown Execution |
| 465 | |
| 466 | Configure Static Name Servers ${null_value} ${HTTP_BAD_REQUEST} |
| 467 | |
Prashanth Katti | afe16b7 | 2019-08-02 00:29:45 -0500 | [diff] [blame] | 468 | Configure Empty Value For DNS Server |
| 469 | [Documentation] Configure empty value for DNS server and expect an error. |
| 470 | [Tags] Configure_Empty_Value_For_DNS_Server |
| 471 | [Setup] DNS Test Setup Execution |
| 472 | [Teardown] Run Keywords |
| 473 | ... Configure Static Name Servers AND Test Teardown Execution |
| 474 | |
| 475 | Configure Static Name Servers ${empty_dictionary} ${HTTP_BAD_REQUEST} |
| 476 | |
| 477 | Configure String Value For DNS Server |
| 478 | [Documentation] Configure string value for DNS server and expect an error. |
| 479 | [Tags] Configure_String_Value_For_DNS_Server |
| 480 | [Setup] DNS Test Setup Execution |
| 481 | [Teardown] Run Keywords |
| 482 | ... Configure Static Name Servers AND Test Teardown Execution |
| 483 | |
| 484 | Configure Static Name Servers ${string_value} ${HTTP_BAD_REQUEST} |
| 485 | |
Prashanth Katti | 568df5f | 2020-05-15 06:00:37 -0500 | [diff] [blame] | 486 | Modify IPv4 Address And Verify |
| 487 | [Documentation] Modify IP address via Redfish and verify. |
George Keishing | 0c8100f | 2022-01-13 00:24:57 -0600 | [diff] [blame] | 488 | [Tags] Modify_IPv4_Address_And_Verify |
Prashanth Katti | 568df5f | 2020-05-15 06:00:37 -0500 | [diff] [blame] | 489 | [Teardown] Run Keywords |
Anves Kumar rayankula | 045814b | 2020-10-09 09:17:05 -0500 | [diff] [blame] | 490 | ... Delete IP Address ${test_ipv4_addr2} AND Test Teardown Execution |
Prashanth Katti | 568df5f | 2020-05-15 06:00:37 -0500 | [diff] [blame] | 491 | |
| 492 | Add IP Address ${test_ipv4_addr} ${test_subnet_mask} ${test_gateway} |
| 493 | |
| 494 | Update IP Address ${test_ipv4_addr} ${test_ipv4_addr2} ${test_subnet_mask} ${test_gateway} |
| 495 | |
Anvesh Kumar | 9c7238d | 2020-04-21 03:56:21 -0500 | [diff] [blame] | 496 | |
Anves Kumar rayankula | 6b9fcd1 | 2020-12-18 01:03:19 -0600 | [diff] [blame] | 497 | Configure Invalid Values For DNS Server |
| 498 | [Documentation] Configure invalid values for DNS server and expect an error. |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 499 | [Tags] Configure_Invalid_Values_For_DNS_Server |
Anves Kumar rayankula | 6b9fcd1 | 2020-12-18 01:03:19 -0600 | [diff] [blame] | 500 | [Setup] DNS Test Setup Execution |
| 501 | [Template] Configure Static Name Servers |
| 502 | [Teardown] Run Keywords |
| 503 | ... Configure Static Name Servers AND Test Teardown Execution |
| 504 | |
| 505 | # static_name_servers valid_status_codes |
| 506 | 0xa.0xb.0xc.0xd ${HTTP_BAD_REQUEST} |
| 507 | 10.-7.-7.-7 ${HTTP_BAD_REQUEST} |
| 508 | 10.3.36 ${HTTP_BAD_REQUEST} |
| 509 | @@@.%%.44.11 ${HTTP_BAD_REQUEST} |
| 510 | |
| 511 | |
| 512 | Config Multiple DNS Servers And Verify |
| 513 | [Documentation] Config multiple DNS servers and verify. |
| 514 | [Tags] Config_Multiple_DNS_Servers_And_Verify |
| 515 | [Setup] DNS Test Setup Execution |
| 516 | [Teardown] Run Keywords |
| 517 | ... Configure Static Name Servers AND Test Teardown Execution |
| 518 | |
| 519 | @{list_name_servers}= Create List 10.5.5.10 10.20.5.10 10.5.6.7 |
| 520 | Configure Static Name Servers ${list_name_servers} |
| 521 | Verify CLI and Redfish Nameservers |
| 522 | |
| 523 | |
Anves Kumar rayankula | d4cdd8c | 2021-01-11 04:10:05 -0600 | [diff] [blame] | 524 | Configure And Verify Multiple Static IPv4 Addresses |
| 525 | [Documentation] Configure multiple static ipv4 address via Redfish and verify. |
| 526 | [Tags] Configure_And_Verify_Multiple_Static_IPv4_Addresses |
| 527 | [Teardown] Run Keywords Delete Multiple Static IPv4 Addresses ${test_ipv4_addresses} |
| 528 | ... AND Test Teardown Execution |
| 529 | |
| 530 | ${test_ipv4_addresses}= Create List ${test_ipv4_addr} ${test_ipv4_addr2} |
| 531 | Configure Multiple Static IPv4 Addresses ${test_ipv4_addresses} ${test_subnet_mask} ${test_gateway} |
| 532 | |
| 533 | |
| 534 | Configure Multiple Static IPv4 Addresses And Check Persistency |
| 535 | [Documentation] Configure multiple static ipv4 address via Redfish and check persistency. |
| 536 | [Tags] Configure_Multiple_Static_IPv4_Addresses_And_Check_Persistency |
| 537 | [Teardown] Run Keywords Delete Multiple Static IPv4 Addresses ${test_ipv4_addresses} |
| 538 | ... AND Test Teardown Execution |
| 539 | |
| 540 | ${test_ipv4_addresses}= Create List ${test_ipv4_addr} ${test_ipv4_addr2} |
| 541 | Configure Multiple Static IPv4 Addresses ${test_ipv4_addresses} ${test_subnet_mask} ${test_gateway} |
| 542 | |
| 543 | # Reboot BMC and verify persistency. |
Sweta Potthuri | 63f0b10 | 2022-08-03 23:11:46 -0500 | [diff] [blame] | 544 | Redfish OBMC Reboot (off) stack_mode=skip |
Anves Kumar rayankula | 8c628b7 | 2021-02-05 05:03:45 -0600 | [diff] [blame] | 545 | Redfish.Login |
Anves Kumar rayankula | d4cdd8c | 2021-01-11 04:10:05 -0600 | [diff] [blame] | 546 | FOR ${ip} IN @{test_ipv4_addresses} |
| 547 | Verify IP And Netmask On BMC ${ip} ${test_subnet_mask} |
nagarjunb22 | 60784a4 | 2022-06-13 10:39:33 +0530 | [diff] [blame] | 548 | Verify IP On Redfish URI ${ip} |
Anves Kumar rayankula | d4cdd8c | 2021-01-11 04:10:05 -0600 | [diff] [blame] | 549 | END |
| 550 | |
| 551 | |
Anves Kumar rayankula | 43e93e1 | 2021-01-27 03:52:37 -0600 | [diff] [blame] | 552 | Configure And Verify Multiple IPv4 Addresses |
| 553 | [Documentation] Configure multiple IPv4 addresses and verify. |
George Keishing | 0c8100f | 2022-01-13 00:24:57 -0600 | [diff] [blame] | 554 | [Tags] Configure_And_Verify_Multiple_IPv4_Addresses |
Anves Kumar rayankula | 43e93e1 | 2021-01-27 03:52:37 -0600 | [diff] [blame] | 555 | [Teardown] Run Keywords |
| 556 | ... Delete IP Address ${test_ipv4_addr} AND Delete IP Address ${test_ipv4_addr2} |
| 557 | ... AND Test Teardown Execution |
| 558 | |
| 559 | ${ip1}= Create dictionary Address=${test_ipv4_addr} |
| 560 | ... SubnetMask=255.255.0.0 Gateway=${test_gateway} |
| 561 | ${ip2}= Create dictionary Address=${test_ipv4_addr2} |
| 562 | ... SubnetMask=255.255.252.0 Gateway=${test_gateway} |
| 563 | |
| 564 | ${empty_dict}= Create Dictionary |
| 565 | ${patch_list}= Create List |
| 566 | ${network_configurations}= Get Network Configuration |
| 567 | ${num_entries}= Get Length ${network_configurations} |
| 568 | |
| 569 | FOR ${INDEX} IN RANGE 0 ${num_entries} |
| 570 | Append To List ${patch_list} ${empty_dict} |
| 571 | END |
| 572 | |
| 573 | # We need not check for existence of IP on BMC while adding. |
| 574 | Append To List ${patch_list} ${ip1} ${ip2} |
| 575 | ${payload}= Create Dictionary IPv4StaticAddresses=${patch_list} |
| 576 | ${active_channel_config}= Get Active Channel Config |
| 577 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 578 | Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} body=&{payload} |
Anves Kumar rayankula | 53b8030 | 2021-05-21 01:50:03 -0500 | [diff] [blame] | 579 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}] |
Anves Kumar rayankula | 43e93e1 | 2021-01-27 03:52:37 -0600 | [diff] [blame] | 580 | |
| 581 | # Note: Network restart takes around 15-18s after patch request processing. |
| 582 | Sleep ${NETWORK_TIMEOUT}s |
| 583 | Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT} |
| 584 | Verify IP On BMC ${test_ipv4_addr} |
| 585 | Verify IP On BMC ${test_ipv4_addr2} |
| 586 | |
| 587 | |
Anves Kumar rayankula | eefdb56 | 2021-02-08 07:54:11 -0600 | [diff] [blame] | 588 | Config Multiple DNS Servers And Check Persistency |
| 589 | [Documentation] Config multiple DNS and check persistency. |
| 590 | [Tags] Config_Multiple_DNS_Servers_And_Check_Persistency |
| 591 | [Setup] DNS Test Setup Execution |
| 592 | [Teardown] Run Keywords |
| 593 | ... Configure Static Name Servers AND Test Teardown Execution |
| 594 | |
| 595 | @{list_name_servers}= Create List 10.5.5.10 10.20.5.10 10.5.6.7 |
| 596 | Configure Static Name Servers ${list_name_servers} |
| 597 | |
| 598 | # Reboot BMC and verify persistency. |
Sweta Potthuri | 63f0b10 | 2022-08-03 23:11:46 -0500 | [diff] [blame] | 599 | Redfish OBMC Reboot (off) stack_mode=skip |
Anves Kumar rayankula | eefdb56 | 2021-02-08 07:54:11 -0600 | [diff] [blame] | 600 | Redfish.Login |
| 601 | Verify CLI and Redfish Nameservers |
| 602 | |
Anves Kumar rayankula | 2f137eb | 2021-03-29 01:12:01 -0500 | [diff] [blame] | 603 | |
| 604 | Configure Static IP Without Using Gateway And Verify |
| 605 | [Documentation] Configure static IP without using gateway and verify error. |
| 606 | [Tags] Configure_Static_IP_Without_Using_Gateway_And_Verify |
| 607 | |
| 608 | ${ip}= Create dictionary Address=${test_ipv4_addr} |
| 609 | ... SubnetMask=${test_subnet_mask} |
| 610 | ${empty_dict}= Create Dictionary |
| 611 | ${patch_list}= Create List |
| 612 | ${network_configurations}= Get Network Configuration |
| 613 | |
| 614 | ${num_entries}= Get Length ${network_configurations} |
| 615 | FOR ${INDEX} IN RANGE 0 ${num_entries} |
| 616 | Append To List ${patch_list} ${empty_dict} |
| 617 | END |
| 618 | |
| 619 | # We need not check for existence of IP on BMC while adding. |
| 620 | Append To List ${patch_list} ${ip} |
| 621 | ${payload}= Create Dictionary IPv4StaticAddresses=${patch_list} |
| 622 | ${active_channel_config}= Get Active Channel Config |
| 623 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 624 | Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 625 | ... body=&{payload} valid_status_codes=[${HTTP_BAD_REQUEST}] |
| 626 | |
Anves Kumar rayankula | ac0a7ba | 2021-03-09 08:10:20 -0600 | [diff] [blame] | 627 | |
| 628 | Test Network Response On Specified Host State |
| 629 | [Documentation] Verifying the BMC network response when host is on and off. |
| 630 | [Tags] Test_Network_Response_On_Specified_Host_State |
| 631 | [Template] Verify Network Response On Specified Host State |
| 632 | |
| 633 | # host_state |
| 634 | on |
| 635 | off |
| 636 | |
Sweta Potthuri | fb00136 | 2022-03-14 02:21:14 -0500 | [diff] [blame] | 637 | |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 638 | *** Keywords *** |
| 639 | |
| 640 | Test Setup Execution |
| 641 | [Documentation] Test setup execution. |
| 642 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 643 | Redfish.Login |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 644 | |
| 645 | @{network_configurations}= Get Network Configuration |
| 646 | Set Test Variable @{network_configurations} |
| 647 | |
| 648 | # Get BMC IP address and prefix length. |
| 649 | ${ip_data}= Get BMC IP Info |
| 650 | Set Test Variable ${ip_data} |
| 651 | |
Prashanth Katti | 747ce9d | 2019-02-07 07:23:48 -0600 | [diff] [blame] | 652 | |
Prashanth Katti | 747ce9d | 2019-02-07 07:23:48 -0600 | [diff] [blame] | 653 | Verify Netmask On BMC |
| 654 | [Documentation] Verify netmask on BMC. |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 655 | [Arguments] ${netmask} |
| 656 | |
| 657 | # Description of the argument(s): |
| 658 | # netmask netmask value to be verified. |
| 659 | |
Prashanth Katti | 747ce9d | 2019-02-07 07:23:48 -0600 | [diff] [blame] | 660 | ${prefix_length}= Netmask Prefix Length ${netmask} |
| 661 | |
| 662 | Should Contain Match ${ip_data} */${prefix_length} |
| 663 | ... msg=Prefix length does not exist. |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 664 | |
Prashanth Katti | 2c5c3bb | 2019-02-14 04:23:07 -0600 | [diff] [blame] | 665 | Verify IP And Netmask On BMC |
| 666 | [Documentation] Verify IP and netmask on BMC. |
| 667 | [Arguments] ${ip} ${netmask} |
| 668 | |
| 669 | # Description of the argument(s): |
| 670 | # ip IP address to be verified. |
| 671 | # netmask netmask value to be verified. |
| 672 | |
| 673 | ${prefix_length}= Netmask Prefix Length ${netmask} |
| 674 | @{ip_data}= Get BMC IP Info |
| 675 | |
| 676 | ${ip_with_netmask}= Catenate ${ip}/${prefix_length} |
| 677 | Should Contain ${ip_data} ${ip_with_netmask} |
| 678 | ... msg=IP and netmask pair does not exist. |
| 679 | |
Prashanth Katti | f58cce0 | 2019-02-06 03:05:14 -0600 | [diff] [blame] | 680 | Test Teardown Execution |
| 681 | [Documentation] Test teardown execution. |
| 682 | |
| 683 | FFDC On Test Case Fail |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 684 | Redfish.Logout |
Prashanth Katti | a844251 | 2019-06-07 06:47:09 -0500 | [diff] [blame] | 685 | |
| 686 | Clear IP Settings On Fail |
| 687 | [Documentation] Clear IP settings on fail. |
| 688 | [Arguments] ${ip} |
| 689 | |
| 690 | # Description of argument(s): |
| 691 | # ip IP address to be deleted. |
| 692 | |
| 693 | Run Keyword If '${TEST STATUS}' == 'FAIL' |
| 694 | ... Delete IP Address ${ip} |
| 695 | |
| 696 | Test Teardown Execution |
Prashanth Katti | adf0b4e | 2019-06-10 04:20:30 -0500 | [diff] [blame] | 697 | |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 698 | Verify CLI and Redfish Nameservers |
| 699 | [Documentation] Verify that nameservers obtained via Redfish do not |
| 700 | ... match those found in /etc/resolv.conf. |
| 701 | |
Tony Lee | 412c668 | 2020-04-01 17:34:30 +0800 | [diff] [blame] | 702 | ${active_channel_config}= Get Active Channel Config |
| 703 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 704 | |
Anves Kumar rayankula | 91548ea | 2020-06-18 00:28:13 -0500 | [diff] [blame] | 705 | ${redfish_nameservers}= Redfish.Get Attribute |
| 706 | ... ${REDFISH_NW_ETH_IFACE}${ethernet_interface} StaticNameServers |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 707 | ${resolve_conf_nameservers}= CLI Get Nameservers |
Michael Walsh | 39c0051 | 2019-07-17 10:54:06 -0500 | [diff] [blame] | 708 | Rqprint Vars redfish_nameservers resolve_conf_nameservers |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 709 | |
Sweta Potthuri | d77ea98 | 2021-07-01 04:30:38 -0500 | [diff] [blame] | 710 | List Should Contain Sub List ${resolve_conf_nameservers} ${redfish_nameservers} |
| 711 | ... msg=The nameservers obtained via Redfish do not match those found in /etc/resolv.conf. |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 712 | |
| 713 | Configure Static Name Servers |
| 714 | [Documentation] Configure DNS server on BMC. |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 715 | [Arguments] ${static_name_servers}=${original_nameservers} |
Prashanth Katti | 3c7b643 | 2019-07-26 06:53:37 -0500 | [diff] [blame] | 716 | ... ${valid_status_codes}=${HTTP_OK} |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 717 | |
George Keishing | 9cb2e59 | 2019-07-12 09:37:33 -0500 | [diff] [blame] | 718 | # Description of the argument(s): |
Prashanth Katti | 7098c97 | 2019-07-03 06:56:42 -0500 | [diff] [blame] | 719 | # static_name_servers A list of static name server IPs to be |
| 720 | # configured on the BMC. |
| 721 | |
Tony Lee | 412c668 | 2020-04-01 17:34:30 +0800 | [diff] [blame] | 722 | ${active_channel_config}= Get Active Channel Config |
| 723 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 724 | |
Anves Kumar rayankula | 6b9fcd1 | 2020-12-18 01:03:19 -0600 | [diff] [blame] | 725 | ${type} = Evaluate type($static_name_servers).__name__ |
| 726 | ${static_name_servers}= Set Variable If '${type}'=='str' |
| 727 | ... '${static_name_servers}' ${static_name_servers} |
| 728 | |
Prashanth Katti | 9d995fc | 2019-09-24 01:29:06 -0500 | [diff] [blame] | 729 | # Currently BMC is sending 500 response code instead of 400 for invalid scenarios. |
Anves Kumar rayankula | 91548ea | 2020-06-18 00:28:13 -0500 | [diff] [blame] | 730 | Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 731 | ... body={'StaticNameServers': ${static_name_servers}} |
Prashanth Katti | 9d995fc | 2019-09-24 01:29:06 -0500 | [diff] [blame] | 732 | ... valid_status_codes=[${valid_status_codes}, ${HTTP_INTERNAL_SERVER_ERROR}] |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 733 | |
Prashanth Katti | f247be3 | 2019-10-07 04:40:43 -0500 | [diff] [blame] | 734 | # Patch operation takes 1 to 3 seconds to set new value. |
| 735 | Sleep 3s |
| 736 | |
Prashanth Katti | 7f9e60f | 2019-07-26 01:18:41 -0500 | [diff] [blame] | 737 | # Check if newly added DNS server is configured on BMC. |
| 738 | ${cli_nameservers}= CLI Get Nameservers |
Prashanth Katti | 3c7b643 | 2019-07-26 06:53:37 -0500 | [diff] [blame] | 739 | ${cmd_status}= Run Keyword And Return Status |
| 740 | ... List Should Contain Sub List ${cli_nameservers} ${static_name_servers} |
| 741 | |
| 742 | Run Keyword If '${valid_status_codes}' == '${HTTP_OK}' |
| 743 | ... Should Be True ${cmd_status} == ${True} |
| 744 | ... ELSE Should Be True ${cmd_status} == ${False} |
Prashanth Katti | 7f9e60f | 2019-07-26 01:18:41 -0500 | [diff] [blame] | 745 | |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 746 | Delete Static Name Servers |
| 747 | [Documentation] Delete static name servers. |
| 748 | |
Sweta Potthuri | dc32593 | 2022-06-15 12:51:27 -0500 | [diff] [blame] | 749 | DNS Test Setup Execution |
Anves Kumar rayankula | 045814b | 2020-10-09 09:17:05 -0500 | [diff] [blame] | 750 | Configure Static Name Servers static_name_servers=@{EMPTY} |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 751 | |
| 752 | # Check if all name servers deleted on BMC. |
| 753 | ${nameservers}= CLI Get Nameservers |
Sweta Potthuri | dc32593 | 2022-06-15 12:51:27 -0500 | [diff] [blame] | 754 | Should Not Contain ${nameservers} ${original_nameservers} |
| 755 | |
| 756 | DNS Test Setup Execution |
| 757 | |
| 758 | Should Be Empty ${original_nameservers} |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 759 | |
| 760 | DNS Test Setup Execution |
| 761 | [Documentation] Do DNS test setup execution. |
| 762 | |
| 763 | Redfish.Login |
| 764 | |
Tony Lee | 412c668 | 2020-04-01 17:34:30 +0800 | [diff] [blame] | 765 | ${active_channel_config}= Get Active Channel Config |
| 766 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 767 | |
Anves Kumar rayankula | 91548ea | 2020-06-18 00:28:13 -0500 | [diff] [blame] | 768 | ${original_nameservers}= Redfish.Get Attribute |
| 769 | ... ${REDFISH_NW_ETH_IFACE}${ethernet_interface} StaticNameServers |
Tony Lee | 412c668 | 2020-04-01 17:34:30 +0800 | [diff] [blame] | 770 | |
Prashanth Katti | c85957c | 2019-07-09 02:01:20 -0500 | [diff] [blame] | 771 | Rprint Vars original_nameservers |
| 772 | # Set suite variables to trigger restoration during teardown. |
| 773 | Set Suite Variable ${original_nameservers} |
Prashanth Katti | b478d90 | 2020-05-08 10:05:32 -0500 | [diff] [blame] | 774 | |
aravinth0510 | ca054ee | 2022-06-16 13:26:15 +0000 | [diff] [blame] | 775 | |
Prashanth Katti | b478d90 | 2020-05-08 10:05:32 -0500 | [diff] [blame] | 776 | Suite Setup Execution |
| 777 | [Documentation] Do suite setup execution. |
| 778 | |
aravinth0510 | ca054ee | 2022-06-16 13:26:15 +0000 | [diff] [blame] | 779 | # - Get DHCP IPv4 enabled/disabled status from redfish managers URI |
| 780 | # - If DHCP IPv4 is enabled , |
| 781 | # - Get DHCP IPv4 settings - ip address, gateway, subnetmask |
| 782 | # - And set the same as static IP address |
| 783 | |
George Keishing | 1ac4221 | 2022-07-20 21:55:49 -0500 | [diff] [blame] | 784 | Redfish.Login |
aravinth0510 | ca054ee | 2022-06-16 13:26:15 +0000 | [diff] [blame] | 785 | ${DHCPEnabled}= Get IPv4 DHCP Enabled Status |
| 786 | Set Suite Variable ${DHCPEnabled} |
| 787 | |
| 788 | Run Keyword If ${DHCPEnabled}==True |
| 789 | ... Run Keywords |
| 790 | ... ${ip_addr} ${gateway} ${subnetmask}= Get DHCP IP Info AND |
| 791 | ... Add IP Address ${ip_addr} ${subnetmask} ${gateway} AND |
| 792 | ... Set Suite Variable ${ip_addr} |
| 793 | |
Prashanth Katti | b478d90 | 2020-05-08 10:05:32 -0500 | [diff] [blame] | 794 | ${test_gateway}= Get BMC Default Gateway |
| 795 | Set Suite Variable ${test_gateway} |
Prashanth Katti | 568df5f | 2020-05-15 06:00:37 -0500 | [diff] [blame] | 796 | |
aravinth0510 | ca054ee | 2022-06-16 13:26:15 +0000 | [diff] [blame] | 797 | |
| 798 | Suite Teardown Execution |
| 799 | [Documentation] Do suite teardown execution. |
| 800 | |
| 801 | # - If the DHCP IPv4 is enabled before suite setup execution |
| 802 | # - Restore the DHCP IPv4 to enabled state |
| 803 | |
| 804 | Run Keyword If ${DHCPEnabled}==True |
| 805 | ... Enable IPv4 DHCP Settings |
| 806 | |
| 807 | |
Prashanth Katti | 568df5f | 2020-05-15 06:00:37 -0500 | [diff] [blame] | 808 | Update IP Address |
| 809 | [Documentation] Update IP address of BMC. |
Anves Kumar rayankula | 53b8030 | 2021-05-21 01:50:03 -0500 | [diff] [blame] | 810 | [Arguments] ${ip} ${new_ip} ${netmask} ${gw_ip} |
| 811 | ... ${valid_status_codes}=[${HTTP_OK}, ${HTTP_NO_CONTENT}] |
Prashanth Katti | 568df5f | 2020-05-15 06:00:37 -0500 | [diff] [blame] | 812 | |
| 813 | # Description of argument(s): |
| 814 | # ip IP address to be replaced (e.g. "10.7.7.7"). |
| 815 | # new_ip New IP address to be configured. |
| 816 | # netmask Netmask value. |
| 817 | # gw_ip Gateway IP address. |
| 818 | # valid_status_codes Expected return code from patch operation |
| 819 | # (e.g. "200"). See prolog of rest_request |
| 820 | # method in redfish_plus.py for details. |
| 821 | |
| 822 | ${empty_dict}= Create Dictionary |
| 823 | ${patch_list}= Create List |
| 824 | ${ip_data}= Create Dictionary Address=${new_ip} SubnetMask=${netmask} Gateway=${gw_ip} |
| 825 | |
| 826 | # Find the position of IP address to be modified. |
| 827 | @{network_configurations}= Get Network Configuration |
| 828 | FOR ${network_configuration} IN @{network_configurations} |
| 829 | Run Keyword If '${network_configuration['Address']}' == '${ip}' |
| 830 | ... Append To List ${patch_list} ${ip_data} |
| 831 | ... ELSE Append To List ${patch_list} ${empty_dict} |
| 832 | END |
| 833 | |
| 834 | ${ip_found}= Run Keyword And Return Status List Should Contain Value |
| 835 | ... ${patch_list} ${ip_data} msg=${ip} does not exist on BMC |
| 836 | Pass Execution If ${ip_found} == ${False} ${ip} does not exist on BMC |
| 837 | |
| 838 | # Run patch command only if given IP is found on BMC |
| 839 | ${data}= Create Dictionary IPv4StaticAddresses=${patch_list} |
| 840 | |
Anves Kumar rayankula | abf6854 | 2021-06-23 00:14:54 -0500 | [diff] [blame] | 841 | ${active_channel_config}= Get Active Channel Config |
| 842 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 843 | |
| 844 | Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 845 | ... body=&{data} valid_status_codes=${valid_status_codes} |
Prashanth Katti | 568df5f | 2020-05-15 06:00:37 -0500 | [diff] [blame] | 846 | |
| 847 | # Note: Network restart takes around 15-18s after patch request processing. |
| 848 | Sleep ${NETWORK_TIMEOUT}s |
| 849 | Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT} |
| 850 | |
| 851 | Verify IP On BMC ${new_ip} |
| 852 | Validate Network Config On BMC |
Anves Kumar rayankula | d4cdd8c | 2021-01-11 04:10:05 -0600 | [diff] [blame] | 853 | |
| 854 | Configure Multiple Static IPv4 Addresses |
| 855 | [Documentation] Configure multiple static ipv4 address via Redfish and verify. |
| 856 | [Arguments] ${ip_addreses} ${subnet_mask} ${gateway} |
| 857 | |
| 858 | # Description of argument(s): |
| 859 | # ip_addreses A list of IP addresses to be added (e.g.["10.7.7.7"]). |
| 860 | # subnet_mask Subnet mask for the IP to be added (e.g. "255.255.0.0"). |
| 861 | # gateway Gateway for the IP to be added (e.g. "10.7.7.1"). |
| 862 | |
| 863 | FOR ${ip} IN @{ip_addreses} |
| 864 | Add IP Address ${ip} ${subnet_mask} ${gateway} |
| 865 | END |
| 866 | Validate Network Config On BMC |
| 867 | |
| 868 | |
| 869 | Delete Multiple Static IPv4 Addresses |
| 870 | [Documentation] Delete multiple static ipv4 address via Redfish. |
| 871 | [Arguments] ${ip_addreses} |
| 872 | |
| 873 | # Description of argument(s): |
| 874 | # ip_addreses A list of IP addresses to be deleted (e.g.["10.7.7.7"]). |
| 875 | |
| 876 | FOR ${ip} IN @{ip_addreses} |
| 877 | Delete IP Address ${ip} |
| 878 | END |
| 879 | Validate Network Config On BMC |
Anves Kumar rayankula | ac0a7ba | 2021-03-09 08:10:20 -0600 | [diff] [blame] | 880 | |
| 881 | Verify Network Response On Specified Host State |
| 882 | [Documentation] Verifying the BMC network response when host is on and off. |
| 883 | [Arguments] ${host_state} |
| 884 | |
| 885 | # Description of argument(s): |
| 886 | # host_state if host_state is on then host is booted to operating system. |
| 887 | # if host_state is off then host is power off. |
| 888 | # (eg. on, off). |
| 889 | |
| 890 | ${active_channel_config}= Get Active Channel Config |
| 891 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 892 | |
| 893 | Run Keyword If '${host_state}' == 'on' |
| 894 | ... Redfish Power On stack_mode=skip |
| 895 | ... ELSE |
| 896 | ... Redfish Power off stack_mode=skip |
| 897 | |
| 898 | Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 899 | Ping Host ${OPENBMC_HOST} |
| 900 | |
nagarjunb22 | 60784a4 | 2022-06-13 10:39:33 +0530 | [diff] [blame] | 901 | |
| 902 | Verify IP On Redfish URI |
| 903 | [Documentation] Verify given IP on redfish URI. |
| 904 | [Arguments] ${ip_address} |
| 905 | |
| 906 | # Description of argument(s): |
| 907 | # ip_address Configured IP address which need to verified. |
| 908 | |
| 909 | ${network_configurations}= Get Network Configuration |
| 910 | |
| 911 | FOR ${network_configuration} IN @{network_configurations} |
| 912 | ${ip_found}= Set Variable If '${network_configuration['Address']}' == '${ip_address}' ${True} |
| 913 | ... ${False} |
| 914 | Exit For Loop If ${ip_found} |
| 915 | END |
| 916 | Run Keyword If '${ip_found}' == '${False}' |
| 917 | ... Fail msg=Configured IP address not found on EthernetInterface URI. |
aravinth0510 | ca054ee | 2022-06-16 13:26:15 +0000 | [diff] [blame] | 918 | |
| 919 | |
| 920 | Enable IPv4 DHCP Settings |
| 921 | [Documentation] Set IPv4 DHCP enabled status true/false in redfish URI. |
| 922 | [Arguments] ${status}=${True} |
| 923 | |
| 924 | # Description of argument(s): |
| 925 | # status IPv4 DHCPEnabled status which needs to be set. |
| 926 | # (e.g. True or False) |
| 927 | |
| 928 | ${active_channel_config}= Get Active Channel Config |
| 929 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 930 | ${DHCPv4}= Create Dictionary DHCPEnabled=${status} |
| 931 | |
| 932 | ${payload}= Create Dictionary DHCPv4=${DHCPv4} |
| 933 | Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 934 | ... body=&{payload} valid_status_codes=[${HTTP_NO_CONTENT}, ${HTTP_OK}] |
| 935 | |
| 936 | Sleep ${NETWORK_TIMEOUT}s |
| 937 | Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT} |
| 938 | |
| 939 | |
| 940 | Get IPv4 DHCP Enabled Status |
| 941 | [Documentation] Return IPv4 DHCP enabled status from redfish URI. |
| 942 | |
| 943 | ${active_channel_config}= Get Active Channel Config |
| 944 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 945 | ${resp}= Redfish.Get Attribute ${REDFISH_NW_ETH_IFACE}${ethernet_interface} DHCPv4 |
| 946 | ${status}= Set Variable ${resp['DHCPEnabled']} |
| 947 | Return From Keyword ${status} |
| 948 | |
| 949 | |
| 950 | Get DHCP IP Info |
| 951 | [Documentation] Return DHCP IP address, gateway and subnetmask from redfish URI. |
| 952 | |
| 953 | ${active_channel_config}= Get Active Channel Config |
| 954 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 955 | ${resp_list}= Redfish.Get Attribute ${REDFISH_NW_ETH_IFACE}${ethernet_interface} IPv4Addresses |
| 956 | FOR ${resp} IN @{resp_list} |
| 957 | Continue For Loop If '${resp['AddressOrigin']}' != 'DHCP' |
| 958 | ${ip_addr}= Set Variable ${resp['Address']} |
| 959 | ${gateway}= Set Variable ${resp['Gateway']} |
| 960 | ${subnetmask}= Set Variable ${resp['SubnetMask']} |
| 961 | Return From Keyword ${ip_addr} ${gateway} ${subnetmask} |
George Keishing | 1ac4221 | 2022-07-20 21:55:49 -0500 | [diff] [blame] | 962 | END |