Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 3 | Documentation VMI static/dynamic IP config tests. |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 4 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 5 | Resource ../../lib/external_intf/vmi_utils.robot |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 6 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 7 | Suite Setup Suite Setup Execution |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 8 | Test Teardown FFDC On Test Case Fail |
George Keishing | 4e0978d | 2022-07-27 10:21:18 -0500 | [diff] [blame] | 9 | Suite Teardown Run Keyword And Ignore Error Suite Teardown Execution |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 10 | |
Megha G N | f986714 | 2025-02-03 23:10:57 -0600 | [diff] [blame] | 11 | Test Tags Vmi |
George Keishing | 725e066 | 2022-07-20 22:18:14 -0500 | [diff] [blame] | 12 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 13 | *** Variables *** |
| 14 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 15 | # users User Name password |
| 16 | @{ADMIN} admin_user TestPwd123 |
| 17 | @{OPERATOR} operator_user TestPwd123 |
| 18 | @{ReadOnly} readonly_user TestPwd123 |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 19 | &{USERS} Administrator=${ADMIN} ReadOnly=${ReadOnly} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 20 | |
Prashanth Katti | 1ce6821 | 2020-11-13 00:39:03 -0600 | [diff] [blame] | 21 | ${test_ipv4} 10.6.6.6 |
| 22 | ${test_gateway} 10.6.6.1 |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 23 | ${test_netmask} 255.255.252.0 |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 24 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 25 | &{DHCP_ENABLED} DHCPEnabled=${${True}} |
| 26 | &{DHCP_DISABLED} DHCPEnabled=${${False}} |
| 27 | |
| 28 | &{ENABLE_DHCP} DHCPv4=&{DHCP_ENABLED} |
| 29 | &{DISABLE_DHCP} DHCPv4=&{DHCP_DISABLED} |
| 30 | |
Megha G N | 38acd84 | 2024-10-14 14:28:11 -0500 | [diff] [blame] | 31 | &{SLAAC_ENABLED} IPv6AutoConfigEnabled=${True} |
| 32 | &{SLAAC_DISABLED} IPv6AutoConfigEnabled=${False} |
| 33 | |
| 34 | &{ENABLE_SLAAC} StatelessAddressAutoConfig=&{SLAAC_ENABLED} |
| 35 | &{DISABLE_SLAAC} StatelessAddressAutoConfig=&{SLAAC_DISABLED} |
| 36 | |
Megha G N | df25564 | 2025-01-10 02:12:21 -0600 | [diff] [blame] | 37 | &{DHCPv6_ENABLED} OperatingMode=Enabled |
| 38 | &{DHCPv6_DISABLED} OperatingMode=Disabled |
| 39 | |
| 40 | &{ENABLE_DHCPv6} DHCPv6=&{DHCPv6_ENABLED} |
| 41 | &{DISABLE_DHCPv6} DHCPv6=&{DHCPv6_DISABLED} |
| 42 | |
Megha G N | 02cbfa1 | 2022-12-12 02:05:03 -0600 | [diff] [blame] | 43 | ${default} 0.0.0.0 |
Megha G N | a37b8da | 2025-01-06 00:23:15 -0600 | [diff] [blame] | 44 | ${default_ipv6addr} :: |
Sridevi Ramesh | 70f087b | 2025-01-26 00:27:05 -0600 | [diff] [blame] | 45 | ${prefix_length} ${64} |
Megha G N | 97af3bf | 2025-02-27 10:32:08 -0600 | [diff] [blame] | 46 | ${test_vmi_ipv6addr} 2001:db8:1111:2222:10:5:5:6 |
Megha G N | e0e055d | 2025-02-28 02:16:06 -0600 | [diff] [blame^] | 47 | ${test_vmi_ipv6gateway} 2001:db8:1111:2222::1 |
Megha G N | 02cbfa1 | 2022-12-12 02:05:03 -0600 | [diff] [blame] | 48 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 49 | |
| 50 | *** Test Cases *** |
| 51 | |
| 52 | Verify All VMI EthernetInterfaces |
| 53 | [Documentation] Verify all VMI ethernet interfaces. |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 54 | [Tags] Verify_All_VMI_EthernetInterfaces |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 55 | |
| 56 | Verify VMI EthernetInterfaces |
| 57 | |
| 58 | |
| 59 | Verify Existing VMI Network Interface Details |
| 60 | [Documentation] Verify existing VMI network interface details. |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 61 | [Tags] Verify_Existing_VMI_Network_Interface_Details |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 62 | |
| 63 | ${vmi_ip}= Get VMI Network Interface Details |
| 64 | ${origin}= Set Variable If ${vmi_ip["DHCPv4"]} == ${False} Static DHCP |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 65 | Should Not Be Equal ${vmi_ip["DHCPv4"]} ${vmi_ip["IPv4StaticAddresses"]} |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 66 | Should Be Equal As Strings ${vmi_ip["Id"]} ${ethernet_interface} |
George Keishing | b3ea095 | 2020-07-01 05:03:56 -0500 | [diff] [blame] | 67 | Should Be Equal As Strings ${vmi_ip["Description"]} |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 68 | ... Hypervisor's Virtual Management Ethernet Interface |
| 69 | Should Be Equal As Strings ${vmi_ip["Name"]} Hypervisor Ethernet Interface |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 70 | Run Keyword If ${vmi_ip["IPv4StaticAddresses"]} != @{empty} |
| 71 | ... Verify VMI Network Interface Details ${vmi_ip["IPv4_Address"]} |
| 72 | ... ${origin} ${vmi_ip["IPv4_Gateway"]} ${vmi_ip["IPv4_SubnetMask"]} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 73 | |
| 74 | |
| 75 | Delete Existing Static VMI IP Address |
| 76 | [Documentation] Delete existing static VMI IP address. |
| 77 | [Tags] Delete_Existing_Static_VMI_IP_Address |
| 78 | |
| 79 | ${curr_origin}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 80 | Run Keyword If ${curr_origin} == ${True} Set VMI IPv4 Origin ${False} ${HTTP_ACCEPTED} |
| 81 | |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 82 | Delete VMI IPv4 Address |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 83 | |
| 84 | |
| 85 | Verify User Cannot Delete ReadOnly Property IPv4Addresses |
| 86 | [Documentation] Verify user cannot delete readonly property IPv4Addresses. |
| 87 | [Tags] Verify_User_Cannot_Delete_ReadOnly_Property_IPv4Addresses |
| 88 | |
| 89 | ${curr_origin}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 90 | Run Keyword If ${curr_origin} == ${True} Set VMI IPv4 Origin ${False} ${HTTP_ACCEPTED} |
| 91 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
shrsuman123 | b25343d | 2021-09-22 04:33:47 -0500 | [diff] [blame] | 92 | Delete VMI IPv4 Address IPv4Addresses valid_status_code=${HTTP_FORBIDDEN} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 93 | |
| 94 | |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 95 | Assign Valid And Invalid Static IPv4 Address To VMI |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 96 | [Documentation] Assign static IPv4 address to VMI. |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 97 | [Tags] Assign_Valid_And_Invalid_Static_IPv4_Address_To_VMI |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 98 | [Template] Set Static IPv4 Address To VMI And Verify |
| 99 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 100 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 101 | # ip gateway netmask valid_status_code |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 102 | 10.5.20.30 10.5.20.1 255.255.252.0 ${HTTP_ACCEPTED} |
| 103 | a.3.118.94 10.5.20.1 255.255.252.0 ${HTTP_BAD_REQUEST} |
Anves Kumar rayankula | 81fd9db | 2021-05-10 02:39:51 -0500 | [diff] [blame] | 104 | 10.5.20 10.5.20.1 255.255.252.0 ${HTTP_BAD_REQUEST} |
| 105 | 10.5.20.-5 10.5.20.1 255.255.252.0 ${HTTP_BAD_REQUEST} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 106 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 107 | |
George Keishing | 16b3c7b | 2021-01-28 09:23:37 -0600 | [diff] [blame] | 108 | Add Multiple IP Addresses On VMI Interface And Verify |
| 109 | [Documentation] Add multiple IP addresses on VMI interface and verify. |
| 110 | [Tags] Add_Multiple_IP_Addresses_On_VMI_Interface_And_Verify |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 111 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 112 | |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 113 | ${ip1}= Create dictionary Address=10.5.5.10 SubnetMask=255.255.252.0 Gateway=10.5.5.1 |
| 114 | ${ip2}= Create dictionary Address=10.5.5.11 SubnetMask=255.255.252.0 Gateway=10.5.5.1 |
| 115 | ${ip3}= Create dictionary Address=10.5.5.12 SubnetMask=255.255.252.0 Gateway=10.5.5.1 |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 116 | ${ips}= Create List ${ip1} ${ip2} ${ip3} |
| 117 | |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 118 | Redfish.Patch /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
shrsuman123 | 993a5c9 | 2021-04-19 06:40:16 -0500 | [diff] [blame] | 119 | ... body={'IPv4StaticAddresses':${ips}} valid_status_codes=[${HTTP_BAD_REQUEST}] |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 120 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 121 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 122 | Modify IP Addresses On VMI Interface And Verify |
| 123 | [Documentation] Modify IP addresses on VMI interface and verify. |
| 124 | [Tags] Modify_IP_Addresses_On_VMI_Interface_And_Verify |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 125 | [Template] Set Static IPv4 Address To VMI And Verify |
| 126 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 127 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 128 | # ip gateway netmask valid_status_code |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 129 | 10.5.5.10 10.5.5.1 255.255.252.0 ${HTTP_ACCEPTED} |
| 130 | 10.5.5.11 10.5.5.1 255.255.252.0 ${HTTP_ACCEPTED} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 131 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 132 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 133 | Switch Between IP Origins On VMI And Verify Details |
| 134 | [Documentation] Switch between IP origins on VMI and verify details. |
| 135 | [Tags] Switch_Between_IP_Origins_On_VMI_And_Verify_Details |
| 136 | |
| 137 | Switch VMI IPv4 Origin And Verify Details |
| 138 | Switch VMI IPv4 Origin And Verify Details |
| 139 | |
| 140 | |
| 141 | Verify Persistency Of VMI IPv4 Details After Host Reboot |
| 142 | [Documentation] Verify persistency of VMI IPv4 details after host reboot. |
| 143 | [Tags] Verify_Persistency_Of_VMI_IPv4_Details_After_Host_Reboot |
| 144 | |
| 145 | # Verifying persistency of dynamic address. |
| 146 | Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
Anves Kumar rayankula | 7936eee | 2021-04-19 05:38:36 -0500 | [diff] [blame] | 147 | Redfish Power Off stack_mode=skip |
| 148 | Redfish Power On |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 149 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 150 | |
| 151 | # Verifying persistency of static address. |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 152 | Switch VMI IPv4 Origin And Verify Details |
Anves Kumar rayankula | 7936eee | 2021-04-19 05:38:36 -0500 | [diff] [blame] | 153 | Redfish Power Off stack_mode=skip |
| 154 | Redfish Power On |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 155 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 156 | |
| 157 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 158 | Delete VMI Static IP Address And Verify |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 159 | [Documentation] Delete VMI static IP address and verify. |
| 160 | [Tags] Delete_VMI_Static_IP_Address_And_Verify |
| 161 | [Teardown] Test Teardown Execution |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 162 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 163 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
| 164 | Delete VMI IPv4 Address |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 165 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 166 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 167 | Verify Successful VMI IP Static Configuration On HOST Boot After Session Delete |
| 168 | [Documentation] Verify VMI IP static Configuration On HOST Boot After session deleted. |
| 169 | [Tags] Verify_Successful_VMI_IP_Static_Configuration_On_HOST_Boot_After_Session_Delete |
shrsuman123 | b25343d | 2021-09-22 04:33:47 -0500 | [diff] [blame] | 170 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 171 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 172 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 173 | |
| 174 | ${session_info}= Get Redfish Session Info |
| 175 | Redfish.Delete ${session_info["location"]} |
| 176 | |
| 177 | # Create a new Redfish session |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 178 | Redfish.Login |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 179 | Redfish Power Off |
| 180 | Redfish Power On |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 181 | |
| 182 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 183 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 184 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 185 | Verify Persistency Of VMI DHCP IP Configuration After Multiple HOST Reboots |
| 186 | [Documentation] Verify Persistency Of VMI DHCP IP configuration After Multiple HOST Reboots |
| 187 | [Tags] Verify_Persistency_Of_VMI_DHCP_IP_Configuration_After_Multiple_HOST_Reboots |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 188 | [Teardown] Test Teardown Execution |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 189 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 190 | Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 191 | ${vmi_ip_config}= Get VMI Network Interface Details |
| 192 | # Verifying persistency of dynamic address after multiple reboots. |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 193 | FOR ${i} IN RANGE ${2} |
| 194 | Redfish Power Off |
| 195 | Redfish Power On |
George Keishing | 538f174 | 2022-03-14 05:00:55 -0500 | [diff] [blame] | 196 | Verify VMI Network Interface Details ${vmi_ip_config["IPv4_Address"]} |
| 197 | ... DHCP ${vmi_ip_config["IPv4_Gateway"]} ${vmi_ip_config["IPv4_SubnetMask"]} |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 198 | END |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 199 | |
| 200 | |
| 201 | Enable DHCP When Static IP Configured And Verify Static IP |
| 202 | [Documentation] Enable DHCP when static ip configured and verify static ip |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 203 | [Tags] Enable_DHCP_When_Static_IP_Configured_And_Verify_Static_IP |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 204 | [Setup] Redfish Power On |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 205 | [Teardown] Test Teardown Execution |
| 206 | |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 207 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 208 | Set VMI IPv4 Origin ${True} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 209 | ${vmi_network_conf}= Get VMI Network Interface Details |
| 210 | Should Not Be Equal As Strings ${test_ipv4} ${vmi_network_conf["IPv4_Address"]} |
| 211 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 212 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 213 | Verify VMI Static IP Configuration Persist On BMC Reset Before Host Boot |
| 214 | [Documentation] Verify VMI static IP configuration persist on BMC reset. |
| 215 | [Tags] Verify_VMI_Static_IP_Configuration_Persist_On_BMC_Reset_Before_Host_Boot |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 216 | [Teardown] Run keywords Delete VMI IPv4 Address AND FFDC On Test Case Fail |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 217 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 218 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
Megha GN | be42859 | 2022-07-21 10:33:02 -0500 | [diff] [blame] | 219 | Redfish OBMC Reboot (off) stack_mode=skip |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 220 | Redfish Power On |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 221 | # Verifying the VMI static configuration |
| 222 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 223 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 224 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 225 | Add Static IP When Host Poweroff And Verify On Poweron |
| 226 | [Documentation] Add Static IP When Host Poweroff And Verify on power on |
| 227 | [Tags] Add_Static_IP_When_Host_Poweroff_And_Verify_On_Poweron |
| 228 | [Setup] Redfish Power Off |
| 229 | [Teardown] Run keywords Delete VMI IPv4 Address AND FFDC On Test Case Fail |
| 230 | |
| 231 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
| 232 | Redfish Power On |
| 233 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 234 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 235 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 236 | Add VMI Static IP When Host Poweroff And Verify Static IP On BMC Reset |
| 237 | [Documentation] Add Static IP When Host Poweroff And Verify Static IP On BMC Reset. |
| 238 | [Tags] Add_VMI_Static_IP_When_Host_Poweroff_And_Verify_Static_IP_On_BMC_Reset |
| 239 | [Setup] Redfish Power Off |
| 240 | [Teardown] Run keywords Delete VMI IPv4 Address AND FFDC On Test Case Fail |
| 241 | |
| 242 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
Megha GN | be42859 | 2022-07-21 10:33:02 -0500 | [diff] [blame] | 243 | Redfish OBMC Reboot (off) stack_mode=skip |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 244 | Redfish Power On |
| 245 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 246 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 247 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 248 | Enable DHCP When No Static IP Configured And Verify DHCP IP |
| 249 | [Documentation] Enable DHCP when no static ip configured and verify dhcp ip |
| 250 | [Tags] Enable_DHCP_When_No_Static_IP_Configured_And_Verify_DHCP_IP |
| 251 | [Setup] Run Keyword And Ignore Error Delete VMI IPv4 Address |
| 252 | [Teardown] Test Teardown Execution |
| 253 | |
| 254 | ${curr_origin}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 255 | Run Keyword If ${curr_origin} == ${False} Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
| 256 | ${vmi_ip_config}= Get VMI Network Interface Details |
George Keishing | 538f174 | 2022-03-14 05:00:55 -0500 | [diff] [blame] | 257 | Verify VMI Network Interface Details ${vmi_ip_config["IPv4_Address"]} |
| 258 | ... DHCP ${vmi_ip_config["IPv4_Gateway"]} ${vmi_ip_config["IPv4_SubnetMask"]} |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 259 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 260 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 261 | Verify User Cannot Delete VMI DHCP IP Address |
| 262 | [Documentation] Verify user cannot delete VMI DHCP IP Address |
| 263 | [Tags] Verify_User_Cannot_Delete_VMI_DHCP_IP_Address |
| 264 | [Setup] Set VMI IPv4 Origin ${True} |
| 265 | [Teardown] Test Teardown Execution |
| 266 | |
shrsuman123 | b25343d | 2021-09-22 04:33:47 -0500 | [diff] [blame] | 267 | Delete VMI IPv4 Address IPv4Addresses valid_status_code=${HTTP_FORBIDDEN} |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 268 | ${resp}= Redfish.Get |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 269 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 270 | Should Not Be Empty ${resp.dict["IPv4Addresses"]} |
| 271 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 272 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 273 | Enable DHCP When Static IP Configured DHCP Server Unavailable And Verify IP |
| 274 | [Documentation] Enable DHCP When Static IP Configured And DHCP Server Unavailable And Verify No IP. |
| 275 | [Tags] Enable_DHCP_When_Static_IP_Configured_DHCP_Server_Unavailable_And_Verify_IP |
| 276 | [Teardown] Test Teardown Execution |
| 277 | |
| 278 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
| 279 | Set VMI IPv4 Origin ${True} |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 280 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 281 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 282 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 283 | Verify To Configure VMI Static IP Address With Different User Roles |
| 284 | [Documentation] Verify to configure vmi static ip address with different user roles. |
| 285 | [Tags] Verify_To_Configure_VMI_Static_IP_Address_With_Different_User_Roles |
Megha G N | 4e2b573 | 2023-02-02 04:52:27 -0600 | [diff] [blame] | 286 | [Setup] Run Keywords Delete BMC Users Using Redfish |
| 287 | ... AND Create Users With Different Roles users=${USERS} force=${True} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 288 | [Template] Config VMI Static IP Address Using Different Users |
| 289 | [Teardown] Delete BMC Users Using Redfish |
| 290 | |
| 291 | # username password ip_address gateway nemask valid_status_code |
| 292 | admin_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_ACCEPTED} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 293 | readonly_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 294 | |
| 295 | |
| 296 | Verify To Configure VMI Static IP Address With Operator User Role |
| 297 | [Documentation] Verify to configure vmi static ip address with operator user role. |
| 298 | [Tags] Verify_To_Configure_VMI_Static_IP_Address_With_Operator_User_Role |
| 299 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 300 | [Template] Config VMI Static IP Address Using Different Users |
| 301 | [Teardown] Delete BMC Users Using Redfish |
| 302 | |
| 303 | # username password ip_address gateway nemask valid_status_code |
| 304 | operator_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_FORBIDDEN} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 305 | |
| 306 | |
| 307 | Verify To Delete VMI Static IP Address With Different User Roles |
| 308 | [Documentation] Verify to delete vmi static IP address with different user roles. |
| 309 | [Tags] Verify_To_Delete_VMI_Static_IP_Address_With_Different_User_Roles |
| 310 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 311 | [Template] Delete VMI Static IP Address Using Different Users |
| 312 | [Teardown] Delete BMC Users Using Redfish |
| 313 | |
| 314 | # username password valid_status_code |
| 315 | admin_user TestPwd123 ${HTTP_ACCEPTED} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 316 | readonly_user TestPwd123 ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 317 | |
| 318 | |
| 319 | Verify To Delete VMI Static IP Address With Operator User Role |
| 320 | [Documentation] Verify to delete vmi static IP address with operator user role. |
| 321 | [Tags] Verify_To_Delete_VMI_Static_IP_Address_With_Operator_User_Role |
| 322 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 323 | [Template] Delete VMI Static IP Address Using Different Users |
| 324 | [Teardown] Delete BMC Users Using Redfish |
| 325 | |
| 326 | # username password valid_status_code |
| 327 | operator_user TestPwd123 ${HTTP_FORBIDDEN} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 328 | |
| 329 | |
| 330 | Verify To Update VMI Static IP Address With Different User Roles |
| 331 | [Documentation] Verify to update vmi static IP address with different user roles. |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 332 | [Tags] Verify_To_Update_VMI_Static_IP_Address_With_Different_User_Roles |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 333 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 334 | [Template] Config VMI Static IP Address Using Different Users |
| 335 | [Teardown] Delete BMC Users Using Redfish |
| 336 | |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 337 | # username password ip_address gateway netmask valid_status_code |
| 338 | admin_user TestPwd123 10.5.10.20 10.5.10.1 255.255.0.0 ${HTTP_ACCEPTED} |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 339 | readonly_user TestPwd123 10.5.20.40 10.5.20.1 255.255.0.0 ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 340 | |
| 341 | |
| 342 | Verify To Update VMI Static IP Address With Operator User Role |
| 343 | [Documentation] Verify to update vmi static IP address with operator user role. |
| 344 | [Tags] Verify_To_Update_VMI_Static_IP_Address_With_Operator_User_Role |
| 345 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 346 | [Template] Config VMI Static IP Address Using Different Users |
| 347 | [Teardown] Delete BMC Users Using Redfish |
| 348 | |
| 349 | # username password ip_address gateway netmask valid_status_code |
| 350 | operator_user TestPwd123 10.5.10.30 10.5.10.1 255.255.0.0 ${HTTP_FORBIDDEN} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 351 | |
| 352 | |
| 353 | Verify To Read VMI Network Configuration With Different User Roles |
| 354 | [Documentation] Verify to read vmi network configuration with different user roles. |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 355 | [Tags] Verify_To_Read_VMI_Network_Configuration_With_Different_User_Roles |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 356 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 357 | [Template] Read VMI Static IP Address Using Different Users |
| 358 | [Teardown] Delete BMC Users Using Redfish |
| 359 | |
| 360 | # username password valid_status_code |
| 361 | admin_user TestPwd123 ${HTTP_OK} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 362 | readonly_user TestPwd123 ${HTTP_OK} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 363 | |
| 364 | |
| 365 | Verify To Read VMI Network Configuration With Operator User Role |
| 366 | [Documentation] Verify to read vmi network configuration with operator user role. |
| 367 | [Tags] Verify_To_Read_VMI_Network_Configuration_With_Operator_User_Role |
| 368 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 369 | [Template] Read VMI Static IP Address Using Different Users |
| 370 | [Teardown] Delete BMC Users Using Redfish |
| 371 | |
| 372 | # username password valid_status_code |
| 373 | operator_user TestPwd123 ${HTTP_FORBIDDEN} |
| 374 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 375 | |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 376 | Enable DHCP On VMI Network Via Different Users Roles And Verify |
| 377 | [Documentation] Enable DHCP On VMI Network Via Different Users Roles And Verify. |
| 378 | [Tags] Enable_DHCP_On_VMI_Network_Via_Different_Users_Roles_And_Verify |
| 379 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 380 | [Template] Update User Role And Set VMI IPv4 Origin |
| 381 | [Teardown] Delete BMC Users Using Redfish |
| 382 | |
| 383 | # username password dhcp_enabled valid_status_code |
| 384 | admin_user TestPwd123 ${True} ${HTTP_ACCEPTED} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 385 | readonly_user TestPwd123 ${True} ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 386 | |
| 387 | |
| 388 | Enable DHCP On VMI Network Via Operator User Role And Verify |
| 389 | [Documentation] Enable DHCP On VMI Network Via Operator User Role And Verify. |
| 390 | [Tags] Enable_DHCP_On_VMI_Network_Via_Operator_User_Role_And_Verify |
| 391 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 392 | [Template] Update User Role And Set VMI IPv4 Origin |
| 393 | [Teardown] Delete BMC Users Using Redfish |
| 394 | |
| 395 | # username password dhcp_enabled valid_status_code |
| 396 | operator_user TestPwd123 ${True} ${HTTP_FORBIDDEN} |
| 397 | |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 398 | |
| 399 | Disable DHCP On VMI Network Via Different Users Roles And Verify |
| 400 | [Documentation] Disable DHCP On VMI Network Via Different Users Roles And Verify. |
| 401 | [Tags] Disable_DHCP_On_VMI_Network_Via_Different_Users_Roles_And_Verify |
| 402 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 403 | [Template] Update User Role And Set VMI IPv4 Origin |
| 404 | [Teardown] Delete BMC Users Using Redfish |
| 405 | |
| 406 | # username password dhcp_enabled valid_status_code |
| 407 | admin_user TestPwd123 ${False} ${HTTP_ACCEPTED} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 408 | readonly_user TestPwd123 ${False} ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 409 | |
| 410 | |
| 411 | Disable DHCP On VMI Network Via Operator User Role And Verify |
| 412 | [Documentation] Disable DHCP On VMI Network Via Operator User Role And Verify. |
| 413 | [Tags] Disable_DHCP_On_VMI_Network_Via_Operator_User_Role_And_Verify |
| 414 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 415 | [Template] Update User Role And Set VMI IPv4 Origin |
| 416 | [Teardown] Delete BMC Users Using Redfish |
| 417 | |
| 418 | # username password dhcp_enabled valid_status_code |
| 419 | operator_user TestPwd123 ${False} ${HTTP_FORBIDDEN} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 420 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 421 | |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 422 | Enable And Disable DHCP And Verify |
| 423 | [Documentation] verify enable DHCP and disable DHCP. |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 424 | [Tags] Enable_And_Disable_DHCP_And_Verify |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 425 | |
| 426 | Set VMI IPv4 Origin ${True} |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 427 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 428 | Set VMI IPv4 Origin ${False} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 429 | Verify VMI Network Interface Details ${default} Static ${default} ${default} |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 430 | |
| 431 | |
| 432 | Multiple Times Enable And Disable DHCP And Verify |
| 433 | [Documentation] Enable and Disable DHCP in a loop and verify VMI gets an IP address from DHCP |
| 434 | ... each time when DHCP is enabled |
| 435 | [Tags] Multiple_Times_Enable_And_Disable_DHCP_And_Verify |
| 436 | |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 437 | FOR ${i} IN RANGE ${2} |
| 438 | Set VMI IPv4 Origin ${True} |
| 439 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 440 | Set VMI IPv4 Origin ${False} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 441 | Verify VMI Network Interface Details ${default} Static ${default} ${default} |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 442 | END |
| 443 | |
| 444 | |
Anves Kumar rayankula | 81fd9db | 2021-05-10 02:39:51 -0500 | [diff] [blame] | 445 | Assign Static IPv4 Address With Invalid Netmask To VMI |
| 446 | [Documentation] Assign static IPv4 address with invalid netmask and expect error. |
| 447 | [Tags] Assign_Static_IPv4_Address_With_Invalid_Netmask_To_VMI |
| 448 | [Template] Set Static IPv4 Address To VMI And Verify |
| 449 | |
| 450 | # ip gateway netmask valid_status_code |
| 451 | ${test_ipv4} ${test_gateway} 255.256.255.0 ${HTTP_BAD_REQUEST} |
| 452 | ${test_ipv4} ${test_gateway} ff.ff.ff.ff ${HTTP_BAD_REQUEST} |
| 453 | ${test_ipv4} ${test_gateway} 255.255.253.0 ${HTTP_BAD_REQUEST} |
| 454 | |
| 455 | |
| 456 | Assign Static IPv4 Address With Invalid Gateway To VMI |
| 457 | [Documentation] Add static IPv4 address with invalid gateway and expect error. |
| 458 | [Tags] Assign_Static_IPv4_Address_With_Invalid_Gateway_To_VMI |
| 459 | [Template] Set Static IPv4 Address To VMI And Verify |
| 460 | |
| 461 | # ip gateway netmask valid_status_code |
| 462 | ${test_ipv4} @@@.%%.44.11 ${test_netmask} ${HTTP_BAD_REQUEST} |
| 463 | ${test_ipv4} 0xa.0xb.0xc.0xd ${test_netmask} ${HTTP_BAD_REQUEST} |
| 464 | ${test_ipv4} 10.3.36 ${test_netmask} ${HTTP_BAD_REQUEST} |
| 465 | ${test_ipv4} 10.3.36.-10 ${test_netmask} ${HTTP_BAD_REQUEST} |
| 466 | |
| 467 | |
Megha G N | 02cbfa1 | 2022-12-12 02:05:03 -0600 | [diff] [blame] | 468 | Enable DHCP When Host Is Off And Verify After Poweron |
| 469 | [Documentation] Enable DHCP when host is off and |
| 470 | ... check whether it is enabled after poweron. |
| 471 | [Tags] Enable_DHCP_When_Host_Is_Off_And_Verify_After_Poweron |
| 472 | [Setup] Redfish Power Off stack_mode=skip |
| 473 | |
| 474 | Set VMI IPv4 Origin ${True} |
| 475 | Redfish Power On stack_mode=skip |
| 476 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 477 | |
| 478 | |
Megha G N | 8917468 | 2023-01-24 23:28:27 -0600 | [diff] [blame] | 479 | Disable DHCP When Host Is Off And Verify New State Reflects After Power On |
| 480 | [Documentation] Disable DHCP when host is off and |
| 481 | ... get network info and verify that VMI origin is static. |
| 482 | [Tags] Disable_DHCP_When_Host_Is_Off_And_Verify_New_State_Reflects_After_Power_On |
| 483 | [Setup] Redfish Power Off stack_mode=skip |
| 484 | |
| 485 | Set VMI IPv4 Origin ${False} |
| 486 | Redfish Power On stack_mode=skip |
| 487 | Verify VMI Network Interface Details ${default} Static ${default} ${default} |
| 488 | |
| 489 | |
Megha G N | 38acd84 | 2024-10-14 14:28:11 -0500 | [diff] [blame] | 490 | Enable VMI Stateless Address AutoConfig And Verify |
| 491 | [Documentation] Enable VMI SLAACv6 and verify an origin. |
| 492 | [Tags] Enable_VMI_Stateless_Address_AutoConfig_And_Verify |
| 493 | |
| 494 | Set VMI SLAACv6 Origin ${True} |
| 495 | |
| 496 | # Check origin is set to slaac and address are getting displayed. |
| 497 | Verify VMI IPv6 Address SLAAC |
| 498 | |
| 499 | |
Megha G N | e8c0e42 | 2024-12-04 03:12:55 -0600 | [diff] [blame] | 500 | Disable VMI Stateless Address AutoConfig And Verify |
| 501 | [Documentation] Disable VMI SLAACv6 and verify an origin. |
| 502 | [Tags] Disable_VMI_Stateless_Address_AutoConfig_And_Verify |
| 503 | [Setup] Set VMI SLAACv6 Origin ${True} |
| 504 | |
| 505 | Set VMI SLAACv6 Origin ${False} |
| 506 | |
| 507 | # Check origin is set to static and slaacv6 address are getting erased. |
| 508 | Verify VMI IPv6 Address Static |
| 509 | |
| 510 | |
Megha G N | a37b8da | 2025-01-06 00:23:15 -0600 | [diff] [blame] | 511 | Enable VMI SLAAC And Check Persistency On BMC Reboot |
| 512 | [Documentation] Enable VMI SLAACv6 and verify its persistency |
| 513 | ... on BMC reboot and this works on the setup where router |
Megha G N | a727d5b | 2025-02-06 04:41:47 -0600 | [diff] [blame] | 514 | ... advertises network prefix. |
Megha G N | a37b8da | 2025-01-06 00:23:15 -0600 | [diff] [blame] | 515 | [Tags] Enable_VMI_SLAAC_And_Check_Persistency_On_BMC_Reboot |
| 516 | |
| 517 | Set VMI SLAACv6 Origin ${True} |
| 518 | |
| 519 | # Reboot BMC and verify persistency. |
| 520 | OBMC Reboot (off) |
| 521 | Redfish Power On |
| 522 | Wait For Host Boot Progress To Reach Required State |
Megha G N | a727d5b | 2025-02-06 04:41:47 -0600 | [diff] [blame] | 523 | Sleep 5s |
Megha G N | a37b8da | 2025-01-06 00:23:15 -0600 | [diff] [blame] | 524 | |
| 525 | # Check origin is set to slaac and address are getting displayed. |
| 526 | ${vmi_ipv6addr}= Verify VMI IPv6 Address SLAAC |
| 527 | Should Not Be Equal ${vmi_ipv6addr["Address"]} ${default_ipv6addr} |
| 528 | |
| 529 | |
Megha G N | 4965738 | 2025-01-07 23:10:42 -0600 | [diff] [blame] | 530 | Disable VMI SLAAC And Check Persistency On BMC Reboot |
| 531 | [Documentation] Disable VMI SLAACv6 and verify its persistency |
| 532 | ... on BMC reboot. |
| 533 | [Tags] Disable_VMI_SLAAC_And_Check_Persistency_On_BMC_Reboot |
| 534 | |
| 535 | Set VMI SLAACv6 Origin ${False} |
| 536 | |
| 537 | # Reboot BMC and verify persistency. |
| 538 | OBMC Reboot (off) |
| 539 | Redfish Power On |
| 540 | Wait For Host Boot Progress To Reach Required State |
| 541 | |
| 542 | # Check if origin is set to static and SLAAC address are getting erased. |
| 543 | ${vmi_ipv6addr}= Verify VMI IPv6 Address Static |
| 544 | Should Be Equal ${vmi_ipv6addr["Address"]} ${default_ipv6addr} |
| 545 | |
| 546 | |
Megha G N | 503fa35 | 2025-01-08 04:43:09 -0600 | [diff] [blame] | 547 | Disable VMI DHCPv4 When SLAAC Is Enabled And Verify |
| 548 | [Documentation] Disable VMI DHCPv4 parameter when SLAACv6 is enabled |
| 549 | ... and check whether the IPv4 address origin is set to static and |
| 550 | ... DHCPv4 address is getting erased. |
| 551 | [Tags] Disable_VMI_DHCPv4_When_SLAAC_Is_Enabled_And_Verify |
| 552 | [Setup] Set VMI IPv4 Origin ${True} |
| 553 | |
| 554 | # Set IPv6 origin to SLAAC. |
| 555 | Set VMI SLAACv6 Origin ${True} |
| 556 | Verify VMI IPv6 Address SLAAC |
| 557 | |
| 558 | # Disable VMI DHCPv4 and check IPv4 address origin is set to static. |
| 559 | Set VMI IPv4 Origin ${False} |
| 560 | Verify VMI Network Interface Details ${default} Static ${default} ${default} |
| 561 | |
| 562 | |
Megha G N | df25564 | 2025-01-10 02:12:21 -0600 | [diff] [blame] | 563 | Enable VMI SLAAC When DHCPv6 Is Enabled And Verify |
| 564 | [Documentation] Enable VMI SLAACv6 when VMI DHCPv6 is enabled and |
| 565 | ... check IPv6 gets Slaac address and this works on the setup |
| 566 | ... where router advertise network prefix. |
| 567 | [Tags] Enable_VMI_SLAAC_When_DHCPv6_Is_Enabled_And_Verify |
| 568 | |
| 569 | Set VMI DHCPv6 Property Enabled |
| 570 | |
| 571 | # Enable SLAAC and check whether IPv6 origin is set to SLAAC. |
| 572 | Set VMI SLAACv6 Origin ${True} |
| 573 | |
| 574 | # Check if origin is set to slaac and address are getting displayed. |
| 575 | ${vmi_ipv6addr}= Verify VMI IPv6 Address SLAAC |
| 576 | Should Not Be Equal ${vmi_ipv6addr["Address"]} ${default_ipv6addr} |
| 577 | Should Be Equal ${vmi_ipv6addr["PrefixLength"]} ${prefix_length} |
| 578 | |
| 579 | |
Megha G N | 80b4af3 | 2025-01-15 00:47:35 -0600 | [diff] [blame] | 580 | Disable VMI DHCPv6 Property And Verify |
George Keishing | 4ebb328 | 2025-01-17 10:01:34 +0530 | [diff] [blame] | 581 | [Documentation] Disable VMI DHCPv6 property and verify IPv6 address |
| 582 | ... origin is set to static and DHCPv6 address is erased. |
| 583 | [Tags] Disable_VMI_DHCPv6_Property_And_Verify |
Megha G N | 80b4af3 | 2025-01-15 00:47:35 -0600 | [diff] [blame] | 584 | [Setup] Set VMI DHCPv6 Property Enabled |
| 585 | |
| 586 | Set VMI DHCPv6 Property Disabled |
| 587 | |
| 588 | # Verify IPv6 address origin is set to static and DHCPv6 address is erased. |
| 589 | ${vmi_ipv6addr}= Verify VMI IPv6 Address Static |
| 590 | Should Be Equal ${vmi_ipv6addr["Address"]} ${default_ipv6addr} |
| 591 | |
| 592 | |
Megha G N | 58be512 | 2025-01-16 08:26:53 -0600 | [diff] [blame] | 593 | Enable VMI SLAAC When DHCPv4 Is Enabled And Verify |
| 594 | [Documentation] On VMI enable SLAAC when DHCPv4 is enabled and verify DHCPv4 settings are intact |
| 595 | ... and IPv6 origin is set to SLAAC & it gets assigned with SLAAC IPv6 address and this |
| 596 | ... works on the setup where router advertise network prefix. |
| 597 | [Tags] Enable_VMI_SLAAC_When_DHCPv4_Is_Enabled_And_Verify |
| 598 | [Setup] Set VMI IPv4 Origin ${True} |
| 599 | |
| 600 | # Enable Autoconfig address and check whether IPv6 address origin is set to SLAAC. |
| 601 | Set VMI SLAACv6 Origin ${True} |
| 602 | Verify VMI IPv6 Address SLAAC |
| 603 | |
| 604 | # Check there is no impact on IPv4 settings, IPv4 address origin should be DHCP. |
| 605 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 606 | |
| 607 | |
Megha G N | f986714 | 2025-02-03 23:10:57 -0600 | [diff] [blame] | 608 | Disable VMI DHCPv6 Property And Check Persistency On BMC Reboot |
| 609 | [Documentation] Disable VMI DHCPv6 property and verify its persistency on |
| 610 | ... BMC reboot. |
| 611 | [Tags] Disable_VMI_DHCPv6_Property_And_Check_Persistency_On_BMC_Reboot |
| 612 | [Setup] Set VMI DHCPv6 Property Enabled |
| 613 | |
| 614 | Set VMI DHCPv6 Property Disabled |
| 615 | |
| 616 | # Reboot BMC and verify persistency. |
| 617 | OBMC Reboot (off) |
| 618 | |
| 619 | # Verify IPv6 address origin is set to Static and DHCPv6 address is erased. |
| 620 | ${vmi_ipv6addr}= Verify VMI IPv6 Address Static |
| 621 | Should Be Equal ${vmi_ipv6addr["Address"]} ${default_ipv6addr} |
| 622 | |
| 623 | |
Megha G N | 95e37d8 | 2025-02-06 03:56:04 -0600 | [diff] [blame] | 624 | Enable VMI SLAAC When IPv4 Origin Is Static And Verify |
| 625 | [Documentation] On VMI enable SLAAC when IPv4 origin is static and verify IPv4 settings are intact |
| 626 | ... and IPv6 origin is set to SLAAC & it gets assigned with SLAAC IPv6 address and this works |
| 627 | ... on the setup where router advertise network prefix. |
| 628 | [Tags] Enable_VMI_SLAAC_When_IPv4_Origin_Is_Static_And_Verify |
| 629 | [Setup] Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
| 630 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
| 631 | |
| 632 | # Enable Autoconfig address and check whether IPv6 address origin is set to SLAAC. |
| 633 | Set VMI SLAACv6 Origin ${True} |
| 634 | Verify VMI IPv6 Address SLAAC |
| 635 | |
| 636 | # Check there is no impact on IPv4 settings, IPv4 address origin should be Static. |
| 637 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 638 | |
| 639 | |
Megha G N | 97af3bf | 2025-02-27 10:32:08 -0600 | [diff] [blame] | 640 | Configure Static VMI IPv6 Address And Verify |
| 641 | [Documentation] Add static VMI IPv6 address and check whether IPv6 origin is set to static |
| 642 | ... and Static IPv6 address is assigned. |
| 643 | [Tags] Configure_Static_VMI_IPv6_Address_And_Verify |
| 644 | |
| 645 | Set Static VMI IPv6 Address ${test_vmi_ipv6addr} ${prefix_length} |
| 646 | |
| 647 | # Verify IPv6 address origin is set to static and static IPv6 address is assigned. |
| 648 | ${vmi_ipv6addr}= Verify VMI IPv6 Address Static |
| 649 | Should Not Be Equal ${vmi_ipv6addr["Address"]} ${default_ipv6addr} |
| 650 | Should Be Equal ${vmi_ipv6addr["PrefixLength"]} ${prefix_length} |
| 651 | |
| 652 | |
Megha G N | e0e055d | 2025-02-28 02:16:06 -0600 | [diff] [blame^] | 653 | Configure IPv6 Static Default Gateway On VMI And Verify |
| 654 | [Documentation] Configure IPv6 static default gateway on VMI and verify. |
| 655 | [Tags] Configure_IPv6_Static_Default_Gateway_On_VMI_And_Verify |
| 656 | |
| 657 | Set VMI IPv6 Static Default Gateway ${test_vmi_ipv6gateway} |
| 658 | |
| 659 | ${resp}= Redfish.Get |
| 660 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
| 661 | ${vmi_ipv6_gateway}= Get From Dictionary ${resp.dict} IPv6StaticDefaultGateways |
| 662 | Should Be Equal ${vmi_ipv6_gateway} ${test_vmi_ipv6gateway} |
| 663 | |
| 664 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 665 | *** Keywords *** |
| 666 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 667 | Suite Setup Execution |
| 668 | [Documentation] Do test setup execution task. |
| 669 | |
| 670 | Redfish.Login |
Megha G N | d0b4da9 | 2024-02-08 15:04:24 -0600 | [diff] [blame] | 671 | |
| 672 | Redfish Power Off |
| 673 | Set BIOS Attribute pvm_hmc_managed Enabled |
Megha G N | 1e53824 | 2024-06-11 03:42:03 -0500 | [diff] [blame] | 674 | Set BIOS Attribute pvm_stop_at_standby Disabled |
| 675 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 676 | Redfish Power On |
Megha G N | 1e53824 | 2024-06-11 03:42:03 -0500 | [diff] [blame] | 677 | Wait For Host Boot Progress To Reach Required State |
Megha G N | 86507da | 2024-02-07 23:16:27 -0600 | [diff] [blame] | 678 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 679 | ${active_channel_config}= Get Active Channel Config |
| 680 | Set Suite Variable ${active_channel_config} |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 681 | Set Suite Variable ${ethernet_interface} ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 682 | ${resp}= Redfish.Get |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 683 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
shrsuman123 | 62e5be5 | 2021-05-20 02:42:59 -0500 | [diff] [blame] | 684 | ${ip_resp}= Evaluate json.loads(r'''${resp.text}''') json |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 685 | ${length}= Get Length ${ip_resp["IPv4StaticAddresses"]} |
| 686 | ${vmi_network_conf}= Run Keyword If ${length} != ${0} Get VMI Network Interface Details |
| 687 | Set Suite Variable ${vmi_network_conf} |
| 688 | |
| 689 | |
| 690 | Test Teardown Execution |
| 691 | [Documentation] Do test teardown execution task. |
| 692 | |
| 693 | FFDC On Test Case Fail |
| 694 | ${curr_mode}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 695 | Run Keyword If ${curr_mode} == ${True} Set VMI IPv4 Origin ${False} |
Megha G N | 1e53824 | 2024-06-11 03:42:03 -0500 | [diff] [blame] | 696 | Run Keyword If '${vmi_network_conf["IPv4_Address"]}' != '${default}' |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 697 | ... Set Static IPv4 Address To VMI And Verify ${vmi_network_conf["IPv4_Address"]} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 698 | ... ${vmi_network_conf["IPv4_Gateway"]} ${vmi_network_conf["IPv4_SubnetMask"]} |
| 699 | |
| 700 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 701 | Get Immediate Child Parameter From VMI Network Interface |
| 702 | [Documentation] Get immediate child parameter from VMI network interface. |
| 703 | [Arguments] ${parameter} ${valid_status_code}=${HTTP_OK} |
| 704 | |
| 705 | # Description of argument(s): |
| 706 | # parameter parameter for which value is required. Ex: DHCPEnabled, MACAddress etc. |
| 707 | # valid_status_code Expected valid status code from GET request. |
| 708 | |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 709 | ${resp}= Redfish.Get |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 710 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 711 | ... valid_status_codes=[${valid_status_code}] |
| 712 | |
shrsuman123 | 62e5be5 | 2021-05-20 02:42:59 -0500 | [diff] [blame] | 713 | ${ip_resp}= Evaluate json.loads(r'''${resp.text}''') json |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 714 | ${value}= Set Variable If '${parameter}' != 'DHCPEnabled' ${ip_resp["${parameter}"]} |
| 715 | ... ${ip_resp["DHCPv4"]["${parameter}"]} |
| 716 | |
George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 717 | RETURN ${value} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 718 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 719 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 720 | Switch VMI IPv4 Origin And Verify Details |
| 721 | [Documentation] Switch VMI IPv4 origin and verify details. |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 722 | |
Anves Kumar rayankula | 7936eee | 2021-04-19 05:38:36 -0500 | [diff] [blame] | 723 | ${dhcp_mode_before}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
Anves Kumar rayankula | e7dc89a | 2021-04-28 04:29:38 -0500 | [diff] [blame] | 724 | ${dhcp_enabled}= Set Variable If ${dhcp_mode_before} == ${False} ${True} ${False} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 725 | |
Anves Kumar rayankula | e7dc89a | 2021-04-28 04:29:38 -0500 | [diff] [blame] | 726 | ${origin}= Set Variable If ${dhcp_mode_before} == ${False} DHCP Static |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 727 | Set VMI IPv4 Origin ${dhcp_enabled} ${HTTP_ACCEPTED} |
Anves Kumar rayankula | 7936eee | 2021-04-19 05:38:36 -0500 | [diff] [blame] | 728 | |
| 729 | ${dhcp_mode_after}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 730 | Should Not Be Equal ${dhcp_mode_before} ${dhcp_mode_after} |
| 731 | |
| 732 | Run Keyword If ${dhcp_mode_after} == ${True} |
| 733 | ... Verify VMI Network Interface Details ${default} ${origin} ${default} ${default} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 734 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 735 | |
| 736 | Delete VMI Static IP Address Using Different Users |
| 737 | [Documentation] Update user role and delete vmi static IP address. |
| 738 | [Arguments] ${username} ${password} ${valid_status_code} |
| 739 | [Teardown] Run Keywords Redfish.Login AND |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 740 | ... Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 741 | ... ${test_netmask} ${HTTP_ACCEPTED} AND Redfish.Logout |
| 742 | |
| 743 | # Description of argument(s): |
| 744 | # username The host username. |
| 745 | # password The host password. |
| 746 | # valid_status_code The expected valid status code. |
| 747 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 748 | # TODO: operator_user role is not yet supported. |
| 749 | Skip If '${username}' == 'operator_user' |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 750 | Redfish.Login ${username} ${password} |
| 751 | Delete VMI IPv4 Address delete_param=IPv4StaticAddresses valid_status_code=${valid_status_code} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 752 | |
| 753 | |
| 754 | Config VMI Static IP Address Using Different Users |
| 755 | [Documentation] Update user role and update vmi static ip address. |
| 756 | [Arguments] ${username} ${password} ${ip} ${gateway} ${netmask} |
| 757 | ... ${valid_status_code} |
| 758 | |
| 759 | # Description of argument(s): |
| 760 | # username The host username. |
| 761 | # password The host password. |
| 762 | # ip IP address to be added (e.g. "10.7.7.7"). |
| 763 | # subnet_mask Subnet mask for the IP to be added |
| 764 | # (e.g. "255.255.0.0"). |
| 765 | # gateway Gateway for the IP to be added (e.g. "10.7.7.1"). |
| 766 | # valid_status_code The expected valid status code. |
| 767 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 768 | # TODO: operator_user role is not yet supported. |
| 769 | Skip If '${username}' == 'operator_user' |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 770 | Redfish.Login ${username} ${password} |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 771 | Set Static IPv4 Address To VMI And Verify ${ip} ${gateway} ${netmask} ${valid_status_code} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 772 | |
| 773 | |
| 774 | Read VMI Static IP Address Using Different Users |
| 775 | [Documentation] Update user role and read vmi static ip address. |
| 776 | [Arguments] ${username} ${password} ${valid_status_code} |
| 777 | |
| 778 | # Description of argument(s): |
| 779 | # username The host username. |
| 780 | # password The host password. |
| 781 | # valid_status_code The expected valid status code. |
| 782 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 783 | # TODO: operator_user role is not yet supported. |
| 784 | Skip If '${username}' == 'operator_user' |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 785 | Redfish.Login ${username} ${password} |
| 786 | Redfish.Get |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 787 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 788 | ... valid_status_codes=[${valid_status_code}] |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 789 | |
| 790 | |
| 791 | Delete BMC Users Using Redfish |
| 792 | [Documentation] Delete BMC users via redfish. |
| 793 | |
| 794 | Redfish.Login |
| 795 | Delete BMC Users Via Redfish users=${USERS} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 796 | |
Sweta Potthuri | d52b273 | 2021-08-12 12:48:24 -0500 | [diff] [blame] | 797 | |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 798 | Update User Role And Set VMI IPv4 Origin |
| 799 | [Documentation] Update User Role And Set VMI IPv4 Origin. |
| 800 | [Arguments] ${username} ${password} ${dhcp_enabled} ${valid_status_code} |
| 801 | |
| 802 | # Description of argument(s): |
| 803 | # username The host username. |
| 804 | # password The host password. |
| 805 | # dhcp_enabled Indicates whether dhcp should be enabled |
| 806 | # (${True}, ${False}). |
| 807 | # valid_status_code The expected valid status code. |
| 808 | |
Megha GN | be42859 | 2022-07-21 10:33:02 -0500 | [diff] [blame] | 809 | # TODO: operator_user role is not yet supported. |
| 810 | Skip If '${username}' == 'operator_user' |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 811 | Redfish.Login ${username} ${password} |
| 812 | Set VMI IPv4 Origin ${dhcp_enabled} ${valid_status_code} |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 813 | |
Sweta Potthuri | d52b273 | 2021-08-12 12:48:24 -0500 | [diff] [blame] | 814 | |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 815 | Suite Teardown Execution |
| 816 | [Documentation] Do suite teardown execution task. |
| 817 | |
| 818 | Run Keyword If ${vmi_network_conf} != ${None} |
| 819 | ... Set Static IPv4 Address To VMI And Verify ${vmi_network_conf["IPv4_Address"]} |
| 820 | ... ${vmi_network_conf["IPv4_Gateway"]} ${vmi_network_conf["IPv4_SubnetMask"]} |
shrsuman123 | b25343d | 2021-09-22 04:33:47 -0500 | [diff] [blame] | 821 | Delete All Redfish Sessions |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 822 | Redfish.Logout |
Megha G N | 38acd84 | 2024-10-14 14:28:11 -0500 | [diff] [blame] | 823 | |
| 824 | |
| 825 | Set VMI SLAACv6 Origin |
| 826 | [Documentation] Set VMI SLAACv6 origin. |
| 827 | [Arguments] ${slaac_enabled}=${False} ${valid_status_code}=${HTTP_ACCEPTED} |
| 828 | ... ${interface}=${ethernet_interface} |
| 829 | |
| 830 | # Description of argument(s): |
| 831 | # slaacv6_enabled True if user wants to enable SLAACv6. Default is Static, hence value is set to False. |
| 832 | # valid_status_code Expected valid status code from PATCH request. Default is HTTP_OK. |
| 833 | # interface VMI interface (eg. eth0 or eth1). |
| 834 | |
| 835 | ${data}= Set Variable If ${slaac_enabled} == ${False} ${DISABLE_SLAAC} ${ENABLE_SLAAC} |
| 836 | ${resp}= Redfish.Patch |
| 837 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 838 | ... body=${data} valid_status_codes=[${valid_status_code}] |
| 839 | |
| 840 | Sleep ${wait_time} |
| 841 | Return From Keyword If ${valid_status_code} != ${HTTP_ACCEPTED} |
| 842 | ${resp}= Redfish.Get |
| 843 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 844 | Should Be Equal ${resp.dict["StatelessAddressAutoConfig"]["IPv6AutoConfigEnabled"]} ${slaac_enabled} |
| 845 | |
| 846 | |
| 847 | Verify VMI IPv6 Address |
| 848 | [Documentation] Verify VMI IPv6 address configurations. |
| 849 | [Arguments] ${ipv6_origin} ${interface}=${ethernet_interface} |
| 850 | |
| 851 | # Description of argument(s): |
| 852 | # ipv6_origin Origin of IPv6 address eg. Static or DHCPv6 or SLAAC. |
| 853 | # interface VMI interface (eg. eth0 or eth1). |
| 854 | |
| 855 | ${resp}= Redfish.Get /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 856 | |
| 857 | @{vmi_ipv6_configurations}= Get From Dictionary ${resp.dict} IPv6Addresses |
| 858 | ${vmi_ipv6_config}= Get From List ${vmi_ipv6_configurations} 0 |
| 859 | Should Not Be Empty ${vmi_ipv6_config["Address"]} |
| 860 | Should Be Equal As Strings ${vmi_ipv6_config["AddressOrigin"]} ${ipv6_origin} |
Megha G N | a37b8da | 2025-01-06 00:23:15 -0600 | [diff] [blame] | 861 | RETURN &{vmi_ipv6_config} |
Megha G N | df25564 | 2025-01-10 02:12:21 -0600 | [diff] [blame] | 862 | |
| 863 | |
| 864 | Set VMI DHCPv6 Property |
| 865 | [Documentation] Set VMI DHCPv6 attribute. |
| 866 | [Arguments] ${dhcpv6_operatingmode}=${Disabled} ${valid_status_code}=${HTTP_ACCEPTED} |
| 867 | ... ${interface}=${ethernet_interface} |
| 868 | |
| 869 | # Description of argument(s): |
| 870 | # dhcpv6_operatingmode Enabled if user wants to enable DHCPv6. |
| 871 | # ... Default is Static, hence value is set to Disabled. |
| 872 | # valid_status_code Expected valid status code from PATCH request. Default is HTTP_OK. |
| 873 | # interface VMI interface (eg. eth0 or eth1). |
| 874 | |
| 875 | ${data}= Set Variable If '${dhcpv6_operatingmode}' == 'Disabled' ${DISABLE_DHCPv6} ${ENABLE_DHCPv6} |
| 876 | ${resp}= Redfish.Patch |
| 877 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 878 | ... body=${data} valid_status_codes=[${valid_status_code}] |
| 879 | |
| 880 | Sleep ${wait_time} |
| 881 | Return From Keyword If ${valid_status_code} != ${HTTP_ACCEPTED} |
| 882 | ${resp}= Redfish.Get |
| 883 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 884 | Should Be Equal ${resp.dict["DHCPv6"]["OperatingMode"]} ${dhcpv6_operatingmode} |
Megha G N | 97af3bf | 2025-02-27 10:32:08 -0600 | [diff] [blame] | 885 | |
| 886 | |
| 887 | Set Static VMI IPv6 Address |
| 888 | [Documentation] Add static VMI IPv6 address. |
| 889 | [Arguments] ${vmi_ipv6_addr} ${prefix_len} ${valid_status_codes}=${HTTP_ACCEPTED} |
| 890 | ... ${interface}=${ethernet_interface} |
| 891 | |
| 892 | # Description of argument(s): |
| 893 | # vmi_ipv6_addr VMI IPv6 address to be added. |
| 894 | # prefix_len Prefix length for the VMI IPv6 to be added. |
| 895 | # valid_status_codes Expected valid status code from PATCH request. |
| 896 | # interface VMI interface (eg. eth0 or eth1). |
| 897 | |
| 898 | ${prefix_length}= Convert To Integer ${prefix_len} |
| 899 | ${empty_dict}= Create Dictionary |
| 900 | ${vmi_ipv6_data}= Create Dictionary Address=${vmi_ipv6_addr} |
| 901 | ... PrefixLength=${prefix_length} |
| 902 | |
| 903 | ${patch_list}= Create List |
| 904 | |
| 905 | Append To List ${patch_list} ${vmi_ipv6_data} |
| 906 | ${data}= Create Dictionary IPv6StaticAddresses=${patch_list} |
| 907 | |
| 908 | ${active_channel_config}= Get Active Channel Config |
| 909 | ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 910 | |
| 911 | Redfish.patch /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 912 | ... body=&{data} valid_status_codes=[${valid_status_codes}] |
Megha G N | e0e055d | 2025-02-28 02:16:06 -0600 | [diff] [blame^] | 913 | |
| 914 | |
| 915 | Set VMI IPv6 Static Default Gateway |
| 916 | [Documentation] Set VMI IPv6 static default gateway address. |
| 917 | [Arguments] ${vmi_staticipv6_gateway} ${valid_status_codes}=${HTTP_ACCEPTED} |
| 918 | ... ${interface}=${ethernet_interface} |
| 919 | |
| 920 | # Description of argument(s): |
| 921 | # vmi_staticipv6_gateway VMI static IPv6 default gateway address. |
| 922 | # valid_status_codes Expected valid status code from PATCH request. |
| 923 | # interface VMI interface (eg. eth0 or eth1). |
| 924 | |
| 925 | ${patch_list}= Create List ${vmi_staticipv6_gateway} |
| 926 | ${data}= Create Dictionary IPv6StaticDefaultGateways=${patch_list} |
| 927 | |
| 928 | Redfish.patch /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 929 | ... body=&{data} valid_status_codes=[${valid_status_codes}] |