Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Network interface IPv6 configuration and verification |
| 3 | ... tests. |
| 4 | |
| 5 | Resource ../../lib/bmc_redfish_resource.robot |
| 6 | Resource ../../lib/openbmc_ffdc.robot |
| 7 | Resource ../../lib/bmc_ipv6_utils.robot |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 8 | Resource ../../lib/external_intf/vmi_utils.robot |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 9 | Library ../../lib/bmc_network_utils.py |
| 10 | Library Collections |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 11 | Library Process |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 12 | |
Anvesh-Kumar_Rayankula | 019d936 | 2025-09-03 22:55:12 -0500 | [diff] [blame] | 13 | Test Setup Test Setup Execution |
| 14 | Test Teardown Test Teardown Execution |
| 15 | Suite Setup Suite Setup Execution |
| 16 | Suite Teardown Redfish.Logout |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 17 | |
Matt Fischer | 6fb70d9 | 2023-10-24 19:06:33 -0600 | [diff] [blame] | 18 | Test Tags BMC_IPv6 |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 19 | |
| 20 | *** Variables *** |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 21 | ${test_ipv6_addr} 2001:db8:3333:4444:5555:6666:7777:8888 |
| 22 | ${test_ipv6_invalid_addr} 2001:db8:3333:4444:5555:6666:7777:JJKK |
| 23 | ${test_ipv6_addr1} 2001:db8:3333:4444:5555:6666:7777:9999 |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 24 | |
George Keishing | e16f158 | 2022-12-15 07:32:21 -0600 | [diff] [blame] | 25 | # Valid prefix length is a integer ranges from 1 to 128. |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 26 | ${test_prefix_length} 64 |
| 27 | ${ipv6_gw_addr} 2002:903:15F:32:9:3:32:1 |
| 28 | ${prefix_length_def} None |
| 29 | ${invalid_staticv6_gateway} 9.41.164.1 |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 30 | ${linklocal_addr_format} fe80::[0-9a-f:]+$ |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 31 | |
| 32 | *** Test Cases *** |
| 33 | |
| 34 | Get IPv6 Address And Verify |
| 35 | [Documentation] Get IPv6 Address And Verify. |
| 36 | [Tags] Get_IPv6_Address_And_Verify |
| 37 | |
| 38 | FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations} |
| 39 | Verify IPv6 On BMC ${ipv6_network_configuration['Address']} |
| 40 | END |
| 41 | |
| 42 | |
Prashanth Katti | 2c73abc | 2021-03-17 07:42:25 -0500 | [diff] [blame] | 43 | Get PrefixLength And Verify |
| 44 | [Documentation] Get IPv6 prefix length and verify. |
| 45 | [Tags] Get_PrefixLength_And_Verify |
| 46 | |
| 47 | FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations} |
| 48 | Verify IPv6 On BMC ${ipv6_network_configuration['PrefixLength']} |
| 49 | END |
| 50 | |
| 51 | |
| 52 | Get IPv6 Default Gateway And Verify |
George Keishing | 9614383 | 2021-03-23 07:55:08 -0500 | [diff] [blame] | 53 | [Documentation] Get IPv6 default gateway and verify. |
George Keishing | ade6ab4 | 2022-07-19 11:41:03 -0500 | [diff] [blame] | 54 | [Tags] Get_IPv6_Default_Gateway_And_Verify |
Prashanth Katti | 2c73abc | 2021-03-17 07:42:25 -0500 | [diff] [blame] | 55 | |
| 56 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 57 | ${ipv6_gateway}= Get From Dictionary ${resp.dict} IPv6DefaultGateway |
| 58 | Verify IPv6 Default Gateway On BMC ${ipv6_gateway} |
| 59 | |
| 60 | |
Prashanth Katti | c1d2daa | 2022-07-26 03:53:06 -0500 | [diff] [blame] | 61 | Verify All Configured IPv6 And PrefixLength On BMC |
| 62 | [Documentation] Verify IPv6 address and its prefix length on BMC. |
| 63 | [Tags] Verify_All_Configured_IPv6_And_PrefixLength_On_BMC |
| 64 | |
| 65 | FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations} |
George Keishing | f02ca2b | 2023-04-05 22:11:03 +0530 | [diff] [blame] | 66 | Verify IPv6 And PrefixLength ${ipv6_network_configuration['Address']} |
Prashanth Katti | c1d2daa | 2022-07-26 03:53:06 -0500 | [diff] [blame] | 67 | ... ${ipv6_network_configuration['PrefixLength']} |
| 68 | END |
| 69 | |
| 70 | |
| 71 | Configure IPv6 Address And Verify |
| 72 | [Documentation] Configure IPv6 address and verify. |
| 73 | [Tags] Configure_IPv6_Address_And_Verify |
Anvesh-Kumar_Rayankula | 3a26c66 | 2025-04-16 01:19:26 -0500 | [diff] [blame] | 74 | [Teardown] Run Keywords |
| 75 | ... Delete IPv6 Address ${test_ipv6_addr} AND Test Teardown Execution |
Prashanth Katti | c1d2daa | 2022-07-26 03:53:06 -0500 | [diff] [blame] | 76 | [Template] Configure IPv6 Address On BMC |
| 77 | |
| 78 | |
| 79 | # IPv6 address Prefix length |
| 80 | ${test_ipv6_addr} ${test_prefix_length} |
| 81 | |
| 82 | |
Prashanth Katti | 12ed4b7 | 2023-05-16 05:24:00 -0500 | [diff] [blame] | 83 | Delete IPv6 Address And Verify |
| 84 | [Documentation] Delete IPv6 address and verify. |
| 85 | [Tags] Delete_IPv6_Address_And_Verify |
| 86 | |
| 87 | Configure IPv6 Address On BMC ${test_ipv6_addr} ${test_prefix_length} |
| 88 | |
| 89 | Delete IPv6 Address ${test_ipv6_addr} |
| 90 | |
| 91 | |
George Keishing | cc28831 | 2024-10-22 10:13:12 +0530 | [diff] [blame] | 92 | Modify IPv6 Address And Verify |
Prashanth Katti | 5f7d2e4 | 2023-05-22 03:17:25 -0500 | [diff] [blame] | 93 | [Documentation] Modify IPv6 address and verify. |
| 94 | [Tags] Modify_IPv6_Address_And_Verify |
kvishal | 88de8c4 | 2025-03-04 01:45:10 -0600 | [diff] [blame] | 95 | [Teardown] Run Keywords |
George Keishing | cfdd099 | 2025-03-17 11:59:20 +0530 | [diff] [blame] | 96 | ... Delete IPv6 Address ${test_ipv6_addr1} AND Test Teardown Execution |
Prashanth Katti | 5f7d2e4 | 2023-05-22 03:17:25 -0500 | [diff] [blame] | 97 | |
| 98 | Configure IPv6 Address On BMC ${test_ipv6_addr} ${test_prefix_length} |
| 99 | |
| 100 | Modify IPv6 Address ${test_ipv6_addr} ${test_ipv6_addr1} ${test_prefix_length} |
| 101 | |
| 102 | |
Sweta Potthuri | afe858e | 2025-02-25 23:52:51 -0600 | [diff] [blame] | 103 | Verify Persistency Of IPv6 After BMC Reboot |
| 104 | [Documentation] Verify persistency of IPv6 after BMC reboot. |
| 105 | [Tags] Verify_Persistency_Of_IPv6_After_BMC_Reboot |
| 106 | [Teardown] Run Keywords |
| 107 | ... Delete IPv6 Address ${test_ipv6_addr} AND Test Teardown Execution |
| 108 | |
| 109 | Configure IPv6 Address On BMC ${test_ipv6_addr} ${test_prefix_length} |
| 110 | |
| 111 | Redfish OBMC Reboot (off) stack_mode=skip |
| 112 | |
| 113 | # Verifying persistency of IPv6. |
| 114 | Verify IPv6 On BMC ${test_ipv6_addr} |
| 115 | |
| 116 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 117 | Enable SLAAC On BMC And Verify |
| 118 | [Documentation] Enable SLAAC on BMC and verify. |
| 119 | [Tags] Enable_SLAAC_On_BMC_And_Verify |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 120 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 121 | Set SLAAC Configuration State And Verify ${True} |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 122 | |
| 123 | |
Sweta Potthuri | 0df4a86 | 2025-03-24 12:05:09 -0500 | [diff] [blame] | 124 | Enable DHCPv6 Property On BMC And Verify |
| 125 | [Documentation] Enable DHCPv6 property on BMC and verify. |
| 126 | [Tags] Enable_DHCPv6_Property_On_BMC_And_Verify |
| 127 | |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 128 | Set And Verify DHCPv6 Property Enabled |
Sweta Potthuri | 0df4a86 | 2025-03-24 12:05:09 -0500 | [diff] [blame] | 129 | |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 130 | |
kvishal | 0d199a9 | 2025-05-29 02:35:18 -0500 | [diff] [blame] | 131 | Disable DHCPv6 Property On BMC And Verify |
| 132 | [Documentation] Disable DHCPv6 property on BMC and verify. |
| 133 | [Tags] Disable_DHCPv6_Property_On_BMC_And_Verify |
| 134 | |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 135 | Set And Verify DHCPv6 Property Disabled |
kvishal | bd04bd6 | 2025-08-05 03:57:53 -0500 | [diff] [blame] | 136 | |
| 137 | |
| 138 | Verify Persistency Of DHCPv6 On Reboot |
| 139 | [Documentation] Verify persistency of DHCPv6 property on reboot. |
| 140 | [Tags] Verify_Persistency_Of_DHCPv6_On_Reboot |
| 141 | |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 142 | Set And Verify DHCPv6 Property Enabled |
| 143 | Redfish OBMC Reboot (off) stack_mode=skip |
| 144 | Verify DHCPv6 Property Enabled |
Sweta Potthuri | 0df4a86 | 2025-03-24 12:05:09 -0500 | [diff] [blame] | 145 | |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 146 | |
Sweta Potthuri | cb61ff0 | 2025-04-09 05:16:09 -0500 | [diff] [blame] | 147 | Configure Invalid Static IPv6 And Verify |
| 148 | [Documentation] Configure invalid static IPv6 and verify. |
| 149 | [Tags] Configure_Invalid_Static_IPv6_And_Verify |
| 150 | [Template] Configure IPv6 Address On BMC |
| 151 | |
| 152 | #invalid_ipv6 prefix length valid_status_code |
| 153 | ${ipv4_hexword_addr} ${test_prefix_length} ${HTTP_BAD_REQUEST} |
| 154 | |
Sweta Potthuri | 565318d | 2025-06-09 06:13:46 -0500 | [diff] [blame] | 155 | |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 156 | Configure IPv6 Static Default Gateway And Verify |
| 157 | [Documentation] Configure IPv6 static default gateway and verify. |
| 158 | [Tags] Configure_IPv6_Static_Default_Gateway_And_Verify |
| 159 | [Template] Configure IPv6 Static Default Gateway On BMC |
Sweta Potthuri | 565318d | 2025-06-09 06:13:46 -0500 | [diff] [blame] | 160 | |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 161 | # static_def_gw prefix length valid_status_code |
| 162 | ${ipv6_gw_addr} ${prefix_length_def} ${HTTP_OK} |
| 163 | ${invalid_staticv6_gateway} ${test_prefix_length} ${HTTP_BAD_REQUEST} |
Sweta Potthuri | 565318d | 2025-06-09 06:13:46 -0500 | [diff] [blame] | 164 | |
Sweta Potthuri | cb61ff0 | 2025-04-09 05:16:09 -0500 | [diff] [blame] | 165 | |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 166 | Modify Static Default Gateway And Verify |
| 167 | [Documentation] Modify static default gateway and verify. |
| 168 | [Tags] Modify_Static_Default_Gateway_And_Verify |
| 169 | [Setup] Configure IPv6 Static Default Gateway On BMC ${ipv6_gw_addr} ${prefix_length_def} |
| 170 | |
| 171 | Modify IPv6 Static Default Gateway On BMC ${test_ipv6_addr1} ${prefix_length_def} ${HTTP_OK} ${ipv6_gw_addr} |
| 172 | |
| 173 | |
Sweta Potthuri | 2d08573 | 2025-07-16 09:10:08 -0500 | [diff] [blame] | 174 | Delete IPv6 Static Default Gateway And Verify |
| 175 | [Documentation] Delete IPv6 static default gateway and verify. |
| 176 | [Tags] Delete_IPv6_Static_Default_Gateway_And_Verify |
| 177 | [Setup] Configure IPv6 Static Default Gateway On BMC ${ipv6_gw_addr} ${prefix_length_def} |
| 178 | |
| 179 | Delete IPv6 Static Default Gateway ${ipv6_gw_addr} |
| 180 | |
| 181 | |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 182 | Verify Coexistence Of Linklocalv6 And Static IPv6 On BMC |
| 183 | [Documentation] Verify linklocalv6 And static IPv6 both exist. |
| 184 | [Tags] Verify_Coexistence_Of_Linklocalv6_And_Static_IPv6_On_BMC |
Anvesh-Kumar_Rayankula | 019d936 | 2025-09-03 22:55:12 -0500 | [diff] [blame] | 185 | [Setup] Configure IPv6 Address On BMC ${test_ipv6_addr} ${test_prefix_length} |
| 186 | [Teardown] Delete IPv6 Address ${test_ipv6_addr} |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 187 | |
| 188 | Check Coexistence Of Linklocalv6 And Static IPv6 |
| 189 | |
| 190 | |
Sweta Potthuri | 3c6f97d | 2025-08-06 00:30:19 -0500 | [diff] [blame] | 191 | Verify IPv6 Linklocal Address Is In Corrrect Format |
| 192 | [Documentation] Verify linklocal address has network part as fe80 and host part as EUI64. |
| 193 | [Tags] Verify_IPv6_Linklocal_Address_Is_In_Correct_Format |
| 194 | |
| 195 | Check If Linklocal Address Is In Correct Format |
| 196 | |
| 197 | |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 198 | Verify BMC Gets SLAAC Address On Enabling SLAAC |
| 199 | [Documentation] On enabling SLAAC verify SLAAC address comes up. |
| 200 | [Tags] Verify_BMC_Gets_SLAAC_Address_On_Enabling_SLAAC |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 201 | [Setup] Set SLAAC Configuration State And Verify ${False} |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 202 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 203 | Set SLAAC Configuration State And Verify ${True} |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 204 | Sleep ${NETWORK_TIMEOUT} |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 205 | Check BMC Gets SLAAC Address |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 206 | |
| 207 | |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 208 | Enable And Verify DHCPv6 Property On Eth1 When DHCPv6 Property Enabled On Eth0 |
| 209 | [Documentation] Verify DHCPv6 on eth1 when DHCPv6 property is enabled on eth0. |
| 210 | [Tags] Enable_And_Verify_DHCPv6_Property_On_Eth1_When_DHCPv6_Property_Enabled_On_Eth0 |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 211 | [Setup] Get The Initial DHCPv6 Settings |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 212 | [Teardown] Run Keywords Set And Verify DHCPv6 Property ${dhcpv6_channel_1} ${1} |
| 213 | ... AND Set And Verify DHCPv6 Property ${dhcpv6_channel_2} ${2} |
| 214 | |
| 215 | Set And Verify DHCPv6 Property Enabled ${1} |
| 216 | Set And Verify DHCPv6 Property Enabled ${2} |
| 217 | |
| 218 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 219 | Enable And Verify SLAAC Property On Eth1 When SLAAC Property Enabled On Eth0 |
| 220 | [Documentation] Enable and verify SLAAC property on Eth1 when SLAAC property enabled on Eth0. |
| 221 | [Tags] Enable_And_Verify_SLAAC_Property_On_Eth1_When_SLAAC_Property_Enabled_On_Eth0 |
| 222 | [Setup] Get The Initial SLAAC Settings |
| 223 | [Teardown] Run Keywords Set SLAAC Configuration State And Verify ${slaac_channel_1} [${HTTP_OK}] ${1} |
| 224 | ... AND Set SLAAC Configuration State And Verify ${slaac_channel_2} [${HTTP_OK}] ${2} |
| 225 | |
| 226 | Set SLAAC Configuration State And Verify ${True} [${HTTP_OK}] ${1} |
| 227 | Set SLAAC Configuration State And Verify ${True} [${HTTP_OK}] ${2} |
| 228 | |
| 229 | # Check all the addresses and address origins remain intact. |
| 230 | Verify All The Addresses Are Intact |
| 231 | |
| 232 | |
abhijith-121 | 3a64590 | 2025-09-08 01:12:34 -0500 | [diff] [blame] | 233 | Verify Autoconfig Is Present On Ethernet Interface |
| 234 | [Documentation] Verify autoconfig is present on ethernet interface. |
| 235 | [Tags] Verify_Autoconfig_Is_Present_On_Ethernet_Interface |
| 236 | |
| 237 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 238 | Should Contain ${resp.dict} StatelessAddressAutoConfig |
| 239 | |
| 240 | |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 241 | *** Keywords *** |
| 242 | |
Prashanth Katti | 3270fd0 | 2021-06-11 08:02:22 -0500 | [diff] [blame] | 243 | Suite Setup Execution |
| 244 | [Documentation] Do suite setup execution. |
| 245 | |
Anvesh-Kumar_Rayankula | 019d936 | 2025-09-03 22:55:12 -0500 | [diff] [blame] | 246 | Redfish.Login |
Prashanth Katti | 3270fd0 | 2021-06-11 08:02:22 -0500 | [diff] [blame] | 247 | ${active_channel_config}= Get Active Channel Config |
Sweta Potthuri | 3c6f97d | 2025-08-06 00:30:19 -0500 | [diff] [blame] | 248 | Set Suite Variable ${active_channel_config} |
| 249 | |
Prashanth Katti | 3270fd0 | 2021-06-11 08:02:22 -0500 | [diff] [blame] | 250 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 251 | |
| 252 | Set Suite variable ${ethernet_interface} |
| 253 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 254 | ${initial_ipv4_addressorigin_list} ${initial_ipv4_addr_list}= Get Address Origin List And IPv4 or IPv6 Address IPv4Addresses |
| 255 | ${initial_ipv6_addressorigin_list} ${initial_ipv6_addr_list}= Get Address Origin List And IPv4 or IPv6 Address IPv6Addresses |
| 256 | |
| 257 | Set Suite Variable ${initial_ipv4_addressorigin_list} |
| 258 | Set Suite Variable ${initial_ipv4_addr_list} |
| 259 | Set Suite Variable ${initial_ipv6_addressorigin_list} |
| 260 | Set Suite Variable ${initial_ipv6_addr_list} |
| 261 | |
Prashanth Katti | 3270fd0 | 2021-06-11 08:02:22 -0500 | [diff] [blame] | 262 | |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 263 | Test Setup Execution |
| 264 | [Documentation] Test setup execution. |
| 265 | |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 266 | @{ipv6_network_configurations}= Get IPv6 Network Configuration |
| 267 | Set Test Variable @{ipv6_network_configurations} |
| 268 | |
| 269 | # Get BMC IPv6 address and prefix length. |
| 270 | ${ipv6_data}= Get BMC IPv6 Info |
| 271 | Set Test Variable ${ipv6_data} |
| 272 | |
| 273 | |
| 274 | Test Teardown Execution |
| 275 | [Documentation] Test teardown execution. |
| 276 | |
| 277 | FFDC On Test Case Fail |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 278 | |
| 279 | |
| 280 | Get IPv6 Network Configuration |
| 281 | [Documentation] Get Ipv6 network configuration. |
| 282 | # Sample output: |
| 283 | # { |
ganesanb | 4d43028 | 2023-04-27 14:33:23 +0000 | [diff] [blame] | 284 | # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0", |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 285 | # "@odata.type": "#EthernetInterface.v1_4_1.EthernetInterface", |
| 286 | # "DHCPv4": { |
| 287 | # "DHCPEnabled": false, |
| 288 | # "UseDNSServers": false, |
| 289 | # "UseDomainName": true, |
| 290 | # "UseNTPServers": false |
| 291 | # }, |
| 292 | # "DHCPv6": { |
| 293 | # "OperatingMode": "Disabled", |
| 294 | # "UseDNSServers": false, |
| 295 | # "UseDomainName": true, |
| 296 | # "UseNTPServers": false |
| 297 | # }, |
| 298 | # "Description": "Management Network Interface", |
| 299 | # "FQDN": "localhost", |
| 300 | # "HostName": "localhost", |
| 301 | # "IPv4Addresses": [ |
| 302 | # { |
| 303 | # "Address": "xx.xx.xx.xx", |
| 304 | # "AddressOrigin": "Static", |
| 305 | # "Gateway": "xx.xx.xx.1", |
| 306 | # "SubnetMask": "xx.xx.xx.0" |
| 307 | # }, |
| 308 | # { |
| 309 | # "Address": "169.254.xx.xx", |
| 310 | # "AddressOrigin": "IPv4LinkLocal", |
| 311 | # "Gateway": "0.0.0.0", |
| 312 | # "SubnetMask": "xx.xx.0.0" |
| 313 | # }, |
| 314 | # ], |
| 315 | # "IPv4StaticAddresses": [ |
| 316 | # { |
| 317 | # "Address": "xx.xx.xx.xx", |
| 318 | # "AddressOrigin": "Static", |
| 319 | # "Gateway": "xx.xx.xx.1", |
| 320 | # "SubnetMask": "xx.xx.0.0" |
| 321 | # } |
| 322 | # } |
| 323 | # ], |
| 324 | # "IPv6AddressPolicyTable": [], |
| 325 | # "IPv6Addresses": [ |
| 326 | # { |
| 327 | # "Address": "fe80::xxxx:xxxx:xxxx:xxxx", |
| 328 | # "AddressOrigin": "LinkLocal", |
| 329 | # "AddressState": null, |
| 330 | # "PrefixLength": xx |
| 331 | # } |
| 332 | # ], |
| 333 | # "IPv6DefaultGateway": "", |
| 334 | # "IPv6StaticAddresses": [ |
| 335 | # { "Address": "xxxx:xxxx:xxxx:xxxx::xxxx", |
| 336 | # "AddressOrigin": "Static", |
| 337 | # "AddressState": null, |
| 338 | # "PrefixLength": xxx |
| 339 | # } |
| 340 | # ], |
| 341 | # "Id": "eth0", |
| 342 | # "InterfaceEnabled": true, |
| 343 | # "LinkStatus": "LinkUp", |
| 344 | # "MACAddress": "xx:xx:xx:xx:xx:xx", |
| 345 | # "Name": "Manager Ethernet Interface", |
| 346 | # "NameServers": [], |
| 347 | # "SpeedMbps": 0, |
| 348 | # "StaticNameServers": [], |
| 349 | # "Status": { |
| 350 | # "Health": "OK", |
| 351 | # "HealthRollup": "OK", |
| 352 | # "State": "Enabled" |
| 353 | # }, |
| 354 | # "VLANs": { |
ganesanb | 4d43028 | 2023-04-27 14:33:23 +0000 | [diff] [blame] | 355 | # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0/VLANs" |
Prashanth Katti | 8abbb4d | 2021-01-29 02:17:45 -0600 | [diff] [blame] | 356 | |
| 357 | |
| 358 | ${active_channel_config}= Get Active Channel Config |
| 359 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 360 | |
| 361 | @{ipv6_network_configurations}= Get From Dictionary ${resp.dict} IPv6StaticAddresses |
George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 362 | RETURN @{ipv6_network_configurations} |
Prashanth Katti | c1d2daa | 2022-07-26 03:53:06 -0500 | [diff] [blame] | 363 | |
| 364 | |
| 365 | Verify IPv6 And PrefixLength |
| 366 | [Documentation] Verify IPv6 address and prefix length on BMC. |
| 367 | [Arguments] ${ipv6_addr} ${prefix_len} |
| 368 | |
| 369 | # Description of the argument(s): |
| 370 | # ipv6_addr IPv6 address to be verified. |
| 371 | # prefix_len PrefixLength value to be verified. |
| 372 | |
| 373 | # Catenate IPv6 address and its prefix length. |
| 374 | ${ipv6_with_prefix}= Catenate ${ipv6_addr}/${prefix_len} |
| 375 | |
| 376 | # Get IPv6 address details on BMC using IP command. |
| 377 | @{ip_data}= Get BMC IPv6 Info |
| 378 | |
| 379 | # Verify if IPv6 and prefix length is configured on BMC. |
| 380 | |
| 381 | Should Contain ${ip_data} ${ipv6_with_prefix} |
| 382 | ... msg=IPv6 and prefix length pair does not exist. |
| 383 | |
| 384 | |
| 385 | Configure IPv6 Address On BMC |
| 386 | [Documentation] Add IPv6 Address on BMC. |
| 387 | [Arguments] ${ipv6_addr} ${prefix_len} ${valid_status_codes}=${HTTP_OK} |
| 388 | |
| 389 | # Description of argument(s): |
| 390 | # ipv6_addr IPv6 address to be added (e.g. "2001:EEEE:2222::2022"). |
| 391 | # prefix_len Prefix length for the IPv6 to be added |
| 392 | # (e.g. "64"). |
| 393 | # valid_status_codes Expected return code from patch operation |
| 394 | # (e.g. "200"). |
| 395 | |
Prashanth Katti | 12ed4b7 | 2023-05-16 05:24:00 -0500 | [diff] [blame] | 396 | ${prefix_length}= Convert To Integer ${prefix_len} |
Prashanth Katti | c1d2daa | 2022-07-26 03:53:06 -0500 | [diff] [blame] | 397 | ${empty_dict}= Create Dictionary |
| 398 | ${ipv6_data}= Create Dictionary Address=${ipv6_addr} |
Prashanth Katti | 12ed4b7 | 2023-05-16 05:24:00 -0500 | [diff] [blame] | 399 | ... PrefixLength=${prefix_length} |
Prashanth Katti | c1d2daa | 2022-07-26 03:53:06 -0500 | [diff] [blame] | 400 | |
| 401 | ${patch_list}= Create List |
| 402 | |
| 403 | # Get existing static IPv6 configurations on BMC. |
| 404 | ${ipv6_network_configurations}= Get IPv6 Network Configuration |
| 405 | ${num_entries}= Get Length ${ipv6_network_configurations} |
| 406 | |
| 407 | FOR ${INDEX} IN RANGE 0 ${num_entries} |
| 408 | Append To List ${patch_list} ${empty_dict} |
| 409 | END |
| 410 | |
George Keishing | e6e161e | 2025-05-08 10:18:30 +0530 | [diff] [blame] | 411 | ${valid_status_codes}= Set Variable If '${valid_status_codes}' == '${HTTP_OK}' |
| 412 | ... ${HTTP_OK},${HTTP_NO_CONTENT} |
| 413 | ... ${valid_status_codes} |
Prashanth Katti | c1d2daa | 2022-07-26 03:53:06 -0500 | [diff] [blame] | 414 | |
| 415 | # We need not check for existence of IPv6 on BMC while adding. |
| 416 | Append To List ${patch_list} ${ipv6_data} |
| 417 | ${data}= Create Dictionary IPv6StaticAddresses=${patch_list} |
| 418 | |
| 419 | ${active_channel_config}= Get Active Channel Config |
| 420 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 421 | |
| 422 | Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} body=&{data} |
| 423 | ... valid_status_codes=[${valid_status_codes}] |
| 424 | |
| 425 | Return From Keyword If '${valid_status_codes}' != '${HTTP_OK},${HTTP_NO_CONTENT}' |
| 426 | |
| 427 | # Note: Network restart takes around 15-18s after patch request processing. |
| 428 | Sleep ${NETWORK_TIMEOUT}s |
| 429 | Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT} |
| 430 | |
| 431 | Verify IPv6 And PrefixLength ${ipv6_addr} ${prefix_len} |
| 432 | |
| 433 | # Verify if existing static IPv6 addresses still exist. |
| 434 | FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations} |
| 435 | Verify IPv6 On BMC ${ipv6_network_configuration['Address']} |
| 436 | END |
| 437 | |
| 438 | Validate IPv6 Network Config On BMC |
| 439 | |
| 440 | |
| 441 | Validate IPv6 Network Config On BMC |
| 442 | [Documentation] Check that IPv6 network info obtained via redfish matches info |
| 443 | ... obtained via CLI. |
Prashanth Katti | 5f7d2e4 | 2023-05-22 03:17:25 -0500 | [diff] [blame] | 444 | @{ipv6_network_configurations}= Get IPv6 Network Configuration |
Prashanth Katti | c1d2daa | 2022-07-26 03:53:06 -0500 | [diff] [blame] | 445 | ${ipv6_data}= Get BMC IPv6 Info |
| 446 | FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations} |
| 447 | Should Contain Match ${ipv6_data} ${ipv6_network_configuration['Address']}/* |
| 448 | ... msg=IPv6 address does not exist. |
| 449 | END |
| 450 | |
Prashanth Katti | 12ed4b7 | 2023-05-16 05:24:00 -0500 | [diff] [blame] | 451 | |
| 452 | Delete IPv6 Address |
| 453 | [Documentation] Delete IPv6 address of BMC. |
Prashanth Katti | bcb9dab | 2025-04-01 12:58:37 -0500 | [diff] [blame] | 454 | [Arguments] ${ipv6_addr} |
| 455 | ... ${valid_status_codes}=[${HTTP_OK},${HTTP_ACCEPTED},${HTTP_NO_CONTENT}] |
Prashanth Katti | 12ed4b7 | 2023-05-16 05:24:00 -0500 | [diff] [blame] | 456 | |
| 457 | # Description of argument(s): |
| 458 | # ipv6_addr IPv6 address to be deleted (e.g. "2001:1234:1234:1234::1234"). |
| 459 | # valid_status_codes Expected return code from patch operation |
| 460 | # (e.g. "200"). See prolog of rest_request |
| 461 | # method in redfish_plus.py for details. |
| 462 | |
| 463 | ${empty_dict}= Create Dictionary |
| 464 | ${patch_list}= Create List |
| 465 | |
| 466 | @{ipv6_network_configurations}= Get IPv6 Network Configuration |
| 467 | FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations} |
| 468 | IF '${ipv6_network_configuration['Address']}' == '${ipv6_addr}' |
| 469 | Append To List ${patch_list} ${null} |
| 470 | ELSE |
| 471 | Append To List ${patch_list} ${empty_dict} |
| 472 | END |
| 473 | END |
| 474 | |
| 475 | ${ip_found}= Run Keyword And Return Status List Should Contain Value |
| 476 | ... ${patch_list} ${null} msg=${ipv6_addr} does not exist on BMC |
| 477 | Pass Execution If ${ip_found} == ${False} ${ipv6_addr} does not exist on BMC |
| 478 | |
| 479 | # Run patch command only if given IP is found on BMC |
| 480 | ${data}= Create Dictionary IPv6StaticAddresses=${patch_list} |
| 481 | |
| 482 | ${active_channel_config}= Get Active Channel Config |
| 483 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 484 | |
| 485 | Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} body=&{data} |
Sweta Potthuri | a198161 | 2025-05-09 05:41:10 -0500 | [diff] [blame] | 486 | ... valid_status_codes=${valid_status_codes} |
Prashanth Katti | 12ed4b7 | 2023-05-16 05:24:00 -0500 | [diff] [blame] | 487 | |
| 488 | # Note: Network restart takes around 15-18s after patch request processing |
| 489 | Sleep ${NETWORK_TIMEOUT}s |
| 490 | Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT} |
| 491 | |
| 492 | # IPv6 address that is deleted should not be there on BMC. |
| 493 | ${delete_status}= Run Keyword And Return Status Verify IPv6 On BMC ${ipv6_addr} |
Anvesh-Kumar_Rayankula | 3a26c66 | 2025-04-16 01:19:26 -0500 | [diff] [blame] | 494 | IF '${valid_status_codes}' == '[${HTTP_OK},${HTTP_ACCEPTED},${HTTP_NO_CONTENT}]' |
Prashanth Katti | 12ed4b7 | 2023-05-16 05:24:00 -0500 | [diff] [blame] | 495 | Should Be True '${delete_status}' == '${False}' |
| 496 | ELSE |
| 497 | Should Be True '${delete_status}' == '${True}' |
| 498 | END |
| 499 | |
| 500 | Validate IPv6 Network Config On BMC |
Prashanth Katti | 5f7d2e4 | 2023-05-22 03:17:25 -0500 | [diff] [blame] | 501 | |
| 502 | |
| 503 | Modify IPv6 Address |
| 504 | [Documentation] Modify and verify IPv6 address of BMC. |
| 505 | [Arguments] ${ipv6} ${new_ipv6} ${prefix_len} |
| 506 | ... ${valid_status_codes}=[${HTTP_OK}, ${HTTP_NO_CONTENT}] |
| 507 | |
| 508 | # Description of argument(s): |
| 509 | # ipv6 IPv6 address to be replaced (e.g. "2001:AABB:CCDD::AAFF"). |
| 510 | # new_ipv6 New IPv6 address to be configured. |
| 511 | # prefix_len Prefix length value (Range 1 to 128). |
| 512 | # valid_status_codes Expected return code from patch operation |
| 513 | # (e.g. "200", "201"). |
| 514 | |
| 515 | ${empty_dict}= Create Dictionary |
| 516 | ${patch_list}= Create List |
| 517 | ${prefix_length}= Convert To Integer ${prefix_len} |
| 518 | ${ipv6_data}= Create Dictionary |
| 519 | ... Address=${new_ipv6} PrefixLength=${prefix_length} |
| 520 | |
| 521 | # Sample IPv6 network configurations: |
| 522 | # "IPv6AddressPolicyTable": [], |
| 523 | # "IPv6Addresses": [ |
| 524 | # { |
| 525 | # "Address": "X002:db8:0:2::XX0", |
| 526 | # "AddressOrigin": "DHCPv6", |
| 527 | # "PrefixLength": 128 |
| 528 | # }, |
| 529 | # { |
| 530 | # "Address": “X002:db8:0:2:a94:XXff:fe82:XXXX", |
| 531 | # "AddressOrigin": "SLAAC", |
| 532 | # "PrefixLength": 64 |
| 533 | # }, |
| 534 | # { |
| 535 | # "Address": “Y002:db8:0:2:a94:efff:fe82:5000", |
| 536 | # "AddressOrigin": "Static", |
| 537 | # "PrefixLength": 56 |
| 538 | # }, |
| 539 | # { |
| 540 | # "Address": “Z002:db8:0:2:a94:efff:fe82:5000", |
| 541 | # "AddressOrigin": "Static", |
| 542 | # "PrefixLength": 56 |
| 543 | # }, |
| 544 | # { |
| 545 | # "Address": “Xe80::a94:efff:YYYY:XXXX", |
| 546 | # "AddressOrigin": "LinkLocal", |
| 547 | # "PrefixLength": 64 |
| 548 | # }, |
| 549 | # { |
| 550 | # "Address": “X002:db8:1:2:eff:233:fee:546", |
| 551 | # "AddressOrigin": "Static", |
| 552 | # "PrefixLength": 56 |
| 553 | # } |
| 554 | # ], |
| 555 | # "IPv6DefaultGateway": “XXXX::ab2e:80fe:87df:XXXX”, |
| 556 | # "IPv6StaticAddresses": [ |
| 557 | # { |
| 558 | # "Address": “X002:db8:0:2:a94:efff:fe82:5000", |
| 559 | # "PrefixLength": 56 |
| 560 | # }, |
| 561 | # { |
| 562 | # "Address": “Y002:db8:0:2:a94:efff:fe82:5000", |
| 563 | # "PrefixLength": 56 |
| 564 | # }, |
| 565 | # { |
| 566 | # "Address": “Z002:db8:1:2:eff:233:fee:546", |
| 567 | # "PrefixLength": 56 |
| 568 | # } |
| 569 | # ], |
| 570 | # "IPv6StaticDefaultGateways": [], |
| 571 | |
| 572 | # Find the position of IPv6 address to be modified. |
| 573 | @{ipv6_network_configurations}= Get IPv6 Network Configuration |
| 574 | FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations} |
George Keishing | e6e161e | 2025-05-08 10:18:30 +0530 | [diff] [blame] | 575 | IF '${ipv6_network_configuration['Address']}' == '${ipv6}' |
| 576 | Append To List ${patch_list} ${ipv6_data} |
| 577 | ELSE |
| 578 | Append To List ${patch_list} ${empty_dict} |
| 579 | END |
Prashanth Katti | 5f7d2e4 | 2023-05-22 03:17:25 -0500 | [diff] [blame] | 580 | END |
| 581 | |
| 582 | # Modify the IPv6 address only if given IPv6 is found |
| 583 | ${ip_found}= Run Keyword And Return Status List Should Contain Value |
| 584 | ... ${patch_list} ${ipv6_data} msg=${ipv6} does not exist on BMC |
| 585 | Pass Execution If ${ip_found} == ${False} ${ipv6} does not exist on BMC |
| 586 | |
| 587 | ${data}= Create Dictionary IPv6StaticAddresses=${patch_list} |
| 588 | |
| 589 | ${active_channel_config}= Get Active Channel Config |
| 590 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 591 | |
| 592 | Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 593 | ... body=&{data} valid_status_codes=${valid_status_codes} |
| 594 | |
| 595 | # Note: Network restart takes around 15-18s after patch request processing. |
| 596 | Sleep ${NETWORK_TIMEOUT}s |
| 597 | Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT} |
| 598 | |
| 599 | # Verify if new IPv6 address is configured on BMC. |
| 600 | Verify IPv6 On BMC ${new_ipv6} |
| 601 | |
| 602 | # Verify if old IPv6 address is erased. |
| 603 | ${cmd_status}= Run Keyword And Return Status |
| 604 | ... Verify IPv6 On BMC ${ipv6} |
| 605 | Should Be Equal ${cmd_status} ${False} msg=Old IPv6 address is not deleted. |
| 606 | |
| 607 | Validate IPv6 Network Config On BMC |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 608 | |
| 609 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 610 | Set SLAAC Configuration State And Verify |
| 611 | [Documentation] Set SLAAC configuration state and verify. |
| 612 | [Arguments] ${slaac_state} ${valid_status_codes}=[${HTTP_OK},${HTTP_ACCEPTED},${HTTP_NO_CONTENT}] ${channel_number}=${CHANNEL_NUMBER} |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 613 | |
| 614 | # Description of argument(s): |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 615 | # slaac_state SLAAC state('True' or 'False'). |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 616 | # valid_status_code Expected valid status codes. |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 617 | # channel_number Channel number 1(eth0) or 2(eth1). |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 618 | |
| 619 | ${active_channel_config}= Get Active Channel Config |
| 620 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 621 | |
| 622 | ${data}= Set Variable If ${slaac_state} == ${False} ${DISABLE_SLAAC} ${ENABLE_SLAAC} |
| 623 | ${resp}= Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
Sweta Potthuri | 610f86f | 2025-05-30 00:47:23 -0500 | [diff] [blame] | 624 | ... body=${data} valid_status_codes=${valid_status_codes} |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 625 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 626 | # Verify SLAAC is set correctly. |
Sweta Potthuri | 8ba7432 | 2025-03-19 12:29:06 -0500 | [diff] [blame] | 627 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 628 | ${slaac_verify}= Get From Dictionary ${resp.dict} StatelessAddressAutoConfig |
| 629 | |
George Keishing | e6e161e | 2025-05-08 10:18:30 +0530 | [diff] [blame] | 630 | IF '${slaac_verify['IPv6AutoConfigEnabled']}' != '${slaac_state}' |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 631 | Fail msg=SLAAC not set properly. |
George Keishing | e6e161e | 2025-05-08 10:18:30 +0530 | [diff] [blame] | 632 | END |
Sweta Potthuri | 0df4a86 | 2025-03-24 12:05:09 -0500 | [diff] [blame] | 633 | |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 634 | Set And Verify DHCPv6 Property |
| 635 | [Documentation] Set DHCPv6 property and verify. |
| 636 | [Arguments] ${dhcpv6_operating_mode}=${Disabled} ${channel_number}=${CHANNEL_NUMBER} |
Sweta Potthuri | 0df4a86 | 2025-03-24 12:05:09 -0500 | [diff] [blame] | 637 | |
| 638 | # Description of argument(s): |
| 639 | # dhcpv6_operating_mode Enabled if user wants to enable DHCPv6('Enabled' or 'Disabled'). |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 640 | # channel_number Channel number 1 or 2. |
| 641 | |
| 642 | Set DHCPv6 Property ${dhcpv6_operating_mode} ${channel_number} |
| 643 | Verify DHCPv6 Property ${dhcpv6_operating_mode} ${channel_number} |
| 644 | |
| 645 | |
| 646 | Set DHCPv6 Property |
| 647 | [Documentation] Set DHCPv6 attribute is enables or disabled. |
| 648 | [Arguments] ${dhcpv6_operating_mode}=${Disabled} ${channel_number}=${CHANNEL_NUMBER} |
| 649 | |
| 650 | # Description of argument(s): |
| 651 | # dhcpv6_operating_mode Enabled if user wants to enable DHCPv6('Enabled' or 'Disabled'). |
| 652 | # channel_number Channel number 1 or 2. |
Sweta Potthuri | 0df4a86 | 2025-03-24 12:05:09 -0500 | [diff] [blame] | 653 | |
| 654 | ${data}= Set Variable If '${dhcpv6_operating_mode}' == 'Disabled' ${DISABLE_DHCPv6} ${ENABLE_DHCPv6} |
Sweta Potthuri | 0df4a86 | 2025-03-24 12:05:09 -0500 | [diff] [blame] | 655 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 656 | |
| 657 | Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 658 | ... body=${data} valid_status_codes=[${HTTP_OK},${HTTP_NO_CONTENT}] |
| 659 | |
kvishal | bd04bd6 | 2025-08-05 03:57:53 -0500 | [diff] [blame] | 660 | |
| 661 | Verify DHCPv6 Property |
| 662 | [Documentation] Verify DHCPv6 settings is enabled or disabled. |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 663 | [Arguments] ${dhcpv6_operating_mode} ${channel_number}=${CHANNEL_NUMBER} |
kvishal | bd04bd6 | 2025-08-05 03:57:53 -0500 | [diff] [blame] | 664 | |
| 665 | # Description of Argument(s): |
| 666 | # dhcpv6_operating_mode Enable/ Disable DHCPv6. |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 667 | # channel_number Channel number 1 or 2. |
| 668 | |
| 669 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
kvishal | bd04bd6 | 2025-08-05 03:57:53 -0500 | [diff] [blame] | 670 | |
Sweta Potthuri | 0df4a86 | 2025-03-24 12:05:09 -0500 | [diff] [blame] | 671 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 672 | ${dhcpv6_verify}= Get From Dictionary ${resp.dict} DHCPv6 |
| 673 | |
| 674 | Should Be Equal '${dhcpv6_verify['OperatingMode']}' '${dhcpv6_operating_mode}' |
Sweta Potthuri | cb61ff0 | 2025-04-09 05:16:09 -0500 | [diff] [blame] | 675 | |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 676 | |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 677 | Get IPv6 Static Default Gateway |
| 678 | [Documentation] Get IPv6 static default gateway. |
| 679 | |
| 680 | ${active_channel_config}= Get Active Channel Config |
| 681 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 682 | |
| 683 | @{ipv6_static_defgw_configurations}= Get From Dictionary ${resp.dict} IPv6StaticDefaultGateways |
| 684 | RETURN @{ipv6_static_defgw_configurations} |
| 685 | |
Sweta Potthuri | 2d08573 | 2025-07-16 09:10:08 -0500 | [diff] [blame] | 686 | |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 687 | Configure IPv6 Static Default Gateway On BMC |
| 688 | [Documentation] Configure IPv6 static default gateway on BMC. |
| 689 | [Arguments] ${ipv6_gw_addr} ${prefix_length_def} |
| 690 | ... ${valid_status_codes}=${HTTP_OK} |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 691 | # Description of argument(s): |
| 692 | # ipv6_gw_addr IPv6 Static Default Gateway address to be configured. |
| 693 | # prefix_len_def Prefix length value (Range 1 to 128). |
| 694 | # valid_status_codes Expected return code from patch operation |
| 695 | # (e.g. "200", "204".) |
| 696 | |
| 697 | # Prefix Length is passed as None. |
| 698 | IF '${prefix_length_def}' == '${None}' |
| 699 | ${ipv6_gw}= Create Dictionary Address=${ipv6_gw_addr} |
| 700 | ELSE |
| 701 | ${ipv6_gw}= Create Dictionary Address=${ipv6_gw_addr} Prefix Length=${prefix_length_def} |
| 702 | END |
| 703 | |
| 704 | ${ipv6_static_def_gw}= Get IPv6 Static Default Gateway |
| 705 | |
| 706 | ${num_entries}= Get Length ${ipv6_static_def_gw} |
| 707 | |
| 708 | ${patch_list}= Create List |
| 709 | ${empty_dict}= Create Dictionary |
| 710 | |
| 711 | FOR ${INDEX} IN RANGE 0 ${num_entries} |
| 712 | Append To List ${patch_list} ${empty_dict} |
| 713 | END |
| 714 | |
| 715 | ${valid_status_codes}= Set Variable If '${valid_status_codes}' == '${HTTP_OK}' |
| 716 | ... ${HTTP_OK},${HTTP_NO_CONTENT} |
| 717 | ... ${valid_status_codes} |
| 718 | |
| 719 | Append To List ${patch_list} ${ipv6_gw} |
| 720 | ${data}= Create Dictionary IPv6StaticDefaultGateways=${patch_list} |
| 721 | |
| 722 | Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 723 | ... body=${data} valid_status_codes=[${valid_status_codes}] |
| 724 | |
| 725 | # Verify the added static default gateway is present in Redfish Get Output. |
| 726 | ${ipv6_staticdef_gateway}= Get IPv6 Static Default Gateway |
| 727 | |
| 728 | ${ipv6_static_def_gw_list}= Create List |
| 729 | FOR ${ipv6_staticdef_gateway} IN @{ipv6_staticdef_gateway} |
| 730 | ${value}= Get From Dictionary ${ipv6_staticdef_gateway} Address |
| 731 | Append To List ${ipv6_static_def_gw_list} ${value} |
| 732 | END |
| 733 | |
| 734 | IF '${valid_status_codes}' != '${HTTP_OK},${HTTP_NO_CONTENT}' |
| 735 | Should Not Contain ${ipv6_static_def_gw_list} ${ipv6_gw_addr} |
| 736 | ELSE |
| 737 | Should Contain ${ipv6_static_def_gw_list} ${ipv6_gw_addr} |
| 738 | END |
| 739 | |
Sweta Potthuri | 2d08573 | 2025-07-16 09:10:08 -0500 | [diff] [blame] | 740 | |
Anvesh-Kumar_Rayankula | 019d936 | 2025-09-03 22:55:12 -0500 | [diff] [blame] | 741 | Modify IPv6 Static Default Gateway On BMC |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 742 | [Documentation] Modify and verify IPv6 address of BMC. |
| 743 | [Arguments] ${ipv6_gw_addr} ${new_static_def_gw} ${prefix_length} |
| 744 | ... ${valid_status_codes}=[${HTTP_OK},${HTTP_ACCEPTED}] |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 745 | |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 746 | # Description of argument(s): |
| 747 | # ipv6_gw_addr IPv6 static default gateway address to be replaced (e.g. "2001:AABB:CCDD::AAFF"). |
| 748 | # new_static_def_gw New static default gateway address to be configured. |
| 749 | # prefix length Prefix length value (Range 1 to 128). |
| 750 | # valid_status_codes Expected return code from patch operation |
| 751 | # (e.g. "200", "204"). |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 752 | |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 753 | ${empty_dict}= Create Dictionary |
| 754 | ${patch_list}= Create List |
| 755 | # Prefix Length is passed as None. |
| 756 | IF '${prefix_length_def}' == '${None}' |
| 757 | ${modified_ipv6_gw_addripv6_data}= Create Dictionary Address=${new_static_def_gw} |
| 758 | ELSE |
| 759 | ${modified_ipv6_gw_addripv6_data}= Create Dictionary Address=${new_static_def_gw} Prefix Length=${prefix_length_def} |
| 760 | END |
Sweta Potthuri | 2edacd3 | 2025-07-02 01:04:43 -0500 | [diff] [blame] | 761 | |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 762 | @{ipv6_static_def_gw_list}= Get IPv6 Static Default Gateway |
| 763 | |
| 764 | FOR ${ipv6_static_def_gw} IN @{ipv6_static_def_gw_list} |
| 765 | IF '${ipv6_static_def_gw['Address']}' == '${ipv6_gw_addr}' |
| 766 | Append To List ${patch_list} ${modified_ipv6_gw_addripv6_data} |
| 767 | ELSE |
| 768 | Append To List ${patch_list} ${empty_dict} |
| 769 | END |
| 770 | END |
| 771 | |
| 772 | # Modify the IPv6 address only if given IPv6 static default gateway is found. |
| 773 | ${ip_static_def_gw_found}= Run Keyword And Return Status List Should Contain Value |
| 774 | ... ${patch_list} ${modified_ipv6_gw_addripv6_data} msg=${ipv6_gw_addr} does not exist on BMC |
| 775 | Pass Execution If ${ip_static_def_gw_found} == ${False} ${ipv6_gw_addr} does not exist on BMC |
| 776 | |
| 777 | ${data}= Create Dictionary IPv6StaticDefaultGateways=${patch_list} |
| 778 | |
| 779 | Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 780 | ... body=&{data} valid_status_codes=${valid_status_codes} |
| 781 | |
| 782 | ${ipv6_staticdef_gateway}= Get IPv6 Static Default Gateway |
| 783 | |
| 784 | ${ipv6_static_def_gw_list}= Create List |
| 785 | FOR ${ipv6_staticdef_gateway} IN @{ipv6_staticdef_gateway} |
Sweta Potthuri | 2d08573 | 2025-07-16 09:10:08 -0500 | [diff] [blame] | 786 | ${value}= Get From Dictionary ${ipv6_staticdef_gateway} Address |
Sweta Potthuri | 4b0083f | 2025-07-09 11:34:40 -0500 | [diff] [blame] | 787 | Append To List ${ipv6_static_def_gw_list} ${value} |
| 788 | END |
| 789 | |
| 790 | Should Contain ${ipv6_static_def_gw_list} ${new_static_def_gw} |
| 791 | # Verify if old static default gateway address is erased. |
| 792 | Should Not Contain ${ipv6_static_def_gw_list} ${ipv6_gw_addr} |
| 793 | |
Sweta Potthuri | 2d08573 | 2025-07-16 09:10:08 -0500 | [diff] [blame] | 794 | |
| 795 | Delete IPv6 Static Default Gateway |
| 796 | [Documentation] Delete IPv6 static default gateway on BMC. |
| 797 | [Arguments] ${ipv6_gw_addr} |
| 798 | ... ${valid_status_codes}=[${HTTP_OK},${HTTP_ACCEPTED},${HTTP_NO_CONTENT}] |
| 799 | |
| 800 | # Description of argument(s): |
| 801 | # ipv6_gw_addr IPv6 Static Default Gateway address to be deleted. |
| 802 | # valid_status_codes Expected return code from patch operation |
| 803 | # (e.g. "200"). |
| 804 | |
| 805 | ${patch_list}= Create List |
| 806 | ${empty_dict}= Create Dictionary |
| 807 | |
| 808 | ${ipv6_static_def_gw_list}= Create List |
| 809 | @{ipv6_static_defgw_configurations}= Get IPv6 Static Default Gateway |
| 810 | |
| 811 | FOR ${ipv6_staticdef_gateway} IN @{ipv6_static_defgw_configurations} |
| 812 | ${value}= Get From Dictionary ${ipv6_staticdef_gateway} Address |
| 813 | Append To List ${ipv6_static_def_gw_list} ${value} |
| 814 | END |
| 815 | |
| 816 | ${defgw_found}= Run Keyword And Return Status List Should Contain Value |
| 817 | ... ${ipv6_static_def_gw_list} ${ipv6_gw_addr} msg=${ipv6_gw_addr} does not exist on BMC |
| 818 | Skip If ${defgw_found} == ${False} ${ipv6_gw_addr} does not exist on BMC |
| 819 | |
| 820 | FOR ${ipv6_static_def_gw} IN @{ipv6_static_defgw_configurations} |
| 821 | IF '${ipv6_static_def_gw['Address']}' == '${ipv6_gw_addr}' |
| 822 | Append To List ${patch_list} ${null} |
| 823 | ELSE |
| 824 | Append To List ${patch_list} ${empty_dict} |
| 825 | END |
| 826 | END |
| 827 | |
| 828 | # Run patch command only if given IP is found on BMC. |
| 829 | ${data}= Create Dictionary IPv6StaticDefaultGateways=${patch_list} |
| 830 | |
| 831 | Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} body=&{data} |
| 832 | ... valid_status_codes=${valid_status_codes} |
| 833 | |
| 834 | ${data}= Create Dictionary IPv6StaticDefaultGateways=${patch_list} |
| 835 | |
| 836 | @{ipv6_static_defgw_configurations}= Get IPv6 Static Default Gateway |
| 837 | Should Not Contain Match ${ipv6_static_defgw_configurations} ${ipv6_gw_addr} |
| 838 | ... msg=IPv6 Static default gateway does not exist. |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 839 | |
| 840 | |
| 841 | Check Coexistence Of Linklocalv6 And Static IPv6 |
| 842 | [Documentation] Verify both linklocalv6 and static IPv6 exist. |
| 843 | |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 844 | # Verify the address origin contains static and linklocal. |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 845 | @{ipv6_addressorigin_list} ${ipv6_linklocal_addr}= Get Address Origin List And Address For Type LinkLocal |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 846 | |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 847 | Should Match Regexp ${ipv6_linklocal_addr} ${linklocal_addr_format} |
Sweta Potthuri | 35c503b | 2025-07-27 23:36:20 -0500 | [diff] [blame] | 848 | Should Contain ${ipv6_addressorigin_list} Static |
Sweta Potthuri | 3c6f97d | 2025-08-06 00:30:19 -0500 | [diff] [blame] | 849 | |
| 850 | |
| 851 | Check If Linklocal Address Is In Correct Format |
| 852 | [Documentation] Linklocal address has network part fe80 and host part EUI64. |
| 853 | |
| 854 | # Fetch the linklocal address. |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 855 | @{ipv6_addressorigin_list} ${ipv6_linklocal_addr}= Get Address Origin List And Address For Type LinkLocal |
Sweta Potthuri | 3c6f97d | 2025-08-06 00:30:19 -0500 | [diff] [blame] | 856 | |
| 857 | # Follow EUI64 from MAC. |
| 858 | ${system_mac}= Get BMC MAC Address |
| 859 | ${split_octets}= Split String ${system_mac} : |
| 860 | ${first_octet}= Evaluate int('${split_octets[0]}', 16) |
| 861 | ${flipped_hex}= Evaluate format(${first_octet} ^ 2, '02x') |
| 862 | ${grp1}= Evaluate re.sub(r'^0+', '', '${flipped_hex}${split_octets[1]}') modules=re |
| 863 | ${grp2}= Evaluate re.sub(r'^0+', '', '${split_octets[2]}ff') modules=re |
| 864 | ${grp3}= Evaluate re.sub(r'^0+', '', '${split_octets[4]}${split_octets[5]}') modules=re |
| 865 | ${linklocal}= Set Variable fe80::${grp1}:${grp2}:fe${split_octets[3]}:${grp3} |
| 866 | |
| 867 | # Verify the linklocal obtained is the same as on the machine. |
| 868 | Should Be Equal ${linklocal} ${ipv6_linklocal_addr} |
| 869 | |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 870 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 871 | Check BMC Gets SLAAC Address |
| 872 | [Documentation] Check BMC gets slaac address. |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 873 | |
| 874 | @{ipv6_addressorigin_list} ${ipv6_slaac_addr}= Get Address Origin List And Address For Type SLAAC |
| 875 | |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 876 | |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 877 | Get The Initial DHCPv6 Setting On Each Interface |
| 878 | [Documentation] Get the initial DHCPv6 setting of each interface. |
| 879 | [Arguments] ${channel_number} |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 880 | |
| 881 | # Description of the argument(s): |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 882 | # channel_number Channel number 1 or 2. |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 883 | |
| 884 | ${ethernet_interface}= Set Variable ${active_channel_config['${channel_number}']['name']} |
| 885 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 886 | ${initial_dhcpv6_iface}= Get From Dictionary ${resp.dict} DHCPv6 |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 887 | IF ${channel_number}==${1} |
| 888 | Set Test Variable ${dhcpv6_channel_1} ${initial_dhcpv6_iface['OperatingMode']} |
| 889 | ELSE |
| 890 | Set Test Variable ${dhcpv6_channel_2} ${initial_dhcpv6_iface['OperatingMode']} |
| 891 | END |
| 892 | |
| 893 | |
| 894 | Get The Initial DHCPv6 Settings |
| 895 | [Documentation] Get the initial DHCPv6 settings of both the interfaces. |
| 896 | |
| 897 | Get The Initial DHCPv6 Setting On Each Interface ${1} |
| 898 | Get The Initial DHCPv6 Setting On Each Interface ${2} |
| 899 | |
| 900 | |
| 901 | Get The Initial SLAAC Settings |
| 902 | [Documentation] Get the initial SLAAC settings of both the interfaces. |
| 903 | |
| 904 | Get The Initial SLAAC Setting On Each Interface ${1} |
| 905 | Get The Initial SLAAC Setting On Each Interface ${2} |
| 906 | |
| 907 | |
| 908 | Get The Initial SLAAC Setting On Each Interface |
| 909 | [Documentation] Get the initial SLAAC setting of the interface. |
| 910 | [Arguments] ${channel_number} |
| 911 | |
| 912 | # Description of the argument(s): |
| 913 | # channel_number Channel number 1 or 2. |
| 914 | |
| 915 | ${ethernet_interface}= Set Variable ${active_channel_config['${channel_number}']['name']} |
| 916 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface} |
| 917 | ${initial_slaac_iface}= Get From Dictionary ${resp.dict} StatelessAddressAutoConfig |
| 918 | IF ${channel_number}==${1} |
| 919 | Set Test Variable ${slaac_channel_1} ${initial_slaac_iface['IPv6AutoConfigEnabled']} |
| 920 | ELSE |
| 921 | Set Test Variable ${slaac_channel_2} ${initial_slaac_iface['IPv6AutoConfigEnabled']} |
| 922 | END |
Sweta Potthuri | db4a6d6 | 2025-08-18 11:29:16 -0500 | [diff] [blame] | 923 | |
| 924 | |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 925 | Get Address Origin List And Address For Type |
| 926 | [Documentation] Get address origin list and address for type. |
| 927 | [Arguments] ${ipv6_address_type} |
| 928 | |
| 929 | # Description of the argument(s): |
| 930 | # ipv6_address_type Type of IPv6 address to be checked. |
| 931 | |
| 932 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 933 | @{ipv6_addresses}= Get From Dictionary ${resp.dict} IPv6Addresses |
| 934 | |
| 935 | ${ipv6_addressorigin_list}= Create List |
| 936 | ${ipv6_slaac_addr}= Set Variable ${None} |
| 937 | FOR ${ipv6_address} IN @{ipv6_addresses} |
| 938 | ${ipv6_addressorigin}= Get From Dictionary ${ipv6_address} AddressOrigin |
| 939 | Append To List ${ipv6_addressorigin_list} ${ipv6_addressorigin} |
| 940 | IF '${ipv6_addressorigin}' == '${ipv6_address_type}' |
| 941 | Set Test Variable ${ipv6_type_addr} ${ipv6_address['Address']} |
| 942 | END |
| 943 | END |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 944 | Should Contain ${ipv6_addressorigin_list} ${ipv6_address_type} |
| 945 | Should Not Be Empty ${ipv6_type_addr} msg=${ipv6_address_type} address is not present |
Sweta Potthuri | 71f7bdc | 2025-08-10 03:08:10 -0500 | [diff] [blame] | 946 | RETURN @{ipv6_addressorigin_list} ${ipv6_type_addr} |
Sweta Potthuri | abbbeae | 2025-08-21 00:06:26 -0500 | [diff] [blame] | 947 | |
| 948 | |
| 949 | Get Address Origin List And IPv4 or IPv6 Address |
| 950 | [Documentation] Get address origin list and address for type. |
| 951 | [Arguments] ${ip_address_type} |
| 952 | |
| 953 | # Description of the argument(s): |
| 954 | # ipv4_address_type Type of IPv4 or IPv6 address to be checked. |
| 955 | |
| 956 | ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 957 | @{ip_addresses}= Get From Dictionary ${resp.dict} ${ip_address_type} |
| 958 | |
| 959 | ${ip_addressorigin_list}= Create List |
| 960 | ${ip_addr_list}= Create List |
| 961 | FOR ${ip_address} IN @{ip_addresses} |
| 962 | ${ip_addressorigin}= Get From Dictionary ${ip_address} AddressOrigin |
| 963 | Append To List ${ip_addressorigin_list} ${ip_addressorigin} |
| 964 | Append To List ${ip_addr_list} ${ip_address['Address']} |
| 965 | END |
| 966 | RETURN ${ip_addressorigin_list} ${ip_addr_list} |
| 967 | |
| 968 | |
| 969 | Verify All The Addresses Are Intact |
| 970 | [Documentation] Verify all the addresses and address origins remain intact. |
| 971 | |
| 972 | # Verify that it will not impact the IPv4 configuration. |
| 973 | Sleep ${NETWORK_TIMEOUT} |
| 974 | Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT} |
| 975 | |
| 976 | # IPv6 address must be present. |
| 977 | @{ipv6_addressorigin_list} ${ipv6_slaac_addr}= Get Address Origin List And Address For Type SLAAC |
| 978 | @{ipv6_addressorigin_list} ${ipv6_linklocal_addr}= Get Address Origin List And Address For Type LinkLocal |
| 979 | |
| 980 | # IPv4 and IPv6 addresses must remain intact. |
| 981 | ${ipv4_addressorigin_list} ${ipv4_addr_list}= Get Address Origin List And IPv4 or IPv6 Address IPv4Addresses |
| 982 | ${ipv6_addressorigin_list} ${ipv6_addr_list}= Get Address Origin List And IPv4 or IPv6 Address IPv6Addresses |
| 983 | |
| 984 | ${ipv6_is_subset}= Evaluate set(${initial_ipv6_addr_list}).issubset(set(${ipv6_addr_list})) |
| 985 | Should Be True ${ipv6_is_subset} |
| 986 | |
| 987 | Should be Equal ${initial_ipv4_addressorigin_list} ${ipv4_addressorigin_list} |
| 988 | Should be Equal ${initial_ipv4_addr_list} ${ipv4_addr_list} |