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