Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 3 | Documentation VMI static/dynamic IP config tests. |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 4 | |
| 5 | Resource ../../lib/resource.robot |
| 6 | Resource ../../lib/bmc_redfish_resource.robot |
| 7 | Resource ../../lib/openbmc_ffdc.robot |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 8 | Resource ../../lib/bmc_redfish_utils.robot |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 9 | Library ../../lib/bmc_network_utils.py |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 10 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 11 | Suite Setup Suite Setup Execution |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 12 | Test Teardown FFDC On Test Case Fail |
| 13 | Suite Teardown Redfish.Logout |
| 14 | |
| 15 | *** Variables *** |
| 16 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 17 | # users User Name password |
| 18 | @{ADMIN} admin_user TestPwd123 |
| 19 | @{OPERATOR} operator_user TestPwd123 |
| 20 | @{ReadOnly} readonly_user TestPwd123 |
| 21 | @{NoAccess} noaccess_user TestPwd123 |
| 22 | &{USERS} Administrator=${ADMIN} Operator=${OPERATOR} ReadOnly=${ReadOnly} |
| 23 | ... NoAccess=${NoAccess} |
| 24 | |
Prashanth Katti | 1ce6821 | 2020-11-13 00:39:03 -0600 | [diff] [blame] | 25 | ${test_ipv4} 10.6.6.6 |
| 26 | ${test_gateway} 10.6.6.1 |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 27 | ${test_netmask} 255.255.252.0 |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 28 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 29 | &{DHCP_ENABLED} DHCPEnabled=${${True}} |
| 30 | &{DHCP_DISABLED} DHCPEnabled=${${False}} |
| 31 | |
| 32 | &{ENABLE_DHCP} DHCPv4=&{DHCP_ENABLED} |
| 33 | &{DISABLE_DHCP} DHCPv4=&{DHCP_DISABLED} |
Prashanth Katti | 1ce6821 | 2020-11-13 00:39:03 -0600 | [diff] [blame] | 34 | ${wait_time} 10s |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 35 | |
| 36 | |
| 37 | *** Test Cases *** |
| 38 | |
| 39 | Verify All VMI EthernetInterfaces |
| 40 | [Documentation] Verify all VMI ethernet interfaces. |
| 41 | [Tags] Verify_All_VMI_EthernetINterfaces |
| 42 | |
| 43 | Verify VMI EthernetInterfaces |
| 44 | |
| 45 | |
| 46 | Verify Existing VMI Network Interface Details |
| 47 | [Documentation] Verify existing VMI network interface details. |
| 48 | [Tags] Verify_VMI_Network_Interface_Details |
| 49 | |
| 50 | ${vmi_ip}= Get VMI Network Interface Details |
| 51 | ${origin}= Set Variable If ${vmi_ip["DHCPv4"]} == ${False} Static DHCP |
| 52 | |
| 53 | Should Not Be Equal ${vmi_ip["DHCPv4"]} ${vmi_ip["IPv4StaticAddresses"]} |
| 54 | Should Be Equal As Strings ${origin} ${vmi_ip["IPv4_AddressOrigin"]} |
| 55 | Should Be Equal As Strings ${vmi_ip["Id"]} intf0 |
George Keishing | b3ea095 | 2020-07-01 05:03:56 -0500 | [diff] [blame] | 56 | Should Be Equal As Strings ${vmi_ip["Description"]} |
| 57 | ... Ethernet Interface for Virtual Management Interface |
| 58 | Should Be Equal As Strings ${vmi_ip["Name"]} Virtual Management Interface |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 59 | Should Be True ${vmi_ip["InterfaceEnabled"]} |
| 60 | |
| 61 | |
| 62 | Delete Existing Static VMI IP Address |
| 63 | [Documentation] Delete existing static VMI IP address. |
| 64 | [Tags] Delete_Existing_Static_VMI_IP_Address |
| 65 | |
| 66 | ${curr_origin}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 67 | Run Keyword If ${curr_origin} == ${True} Set VMI IPv4 Origin ${False} ${HTTP_ACCEPTED} |
| 68 | |
| 69 | Delete VMI IPv4 Address IPv4StaticAddresses valid_status_code=${HTTP_ACCEPTED} |
| 70 | ${default}= Set Variable 0.0.0.0 |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 71 | Verify VMI Network Interface Details ${default} Static ${default} ${default} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 72 | |
| 73 | |
| 74 | Verify User Cannot Delete ReadOnly Property IPv4Addresses |
| 75 | [Documentation] Verify user cannot delete readonly property IPv4Addresses. |
| 76 | [Tags] Verify_User_Cannot_Delete_ReadOnly_Property_IPv4Addresses |
| 77 | |
| 78 | ${curr_origin}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 79 | Run Keyword If ${curr_origin} == ${False} Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
| 80 | Delete VMI IPv4 Address IPv4Addresses valid_status_code=${HTTP_BAD_REQUEST} |
| 81 | |
| 82 | |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 83 | Assign Valid And Invalid Static IPv4 Address To VMI |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 84 | [Documentation] Assign static IPv4 address to VMI. |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 85 | [Tags] Assign_Valid_And_Invalid_Static_IPv4_Address_To_VMI |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 86 | [Template] Set Static IPv4 Address To VMI And Verify |
| 87 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 88 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 89 | # ip gateway netmask valid_status_code |
| 90 | 10.5.20.30 0.0.0.0 255.255.252.0 ${HTTP_ACCEPTED} |
| 91 | a.3.118.94 0.0.0.0 255.255.252.0 ${HTTP_BAD_REQUEST} |
| 92 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 93 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 94 | Add Multiple IP Addreses On VMI Interface And Verify |
| 95 | [Documentation] Add multiple IP addreses on VMI interface and verify. |
| 96 | [Tags] Add_Multiple_IP_Addreses_On_VMI_Interface_And_Verify |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 97 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 98 | |
| 99 | ${ip1}= Create dictionary Address=10.5.5.10 SubnetMask=255.255.252.0 Gateway=0.0.0.0 |
| 100 | ${ip2}= Create dictionary Address=10.5.5.11 SubnetMask=255.255.252.0 Gateway=0.0.0.0 |
| 101 | ${ip3}= Create dictionary Address=10.5.5.12 SubnetMask=255.255.252.0 Gateway=0.0.0.0 |
| 102 | ${ips}= Create List ${ip1} ${ip2} ${ip3} |
| 103 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 104 | Redfish.Patch /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 105 | ... body={'IPv4StaticAddresses':${ips}} valid_status_codes=[${HTTP_ACCEPTED}] |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 106 | Verify VMI Network Interface Details ${ip1["Address"]} Static ${ip1["Gateway"]} ${ip1["SubnetMask"]} |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 107 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 108 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 109 | Modify IP Addresses On VMI Interface And Verify |
| 110 | [Documentation] Modify IP addresses on VMI interface and verify. |
| 111 | [Tags] Modify_IP_Addresses_On_VMI_Interface_And_Verify |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 112 | [Template] Set Static IPv4 Address To VMI And Verify |
| 113 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 114 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 115 | # ip gateway netmask valid_status_code |
| 116 | 10.5.5.10 0.0.0.0 255.255.252.0 ${HTTP_ACCEPTED} |
| 117 | 10.5.5.11 0.0.0.0 255.255.252.0 ${HTTP_ACCEPTED} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 118 | |
| 119 | Switch Between IP Origins On VMI And Verify Details |
| 120 | [Documentation] Switch between IP origins on VMI and verify details. |
| 121 | [Tags] Switch_Between_IP_Origins_On_VMI_And_Verify_Details |
| 122 | |
| 123 | Switch VMI IPv4 Origin And Verify Details |
| 124 | Switch VMI IPv4 Origin And Verify Details |
| 125 | |
| 126 | |
| 127 | Verify Persistency Of VMI IPv4 Details After Host Reboot |
| 128 | [Documentation] Verify persistency of VMI IPv4 details after host reboot. |
| 129 | [Tags] Verify_Persistency_Of_VMI_IPv4_Details_After_Host_Reboot |
| 130 | |
| 131 | # Verifying persistency of dynamic address. |
| 132 | Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
| 133 | ${default}= Set Variable 0.0.0.0 |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 134 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 135 | |
| 136 | # Verifying persistency of static address. |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 137 | Switch VMI IPv4 Origin And Verify Details |
| 138 | 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] | 139 | |
| 140 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 141 | Delete VMI Static IP Address And Verify |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 142 | [Documentation] Delete VMI static IP address and verify. |
| 143 | [Tags] Delete_VMI_Static_IP_Address_And_Verify |
| 144 | [Teardown] Test Teardown Execution |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 145 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 146 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
| 147 | Delete VMI IPv4 Address |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 148 | ${resp}= Redfish.Get |
| 149 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 150 | Should Be Empty ${resp.dict["IPv4Addresses"]} |
| 151 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 152 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 153 | Verify Successful VMI IP Static Configuration On HOST Boot After Session Delete |
| 154 | [Documentation] Verify VMI IP static Configuration On HOST Boot After session deleted. |
| 155 | [Tags] Verify_Successful_VMI_IP_Static_Configuration_On_HOST_Boot_After_Session_Delete |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 156 | [Teardown] Run keywords Delete VMI IPv4 Address IPv4Addresses AND Test Teardown Execution |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 157 | |
| 158 | Set Static IPv4 Address To VMI ${test_ipv4} ${test_gateway} ${test_netmask} |
| 159 | |
| 160 | ${session_info}= Get Redfish Session Info |
| 161 | Redfish.Delete ${session_info["location"]} |
| 162 | |
| 163 | # Create a new Redfish session |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 164 | Redfish Power Off |
| 165 | Redfish Power On |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 166 | |
| 167 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 168 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 169 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 170 | Verify Persistency Of VMI DHCP IP Configuration After Multiple HOST Reboots |
| 171 | [Documentation] Verify Persistency Of VMI DHCP IP configuration After Multiple HOST Reboots |
| 172 | [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] | 173 | [Teardown] Test Teardown Execution |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 174 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 175 | Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 176 | ${vmi_ip_config}= Get VMI Network Interface Details |
| 177 | # Verifying persistency of dynamic address after multiple reboots. |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 178 | FOR ${i} IN RANGE ${2} |
| 179 | Redfish Power Off |
| 180 | Redfish Power On |
| 181 | Verify VMI Network Interface Details ${vmi_ip_config["IPv4_Address"]} DHCP ${vmi_ip_config["IPv4_Gateway"]} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 182 | ... ${vmi_ip_config["IPv4_SubnetMask"]} |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 183 | END |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 184 | |
| 185 | |
| 186 | Enable DHCP When Static IP Configured And Verify Static IP |
| 187 | [Documentation] Enable DHCP when static ip configured and verify static ip |
| 188 | [Tags] Enable_DHCP_when_Static_IP_Configured_And_Verify_Static_IP |
| 189 | [Teardown] Test Teardown Execution |
| 190 | |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 191 | 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] | 192 | Set VMI IPv4 Origin ${True} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 193 | ${vmi_network_conf}= Get VMI Network Interface Details |
| 194 | Should Not Be Equal As Strings ${test_ipv4} ${vmi_network_conf["IPv4_Address"]} |
| 195 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 196 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 197 | Verify VMI Static IP Configuration Persist On BMC Reset Before Host Boot |
| 198 | [Documentation] Verify VMI static IP configuration persist on BMC reset. |
| 199 | [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] | 200 | [Teardown] Run keywords Delete VMI IPv4 Address AND FFDC On Test Case Fail |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 201 | |
| 202 | Set Static IPv4 Address To VMI ${test_ipv4} ${test_gateway} ${test_netmask} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 203 | OBMC Reboot (off) |
| 204 | Redfish Power On |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 205 | # Verifying the VMI static configuration |
| 206 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 207 | |
| 208 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 209 | Verify To Configure VMI Static IP Address With Different User Roles |
| 210 | [Documentation] Verify to configure vmi static ip address with different user roles. |
| 211 | [Tags] Verify_To_Configure_VMI_Static_IP_Address_With_Different_User_Roles |
| 212 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 213 | [Template] Config VMI Static IP Address Using Different Users |
| 214 | [Teardown] Delete BMC Users Using Redfish |
| 215 | |
| 216 | # username password ip_address gateway nemask valid_status_code |
| 217 | admin_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_ACCEPTED} |
| 218 | operator_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_FORBIDDEN} |
| 219 | readonly_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_FORBIDDEN} |
| 220 | noaccess_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_FORBIDDEN} |
| 221 | |
| 222 | |
| 223 | Verify To Delete VMI Static IP Address With Different User Roles |
| 224 | [Documentation] Verify to delete vmi static IP address with different user roles. |
| 225 | [Tags] Verify_To_Delete_VMI_Static_IP_Address_With_Different_User_Roles |
| 226 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 227 | [Template] Delete VMI Static IP Address Using Different Users |
| 228 | [Teardown] Delete BMC Users Using Redfish |
| 229 | |
| 230 | # username password valid_status_code |
| 231 | admin_user TestPwd123 ${HTTP_ACCEPTED} |
| 232 | operator_user TestPwd123 ${HTTP_FORBIDDEN} |
| 233 | readonly_user TestPwd123 ${HTTP_FORBIDDEN} |
| 234 | noaccess_user TestPwd123 ${HTTP_FORBIDDEN} |
| 235 | |
| 236 | |
| 237 | Verify To Update VMI Static IP Address With Different User Roles |
| 238 | [Documentation] Verify to update vmi static IP address with different user roles. |
| 239 | [Tags] Verify_To_Update_VMI_Static_IP_Address_With_Different_User_Roles_And_Verify |
| 240 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 241 | [Template] Config VMI Static IP Address Using Different Users |
| 242 | [Teardown] Delete BMC Users Using Redfish |
| 243 | |
| 244 | # username password ip_address gateway nemask valid_status_code |
| 245 | admin_user TestPwd123 10.5.10.20 0.0.0.0 255.255.0.0 ${HTTP_ACCEPTED} |
| 246 | operator_user TestPwd123 10.5.10.30 0.0.0.0 255.255.0.0 ${HTTP_FORBIDDEN} |
| 247 | readonly_user TestPwd123 10.5.20.40 0.0.0.0 255.255.0.0 ${HTTP_FORBIDDEN} |
| 248 | noaccess_user TestPwd123 10.5.30.50 0.0.0.0 255.255.0.0 ${HTTP_FORBIDDEN} |
| 249 | |
| 250 | |
| 251 | Verify To Read VMI Network Configuration With Different User Roles |
| 252 | [Documentation] Verify to read vmi network configuration with different user roles. |
| 253 | [Tags] Verify_To_Read_VMI_Network_Configuration_Via_Different_User_Roles |
| 254 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 255 | [Template] Read VMI Static IP Address Using Different Users |
| 256 | [Teardown] Delete BMC Users Using Redfish |
| 257 | |
| 258 | # username password valid_status_code |
| 259 | admin_user TestPwd123 ${HTTP_OK} |
| 260 | operator_user TestPwd123 ${HTTP_OK} |
| 261 | readonly_user TestPwd123 ${HTTP_OK} |
| 262 | noaccess_user TestPwd123 ${HTTP_FORBIDDEN} |
| 263 | |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 264 | Enable DHCP On VMI Network Via Different Users Roles And Verify |
| 265 | [Documentation] Enable DHCP On VMI Network Via Different Users Roles And Verify. |
| 266 | [Tags] Enable_DHCP_On_VMI_Network_Via_Different_Users_Roles_And_Verify |
| 267 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 268 | [Template] Update User Role And Set VMI IPv4 Origin |
| 269 | [Teardown] Delete BMC Users Using Redfish |
| 270 | |
| 271 | # username password dhcp_enabled valid_status_code |
| 272 | admin_user TestPwd123 ${True} ${HTTP_ACCEPTED} |
| 273 | operator_user TestPwd123 ${True} ${HTTP_FORBIDDEN} |
| 274 | readonly_user TestPwd123 ${True} ${HTTP_FORBIDDEN} |
| 275 | noaccess_user TestPwd123 ${True} ${HTTP_FORBIDDEN} |
| 276 | |
| 277 | Disable DHCP On VMI Network Via Different Users Roles And Verify |
| 278 | [Documentation] Disable DHCP On VMI Network Via Different Users Roles And Verify. |
| 279 | [Tags] Disable_DHCP_On_VMI_Network_Via_Different_Users_Roles_And_Verify |
| 280 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 281 | [Template] Update User Role And Set VMI IPv4 Origin |
| 282 | [Teardown] Delete BMC Users Using Redfish |
| 283 | |
| 284 | # username password dhcp_enabled valid_status_code |
| 285 | admin_user TestPwd123 ${False} ${HTTP_ACCEPTED} |
| 286 | operator_user TestPwd123 ${False} ${HTTP_FORBIDDEN} |
| 287 | readonly_user TestPwd123 ${False} ${HTTP_FORBIDDEN} |
| 288 | noaccess_user TestPwd123 ${False} ${HTTP_FORBIDDEN} |
| 289 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 290 | |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 291 | Enable And Disable DHCP And Verify |
| 292 | [Documentation] verify enable DHCP and disable DHCP. |
| 293 | [Tags] Enabled_And_Disabled_DHCP_Verify |
| 294 | |
| 295 | Set VMI IPv4 Origin ${True} |
| 296 | ${default}= Set Variable 0.0.0.0 |
| 297 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 298 | Set VMI IPv4 Origin ${False} |
shrsuman123 | 7a0e7f5 | 2021-01-07 00:43:11 -0600 | [diff] [blame] | 299 | ${resp}= Redfish.Get |
| 300 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 301 | Should Be Empty ${resp.dict["IPv4Addresses"]} |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 302 | |
| 303 | |
| 304 | Multiple Times Enable And Disable DHCP And Verify |
| 305 | [Documentation] Enable and Disable DHCP in a loop and verify VMI gets an IP address from DHCP |
| 306 | ... each time when DHCP is enabled |
| 307 | [Tags] Multiple_Times_Enable_And_Disable_DHCP_And_Verify |
| 308 | |
| 309 | ${default}= Set Variable 0.0.0.0 |
| 310 | FOR ${i} IN RANGE ${2} |
| 311 | Set VMI IPv4 Origin ${True} |
| 312 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 313 | Set VMI IPv4 Origin ${False} |
shrsuman123 | 7a0e7f5 | 2021-01-07 00:43:11 -0600 | [diff] [blame] | 314 | ${resp}= Redfish.Get |
| 315 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 316 | Should Be Empty ${resp.dict["IPv4Addresses"]} |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 317 | END |
| 318 | |
| 319 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 320 | *** Keywords *** |
| 321 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 322 | Suite Setup Execution |
| 323 | [Documentation] Do test setup execution task. |
| 324 | |
| 325 | Redfish.Login |
| 326 | Redfish Power On |
| 327 | ${active_channel_config}= Get Active Channel Config |
| 328 | Set Suite Variable ${active_channel_config} |
| 329 | ${resp}= Redfish.Get |
| 330 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 331 | ${ip_resp}= Evaluate json.loads('''${resp.text}''') json |
| 332 | ${length}= Get Length ${ip_resp["IPv4StaticAddresses"]} |
| 333 | ${vmi_network_conf}= Run Keyword If ${length} != ${0} Get VMI Network Interface Details |
| 334 | Set Suite Variable ${vmi_network_conf} |
| 335 | |
| 336 | |
| 337 | Test Teardown Execution |
| 338 | [Documentation] Do test teardown execution task. |
| 339 | |
| 340 | FFDC On Test Case Fail |
| 341 | ${curr_mode}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 342 | Run Keyword If ${curr_mode} == ${True} Set VMI IPv4 Origin ${False} |
| 343 | Run Keyword If ${vmi_network_conf} != ${None} |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 344 | ... 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] | 345 | ... ${vmi_network_conf["IPv4_Gateway"]} ${vmi_network_conf["IPv4_SubnetMask"]} |
| 346 | |
| 347 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 348 | Get VMI Network Interface Details |
| 349 | [Documentation] Get VMI network interface details. |
| 350 | [Arguments] ${valid_status_code}=${HTTP_OK} |
| 351 | |
| 352 | # Description of argument(s): |
| 353 | # valid_status_code Expected valid status code from GET request. |
| 354 | |
Anves Kumar rayankula | aa33b05 | 2020-07-22 04:24:51 -0500 | [diff] [blame] | 355 | # Note: It returns a dictionary of VMI eth0 parameters. |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 356 | |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 357 | ${active_channel_config}= Get Active Channel Config |
| 358 | ${resp}= Redfish.Get |
| 359 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 360 | ... valid_status_codes=[${valid_status_code}] |
| 361 | |
| 362 | ${ip_resp}= Evaluate json.loads('''${resp.text}''') json |
| 363 | |
| 364 | ${static_exists}= Run Keyword And Ignore Error |
| 365 | ... Set Variable ${ip_resp["IPv4StaticAddresses"][0]["Address"]} |
| 366 | ${static_exists}= Set Variable If '${static_exists[0]}' == 'PASS' ${True} ${False} |
| 367 | |
| 368 | ${vmi_ip}= Create Dictionary DHCPv4=${${ip_resp["DHCPv4"]["DHCPEnabled"]}} Id=${ip_resp["Id"]} |
| 369 | ... Description=${ip_resp["Description"]} IPv4_Address=${ip_resp["IPv4Addresses"][0]["Address"]} |
| 370 | ... IPv4_AddressOrigin=${ip_resp["IPv4Addresses"][0]["AddressOrigin"]} Name=${ip_resp["Name"]} |
Sushil Singh | 810234d | 2020-05-13 12:12:03 -0500 | [diff] [blame] | 371 | ... IPv4_Gateway=${ip_resp["IPv4Addresses"][0]["Gateway"]} |
| 372 | ... InterfaceEnabled=${${ip_resp["InterfaceEnabled"]}} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 373 | ... IPv4_SubnetMask=${ip_resp["IPv4Addresses"][0]["SubnetMask"]} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 374 | ... IPv4StaticAddresses=${${static_exists}} |
| 375 | |
| 376 | [Return] &{vmi_ip} |
| 377 | |
| 378 | |
| 379 | Get Immediate Child Parameter From VMI Network Interface |
| 380 | [Documentation] Get immediate child parameter from VMI network interface. |
| 381 | [Arguments] ${parameter} ${valid_status_code}=${HTTP_OK} |
| 382 | |
| 383 | # Description of argument(s): |
| 384 | # parameter parameter for which value is required. Ex: DHCPEnabled, MACAddress etc. |
| 385 | # valid_status_code Expected valid status code from GET request. |
| 386 | |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 387 | ${active_channel_config}= Get Active Channel Config |
| 388 | ${resp}= Redfish.Get |
| 389 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 390 | ... valid_status_codes=[${valid_status_code}] |
| 391 | |
| 392 | ${ip_resp}= Evaluate json.loads('''${resp.text}''') json |
| 393 | ${value}= Set Variable If '${parameter}' != 'DHCPEnabled' ${ip_resp["${parameter}"]} |
| 394 | ... ${ip_resp["DHCPv4"]["${parameter}"]} |
| 395 | |
| 396 | [Return] ${value} |
| 397 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 398 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 399 | Verify VMI EthernetInterfaces |
| 400 | [Documentation] Verify VMI ethernet interfaces. |
| 401 | [Arguments] ${valid_status_code}=${HTTP_OK} |
| 402 | |
| 403 | # Description of argument(s): |
| 404 | # valid_status_code Expected valid status code from GET request. |
| 405 | |
| 406 | ${resp}= Redfish.Get /redfish/v1/Systems/hypervisor/EthernetInterfaces |
| 407 | ... valid_status_codes=[${valid_status_code}] |
| 408 | |
| 409 | ${resp}= Evaluate json.loads('''${resp.text}''') json |
| 410 | ${interfaces}= Set Variable ${resp["Members"]} |
| 411 | |
| 412 | Should Be Equal As Strings ${interfaces[0]}[@odata.id] |
Anves Kumar rayankula | aa33b05 | 2020-07-22 04:24:51 -0500 | [diff] [blame] | 413 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0 |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 414 | Should Be Equal As Strings ${interfaces[1]}[@odata.id] |
Anves Kumar rayankula | aa33b05 | 2020-07-22 04:24:51 -0500 | [diff] [blame] | 415 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/eth1 |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 416 | |
| 417 | Should Be Equal ${resp["Members@odata.count"]} ${2} |
| 418 | |
| 419 | |
| 420 | Verify VMI Network Interface Details |
| 421 | [Documentation] Verify VMI network interface details. |
| 422 | [Arguments] ${ip} ${origin} ${gateway} ${netmask} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 423 | ... ${valid_status_code}=${HTTP_OK} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 424 | |
| 425 | # Description of argument(s): |
| 426 | # ip VMI IPv4 address. |
| 427 | # origin Origin of IPv4 address eg. Static or DHCP. |
| 428 | # gateway Gateway for VMI IP. |
| 429 | # netmask Subnetmask for VMI IP. |
| 430 | # valid_status_code Expected valid status code from GET request. Default is HTTP_OK. |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 431 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 432 | ${vmi_ip}= Get VMI Network Interface Details ${valid_status_code} |
| 433 | Should Be Equal As Strings ${origin} ${vmi_ip["IPv4_AddressOrigin"]} |
| 434 | Should Be Equal As Strings ${gateway} ${vmi_ip["IPv4_Gateway"]} |
| 435 | Should Be Equal As Strings ${netmask} ${vmi_ip["IPv4_SubnetMask"]} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 436 | Should Be Equal As Strings ${ip} ${vmi_ip["IPv4_Address"]} |
| 437 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 438 | |
| 439 | Set Static IPv4 Address To VMI And Verify |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 440 | [Documentation] Set static IPv4 address to VMI. |
| 441 | [Arguments] ${ip} ${gateway} ${netmask} ${valid_status_code}=${HTTP_ACCEPTED} |
| 442 | |
| 443 | # Description of argument(s): |
| 444 | # ip VMI IPv4 address. |
| 445 | # gateway Gateway for VMI IP. |
| 446 | # netmask Subnetmask for VMI IP. |
| 447 | # valid_status_code Expected valid status code from GET request. Default is HTTP_ACCEPTED. |
| 448 | |
| 449 | ${data}= Set Variable |
| 450 | ... {"IPv4StaticAddresses": [{"Address": "${ip}","SubnetMask": "${netmask}","Gateway": "${gateway}"}]} |
| 451 | |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 452 | ${active_channel_config}= Get Active Channel Config |
| 453 | ${resp}= Redfish.Patch |
| 454 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 455 | ... body=${data} valid_status_codes=[${valid_status_code}] |
Prashanth Katti | 1ce6821 | 2020-11-13 00:39:03 -0600 | [diff] [blame] | 456 | |
| 457 | # Wait few seconds for new configuration to get populated on runtime. |
| 458 | Sleep ${wait_time} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 459 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 460 | Return From Keyword If ${valid_status_code} != ${HTTP_ACCEPTED} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 461 | Verify VMI Network Interface Details ${ip} Static ${gateway} ${netmask} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 462 | |
| 463 | |
| 464 | Delete VMI IPv4 Address |
| 465 | [Documentation] Delete VMI IPv4 address. |
| 466 | [Arguments] ${delete_param}=IPv4StaticAddresses ${valid_status_code}=${HTTP_ACCEPTED} |
| 467 | |
| 468 | # Description of argument(s): |
| 469 | # delete_param Parameter to be deleted eg. IPv4StaticAddresses or IPv4Addresses. |
| 470 | # Default is IPv4StaticAddresses. |
| 471 | # valid_status_code Expected valid status code from PATCH request. Default is HTTP_OK. |
| 472 | |
| 473 | ${data}= Set Variable {"${delete_param}": [${Null}]} |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 474 | ${active_channel_config}= Get Active Channel Config |
| 475 | ${resp}= Redfish.Patch |
| 476 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 477 | ... body=${data} valid_status_codes=[${valid_status_code}] |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 478 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 479 | Return From Keyword If ${valid_status_code} != ${HTTP_ACCEPTED} |
| 480 | ${resp}= Redfish.Get |
| 481 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 482 | Should Be Empty ${resp.dict["IPv4StaticAddresses"]} |
| 483 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 484 | |
| 485 | Set VMI IPv4 Origin |
| 486 | [Documentation] Set VMI IPv4 origin. |
| 487 | [Arguments] ${dhcp_enabled}=${False} ${valid_status_code}=${HTTP_ACCEPTED} |
| 488 | |
| 489 | # Description of argument(s): |
| 490 | # dhcp_enabled True if user wants to enable DHCP. Default is Static, hence value is set to False. |
| 491 | # valid_status_code Expected valid status code from PATCH request. Default is HTTP_OK. |
| 492 | |
| 493 | ${data}= Set Variable If ${dhcp_enabled} == ${False} ${DISABLE_DHCP} ${ENABLE_DHCP} |
Anves Kumar rayankula | aa33b05 | 2020-07-22 04:24:51 -0500 | [diff] [blame] | 494 | ${resp}= Redfish.Patch /redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0 body=${data} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 495 | ... valid_status_codes=[${valid_status_code}] |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 496 | Return From Keyword If ${valid_status_code} != ${HTTP_ACCEPTED} |
| 497 | ${resp}= Redfish.Get |
| 498 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 499 | Should Be Equal ${resp.dict["DHCPv4"]["DHCPEnabled"]} ${dhcp_enabled} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 500 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 501 | Return From Keyword If ${valid_status_code} != ${HTTP_ACCEPTED} |
| 502 | ${resp}= Redfish.Get |
| 503 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 504 | Should Be Equal ${resp.dict["DHCPv4"]["DHCPEnabled"]} ${dhcp_enabled} |
| 505 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 506 | |
| 507 | Switch VMI IPv4 Origin And Verify Details |
| 508 | [Documentation] Switch VMI IPv4 origin and verify details. |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 509 | |
| 510 | ${curr_mode}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 511 | ${dhcp_enabled}= Set Variable If ${curr_mode} == ${False} ${True} ${False} |
| 512 | |
| 513 | ${default}= Set Variable 0.0.0.0 |
| 514 | ${origin}= Set Variable If ${curr_mode} == ${False} DHCP Static |
| 515 | Set VMI IPv4 Origin ${dhcp_enabled} ${HTTP_ACCEPTED} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 516 | Verify VMI Network Interface Details ${default} ${origin} ${default} ${default} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 517 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 518 | |
| 519 | Delete VMI Static IP Address Using Different Users |
| 520 | [Documentation] Update user role and delete vmi static IP address. |
| 521 | [Arguments] ${username} ${password} ${valid_status_code} |
| 522 | [Teardown] Run Keywords Redfish.Login AND |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 523 | ... 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] | 524 | ... ${test_netmask} ${HTTP_ACCEPTED} AND Redfish.Logout |
| 525 | |
| 526 | # Description of argument(s): |
| 527 | # username The host username. |
| 528 | # password The host password. |
| 529 | # valid_status_code The expected valid status code. |
| 530 | |
| 531 | Redfish.Login ${username} ${password} |
| 532 | Delete VMI IPv4 Address delete_param=IPv4StaticAddresses valid_status_code=${valid_status_code} |
| 533 | Redfish.Logout |
| 534 | |
| 535 | |
| 536 | Config VMI Static IP Address Using Different Users |
| 537 | [Documentation] Update user role and update vmi static ip address. |
| 538 | [Arguments] ${username} ${password} ${ip} ${gateway} ${netmask} |
| 539 | ... ${valid_status_code} |
| 540 | |
| 541 | # Description of argument(s): |
| 542 | # username The host username. |
| 543 | # password The host password. |
| 544 | # ip IP address to be added (e.g. "10.7.7.7"). |
| 545 | # subnet_mask Subnet mask for the IP to be added |
| 546 | # (e.g. "255.255.0.0"). |
| 547 | # gateway Gateway for the IP to be added (e.g. "10.7.7.1"). |
| 548 | # valid_status_code The expected valid status code. |
| 549 | |
| 550 | Redfish.Login ${username} ${password} |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 551 | 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] | 552 | Redfish.Logout |
| 553 | |
| 554 | |
| 555 | Read VMI Static IP Address Using Different Users |
| 556 | [Documentation] Update user role and read vmi static ip address. |
| 557 | [Arguments] ${username} ${password} ${valid_status_code} |
| 558 | |
| 559 | # Description of argument(s): |
| 560 | # username The host username. |
| 561 | # password The host password. |
| 562 | # valid_status_code The expected valid status code. |
| 563 | |
| 564 | Redfish.Login ${username} ${password} |
| 565 | Redfish.Get |
| 566 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']} |
| 567 | ... valid_status_codes=[${valid_status_code}] |
| 568 | Redfish.Logout |
| 569 | |
| 570 | |
| 571 | Delete BMC Users Using Redfish |
| 572 | [Documentation] Delete BMC users via redfish. |
| 573 | |
| 574 | Redfish.Login |
| 575 | Delete BMC Users Via Redfish users=${USERS} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 576 | |
| 577 | Update User Role And Set VMI IPv4 Origin |
| 578 | [Documentation] Update User Role And Set VMI IPv4 Origin. |
| 579 | [Arguments] ${username} ${password} ${dhcp_enabled} ${valid_status_code} |
| 580 | |
| 581 | # Description of argument(s): |
| 582 | # username The host username. |
| 583 | # password The host password. |
| 584 | # dhcp_enabled Indicates whether dhcp should be enabled |
| 585 | # (${True}, ${False}). |
| 586 | # valid_status_code The expected valid status code. |
| 587 | |
| 588 | Redfish.Login ${username} ${password} |
| 589 | Set VMI IPv4 Origin ${dhcp_enabled} ${valid_status_code} |
| 590 | Redfish.Logout |