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 | |
Matt Fischer | 6fb70d9 | 2023-10-24 19:06:33 -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 | 02cbfa1 | 2022-12-12 02:05:03 -0600 | [diff] [blame] | 37 | ${default} 0.0.0.0 |
| 38 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 39 | |
| 40 | *** Test Cases *** |
| 41 | |
| 42 | Verify All VMI EthernetInterfaces |
| 43 | [Documentation] Verify all VMI ethernet interfaces. |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 44 | [Tags] Verify_All_VMI_EthernetInterfaces |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 45 | |
| 46 | Verify VMI EthernetInterfaces |
| 47 | |
| 48 | |
| 49 | Verify Existing VMI Network Interface Details |
| 50 | [Documentation] Verify existing VMI network interface details. |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 51 | [Tags] Verify_Existing_VMI_Network_Interface_Details |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 52 | |
| 53 | ${vmi_ip}= Get VMI Network Interface Details |
| 54 | ${origin}= Set Variable If ${vmi_ip["DHCPv4"]} == ${False} Static DHCP |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 55 | Should Not Be Equal ${vmi_ip["DHCPv4"]} ${vmi_ip["IPv4StaticAddresses"]} |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 56 | Should Be Equal As Strings ${vmi_ip["Id"]} ${ethernet_interface} |
George Keishing | b3ea095 | 2020-07-01 05:03:56 -0500 | [diff] [blame] | 57 | Should Be Equal As Strings ${vmi_ip["Description"]} |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 58 | ... Hypervisor's Virtual Management Ethernet Interface |
| 59 | Should Be Equal As Strings ${vmi_ip["Name"]} Hypervisor Ethernet Interface |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 60 | Run Keyword If ${vmi_ip["IPv4StaticAddresses"]} != @{empty} |
| 61 | ... Verify VMI Network Interface Details ${vmi_ip["IPv4_Address"]} |
| 62 | ... ${origin} ${vmi_ip["IPv4_Gateway"]} ${vmi_ip["IPv4_SubnetMask"]} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 63 | |
| 64 | |
| 65 | Delete Existing Static VMI IP Address |
| 66 | [Documentation] Delete existing static VMI IP address. |
| 67 | [Tags] Delete_Existing_Static_VMI_IP_Address |
| 68 | |
| 69 | ${curr_origin}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 70 | Run Keyword If ${curr_origin} == ${True} Set VMI IPv4 Origin ${False} ${HTTP_ACCEPTED} |
| 71 | |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 72 | Delete VMI IPv4 Address |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 73 | |
| 74 | |
| 75 | Verify User Cannot Delete ReadOnly Property IPv4Addresses |
| 76 | [Documentation] Verify user cannot delete readonly property IPv4Addresses. |
| 77 | [Tags] Verify_User_Cannot_Delete_ReadOnly_Property_IPv4Addresses |
| 78 | |
| 79 | ${curr_origin}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 80 | Run Keyword If ${curr_origin} == ${True} Set VMI IPv4 Origin ${False} ${HTTP_ACCEPTED} |
| 81 | 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] | 82 | Delete VMI IPv4 Address IPv4Addresses valid_status_code=${HTTP_FORBIDDEN} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 83 | |
| 84 | |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 85 | Assign Valid And Invalid Static IPv4 Address To VMI |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 86 | [Documentation] Assign static IPv4 address to VMI. |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 87 | [Tags] Assign_Valid_And_Invalid_Static_IPv4_Address_To_VMI |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 88 | [Template] Set Static IPv4 Address To VMI And Verify |
| 89 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 90 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 91 | # ip gateway netmask valid_status_code |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 92 | 10.5.20.30 10.5.20.1 255.255.252.0 ${HTTP_ACCEPTED} |
| 93 | 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] | 94 | 10.5.20 10.5.20.1 255.255.252.0 ${HTTP_BAD_REQUEST} |
| 95 | 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] | 96 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 97 | |
George Keishing | 16b3c7b | 2021-01-28 09:23:37 -0600 | [diff] [blame] | 98 | Add Multiple IP Addresses On VMI Interface And Verify |
| 99 | [Documentation] Add multiple IP addresses on VMI interface and verify. |
| 100 | [Tags] Add_Multiple_IP_Addresses_On_VMI_Interface_And_Verify |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 101 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 102 | |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 103 | ${ip1}= Create dictionary Address=10.5.5.10 SubnetMask=255.255.252.0 Gateway=10.5.5.1 |
| 104 | ${ip2}= Create dictionary Address=10.5.5.11 SubnetMask=255.255.252.0 Gateway=10.5.5.1 |
| 105 | ${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] | 106 | ${ips}= Create List ${ip1} ${ip2} ${ip3} |
| 107 | |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 108 | Redfish.Patch /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
shrsuman123 | 993a5c9 | 2021-04-19 06:40:16 -0500 | [diff] [blame] | 109 | ... body={'IPv4StaticAddresses':${ips}} valid_status_codes=[${HTTP_BAD_REQUEST}] |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 110 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 111 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 112 | Modify IP Addresses On VMI Interface And Verify |
| 113 | [Documentation] Modify IP addresses on VMI interface and verify. |
| 114 | [Tags] Modify_IP_Addresses_On_VMI_Interface_And_Verify |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 115 | [Template] Set Static IPv4 Address To VMI And Verify |
| 116 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 117 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 118 | # ip gateway netmask valid_status_code |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 119 | 10.5.5.10 10.5.5.1 255.255.252.0 ${HTTP_ACCEPTED} |
| 120 | 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] | 121 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 122 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 123 | Switch Between IP Origins On VMI And Verify Details |
| 124 | [Documentation] Switch between IP origins on VMI and verify details. |
| 125 | [Tags] Switch_Between_IP_Origins_On_VMI_And_Verify_Details |
| 126 | |
| 127 | Switch VMI IPv4 Origin And Verify Details |
| 128 | Switch VMI IPv4 Origin And Verify Details |
| 129 | |
| 130 | |
| 131 | Verify Persistency Of VMI IPv4 Details After Host Reboot |
| 132 | [Documentation] Verify persistency of VMI IPv4 details after host reboot. |
| 133 | [Tags] Verify_Persistency_Of_VMI_IPv4_Details_After_Host_Reboot |
| 134 | |
| 135 | # Verifying persistency of dynamic address. |
| 136 | Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
Anves Kumar rayankula | 7936eee | 2021-04-19 05:38:36 -0500 | [diff] [blame] | 137 | Redfish Power Off stack_mode=skip |
| 138 | Redfish Power On |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 139 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 140 | |
| 141 | # Verifying persistency of static address. |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 142 | Switch VMI IPv4 Origin And Verify Details |
Anves Kumar rayankula | 7936eee | 2021-04-19 05:38:36 -0500 | [diff] [blame] | 143 | Redfish Power Off stack_mode=skip |
| 144 | Redfish Power On |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 145 | 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] | 146 | |
| 147 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 148 | Delete VMI Static IP Address And Verify |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 149 | [Documentation] Delete VMI static IP address and verify. |
| 150 | [Tags] Delete_VMI_Static_IP_Address_And_Verify |
| 151 | [Teardown] Test Teardown Execution |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 152 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 153 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
| 154 | Delete VMI IPv4 Address |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 155 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 156 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 157 | Verify Successful VMI IP Static Configuration On HOST Boot After Session Delete |
| 158 | [Documentation] Verify VMI IP static Configuration On HOST Boot After session deleted. |
| 159 | [Tags] Verify_Successful_VMI_IP_Static_Configuration_On_HOST_Boot_After_Session_Delete |
shrsuman123 | b25343d | 2021-09-22 04:33:47 -0500 | [diff] [blame] | 160 | [Teardown] Run keywords Delete VMI IPv4 Address AND Test Teardown Execution |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 161 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 162 | 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] | 163 | |
| 164 | ${session_info}= Get Redfish Session Info |
| 165 | Redfish.Delete ${session_info["location"]} |
| 166 | |
| 167 | # Create a new Redfish session |
shrsuman123 | 5c7e4d7 | 2021-04-16 05:42:57 -0500 | [diff] [blame] | 168 | Redfish.Login |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 169 | Redfish Power Off |
| 170 | Redfish Power On |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 171 | |
| 172 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 173 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 174 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 175 | Verify Persistency Of VMI DHCP IP Configuration After Multiple HOST Reboots |
| 176 | [Documentation] Verify Persistency Of VMI DHCP IP configuration After Multiple HOST Reboots |
| 177 | [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] | 178 | [Teardown] Test Teardown Execution |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 179 | |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 180 | Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
shrsuman123 | c1d3fe3 | 2020-09-08 05:04:07 -0500 | [diff] [blame] | 181 | ${vmi_ip_config}= Get VMI Network Interface Details |
| 182 | # Verifying persistency of dynamic address after multiple reboots. |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 183 | FOR ${i} IN RANGE ${2} |
| 184 | Redfish Power Off |
| 185 | Redfish Power On |
George Keishing | 538f174 | 2022-03-14 05:00:55 -0500 | [diff] [blame] | 186 | Verify VMI Network Interface Details ${vmi_ip_config["IPv4_Address"]} |
| 187 | ... DHCP ${vmi_ip_config["IPv4_Gateway"]} ${vmi_ip_config["IPv4_SubnetMask"]} |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 188 | END |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 189 | |
| 190 | |
| 191 | Enable DHCP When Static IP Configured And Verify Static IP |
| 192 | [Documentation] Enable DHCP when static ip configured and verify static ip |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 193 | [Tags] Enable_DHCP_When_Static_IP_Configured_And_Verify_Static_IP |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 194 | [Setup] Redfish Power On |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 195 | [Teardown] Test Teardown Execution |
| 196 | |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 197 | 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] | 198 | Set VMI IPv4 Origin ${True} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 199 | ${vmi_network_conf}= Get VMI Network Interface Details |
| 200 | Should Not Be Equal As Strings ${test_ipv4} ${vmi_network_conf["IPv4_Address"]} |
| 201 | |
Anves Kumar rayankula | 9fa524a | 2020-08-18 06:40:18 -0500 | [diff] [blame] | 202 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 203 | Verify VMI Static IP Configuration Persist On BMC Reset Before Host Boot |
| 204 | [Documentation] Verify VMI static IP configuration persist on BMC reset. |
| 205 | [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] | 206 | [Teardown] Run keywords Delete VMI IPv4 Address AND FFDC On Test Case Fail |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 207 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 208 | 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] | 209 | Redfish OBMC Reboot (off) stack_mode=skip |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 210 | Redfish Power On |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 211 | # Verifying the VMI static configuration |
| 212 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 213 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 214 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 215 | Add Static IP When Host Poweroff And Verify On Poweron |
| 216 | [Documentation] Add Static IP When Host Poweroff And Verify on power on |
| 217 | [Tags] Add_Static_IP_When_Host_Poweroff_And_Verify_On_Poweron |
| 218 | [Setup] Redfish Power Off |
| 219 | [Teardown] Run keywords Delete VMI IPv4 Address AND FFDC On Test Case Fail |
| 220 | |
| 221 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
| 222 | Redfish Power On |
| 223 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 224 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 225 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 226 | Add VMI Static IP When Host Poweroff And Verify Static IP On BMC Reset |
| 227 | [Documentation] Add Static IP When Host Poweroff And Verify Static IP On BMC Reset. |
| 228 | [Tags] Add_VMI_Static_IP_When_Host_Poweroff_And_Verify_Static_IP_On_BMC_Reset |
| 229 | [Setup] Redfish Power Off |
| 230 | [Teardown] Run keywords Delete VMI IPv4 Address AND FFDC On Test Case Fail |
| 231 | |
| 232 | 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] | 233 | Redfish OBMC Reboot (off) stack_mode=skip |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 234 | Redfish Power On |
| 235 | Verify VMI Network Interface Details ${test_ipv4} Static ${test_gateway} ${test_netmask} |
| 236 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 237 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 238 | Enable DHCP When No Static IP Configured And Verify DHCP IP |
| 239 | [Documentation] Enable DHCP when no static ip configured and verify dhcp ip |
| 240 | [Tags] Enable_DHCP_When_No_Static_IP_Configured_And_Verify_DHCP_IP |
| 241 | [Setup] Run Keyword And Ignore Error Delete VMI IPv4 Address |
| 242 | [Teardown] Test Teardown Execution |
| 243 | |
| 244 | ${curr_origin}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 245 | Run Keyword If ${curr_origin} == ${False} Set VMI IPv4 Origin ${True} ${HTTP_ACCEPTED} |
| 246 | ${vmi_ip_config}= Get VMI Network Interface Details |
George Keishing | 538f174 | 2022-03-14 05:00:55 -0500 | [diff] [blame] | 247 | Verify VMI Network Interface Details ${vmi_ip_config["IPv4_Address"]} |
| 248 | ... DHCP ${vmi_ip_config["IPv4_Gateway"]} ${vmi_ip_config["IPv4_SubnetMask"]} |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 249 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 250 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 251 | Verify User Cannot Delete VMI DHCP IP Address |
| 252 | [Documentation] Verify user cannot delete VMI DHCP IP Address |
| 253 | [Tags] Verify_User_Cannot_Delete_VMI_DHCP_IP_Address |
| 254 | [Setup] Set VMI IPv4 Origin ${True} |
| 255 | [Teardown] Test Teardown Execution |
| 256 | |
shrsuman123 | b25343d | 2021-09-22 04:33:47 -0500 | [diff] [blame] | 257 | Delete VMI IPv4 Address IPv4Addresses valid_status_code=${HTTP_FORBIDDEN} |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 258 | ${resp}= Redfish.Get |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 259 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 260 | Should Not Be Empty ${resp.dict["IPv4Addresses"]} |
| 261 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 262 | |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 263 | Enable DHCP When Static IP Configured DHCP Server Unavailable And Verify IP |
| 264 | [Documentation] Enable DHCP When Static IP Configured And DHCP Server Unavailable And Verify No IP. |
| 265 | [Tags] Enable_DHCP_When_Static_IP_Configured_DHCP_Server_Unavailable_And_Verify_IP |
| 266 | [Teardown] Test Teardown Execution |
| 267 | |
| 268 | Set Static IPv4 Address To VMI And Verify ${test_ipv4} ${test_gateway} ${test_netmask} |
| 269 | Set VMI IPv4 Origin ${True} |
shrsuman123 | 75e7706 | 2020-09-18 01:08:45 -0500 | [diff] [blame] | 270 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 271 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 272 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 273 | Verify To Configure VMI Static IP Address With Different User Roles |
| 274 | [Documentation] Verify to configure vmi static ip address with different user roles. |
| 275 | [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] | 276 | [Setup] Run Keywords Delete BMC Users Using Redfish |
| 277 | ... AND Create Users With Different Roles users=${USERS} force=${True} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 278 | [Template] Config VMI Static IP Address Using Different Users |
| 279 | [Teardown] Delete BMC Users Using Redfish |
| 280 | |
| 281 | # username password ip_address gateway nemask valid_status_code |
| 282 | admin_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_ACCEPTED} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 283 | readonly_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 284 | |
| 285 | |
| 286 | Verify To Configure VMI Static IP Address With Operator User Role |
| 287 | [Documentation] Verify to configure vmi static ip address with operator user role. |
| 288 | [Tags] Verify_To_Configure_VMI_Static_IP_Address_With_Operator_User_Role |
| 289 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 290 | [Template] Config VMI Static IP Address Using Different Users |
| 291 | [Teardown] Delete BMC Users Using Redfish |
| 292 | |
| 293 | # username password ip_address gateway nemask valid_status_code |
| 294 | operator_user TestPwd123 ${test_ipv4} ${test_gateway} ${test_netmask} ${HTTP_FORBIDDEN} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 295 | |
| 296 | |
| 297 | Verify To Delete VMI Static IP Address With Different User Roles |
| 298 | [Documentation] Verify to delete vmi static IP address with different user roles. |
| 299 | [Tags] Verify_To_Delete_VMI_Static_IP_Address_With_Different_User_Roles |
| 300 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 301 | [Template] Delete VMI Static IP Address Using Different Users |
| 302 | [Teardown] Delete BMC Users Using Redfish |
| 303 | |
| 304 | # username password valid_status_code |
| 305 | admin_user TestPwd123 ${HTTP_ACCEPTED} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 306 | readonly_user TestPwd123 ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 307 | |
| 308 | |
| 309 | Verify To Delete VMI Static IP Address With Operator User Role |
| 310 | [Documentation] Verify to delete vmi static IP address with operator user role. |
| 311 | [Tags] Verify_To_Delete_VMI_Static_IP_Address_With_Operator_User_Role |
| 312 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 313 | [Template] Delete VMI Static IP Address Using Different Users |
| 314 | [Teardown] Delete BMC Users Using Redfish |
| 315 | |
| 316 | # username password valid_status_code |
| 317 | operator_user TestPwd123 ${HTTP_FORBIDDEN} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 318 | |
| 319 | |
| 320 | Verify To Update VMI Static IP Address With Different User Roles |
| 321 | [Documentation] Verify to update vmi static IP address with different user roles. |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 322 | [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] | 323 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 324 | [Template] Config VMI Static IP Address Using Different Users |
| 325 | [Teardown] Delete BMC Users Using Redfish |
| 326 | |
Shradha Suman | c7df7db | 2021-03-08 05:16:44 -0600 | [diff] [blame] | 327 | # username password ip_address gateway netmask valid_status_code |
| 328 | 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] | 329 | 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] | 330 | |
| 331 | |
| 332 | Verify To Update VMI Static IP Address With Operator User Role |
| 333 | [Documentation] Verify to update vmi static IP address with operator user role. |
| 334 | [Tags] Verify_To_Update_VMI_Static_IP_Address_With_Operator_User_Role |
| 335 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 336 | [Template] Config VMI Static IP Address Using Different Users |
| 337 | [Teardown] Delete BMC Users Using Redfish |
| 338 | |
| 339 | # username password ip_address gateway netmask valid_status_code |
| 340 | 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] | 341 | |
| 342 | |
| 343 | Verify To Read VMI Network Configuration With Different User Roles |
| 344 | [Documentation] Verify to read vmi network configuration with different user roles. |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 345 | [Tags] Verify_To_Read_VMI_Network_Configuration_With_Different_User_Roles |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 346 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 347 | [Template] Read VMI Static IP Address Using Different Users |
| 348 | [Teardown] Delete BMC Users Using Redfish |
| 349 | |
| 350 | # username password valid_status_code |
| 351 | admin_user TestPwd123 ${HTTP_OK} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 352 | readonly_user TestPwd123 ${HTTP_OK} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 353 | |
| 354 | |
| 355 | Verify To Read VMI Network Configuration With Operator User Role |
| 356 | [Documentation] Verify to read vmi network configuration with operator user role. |
| 357 | [Tags] Verify_To_Read_VMI_Network_Configuration_With_Operator_User_Role |
| 358 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 359 | [Template] Read VMI Static IP Address Using Different Users |
| 360 | [Teardown] Delete BMC Users Using Redfish |
| 361 | |
| 362 | # username password valid_status_code |
| 363 | operator_user TestPwd123 ${HTTP_FORBIDDEN} |
| 364 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 365 | |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 366 | Enable DHCP On VMI Network Via Different Users Roles And Verify |
| 367 | [Documentation] Enable DHCP On VMI Network Via Different Users Roles And Verify. |
| 368 | [Tags] Enable_DHCP_On_VMI_Network_Via_Different_Users_Roles_And_Verify |
| 369 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 370 | [Template] Update User Role And Set VMI IPv4 Origin |
| 371 | [Teardown] Delete BMC Users Using Redfish |
| 372 | |
| 373 | # username password dhcp_enabled valid_status_code |
| 374 | admin_user TestPwd123 ${True} ${HTTP_ACCEPTED} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 375 | readonly_user TestPwd123 ${True} ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 376 | |
| 377 | |
| 378 | Enable DHCP On VMI Network Via Operator User Role And Verify |
| 379 | [Documentation] Enable DHCP On VMI Network Via Operator User Role And Verify. |
| 380 | [Tags] Enable_DHCP_On_VMI_Network_Via_Operator_User_Role_And_Verify |
| 381 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 382 | [Template] Update User Role And Set VMI IPv4 Origin |
| 383 | [Teardown] Delete BMC Users Using Redfish |
| 384 | |
| 385 | # username password dhcp_enabled valid_status_code |
| 386 | operator_user TestPwd123 ${True} ${HTTP_FORBIDDEN} |
| 387 | |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 388 | |
| 389 | Disable DHCP On VMI Network Via Different Users Roles And Verify |
| 390 | [Documentation] Disable DHCP On VMI Network Via Different Users Roles And Verify. |
| 391 | [Tags] Disable_DHCP_On_VMI_Network_Via_Different_Users_Roles_And_Verify |
| 392 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 393 | [Template] Update User Role And Set VMI IPv4 Origin |
| 394 | [Teardown] Delete BMC Users Using Redfish |
| 395 | |
| 396 | # username password dhcp_enabled valid_status_code |
| 397 | admin_user TestPwd123 ${False} ${HTTP_ACCEPTED} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 398 | readonly_user TestPwd123 ${False} ${HTTP_FORBIDDEN} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 399 | |
| 400 | |
| 401 | Disable DHCP On VMI Network Via Operator User Role And Verify |
| 402 | [Documentation] Disable DHCP On VMI Network Via Operator User Role And Verify. |
| 403 | [Tags] Disable_DHCP_On_VMI_Network_Via_Operator_User_Role_And_Verify |
| 404 | [Setup] Create Users With Different Roles users=${USERS} force=${True} |
| 405 | [Template] Update User Role And Set VMI IPv4 Origin |
| 406 | [Teardown] Delete BMC Users Using Redfish |
| 407 | |
| 408 | # username password dhcp_enabled valid_status_code |
| 409 | operator_user TestPwd123 ${False} ${HTTP_FORBIDDEN} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 410 | |
shrsuman123 | e37b0cc | 2020-09-02 00:33:42 -0500 | [diff] [blame] | 411 | |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 412 | Enable And Disable DHCP And Verify |
| 413 | [Documentation] verify enable DHCP and disable DHCP. |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 414 | [Tags] Enable_And_Disable_DHCP_And_Verify |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 415 | |
| 416 | Set VMI IPv4 Origin ${True} |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 417 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 418 | Set VMI IPv4 Origin ${False} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 419 | Verify VMI Network Interface Details ${default} Static ${default} ${default} |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 420 | |
| 421 | |
| 422 | Multiple Times Enable And Disable DHCP And Verify |
| 423 | [Documentation] Enable and Disable DHCP in a loop and verify VMI gets an IP address from DHCP |
| 424 | ... each time when DHCP is enabled |
| 425 | [Tags] Multiple_Times_Enable_And_Disable_DHCP_And_Verify |
| 426 | |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 427 | FOR ${i} IN RANGE ${2} |
| 428 | Set VMI IPv4 Origin ${True} |
| 429 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 430 | Set VMI IPv4 Origin ${False} |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 431 | Verify VMI Network Interface Details ${default} Static ${default} ${default} |
Anves Kumar rayankula | 55b939e | 2020-08-12 04:19:01 -0500 | [diff] [blame] | 432 | END |
| 433 | |
| 434 | |
Anves Kumar rayankula | 81fd9db | 2021-05-10 02:39:51 -0500 | [diff] [blame] | 435 | Assign Static IPv4 Address With Invalid Netmask To VMI |
| 436 | [Documentation] Assign static IPv4 address with invalid netmask and expect error. |
| 437 | [Tags] Assign_Static_IPv4_Address_With_Invalid_Netmask_To_VMI |
| 438 | [Template] Set Static IPv4 Address To VMI And Verify |
| 439 | |
| 440 | # ip gateway netmask valid_status_code |
| 441 | ${test_ipv4} ${test_gateway} 255.256.255.0 ${HTTP_BAD_REQUEST} |
| 442 | ${test_ipv4} ${test_gateway} ff.ff.ff.ff ${HTTP_BAD_REQUEST} |
| 443 | ${test_ipv4} ${test_gateway} 255.255.253.0 ${HTTP_BAD_REQUEST} |
| 444 | |
| 445 | |
| 446 | Assign Static IPv4 Address With Invalid Gateway To VMI |
| 447 | [Documentation] Add static IPv4 address with invalid gateway and expect error. |
| 448 | [Tags] Assign_Static_IPv4_Address_With_Invalid_Gateway_To_VMI |
| 449 | [Template] Set Static IPv4 Address To VMI And Verify |
| 450 | |
| 451 | # ip gateway netmask valid_status_code |
| 452 | ${test_ipv4} @@@.%%.44.11 ${test_netmask} ${HTTP_BAD_REQUEST} |
| 453 | ${test_ipv4} 0xa.0xb.0xc.0xd ${test_netmask} ${HTTP_BAD_REQUEST} |
| 454 | ${test_ipv4} 10.3.36 ${test_netmask} ${HTTP_BAD_REQUEST} |
| 455 | ${test_ipv4} 10.3.36.-10 ${test_netmask} ${HTTP_BAD_REQUEST} |
| 456 | |
| 457 | |
Megha G N | 02cbfa1 | 2022-12-12 02:05:03 -0600 | [diff] [blame] | 458 | Enable DHCP When Host Is Off And Verify After Poweron |
| 459 | [Documentation] Enable DHCP when host is off and |
| 460 | ... check whether it is enabled after poweron. |
| 461 | [Tags] Enable_DHCP_When_Host_Is_Off_And_Verify_After_Poweron |
| 462 | [Setup] Redfish Power Off stack_mode=skip |
| 463 | |
| 464 | Set VMI IPv4 Origin ${True} |
| 465 | Redfish Power On stack_mode=skip |
| 466 | Verify VMI Network Interface Details ${default} DHCP ${default} ${default} |
| 467 | |
| 468 | |
Megha G N | 8917468 | 2023-01-24 23:28:27 -0600 | [diff] [blame] | 469 | Disable DHCP When Host Is Off And Verify New State Reflects After Power On |
| 470 | [Documentation] Disable DHCP when host is off and |
| 471 | ... get network info and verify that VMI origin is static. |
| 472 | [Tags] Disable_DHCP_When_Host_Is_Off_And_Verify_New_State_Reflects_After_Power_On |
| 473 | [Setup] Redfish Power Off stack_mode=skip |
| 474 | |
| 475 | Set VMI IPv4 Origin ${False} |
| 476 | Redfish Power On stack_mode=skip |
| 477 | Verify VMI Network Interface Details ${default} Static ${default} ${default} |
| 478 | |
| 479 | |
Megha G N | 38acd84 | 2024-10-14 14:28:11 -0500 | [diff] [blame] | 480 | Enable VMI Stateless Address AutoConfig And Verify |
| 481 | [Documentation] Enable VMI SLAACv6 and verify an origin. |
| 482 | [Tags] Enable_VMI_Stateless_Address_AutoConfig_And_Verify |
| 483 | |
| 484 | Set VMI SLAACv6 Origin ${True} |
| 485 | |
| 486 | # Check origin is set to slaac and address are getting displayed. |
| 487 | Verify VMI IPv6 Address SLAAC |
| 488 | |
| 489 | |
Megha G N | e8c0e42 | 2024-12-04 03:12:55 -0600 | [diff] [blame^] | 490 | Disable VMI Stateless Address AutoConfig And Verify |
| 491 | [Documentation] Disable VMI SLAACv6 and verify an origin. |
| 492 | [Tags] Disable_VMI_Stateless_Address_AutoConfig_And_Verify |
| 493 | [Setup] Set VMI SLAACv6 Origin ${True} |
| 494 | |
| 495 | Set VMI SLAACv6 Origin ${False} |
| 496 | |
| 497 | # Check origin is set to static and slaacv6 address are getting erased. |
| 498 | Verify VMI IPv6 Address Static |
| 499 | |
| 500 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 501 | *** Keywords *** |
| 502 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 503 | Suite Setup Execution |
| 504 | [Documentation] Do test setup execution task. |
| 505 | |
| 506 | Redfish.Login |
Megha G N | d0b4da9 | 2024-02-08 15:04:24 -0600 | [diff] [blame] | 507 | |
| 508 | Redfish Power Off |
| 509 | Set BIOS Attribute pvm_hmc_managed Enabled |
Megha G N | 1e53824 | 2024-06-11 03:42:03 -0500 | [diff] [blame] | 510 | Set BIOS Attribute pvm_stop_at_standby Disabled |
| 511 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 512 | Redfish Power On |
Megha G N | 1e53824 | 2024-06-11 03:42:03 -0500 | [diff] [blame] | 513 | Wait For Host Boot Progress To Reach Required State |
Megha G N | 86507da | 2024-02-07 23:16:27 -0600 | [diff] [blame] | 514 | |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 515 | ${active_channel_config}= Get Active Channel Config |
| 516 | Set Suite Variable ${active_channel_config} |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 517 | Set Suite Variable ${ethernet_interface} ${active_channel_config['${CHANNEL_NUMBER}']['name']} |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 518 | ${resp}= Redfish.Get |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 519 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
shrsuman123 | 62e5be5 | 2021-05-20 02:42:59 -0500 | [diff] [blame] | 520 | ${ip_resp}= Evaluate json.loads(r'''${resp.text}''') json |
Anves Kumar rayankula | d7deb89 | 2020-08-24 02:58:20 -0500 | [diff] [blame] | 521 | ${length}= Get Length ${ip_resp["IPv4StaticAddresses"]} |
| 522 | ${vmi_network_conf}= Run Keyword If ${length} != ${0} Get VMI Network Interface Details |
| 523 | Set Suite Variable ${vmi_network_conf} |
| 524 | |
| 525 | |
| 526 | Test Teardown Execution |
| 527 | [Documentation] Do test teardown execution task. |
| 528 | |
| 529 | FFDC On Test Case Fail |
| 530 | ${curr_mode}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 531 | Run Keyword If ${curr_mode} == ${True} Set VMI IPv4 Origin ${False} |
Megha G N | 1e53824 | 2024-06-11 03:42:03 -0500 | [diff] [blame] | 532 | Run Keyword If '${vmi_network_conf["IPv4_Address"]}' != '${default}' |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 533 | ... 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] | 534 | ... ${vmi_network_conf["IPv4_Gateway"]} ${vmi_network_conf["IPv4_SubnetMask"]} |
| 535 | |
| 536 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 537 | Get Immediate Child Parameter From VMI Network Interface |
| 538 | [Documentation] Get immediate child parameter from VMI network interface. |
| 539 | [Arguments] ${parameter} ${valid_status_code}=${HTTP_OK} |
| 540 | |
| 541 | # Description of argument(s): |
| 542 | # parameter parameter for which value is required. Ex: DHCPEnabled, MACAddress etc. |
| 543 | # valid_status_code Expected valid status code from GET request. |
| 544 | |
Anves Kumar rayankula | 358c41d | 2020-08-14 04:53:06 -0500 | [diff] [blame] | 545 | ${resp}= Redfish.Get |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 546 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 547 | ... valid_status_codes=[${valid_status_code}] |
| 548 | |
shrsuman123 | 62e5be5 | 2021-05-20 02:42:59 -0500 | [diff] [blame] | 549 | ${ip_resp}= Evaluate json.loads(r'''${resp.text}''') json |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 550 | ${value}= Set Variable If '${parameter}' != 'DHCPEnabled' ${ip_resp["${parameter}"]} |
| 551 | ... ${ip_resp["DHCPv4"]["${parameter}"]} |
| 552 | |
George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 553 | RETURN ${value} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 554 | |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 555 | |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 556 | Switch VMI IPv4 Origin And Verify Details |
| 557 | [Documentation] Switch VMI IPv4 origin and verify details. |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 558 | |
Anves Kumar rayankula | 7936eee | 2021-04-19 05:38:36 -0500 | [diff] [blame] | 559 | ${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] | 560 | ${dhcp_enabled}= Set Variable If ${dhcp_mode_before} == ${False} ${True} ${False} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 561 | |
Anves Kumar rayankula | e7dc89a | 2021-04-28 04:29:38 -0500 | [diff] [blame] | 562 | ${origin}= Set Variable If ${dhcp_mode_before} == ${False} DHCP Static |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 563 | Set VMI IPv4 Origin ${dhcp_enabled} ${HTTP_ACCEPTED} |
Anves Kumar rayankula | 7936eee | 2021-04-19 05:38:36 -0500 | [diff] [blame] | 564 | |
| 565 | ${dhcp_mode_after}= Get Immediate Child Parameter From VMI Network Interface DHCPEnabled |
| 566 | Should Not Be Equal ${dhcp_mode_before} ${dhcp_mode_after} |
| 567 | |
| 568 | Run Keyword If ${dhcp_mode_after} == ${True} |
| 569 | ... Verify VMI Network Interface Details ${default} ${origin} ${default} ${default} |
Vijay | 06a169d | 2020-04-23 09:28:24 -0500 | [diff] [blame] | 570 | |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 571 | |
| 572 | Delete VMI Static IP Address Using Different Users |
| 573 | [Documentation] Update user role and delete vmi static IP address. |
| 574 | [Arguments] ${username} ${password} ${valid_status_code} |
| 575 | [Teardown] Run Keywords Redfish.Login AND |
shrsuman123 | f559cbe | 2021-01-06 05:40:45 -0600 | [diff] [blame] | 576 | ... 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] | 577 | ... ${test_netmask} ${HTTP_ACCEPTED} AND Redfish.Logout |
| 578 | |
| 579 | # Description of argument(s): |
| 580 | # username The host username. |
| 581 | # password The host password. |
| 582 | # valid_status_code The expected valid status code. |
| 583 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 584 | # TODO: operator_user role is not yet supported. |
| 585 | Skip If '${username}' == 'operator_user' |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 586 | Redfish.Login ${username} ${password} |
| 587 | 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] | 588 | |
| 589 | |
| 590 | Config VMI Static IP Address Using Different Users |
| 591 | [Documentation] Update user role and update vmi static ip address. |
| 592 | [Arguments] ${username} ${password} ${ip} ${gateway} ${netmask} |
| 593 | ... ${valid_status_code} |
| 594 | |
| 595 | # Description of argument(s): |
| 596 | # username The host username. |
| 597 | # password The host password. |
| 598 | # ip IP address to be added (e.g. "10.7.7.7"). |
| 599 | # subnet_mask Subnet mask for the IP to be added |
| 600 | # (e.g. "255.255.0.0"). |
| 601 | # gateway Gateway for the IP to be added (e.g. "10.7.7.1"). |
| 602 | # valid_status_code The expected valid status code. |
| 603 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 604 | # TODO: operator_user role is not yet supported. |
| 605 | Skip If '${username}' == 'operator_user' |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 606 | Redfish.Login ${username} ${password} |
Anves Kumar rayankula | 1b64d94 | 2020-11-17 02:44:02 -0600 | [diff] [blame] | 607 | 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] | 608 | |
| 609 | |
| 610 | Read VMI Static IP Address Using Different Users |
| 611 | [Documentation] Update user role and read vmi static ip address. |
| 612 | [Arguments] ${username} ${password} ${valid_status_code} |
| 613 | |
| 614 | # Description of argument(s): |
| 615 | # username The host username. |
| 616 | # password The host password. |
| 617 | # valid_status_code The expected valid status code. |
| 618 | |
Megha GN | 80ef5ca | 2022-06-09 00:29:57 -0500 | [diff] [blame] | 619 | # TODO: operator_user role is not yet supported. |
| 620 | Skip If '${username}' == 'operator_user' |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 621 | Redfish.Login ${username} ${password} |
| 622 | Redfish.Get |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 623 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${ethernet_interface} |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 624 | ... valid_status_codes=[${valid_status_code}] |
Anves Kumar rayankula | d5de207 | 2020-09-30 06:24:11 -0500 | [diff] [blame] | 625 | |
| 626 | |
| 627 | Delete BMC Users Using Redfish |
| 628 | [Documentation] Delete BMC users via redfish. |
| 629 | |
| 630 | Redfish.Login |
| 631 | Delete BMC Users Via Redfish users=${USERS} |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 632 | |
Sweta Potthuri | d52b273 | 2021-08-12 12:48:24 -0500 | [diff] [blame] | 633 | |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 634 | Update User Role And Set VMI IPv4 Origin |
| 635 | [Documentation] Update User Role And Set VMI IPv4 Origin. |
| 636 | [Arguments] ${username} ${password} ${dhcp_enabled} ${valid_status_code} |
| 637 | |
| 638 | # Description of argument(s): |
| 639 | # username The host username. |
| 640 | # password The host password. |
| 641 | # dhcp_enabled Indicates whether dhcp should be enabled |
| 642 | # (${True}, ${False}). |
| 643 | # valid_status_code The expected valid status code. |
| 644 | |
Megha GN | be42859 | 2022-07-21 10:33:02 -0500 | [diff] [blame] | 645 | # TODO: operator_user role is not yet supported. |
| 646 | Skip If '${username}' == 'operator_user' |
shrsuman123 | b361d41 | 2020-09-30 06:17:23 -0500 | [diff] [blame] | 647 | Redfish.Login ${username} ${password} |
| 648 | Set VMI IPv4 Origin ${dhcp_enabled} ${valid_status_code} |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 649 | |
Sweta Potthuri | d52b273 | 2021-08-12 12:48:24 -0500 | [diff] [blame] | 650 | |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 651 | Suite Teardown Execution |
| 652 | [Documentation] Do suite teardown execution task. |
| 653 | |
| 654 | Run Keyword If ${vmi_network_conf} != ${None} |
| 655 | ... Set Static IPv4 Address To VMI And Verify ${vmi_network_conf["IPv4_Address"]} |
| 656 | ... ${vmi_network_conf["IPv4_Gateway"]} ${vmi_network_conf["IPv4_SubnetMask"]} |
shrsuman123 | b25343d | 2021-09-22 04:33:47 -0500 | [diff] [blame] | 657 | Delete All Redfish Sessions |
shrsuman123 | bfb851b | 2021-07-02 04:59:16 -0500 | [diff] [blame] | 658 | Redfish.Logout |
Megha G N | 38acd84 | 2024-10-14 14:28:11 -0500 | [diff] [blame] | 659 | |
| 660 | |
| 661 | Set VMI SLAACv6 Origin |
| 662 | [Documentation] Set VMI SLAACv6 origin. |
| 663 | [Arguments] ${slaac_enabled}=${False} ${valid_status_code}=${HTTP_ACCEPTED} |
| 664 | ... ${interface}=${ethernet_interface} |
| 665 | |
| 666 | # Description of argument(s): |
| 667 | # slaacv6_enabled True if user wants to enable SLAACv6. Default is Static, hence value is set to False. |
| 668 | # valid_status_code Expected valid status code from PATCH request. Default is HTTP_OK. |
| 669 | # interface VMI interface (eg. eth0 or eth1). |
| 670 | |
| 671 | ${data}= Set Variable If ${slaac_enabled} == ${False} ${DISABLE_SLAAC} ${ENABLE_SLAAC} |
| 672 | ${resp}= Redfish.Patch |
| 673 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 674 | ... body=${data} valid_status_codes=[${valid_status_code}] |
| 675 | |
| 676 | Sleep ${wait_time} |
| 677 | Return From Keyword If ${valid_status_code} != ${HTTP_ACCEPTED} |
| 678 | ${resp}= Redfish.Get |
| 679 | ... /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 680 | Should Be Equal ${resp.dict["StatelessAddressAutoConfig"]["IPv6AutoConfigEnabled"]} ${slaac_enabled} |
| 681 | |
| 682 | |
| 683 | Verify VMI IPv6 Address |
| 684 | [Documentation] Verify VMI IPv6 address configurations. |
| 685 | [Arguments] ${ipv6_origin} ${interface}=${ethernet_interface} |
| 686 | |
| 687 | # Description of argument(s): |
| 688 | # ipv6_origin Origin of IPv6 address eg. Static or DHCPv6 or SLAAC. |
| 689 | # interface VMI interface (eg. eth0 or eth1). |
| 690 | |
| 691 | ${resp}= Redfish.Get /redfish/v1/Systems/hypervisor/EthernetInterfaces/${interface} |
| 692 | |
| 693 | @{vmi_ipv6_configurations}= Get From Dictionary ${resp.dict} IPv6Addresses |
| 694 | ${vmi_ipv6_config}= Get From List ${vmi_ipv6_configurations} 0 |
| 695 | Should Not Be Empty ${vmi_ipv6_config["Address"]} |
| 696 | Should Be Equal As Strings ${vmi_ipv6_config["AddressOrigin"]} ${ipv6_origin} |