Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 3 | Documentation Test OpenBMC GUI "Policies" sub-menu of "Security and Access" menu. |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 4 | |
| 5 | Resource ../../lib/gui_resource.robot |
meghagn | 56eba26 | 2021-09-16 07:05:52 -0500 | [diff] [blame] | 6 | Resource ../lib/ipmi_client.robot |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 7 | Resource ../lib/protocol_setting_utils.robot |
| 8 | Resource ../lib/common_utils.robot |
Priya Sinha | 9f3de2b | 2022-08-26 01:59:46 -0500 | [diff] [blame] | 9 | Suite Setup Run Keywords Launch Browser And Login GUI AND Redfish.Login |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 10 | Suite Teardown Close Browser |
| 11 | Test Setup Test Setup Execution |
| 12 | |
| 13 | |
| 14 | *** Variables *** |
rramyasr-in | 9e2c96f | 2023-01-24 07:59:34 -0600 | [diff] [blame] | 15 | |
| 16 | |
rramyasr-in | 3496062 | 2022-08-11 11:35:04 -0500 | [diff] [blame] | 17 | ${xpath_policies_heading} //h1[text()="Policies"] |
| 18 | ${xpath_bmc_ssh_toggle} //*[@data-test-id='policies-toggle-bmcShell'] |
| 19 | ... /following-sibling::label |
| 20 | ${xpath_network_ipmi_toggle} //*[@data-test-id='polices-toggle-networkIpmi'] |
| 21 | ... /following-sibling::label |
| 22 | ${xpath_host_tpm_toggle} //input[@id='host-tpm-policy'] |
| 23 | ${xpath_virtual_tpm_toggle} //*[@data-test-id='policies-toggle-vtpm'] |
| 24 | ${xpath_rtad_toggle} //*[@data-test-id='policies-toggle-rtad'] |
| 25 | ${xpath_usb_firmware_update_policy_toggle} //*[@data-test-id='policies-toggle-usbFirmwareUpdatePolicy'] |
| 26 | ${xpath_secure_version_lockin_toggle} //*[@data-test-id='policies-toggle-svle'] |
| 27 | ${xpath_host_usb_enablement_toggle} //*[@data-test-id='policies-toggle-hostUsb'] |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 28 | |
rramyasr-in | 9e2c96f | 2023-01-24 07:59:34 -0600 | [diff] [blame] | 29 | |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 30 | *** Test Cases *** |
| 31 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 32 | Verify Navigation To Policies Page |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 33 | [Documentation] Verify navigation to policies page. |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 34 | [Tags] Verify_Navigation_To_Policies_Page |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 35 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 36 | Page Should Contain Element ${xpath_policies_heading} |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 37 | |
| 38 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 39 | Verify Existence Of All Sections In Policies Page |
| 40 | [Documentation] Verify existence of all sections in policies page. |
| 41 | [Tags] Verify_Existence_Of_All_Sections_In_Policies_Page |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 42 | |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 43 | Page Should Contain BMC shell (via SSH) |
| 44 | Page Should Contain Network IPMI (out-of-band IPMI) |
rramyasr-in | 03f4237 | 2022-06-16 11:51:11 -0500 | [diff] [blame] | 45 | Page Should Contain Host TPM |
| 46 | Page Should Contain VirtualTPM |
| 47 | Page Should Contain RTAD |
| 48 | Page Should Contain USB firmware update policy |
| 49 | Page Should Contain Secure version lock-in |
| 50 | Page Should Contain Host USB enablement |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 51 | |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 52 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 53 | Verify Existence Of All Buttons In Policies Page |
| 54 | [Documentation] Verify existence of All Buttons in policies page. |
| 55 | [Tags] Verify_Existence_Of_All_Buttons_In_Policies_Page |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 56 | |
| 57 | Page Should Contain Element ${xpath_bmc_ssh_toggle} |
| 58 | Page Should Contain Element ${xpath_network_ipmi_toggle} |
rramyasr-in | 3496062 | 2022-08-11 11:35:04 -0500 | [diff] [blame] | 59 | Page Should Contain Element ${xpath_host_tpm_toggle} |
| 60 | Page Should Contain Element ${xpath_virtual_tpm_toggle} |
| 61 | Page Should Contain Element ${xpath_rtad_toggle} |
| 62 | Page Should Contain Element ${xpath_usb_firmware_update_policy_toggle} |
| 63 | Page Should Contain Element ${xpath_secure_version_lockin_toggle} |
| 64 | Page Should Contain Element ${xpath_host_usb_enablement_toggle} |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 65 | |
| 66 | |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 67 | Enable SSH Via GUI And Verify |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 68 | [Documentation] Login to GUI Policies page,enable SSH toggle and |
| 69 | ... verify that SSH to BMC starts working after enabling SSH. |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 70 | [Tags] Enable_SSH_Via_GUI_And_Verify |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 71 | |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 72 | Set Policy Via GUI SSH Enabled |
Priya Sinha | 9f3de2b | 2022-08-26 01:59:46 -0500 | [diff] [blame] | 73 | Wait Until Keyword Succeeds ${NETWORK_TIMEOUT} ${NETWORK_RETRY_TIME} Open Connection And Login |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 74 | |
| 75 | |
meghagn | 07db962 | 2021-09-13 07:22:28 -0500 | [diff] [blame] | 76 | Disable SSH Via GUI And Verify |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 77 | [Documentation] Login to GUI Policies page,disable SSH and |
| 78 | ... verify that SSH to BMC stops working after disabling SSH. |
meghagn | 07db962 | 2021-09-13 07:22:28 -0500 | [diff] [blame] | 79 | [Tags] Disable_SSH_Via_GUI_And_Verify |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 80 | [Teardown] Run Keywords Enable SSH Protocol ${True} AND |
Priya Sinha | 9f3de2b | 2022-08-26 01:59:46 -0500 | [diff] [blame] | 81 | ... Wait Until Keyword Succeeds 30 sec 15 sec Open Connection And Login |
meghagn | 07db962 | 2021-09-13 07:22:28 -0500 | [diff] [blame] | 82 | |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 83 | Set Policy Via GUI SSH Disabled |
meghagn | 07db962 | 2021-09-13 07:22:28 -0500 | [diff] [blame] | 84 | |
| 85 | ${status}= Run Keyword And Return Status |
| 86 | ... Open Connection And Login |
| 87 | |
| 88 | Should Be Equal As Strings ${status} False |
| 89 | ... msg=SSH login still working after disabling SSH. |
| 90 | |
| 91 | |
meghagn | 56eba26 | 2021-09-16 07:05:52 -0500 | [diff] [blame] | 92 | Disable IPMI Via GUI And Verify |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 93 | [Documentation] Login to GUI Policies page,disable IPMI and |
George Keishing | de7e045 | 2022-02-01 07:04:41 -0600 | [diff] [blame] | 94 | ... verify that IPMI command does not work after disabling IPMI. |
meghagn | 56eba26 | 2021-09-16 07:05:52 -0500 | [diff] [blame] | 95 | [Tags] Disable_IPMI_Via_GUI_And_Verify |
meghagn | 56eba26 | 2021-09-16 07:05:52 -0500 | [diff] [blame] | 96 | |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 97 | Set Policy Via GUI IPMI Disabled |
meghagn | 56eba26 | 2021-09-16 07:05:52 -0500 | [diff] [blame] | 98 | |
| 99 | ${status}= Run Keyword And Return Status |
George Keishing | 0d930e9 | 2023-01-25 13:19:37 -0600 | [diff] [blame] | 100 | ... Wait Until Keyword Succeeds ${NETWORK_TIMEOUT} ${NETWORK_RETRY_TIME} |
| 101 | ... Run IPMI Standard Command sel info |
meghagn | 56eba26 | 2021-09-16 07:05:52 -0500 | [diff] [blame] | 102 | |
| 103 | Should Be Equal As Strings ${status} False |
| 104 | ... msg=IPMI command is working after disabling IPMI. |
| 105 | |
| 106 | |
meghagn | b5c88b0 | 2021-09-14 00:32:27 -0500 | [diff] [blame] | 107 | Enable IPMI Via GUI And Verify |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 108 | [Documentation] Login to GUI Policies page,enable IPMI and |
| 109 | ... verify that IPMI command works after enabling IPMI. |
meghagn | b5c88b0 | 2021-09-14 00:32:27 -0500 | [diff] [blame] | 110 | [Tags] Enable_IPMI_Via_GUI_And_Verify |
meghagn | b5c88b0 | 2021-09-14 00:32:27 -0500 | [diff] [blame] | 111 | |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 112 | Set Policy Via GUI IPMI Enabled |
George Keishing | 0d930e9 | 2023-01-25 13:19:37 -0600 | [diff] [blame] | 113 | Wait Until Keyword Succeeds ${NETWORK_TIMEOUT} ${NETWORK_RETRY_TIME} |
| 114 | ... Run IPMI Standard Command sel info |
meghagn | b5c88b0 | 2021-09-14 00:32:27 -0500 | [diff] [blame] | 115 | |
| 116 | |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 117 | Enable SSH Via GUI And Verify Persistency On BMC Reboot |
| 118 | [Documentation] Login to GUI Policies page,enable SSH and |
| 119 | ... verify persistency of SSH connection on BMC reboot. |
| 120 | [Tags] Enable_SSH_Via_GUI_And_Verify_Persistency_On_BMC_Reboot |
| 121 | |
| 122 | Set Policy Via GUI SSH Enabled |
| 123 | |
| 124 | Reboot BMC via GUI |
| 125 | |
| 126 | Wait Until Keyword Succeeds 5 min 30 sec Open Connection And Login |
| 127 | |
| 128 | |
| 129 | Enable IPMI Via GUI And Verify Persistency On BMC Reboot |
| 130 | [Documentation] Login to GUI Policies page,enable IPMI and |
| 131 | ... verify persistency of IPMI command work on BMC reboot. |
| 132 | [Tags] Enable_IPMI_Via_GUI_And_Verify_Persistency_On_BMC_Reboot |
| 133 | |
| 134 | Set Policy Via GUI IPMI Enabled |
| 135 | |
| 136 | Reboot BMC via GUI |
| 137 | |
| 138 | Wait Until Keyword Succeeds 2 min 30 sec Run IPMI Standard Command sel info |
| 139 | |
| 140 | |
meghagn | 3fb3d1b | 2022-01-28 01:27:59 -0600 | [diff] [blame] | 141 | Disable SSH Via GUI And Verify Persistency On BMC Reboot |
| 142 | [Documentation] Login to GUI Policies page,disable SSH and |
| 143 | ... verify that SSH to BMC stops working after disabling SSH on BMC reboot. |
| 144 | [Tags] Disable_SSH_Via_GUI_And_Verify_Persistency_On_BMC_Reboot |
| 145 | [Teardown] Run Keywords Wait Until Keyword Succeeds 2 min 15 sec Enable SSH Protocol ${True} |
| 146 | ... AND Wait Until Keyword Succeeds 2 min 15 sec Open Connection And Login |
| 147 | |
| 148 | Set Policy Via GUI SSH Disabled |
| 149 | |
| 150 | Reboot BMC via GUI |
| 151 | |
| 152 | ${status}= Run Keyword And Return Status |
Priya Sinha | 9f3de2b | 2022-08-26 01:59:46 -0500 | [diff] [blame] | 153 | ... Wait Until Keyword Succeeds ${NETWORK_TIMEOUT} ${NETWORK_RETRY_TIME} Open Connection And Login |
meghagn | 3fb3d1b | 2022-01-28 01:27:59 -0600 | [diff] [blame] | 154 | |
| 155 | Should Be Equal As Strings ${status} False |
| 156 | ... msg=SSH login still working after disabling SSH. |
| 157 | |
| 158 | |
| 159 | Disable IPMI Via GUI And Verify Persistency On BMC Reboot |
| 160 | [Documentation] Login to GUI Policies page,disable IPMI and |
George Keishing | 86d85f4 | 2022-08-18 23:02:22 -0500 | [diff] [blame] | 161 | ... verify persistency of IPMI command does not work on BMC reboot. |
meghagn | 3fb3d1b | 2022-01-28 01:27:59 -0600 | [diff] [blame] | 162 | [Tags] Disable_IPMI_Via_GUI_And_Verify_Persistency_On_BMC_Reboot |
| 163 | [Teardown] Run Keywords Wait Until Keyword Succeeds 2 min 15 sec Enable IPMI Protocol ${True} |
| 164 | ... AND Wait Until Keyword Succeeds 2 min 15 sec Run IPMI Standard Command sel info |
| 165 | |
| 166 | Set Policy Via GUI IPMI Disabled |
| 167 | |
| 168 | Reboot BMC via GUI |
| 169 | |
| 170 | ${status}= Run Keyword And Return Status |
George Keishing | 0d930e9 | 2023-01-25 13:19:37 -0600 | [diff] [blame] | 171 | ... Wait Until Keyword Succeeds ${NETWORK_TIMEOUT} ${NETWORK_RETRY_TIME} |
| 172 | ... Run IPMI Standard Command sel info |
meghagn | 3fb3d1b | 2022-01-28 01:27:59 -0600 | [diff] [blame] | 173 | |
| 174 | Should Be Equal As Strings ${status} False |
| 175 | ... msg=IPMI command is working after disabling IPMI. |
| 176 | |
| 177 | |
Megha G N | 212f0cf | 2022-11-22 00:55:49 -0600 | [diff] [blame] | 178 | Configure SSH And IPMI Settings Via GUI And Verify |
| 179 | [Documentation] Login to GUI Policies page,set SSH and IPMI toggle and |
| 180 | ... verify SSH & IPMI after the settings. |
| 181 | [Tags] Configure_SSH_And_IPMI_Settings_Via_GUI_And_Verify |
| 182 | [Setup] Fetch IPMI And SSH Settings |
| 183 | [Template] Set SSH And IPMI State Via GUI |
| 184 | [Teardown] Set SSH And IPMI State Via GUI ${initial_ssh_setting} ${initial_ipmi_setting} |
| 185 | |
| 186 | # ssh_state ipmi_state |
| 187 | Enabled Enabled |
| 188 | Disabled Disabled |
| 189 | Enabled Disabled |
| 190 | Disabled Enabled |
| 191 | |
| 192 | |
Megha G N | 50eaf4e | 2023-01-18 01:28:24 -0600 | [diff] [blame] | 193 | Configure SSH And IPMI Settings Via GUI And Verify Its Persistency |
| 194 | [Documentation] Login to GUI Policies page,set SSH and IPMI toggle and |
| 195 | ... verify SSH & IPMI settings after BMC reboot. |
| 196 | [Tags] Configure_SSH_And_IPMI_Settings_Via_GUI_And_Verify_Its_Persistency |
| 197 | [Setup] Fetch IPMI And SSH Settings |
| 198 | [Template] Set SSH And IPMI State Via GUI |
| 199 | [Teardown] Set SSH And IPMI State Via GUI ${initial_ssh_setting} ${initial_ipmi_setting} |
| 200 | |
| 201 | # ssh_state ipmi_state persistency_check |
| 202 | Enabled Enabled True |
| 203 | Disabled Disabled True |
| 204 | Enabled Disabled True |
| 205 | Disabled Enabled True |
| 206 | |
| 207 | |
Ashwini Chandrappa | fdfd7e3 | 2021-08-02 07:59:11 -0500 | [diff] [blame] | 208 | *** Keywords *** |
| 209 | |
| 210 | Test Setup Execution |
| 211 | [Documentation] Do test case setup tasks. |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 212 | |
Megha G N | 212f0cf | 2022-11-22 00:55:49 -0600 | [diff] [blame] | 213 | Wait Until Keyword Succeeds 30 sec 15 sec Click Element ${xpath_secuity_and_accesss_menu} |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 214 | Click Element ${xpath_policies_sub_menu} |
Priya Sinha | 9f3de2b | 2022-08-26 01:59:46 -0500 | [diff] [blame] | 215 | Wait Until Keyword Succeeds 30 sec 15 sec Location Should Contain policies |
Megha G N | 42d5cc9 | 2023-02-15 03:55:40 -0600 | [diff] [blame] | 216 | Wait Until Element Is Not Visible ${xpath_page_loading_progress_bar} timeout=1min |
meghagn12345 | f942dae | 2021-08-27 02:53:00 -0500 | [diff] [blame] | 217 | |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 218 | Set Policy Via GUI |
| 219 | |
| 220 | [Documentation] Login to GUI Policies page and set policy. |
| 221 | [Arguments] ${policy} ${state} |
| 222 | |
| 223 | # Description of argument(s): |
| 224 | # policy policy to be set(e.g. SSH, IPMI). |
| 225 | # state state to be set(e.g. Enable, Disable). |
| 226 | |
| 227 | ${opposite_state_gui} ${opposite_state_redfish}= Run Keyword If |
| 228 | ... '${state}' == 'Enabled' Set Variable Disabled ${False} |
| 229 | ... ELSE IF '${state}' == 'Disabled' Set Variable Enabled ${True} |
| 230 | |
| 231 | # Setting policy to an opposite value via Redfish. |
| 232 | Run Keyword If '${policy}' == 'SSH' |
| 233 | ... Enable SSH Protocol ${opposite_state_redfish} |
| 234 | ... ELSE IF '${policy}' == 'IPMI' |
| 235 | ... Enable IPMI Protocol ${opposite_state_redfish} |
| 236 | |
| 237 | ${policy_toggle_button}= Run Keyword If '${policy}' == 'SSH' |
| 238 | ... Set variable ${xpath_bmc_ssh_toggle} |
| 239 | ... ELSE IF '${policy}' == 'IPMI' |
| 240 | ... Set variable ${xpath_network_ipmi_toggle} |
| 241 | |
| 242 | Wait Until Keyword Succeeds 1 min 30 sec |
| 243 | ... Refresh GUI And Verify Element Value ${policy_toggle_button} ${opposite_state_gui} |
| 244 | Click Element ${policy_toggle_button} |
| 245 | |
| 246 | # Wait for GUI to reflect policy status. |
| 247 | Wait Until Keyword Succeeds 1 min 30 sec |
| 248 | ... Refresh GUI And Verify Element Value ${policy_toggle_button} ${state} |
Megha G N | 212f0cf | 2022-11-22 00:55:49 -0600 | [diff] [blame] | 249 | |
| 250 | |
| 251 | Verify Policy State |
| 252 | [Documentation] Verify if the current SSH and IPMI setting matches with |
| 253 | ... given values. |
| 254 | |
| 255 | # Verify SSH state value. |
| 256 | ${status}= Run Keyword And Return Status |
| 257 | ... Open Connection And Login |
| 258 | |
| 259 | Run Keyword If '${status}' == 'True' |
| 260 | ... Element Text Should Be ${xpath_bmc_ssh_toggle} Enabled |
| 261 | ... ELSE IF '${status}' == 'False' |
| 262 | ... Element Text Should Be ${xpath_bmc_ssh_toggle} Disabled |
| 263 | |
| 264 | # Verify IPMI state value. |
| 265 | ${status}= Run Keyword And Return Status |
George Keishing | 0d930e9 | 2023-01-25 13:19:37 -0600 | [diff] [blame] | 266 | ... Wait Until Keyword Succeeds ${NETWORK_TIMEOUT} ${NETWORK_RETRY_TIME} |
| 267 | ... Run IPMI Standard Command sel info |
Megha G N | 212f0cf | 2022-11-22 00:55:49 -0600 | [diff] [blame] | 268 | |
| 269 | Run Keyword If '${status}' == 'True' |
| 270 | ... Element Text Should Be ${xpath_network_ipmi_toggle} Enabled |
| 271 | ... ELSE IF '${status}' == 'False' |
| 272 | ... Element Text Should Be ${xpath_network_ipmi_toggle} Disabled |
| 273 | |
| 274 | |
| 275 | Set SSH And IPMI State Via GUI |
| 276 | [Documentation] Set SSH and IPMI states via GUI. |
Megha G N | 42d5cc9 | 2023-02-15 03:55:40 -0600 | [diff] [blame] | 277 | [Arguments] ${ssh_state} ${ipmi_state} ${persistency_check}=${False} |
Megha G N | 212f0cf | 2022-11-22 00:55:49 -0600 | [diff] [blame] | 278 | |
| 279 | # Description of argument(s): |
| 280 | # ssh_state State of SSH to be set (e.g. Enabled, Disabled). |
George Keishing | a87ee1e | 2023-01-11 22:55:45 -0600 | [diff] [blame] | 281 | # ipmi_state State of IPMI to be set (e.g. Enabled, Disabled). |
Megha G N | 212f0cf | 2022-11-22 00:55:49 -0600 | [diff] [blame] | 282 | |
| 283 | ${current_ssh_state}= Get Text ${xpath_bmc_ssh_toggle} |
| 284 | |
| 285 | Run Keyword If '${ssh_state}' == '${current_ssh_state}' |
| 286 | # When SSH state is already set to given value, click SSH toggle |
| 287 | # button twice to reset SSH value back to its original value. |
| 288 | ... Run Keywords Click Element ${xpath_bmc_ssh_toggle} |
| 289 | ... AND Click Element ${xpath_bmc_ssh_toggle} |
| 290 | ... ELSE IF '${ssh_state}' != '${current_ssh_state}' |
| 291 | ... Click Element ${xpath_bmc_ssh_toggle} |
| 292 | |
| 293 | ${current_ipmi_state}= Get Text ${xpath_network_ipmi_toggle} |
| 294 | |
| 295 | Run Keyword If '${ipmi_state}' == '${current_ipmi_state}' |
| 296 | # When IPMI state is already set to given value, click IPMI toggle |
| 297 | # button twice to reset IPMI value back to its original value. |
| 298 | ... Run Keywords Click Element ${xpath_network_ipmi_toggle} |
| 299 | ... AND Click Element ${xpath_network_ipmi_toggle} |
| 300 | ... ELSE IF '${ipmi_state}' != '${current_ipmi_state}' |
| 301 | ... Click Element ${xpath_network_ipmi_toggle} |
| 302 | |
Megha G N | 50eaf4e | 2023-01-18 01:28:24 -0600 | [diff] [blame] | 303 | Run Keyword If ${persistency_check} == ${True} |
| 304 | ... Run Keywords Reboot BMC via GUI AND Test Setup Execution |
| 305 | |
Megha G N | e149912 | 2023-01-25 00:41:02 -0600 | [diff] [blame] | 306 | Wait Until Keyword Succeeds 30 sec 15 sec Verify Policy State |
Megha G N | 212f0cf | 2022-11-22 00:55:49 -0600 | [diff] [blame] | 307 | |
| 308 | |
| 309 | Fetch IPMI And SSH Settings |
| 310 | [Documentation] Note down the initial states of SSH and IPMI. |
| 311 | |
| 312 | Test Setup Execution |
| 313 | ${initial_ssh_setting}= Get Text ${xpath_bmc_ssh_toggle} |
| 314 | Set Suite Variable ${initial_ssh_setting} |
| 315 | ${initial_ipmi_setting}= Get Text ${xpath_network_ipmi_toggle} |
| 316 | Set Suite Variable ${initial_ipmi_setting} |