Revert "Renamed some files of GUI test suite to have consistency"
GUI re-structuring gone wrong
This reverts commit 66c2f33f3d951c6d356404648058db3082a5e441.
Reason for revert: <INSERT REASONING HERE>
Change-Id: I503e4890a57d92f8cf404b0f5eec3c25a1d0762e
diff --git a/gui/gui_test/access_control/test_certificate_sub_menu.robot b/gui/gui_test/access_control/test_certificate_sub_menu.robot
deleted file mode 100644
index 2ba9186..0000000
--- a/gui/gui_test/access_control/test_certificate_sub_menu.robot
+++ /dev/null
@@ -1,152 +0,0 @@
-*** Settings ***
-
-Documentation Test OpenBMC GUI "SSL Certificates" sub-menu of "Access control".
-
-Resource ../../lib/gui_resource.robot
-Resource ../../../lib/certificate_utils.robot
-
-Suite Setup Suite Setup Execution
-Suite Teardown Close Browser
-Test Setup Test Setup Execution
-
-
-*** Variables ***
-
-${xpath_certificate_heading} //h1[text()="SSL certificates"]
-${xpath_add_certificate_button} //button[contains(text(),"Add new certificate")]
-${xpath_generate_csr_button} //*[@data-test-id='sslCertificates-button-generateCsr']
-${xpath_generate_csr_heading} //h5[contains(text(), "Generate a Certificate Signing Request")]
-${xpath_select_certificate_type} //*[@data-test-id='modalGenerateCsr-select-certificateType']
-${xpath_select_country} //*[@data-test-id='modalGenerateCsr-select-country']
-${xpath_input_state} //*[@data-test-id='modalGenerateCsr-input-state']
-${xpath_input_city} //*[@data-test-id='modalGenerateCsr-input-city']
-${xpath_input_company_name} //*[@data-test-id='modalGenerateCsr-input-companyName']
-${xpath_input_company_unit} //*[@data-test-id='modalGenerateCsr-input-companyUnit']
-${xpath_input_common_name} //*[@data-test-id='modalGenerateCsr-input-commonName']
-${xpath_input_challenge_password} //*[@data-test-id='modalGenerateCsr-input-challengePassword']
-${xpath_input_contact_person} //*[@data-test-id='modalGenerateCsr-input-contactPerson']
-${xpath_input_email_address} //*[@data-test-id='modalGenerateCsr-input-emailAddress']
-${xpath_generate_csr_submit} //*[@data-test-id='modalGenerateCsr-button-ok']
-${xpath_csr_cancel_button} //button[contains(text(),"Cancel")]
-${xpath_input_alternate_name} //input[@id='alternate-name']
-${xpath_select_algorithm_button} //*[@data-test-id='modalGenerateCsr-select-keyPairAlgorithm']
-
-*** Test Cases ***
-
-Verify Navigation To SSL Certificate Page
- [Documentation] Verify navigation to SSL certificate page.
- [Tags] Verify_Navigation_To_SSL_Certificate_Page
-
- Page Should Contain Element ${xpath_certificate_heading}
-
-
-Verify Existence Of All Sections In Certificate Page
- [Documentation] Verify existence of all sections in certificate page.
- [Tags] Verify_Existence_Of_All_Sections_In_Certificate_Page
-
- Page should contain Certificate
- Page should contain Valid from
- Page should contain Valid until
-
-
-Verify Existence Of Add Certificate Button
- [Documentation] Verify existence of add certificate button.
- [Tags] Verify_Existence_Of_Add_Certificate_Button
-
- Page Should Contain Element ${xpath_add_certificate_button}
-
-Verify Generate CSR Certificate Button
- [Documentation] Verify existence of all the fields of CSR generation.
- [Tags] Verify_Generate_CSR_Certificate_Button
- [Teardown] Click Element ${xpath_csr_cancel_button}
-
- Page Should Contain Element ${xpath_generate_csr_button}
- Click Element ${xpath_generate_csr_button}
- Wait Until Page Contains Element ${xpath_generate_csr_heading}
- Page Should Contain Element ${xpath_select_certificate_type}
- Page Should Contain Element ${xpath_select_country}
- Page Should Contain Element ${xpath_input_state}
- Page Should Contain Element ${xpath_input_city}
- Page Should Contain Element ${xpath_input_company_name}
- Page Should Contain Element ${xpath_input_common_name}
- Page Should Contain Element ${xpath_input_challenge_password}
- Page Should Contain Element ${xpath_input_contact_person}
- Page Should Contain Element ${xpath_input_email_address}
- Page Should Contain Element ${xpath_input_alternate_name}
- Page Should Contain Element ${xpath_select_algorithm_button}
- Page Should Contain Element ${xpath_generate_csr_submit}
-
-
-Verify Installed CA Certificate
- [Documentation] Install CA certificate and verify the same via GUI.
- [Tags] Verify_Installed_CA_Certificate
-
- Delete All CA Certificate Via Redfish
-
- # Install CA certificate via Redfish.
- ${file_data}= Generate Certificate File Data CA
- Install Certificate File On BMC ${REDFISH_CA_CERTIFICATE_URI} ok data=${file_data}
-
- # Verify CA certificate availability in GUI.
- Wait Until Page Contains CA Certificate timeout=10
-
-
-Verify Installed HTTPS Certificate
- [Documentation] Install HTTPS certificate via Redfish and verify it in GUI.
- [Tags] Verify_Installed_HTTPS_Certificate
-
- # Install HTTPS certificate.
- ${file_data}= Generate Certificate File Data Server
- Install Certificate File On BMC ${REDFISH_HTTPS_CERTIFICATE_URI} ok data=${file_data}
-
- # Verify certificate is available in GUI.
- Wait Until Page Contains HTTPS Certificate timeout=10
-
-
-Verify Installed LDAP Certificate
- [Documentation] Install LDAP certificate via Redfish and verify it in GUI.
- [Tags] Verify_Installed_LDAP_Certificate
-
- Delete Certificate Via BMC CLI Client
-
- # Install LDAP certificate.
- ${file_data}= Generate Certificate File Data Client
- Install Certificate File On BMC ${REDFISH_LDAP_CERTIFICATE_URI} ok data=${file_data}
-
- # Verify certificate is available in GUI.
- Wait Until Page Contains LDAP Certificate timeout=10
-
-
-*** Keywords ***
-
-Generate Certificate File Data
- [Documentation] Generate data of certificate file.
-
- [Arguments] ${cert_type}
-
- # Description of Arguments(s):
- # cert_type Certificate type (e.g. "Client" or "CA").
-
- ${cert_file_path}= Run Keyword If '${cert_type}' == 'Client' or 'Server'
- ... Generate Certificate File Via Openssl Valid Certificate Valid Privatekey
- ... ELSE IF '${cert_type}' == 'CA'
- ... Generate Certificate File Via Openssl Valid Certificate
- ${bytes}= OperatingSystem.Get Binary File ${cert_file_path}
- ${file_data}= Decode Bytes To String ${bytes} UTF-8
-
- [return] ${file_data}
-
-
-Test Setup Execution
- [Documentation] Do test case setup tasks.
-
- Click Element ${xpath_access_control_menu}
- Click Element ${xpath_ssl_certificates_sub_menu}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain ssl-certificates
-
-
-Suite Setup Execution
- [Documentation] Do test case suite setup tasks.
-
- Launch Browser And Login GUI
- Create Directory certificate_dir
diff --git a/gui/gui_test/access_control/test_client_sessions_sub_menu.robot b/gui/gui_test/access_control/test_client_sessions_sub_menu.robot
deleted file mode 100644
index db9b7fb..0000000
--- a/gui/gui_test/access_control/test_client_sessions_sub_menu.robot
+++ /dev/null
@@ -1,33 +0,0 @@
-*** Settings ***
-
-Documentation Test OpenBMC GUI "Client sessions" sub-menu of "Access Control" menu.
-
-Resource ../../lib/gui_resource.robot
-
-Suite Setup Launch Browser And Login GUI
-Suite Teardown Close Browser
-Test Setup Test Setup Execution
-
-
-*** Variables ***
-
-${xpath_client_sessions_heading} //h1[text()="Client sessions"]
-
-
-*** Test Cases ***
-
-Verify Navigation To Client Sessions Page
- [Documentation] Verify navigation to client sessions page.
- [Tags] Verify_Navigation_To_Client_Sessions_Page
-
- Page Should Contain Element ${xpath_client_sessions_heading}
-
-
-*** Keywords ***
-
-Test Setup Execution
- [Documentation] Do test case setup tasks.
-
- Click Element ${xpath_access_control_menu}
- Click Element ${xpath_client_sessions_sub_menu}
- Wait Until Keyword Succeeds 30 sec 5 sec Location Should Contain client-sessions
diff --git a/gui/gui_test/access_control/test_ldap_sub_menu.robot b/gui/gui_test/access_control/test_ldap_sub_menu.robot
deleted file mode 100644
index e298b16..0000000
--- a/gui/gui_test/access_control/test_ldap_sub_menu.robot
+++ /dev/null
@@ -1,351 +0,0 @@
-*** Settings ***
-
-Documentation Test OpenBMC GUI "LDAP" sub-menu of "Access control".
-
-Resource ../../lib/gui_resource.robot
-Resource ../../../lib/bmc_ldap_utils.robot
-
-Suite Setup Suite Setup Execution
-Suite Teardown Close Browser
-
-
-*** Variables ***
-
-${xpath_ldap_heading} //h1[text()="LDAP"]
-${xpath_enable_ldap_checkbox} //*[@data-test-id='ldap-checkbox-ldapAuthenticationEnabled']
-${xpath_secure_ldap_checkbox} //*[@data-test-id='ldap-checkbox-secureLdapEnabled']
-${xpath_service_radio_button} //*[@data-test-id="ldap-radio-activeDirectoryEnabled"]
-${xpath_add_role_group_button} //button[contains(text(),'Add role group')]
-${xpath_ldap_url} //*[@data-test-id='ldap-input-serverUri']
-${xpath_ldap_bind_dn} //*[@data-test-id='ldap-input-bindDn']
-${xpath_ldap_password} //*[@id='bind-password']
-${xpath_ldap_base_dn} //*[@data-test-id='ldap-input-baseDn']
-${xpath_ldap_save_settings} //*[@data-test-id='ldap-button-saveSettings']
-${xpath_select_refresh_button} //*[text()[contains(.,"Refresh")]]
-${xpath_add_group_name} //*[@id="role-group-name"]
-${xpath_add_group_Privilege} //*[@id="privilege"]
-${xpath_add_privilege_button} //button[text()=" Add "]
-${xpath_delete_group_button} //*[@title="Delete"]
-${xpath_delete_button} //button[text()="Delete"]
-
-
-${incorrect_ip} 1.2.3.4
-
-*** Test Cases ***
-
-Verify Navigation To LDAP Page
- [Documentation] Verify navigation to LDAP page.
- [Tags] Verify_Navigation_To_LDAP_Page
-
- Page Should Contain Element ${xpath_ldap_heading}
-
-
-Verify Existence Of All Sections In LDAP Page
- [Documentation] Verify existence of all sections in LDAP page.
- [Tags] Verify_Existence_Of_All_Sections_In_LDAP_Page
-
- Page Should Contain Settings
- Page Should Contain Role groups
-
-
-Verify Existence Of All Buttons In LDAP Page
- [Documentation] Verify existence of all buttons in LDAP page.
- [Tags] Verify_Existence_Of_All_Buttons_In_LDAP_Page
-
- # Buttons under settings section.
- Page Should Contain Element ${xpath_service_radio_button}
- Page Should Contain Element ${xpath_save_settings_button}
-
- # Buttons under role groups section.
- Page Should Contain Element ${xpath_add_role_group_button}
-
-
-Verify Existence Of All Checkboxes In LDAP Page
- [Documentation] Verify existence of all checkboxes in LDAP page.
- [Tags] Verify_Existence_Of_All_Checkboxes_In_LDAP_Page
-
- # Checkboxes under settings section.
- Page Should Contain Element ${xpath_enable_ldap_checkbox}
- Page Should Contain Element ${xpath_secure_ldap_checkbox}
-
-
-Verify LDAP Configurations Editable
- [Documentation] Verify LDAP configurations are editable.
- [Tags] Verify_LDAP_Configurations_Editable
-
- Create LDAP Configuration ${LDAP_SERVER_URI} ${LDAP_TYPE} ${LDAP_BIND_DN}
- ... ${LDAP_BIND_DN_PASSWORD} ${LDAP_BASE_DN}
- Wait Until Page Contains Element ${xpath_ldap_url}
- Textfield Value Should Be ${xpath_ldap_url} ${LDAP_SERVER_URI}
- Textfield Value Should Be ${xpath_ldap_bind_dn} ${LDAP_BIND_DN}
- Textfield Value Should Be ${xpath_ldap_password} ${empty}
- Textfield Value Should Be ${xpath_ldap_base_dn} ${LDAP_BASE_DN}
-
-
-Verify Create LDAP Configuration
- [Documentation] Verify created LDAP configuration.
- [Tags] Verify_Created_LDAP_Configuration
- [Teardown] Run Keywords Redfish.Logout AND Redfish.Login
-
- Create LDAP Configuration
- Get LDAP Configuration ${LDAP_TYPE}
- Redfish.Logout
- Redfish.Login ${LDAP_USER} ${LDAP_USER_PASSWORD}
-
-
-Verify LDAP Config Update With Incorrect LDAP IP Address
- [Documentation] Verify that LDAP login fails with incorrect LDAP IP Address.
- [Tags] Verify_LDAP_Config_Update_With_Incorrect_LDAP_IP_Address
- [Teardown] Run Keywords Redfish.Logout AND Redfish.Login
-
- Create LDAP Configuration ${incorrect_ip} ${LDAP_TYPE} ${LDAP_BIND_DN}
- ... ${LDAP_BIND_DN_PASSWORD} ${LDAP_BASE_DN} ${LDAP_MODE}
-
- Get LDAP Configuration ${LDAP_TYPE}
- Redfish.Logout
-
- ${resp}= Run Keyword And Return Status
- ... Redfish.Login ${LDAP_USER} ${LDAP_USER_PASSWORD}
- Should Be Equal ${resp} ${False}
- ... msg=LDAP user was able to login though the incorrect LDAP IP Address.
-
-
-Verify LDAP Service Disable
- [Documentation] Verify that LDAP user cannot login when LDAP service is disabled.
- [Tags] Verify_LDAP_Service_Disable
- [Teardown] Run Keywords Redfish.Logout AND Redfish.Login
-
- ${status}= Run Keyword And Return Status
- ... Checkbox Should Be Selected ${xpath_enable_ldap_checkbox}
-
- Run Keyword If ${status} == ${True}
- ... Click Element At Coordinates ${xpath_enable_ldap_checkbox} 0 0
-
- Checkbox Should Not Be Selected ${xpath_enable_ldap_checkbox}
- Click Element ${xpath_ldap_save_settings}
- Wait Until Page Contains Successfully saved Open LDAP settings
- Click Element ${xpath_refresh_button}
- Wait Until Page Contains Element ${xpath_ldap_heading}
- Redfish.Logout
-
- ${resp}= Run Keyword And Return Status
- ... Redfish.Login ${LDAP_USER} ${LDAP_USER_PASSWORD}
- Should Be Equal ${resp} ${False}
- ... msg=LDAP user was able to login even though the LDAP service was disabled.
-
-
-Verify LDAP User With Admin Privilege
- [Documentation] Verify that LDAP user with administrator privilege is able to do BMC reboot.
- [Tags] Verify_LDAP_User_With_Admin_Privilege
- [Teardown] Run Keywords Redfish.Login AND Delete LDAP Role Group ${GROUP_NAME}
-
- Update LDAP Configuration with LDAP User Role And Group ${GROUP_NAME} ${GROUP_PRIVILEGE}
- Redfish.Login ${LDAP_USER} ${LDAP_USER_PASSWORD}
- Redfish OBMC Reboot (off)
- Redfish.Logout
-
-
-Verify Enabling LDAP
- [Documentation] Verify that LDAP can be enabled from disabled state.
- [Tags] Verify_Enabling_LDAP
-
- Disable LDAP Configuration
- Create LDAP Configuration
-
-
-Read Network Configuration Via Different User Roles And Verify Using GUI
- [Documentation] Read network configuration via different user roles and verify.
- [Tags] Read_Network_Configuration_Via_Different_User_Roles_And_Verify_Using_GUI
- [Template] Update LDAP User Role And Read Network Configuration Via GUI
-
- # group_name user_role valid_status_code
- ${GROUP_NAME} Administrator ${HTTP_OK}
- ${GROUP_NAME} Operator ${HTTP_OK}
- ${GROUP_NAME} ReadOnly ${HTTP_OK}
- ${GROUP_NAME} NoAccess ${HTTP_FORBIDDEN}
-
-
-*** Keywords ***
-
-Suite Setup Execution
- [Documentation] Do test case setup tasks.
-
- Launch Browser And Login GUI
-
- # Navigate to https://xx.xx.xx.xx/#/access-control/ldap LDAP page.
- Click Element ${xpath_access_control_menu}
- Click Element ${xpath_ldap_sub_menu}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain ldap
- Element Should Be Enabled ${xpath_enable_ldap_checkbox}
-
- Valid Value LDAP_TYPE valid_values=["ActiveDirectory", "LDAP"]
- Valid Value LDAP_USER
- Valid Value LDAP_USER_PASSWORD
- Valid Value GROUP_PRIVILEGE
- Valid Value GROUP_NAME
- Valid Value LDAP_SERVER_URI
- Valid Value LDAP_BIND_DN_PASSWORD
- Valid Value LDAP_BIND_DN
- Valid Value LDAP_BASE_DN
- Valid Value LDAP_MODE valid_values=["secure", "nonsecure"]
-
-
-Create LDAP Configuration
- [Documentation] Create LDAP configuration.
- [Arguments] ${ldap_server_uri}=${LDAP_SERVER_URI} ${ldap_servicetype}=${LDAP_TYPE}
- ... ${ldap_bind_dn}=${LDAP_BIND_DN} ${ldap_bind_dn_password}=${LDAP_BIND_DN_PASSWORD}
- ... ${ldap_base_dn}=${LDAP_BASE_DN} ${ldap_mode}=${LDAP_MODE}
-
- # Description of argument(s):
- # ldap_server_uri LDAP server uri (e.g. ldap://XX.XX.XX.XX).
- # ldap_type The LDAP type ("ActiveDirectory" or "LDAP").
- # ldap_bind_dn The LDAP bind distinguished name.
- # ldap_bind_dn_password The LDAP bind distinguished name password.
- # ldap_base_dn The LDAP base distinguished name.
-
- Select Checkbox ${xpath_enable_ldap_checkbox}
- Checkbox Should Be Selected ${xpath_enable_ldap_checkbox}
- ${radio_buttons}= Get WebElements ${xpath_service_radio_button}
-
- Run Keyword If '${ldap_service_type}' == 'LDAP'
- ... Click Element At Coordinates ${radio_buttons}[${0}] 0 0
- ... ELSE Click Element At Coordinates ${radio_buttons}[${1}] 0 0
-
- Wait Until Page Contains Element ${xpath_ldap_url}
- Run Keyword If '${ldap_mode}' == 'secure'
- ... Click Element At Coordinates ${xpath_secure_ldap_checkbox} 0 0
- ... ELSE Unselect Checkbox ${xpath_secure_ldap_checkbox}
-
- Input Text ${xpath_ldap_url} ${ldap_server_uri}
- Input Text ${xpath_ldap_bind_dn} ${ldap_bind_dn}
- Input Text ${xpath_ldap_password} ${ldap_bind_dn_password}
- Input Text ${xpath_ldap_base_dn} ${ldap_base_dn}
- Click Element ${xpath_ldap_save_settings}
-
- Run Keyword If '${ldap_service_type}'=='LDAP'
- ... Wait Until Page Contains Successfully saved Open LDAP settings
- ... ELSE
- ... Wait Until Page Contains Successfully saved Active Directory settings
-
- Click Element ${xpath_refresh_button}
- Wait Until Page Contains Element ${xpath_ldap_heading}
-
-
-Get LDAP Configuration
- [Documentation] Retrieve LDAP Configuration.
- [Arguments] ${ldap_type}
-
- # Description of argument(s):
- # ldap_type The LDAP type ("ActiveDirectory" or "LDAP").
-
- ${radio_buttons}= Get WebElements ${xpath_service_radio_button}
-
- ${status}= Run Keyword And Return Status
- ... Run Keyword If '${ldap_type}'=='LDAP'
- ... Checkbox Should Be Selected ${radio_buttons}[${0}]
- ... ELSE
- ... Checkbox Should Be Selected ${radio_buttons}[${1}]
- Should Be Equal ${status} ${True}
-
-
-Update LDAP Configuration With LDAP User Role And Group
- [Documentation] Update LDAP configuration update with LDAP user role and group.
- [Arguments] ${group_name} ${group_privilege}
-
- # Description of argument(s):
- # group_name The group name of LDAP user.
- # group_privilege The group privilege for LDAP user
- # (e.g. "Administrator", "Operator", "ReadOnly" or "NoAcccess").
-
- Create LDAP Configuration
- Click Element ${xpath_add_role_group_button}
- Input Text ${xpath_add_group_name} ${group_name}
- Select From List By Value ${xpath_add_group_Privilege} ${group_privilege}
- Click Element ${xpath_add_privilege_button}
-
- # Verify group name after adding.
- ${ldap_group_name}= Get LDAP Privilege And Group Name Via Redfish
- List Should Contain Value ${ldap_group_name} ${group_name}
-
-
-Delete LDAP Role Group
- [Documentation] Delete LDAP role group.
- [Arguments] ${group_name}
-
- # Description of argument(s):
- # group_name The group name of LDAP user.
-
- # Verify given group name is exist before deleting.
- ${ldap_group_name}= Get LDAP Privilege And Group Name Via Redfish
- List Should Contain Value ${ldap_group_name} ${group_name} msg=${group_name} not available.
-
- ${get_groupname_index}= Get Index From List ${ldap_group_name} ${group_name}
- ${delete_group_elements}= Get WebElements ${xpath_delete_group_button}
- Click Element ${delete_group_elements}[${get_groupname_index}]
- Click Element ${xpath_delete_button}
-
- # Verify group name after deleting.
- ${ldap_group_name}= Get LDAP Privilege And Group Name Via Redfish
- List Should Not Contain Value ${ldap_group_name} ${group_name} msg=${group_name} not available.
-
-
-Disable LDAP Configuration
- [Documentation] Disable LDAP configuration on BMC.
-
- ${status}= Run Keyword And Return Status
- ... Checkbox Should Be Selected ${xpath_enable_ldap_checkbox}
-
- Run Keyword If ${status} == ${True}
- ... Click Element At Coordinates ${xpath_enable_ldap_checkbox} 0 0
-
- Checkbox Should Not Be Selected ${xpath_enable_ldap_checkbox}
- Click Element ${xpath_ldap_save_settings}
- Wait Until Page Contains Successfully saved Open LDAP settings
- Click Element ${xpath_refresh_button}
- Wait Until Page Contains Element ${xpath_ldap_heading}
-
-
-Login BMC And Navigate To LDAP Page
- [Documentation] Login BMC and navigate to ldap page.
- [Arguments] ${username}=${OPENBMC_USERNAME} ${password}=${OPENBMC_PASSWORD}
-
- # Description of argument(s):
- # username The username to be used for login.
- # password The password to be used for login.
-
- Login GUI ${username} ${password}
- # Navigate to https://xx.xx.xx.xx/#/access-control/ldap LDAP page.
- Click Element ${xpath_access_control_menu}
- Click Element ${xpath_ldap_sub_menu}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain ldap
-
-
-Update LDAP User Role And Read Network Configuration Via GUI
- [Documentation] Update LDAP user role and read network configuration via GUI.
- [Arguments] ${group_name} ${user_role} ${valid_status_codes}
- [Teardown] Run Keywords Logout GUI AND Login BMC And Navigate To LDAP Page
- ... AND Delete LDAP Role Group ${group_name}
-
- # Description of argument(s):
- # group_privilege The group privilege ("Administrator", "Operator", "ReadOnly" or "NoAccess").
- # group_name The group name of user.
- # valid_status_code The expected valid status code.
-
-
- Update LDAP Configuration with LDAP User Role And Group ${group_name} ${user_role}
- Logout GUI
- Login GUI ${LDAP_USER} ${LDAP_USER_PASSWORD}
- Redfish.Login ${LDAP_USER} ${LDAP_USER_PASSWORD}
-
- Click Element ${xpath_server_configuration}
- Click Element ${xpath_select_network_settings}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network-settings
-
- ${resp}= Redfish.Get ${REDFISH_NW_ETH0_URI} valid_status_codes=[${valid_status_codes}]
- Return From Keyword If ${valid_status_codes} == ${HTTP_FORBIDDEN}
-
- ${host_name}= Redfish.Get Attribute ${REDFISH_NW_PROTOCOL_URI} HostName
- Textfield Value Should Be ${xpath_hostname_input} ${host_name}
-
- ${mac_address}= Redfish.Get Attribute ${REDFISH_NW_ETH0_URI} MACAddress
- Textfield Value Should Be ${xpath_mac_address_input} ${mac_address}
diff --git a/gui/gui_test/access_control/test_local_user_sub_menu.robot b/gui/gui_test/access_control/test_local_user_sub_menu.robot
deleted file mode 100644
index 4e849f7..0000000
--- a/gui/gui_test/access_control/test_local_user_sub_menu.robot
+++ /dev/null
@@ -1,168 +0,0 @@
-*** Settings ***
-
-Documentation Test OpenBMC GUI "Local user management" sub-menu of "Access control".
-
-Resource ../../lib/gui_resource.robot
-
-Suite Setup Launch Browser And Login GUI
-Suite Teardown Close Browser
-Test Setup Test Setup Execution
-
-
-*** Variables ***
-${xpath_local_user_management_heading } //h1[text()="Local user management"]
-${xpath_select_user} //input[contains(@class,"custom-control-input")]
-${xpath_account_policy} //button[contains(text(),'Account policy settings')]
-${xpath_add_user} //button[contains(text(),'Add user')]
-${xpath_edit_user} //*[@data-test-id='localUserManagement-tableRowAction-edit-0']
-${xpath_delete_user} //*[@data-test-id='localUserManagement-tableRowAction-delete-1']
-${xpath_account_status_enabled_button} //*[@data-test-id='localUserManagement-radioButton-statusEnabled']
-${xpath_account_status_disabled_button} //*[@data-test-id='localUserManagement-radioButton-statusDisabled']
-${xpath_username_input_button} //*[@data-test-id='localUserManagement-input-username']
-${xpath_privilege_list_button} //*[@data-test-id='localUserManagement-select-privilege']
-${xpath_password_input_button} //*[@data-test-id='localUserManagement-input-password']
-${xpath_password_confirm_button} //*[@data-test-id='localUserManagement-input-passwordConfirmation']
-${xpath_cancel_button} //*[@data-test-id='localUserManagement-button-cancel']
-${xpath_submit_button} //*[@data-test-id='localUserManagement-button-submit']
-${xpath_add_user_heading} //h5[contains(text(),'Add user')]
-${xpath_policy_settings_header} //*[text()="Account policy settings"]
-${xpath_auto_unlock} //*[@data-test-id='localUserManagement-radio-automaticUnlock']
-${xpath_manual_unlock} //*[@data-test-id='localUserManagement-radio-manualUnlock']
-${xpath_max_failed_login} //*[@data-test-id='localUserManagement-input-lockoutThreshold']
-${test_user_password} TestPwd1
-
-*** Test Cases ***
-
-Verify Navigation To Local User Management Page
- [Documentation] Verify navigation to local user management page.
- [Tags] Verify_Navigation_To_Local_User_Management_Page
-
- Page Should Contain Element ${xpath_local_user_management_heading}
-
-
-Verify Existence Of All Sections In Local User Management Page
- [Documentation] Verify existence of all sections in local user management page.
- [Tags] Verify_Existence_Of_All_Sections_In_Local_User_Management_Page
-
- Page should contain View privilege role descriptions
-
-
-Verify Existence Of All Input Boxes In Local User Management Page
- [Documentation] Verify existence of all sections in Manage Power Usage page.
- [Tags] Verify_Existence_Of_All_Input_Boxes_In_Local_User_Management_Page
-
- Page Should Contain Checkbox ${xpath_select_user}
-
-
-Verify Existence Of All Buttons In Local User Management Page
- [Documentation] Verify existence of all buttons in local user management page.
- [Tags] Verify_Existence_Of_All_Buttons_In_Local_User_Management_Page
-
- Page should contain Button ${xpath_account_policy}
- Page should contain Button ${xpath_add_user}
- Page Should Contain Element ${xpath_edit_user}
- Page Should Contain Element ${xpath_delete_user}
-
-
-Verify Existence Of All Button And Fields In Add User
- [Documentation] Verify existence of all buttons and fields in add user page.
- [Tags] Verify_Existence_Of_All_Button_And_Fields_In_Add_User
- [Teardown] Click Element ${xpath_cancel_button}
-
- Click Element ${xpath_add_user}
- Wait Until Page Contains Element ${xpath_add_user_heading}
- Page Should Contain Element ${xpath_account_status_enabled_button}
- Page Should Contain Element ${xpath_account_status_disabled_button}
- Page Should Contain Element ${xpath_username_input_button}
- Page Should Contain Element ${xpath_privilege_list_button}
- Page Should Contain Element ${xpath_password_input_button}
- Page Should Contain Element ${xpath_password_confirm_button}
- Page Should Contain Element ${xpath_cancel_button}
- Page Should Contain Element ${xpath_submit_button}
-
-
-Verify Existence Of All Buttons And Fields In Account Policy Settings
- [Documentation] Verify existence of all buttons and fields in account policy settings page.
- [Tags] Verify_Existence_Of_All_Buttons_And_Fields_In_Account_Policy_Settings
- [Teardown] Click Element ${xpath_cancel_button}
-
- Click Element ${xpath_account_policy}
- Wait Until Page Contains Element ${xpath_policy_settings_header}
- Page Should Contain Element ${xpath_auto_unlock}
- Page Should Contain Element ${xpath_manual_unlock}
- Page Should Contain Element ${xpath_max_failed_login}
- Page Should Contain Element ${xpath_submit_button}
- Page Should Contain Element ${xpath_cancel_button}
-
-
-Verify User Access Privilege
- [Documentation] Create a new user with a privilege and verify that user is created.
- [Tags] Verify_User_Access_Privilege
- [Template] Create User And Verify
-
- # username privilege_level enabled
- admin_user Administrator ${True}
- operator_user Operator ${True}
- readonly_user ReadOnly ${True}
- noaccess_user NoAccess ${True}
- disabled_user Administrator ${False}
-
-
-*** Keywords ***
-
-Create User And Verify
- [Documentation] Create a user with given user name and privilege and verify that the
- ... user is created successfully via GUI and Redfish.
- [Teardown] Run Keywords Redfish.Logout AND Redfish.Login AND
- ... Redfish.Delete /redfish/v1/AccountService/Accounts/${user_name}
- [Arguments] ${user_name} ${user_privilege} ${enabled}
-
- # Description of argument(s):
- # user_name The name of the user to be created (e.g. "test", "robert", etc.).
- # user_privilege Privilege of the user.
- # enabled If the user is enabled (e.g True if enabled, False if disabled).
-
- Click Element ${xpath_add_user}
- Wait Until Page Contains Element ${xpath_add_user_heading}
-
- # Select disabled radio button if user needs to be disabled
- Run Keyword If ${enabled} == ${False}
- ... Click Element At Coordinates ${xpath_account_status_disabled_button} 0 0
-
- # Input username, password and privilege.
- Input Text ${xpath_username_input_button} ${user_name}
- Select From List by Value ${xpath_privilege_list_button} ${user_privilege}
-
- Input Text ${xpath_password_input_button} ${test_user_password}
-
- Input Text ${xpath_password_confirm_button} ${test_user_password}
-
- # Submit.
- Click Element ${xpath_submit_button}
-
- # Refresh page and check new user is available.
- Wait Until Page Contains Element ${xpath_add_user}
- Click Element ${xpath_refresh_button}
- Wait Until Page Contains ${user_name} timeout=15
-
- # Cross check the privilege of newly added user via Redfish.
- ${user_priv_redfish}= Redfish_Utils.Get Attribute
- ... /redfish/v1/AccountService/Accounts/${user_name} RoleId
- Should Be Equal ${user_privilege} ${user_priv_redfish}
-
- # Check enable/disable status for user.
- Redfish.Logout
- ${status}= Run Keyword And Return Status Redfish.Login ${user_name} ${test_user_password}
- Run Keyword If ${enabled} == ${False}
- ... Should Be Equal ${status} ${False}
- ... ELSE Should Be Equal ${status} ${True}
-
-
-Test Setup Execution
- [Documentation] Do test case setup tasks.
-
- # Navigate to https://xx.xx.xx.xx/#/access-control/local-user-management Local users page.
-
- Click Element ${xpath_access_control_menu}
- Click Element ${xpath_local_user_management_sub_menu}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain local-user-managemen
diff --git a/gui/gui_test/control_menu/test_kvm_sub_menu.robot b/gui/gui_test/control_menu/test_obmc_gui_kvm_sub_menu.robot
similarity index 100%
rename from gui/gui_test/control_menu/test_kvm_sub_menu.robot
rename to gui/gui_test/control_menu/test_obmc_gui_kvm_sub_menu.robot
diff --git a/gui/gui_test/control_menu/test_sol_console_sub_menu.robot b/gui/gui_test/control_menu/test_obmc_gui_sol_console.robot
similarity index 100%
rename from gui/gui_test/control_menu/test_sol_console_sub_menu.robot
rename to gui/gui_test/control_menu/test_obmc_gui_sol_console.robot
diff --git a/gui/gui_test/gui_header/test_profile_settings_menu.robot b/gui/gui_test/gui_header/test_obmc_profile_settings.robot
similarity index 100%
rename from gui/gui_test/gui_header/test_profile_settings_menu.robot
rename to gui/gui_test/gui_header/test_obmc_profile_settings.robot
diff --git a/gui/gui_test/health_menu/test_sensors_sub_menu.robot b/gui/gui_test/health_menu/test_obmc_gui_sensors.robot
similarity index 100%
rename from gui/gui_test/health_menu/test_sensors_sub_menu.robot
rename to gui/gui_test/health_menu/test_obmc_gui_sensors.robot
diff --git a/gui/gui_test/server_config/test_firmware_sub_menu.robot b/gui/gui_test/server_config/test_firmware_sub_menu.robot
deleted file mode 100644
index d438ad2..0000000
--- a/gui/gui_test/server_config/test_firmware_sub_menu.robot
+++ /dev/null
@@ -1,49 +0,0 @@
-*** Settings ***
-
-Documentation Test OpenBMC Firmware Update" sub menu of "Configuration".
-
-Resource ../../lib/gui_resource.robot
-
-Suite Setup Suite Setup Execution
-Suite Teardown Close Browser
-
-*** Variables ***
-
-${xpath_firmware_heading} //h1[text()="Firmware"]
-${xpath_change_image_and_reboot} //button[contains(text(),'Change image and reboot BMC')]
-${xpath_upload_image_and_reboot} //button[contains(text(),'Upload and reboot BMC')]
-
-*** Test Cases ***
-
-Verify Navigation To Firmware Page
- [Documentation] Verify navigation to firmware page.
- [Tags] Verify_Navigation_To_Firmware_Page
-
- Page Should Contain Element ${xpath_firmware_heading}
-
-
-Verify Existence Of All Sections In Firmware Page
- [Documentation] Verify existence of all sections in firmware page.
- [Tags] Verify_Existence_Of_All_Sections_In_Firmware_Page
-
- Page Should Contain BMC and server
- Page Should Contain Update firmware
-
-
-Verify Existence Of All Buttons In Firmware Page
- [Documentation] Verify existence of all buttons in firmware page.
- [Tags] Verify_Existence_Of_All_Buttons_In_Firmware_Page
-
- Page Should Contain Element ${xpath_change_image_and_reboot}
- Page Should Contain Element ${xpath_upload_image_and_reboot}
-
-
-*** Keywords ***
-
-Suite Setup Execution
- [Documentation] Do test case setup tasks.
-
- Launch Browser And Login GUI
- Click Element ${xpath_server_configuration}
- Click Element ${xpath_firmware_update_sub_menu}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain firmware
diff --git a/gui/gui_test/server_config/test_multiple_interfaces.robot b/gui/gui_test/server_config/test_multiple_interfaces.robot
deleted file mode 100644
index 0980b0c..0000000
--- a/gui/gui_test/server_config/test_multiple_interfaces.robot
+++ /dev/null
@@ -1,111 +0,0 @@
-*** Settings ***
-Documentation Test BMC multiple network interface functionalities via GUI.
-
-Resource ../../lib/gui_resource.robot
-Resource ../../../lib/resource.robot
-Resource ../../../lib/certificate_utils.robot
-
-Suite Setup Suite Setup Execution
-Test Teardown FFDC On Test Case Fail
-
-*** Variables ***
-
-${bmc_url} https://${OPENBMC_HOST}
-${bmc_url_1} https://${OPENBMC_HOST_1}
-${LDAP_FILE_PATH} ${EMPTY}
-${CA_FILE_PATH} ${EMPTY}
-
-${xpath_add_new_certificate} //*[contains(text(), ' Add new certificate ')]
-${xpath_certificate_type} //*[@id="certificate-type"]
-${xpath_upload_file} //*[@id="certificate-file"]
-${xpath_load_certificate} //button[text()=' Add ']
-${xpath_close_poup} //*[@class="close ml-auto mb-1"]
-
-*** Test Cases ***
-
-Verify BMC GUI Is Accessible Via Both Network Interfaces
- [Documentation] Verify BMC GUI is accessible via both network interfaces.
- [Tags] Verify_BMC_GUI_Is_Accessible_Via_Both_Network_Interfaces
- [Teardown] Close All Browsers
-
- Start Virtual Display
- ${browser_ID}= Open Browser ${bmc_url} alias=tab1
- Set Window Size 1920 1080
- ${browser_ID}= Open Browser ${bmc_url_1} alias=tab2
- Set Window Size 1920 1080
- Switch Browser tab1
- Run Keywords Login GUI AND Logout GUI
- Switch Browser tab2
- Run Keywords Login GUI AND Logout GUI
-
-
-Load Certificates Via Eth1 IP Address And Verify
- [Documentation] Verify ability to load LDAP certificate using eth1 IP address.
- [Tags] Load_Certificates_Via_Eth1_IP_Address_And_Verify
- [Template] Load Certificates On BMC Via GUI
-
- # bmc_url certificate_type file_path
- ${bmc_url_1} Client ${LDAP_FILE_PATH}
- ${bmc_url_1} CA ${CA_FILE_PATH}
-
-
-*** keywords ***
-
-Suite Setup Execution
- [Documentation] Do suite setup task.
-
- Valid Value OPENBMC_HOST_1
-
- # Check both interfaces are configured and reachable.
- Ping Host ${OPENBMC_HOST}
- Ping Host ${OPENBMC_HOST_1}
-
-
-Load Certificates On BMC Via GUI
- [Documentation] Load certificate on BMC via GUI.
- [Arguments] ${bmc_url} ${certificate_type} ${file_path} ${delete_cert}=${True}
- [Teardown] Run Keywords Logout GUI AND Close Browser
-
- # Description of argument(s):
- # bmc_url Openbmc GUI URL to be open.
- # certificate_type Certificate type.
- # (e.g. "LDAP Certificate" or "CA Certificate").
- # file_path Certificate file path (e.g. "/home/folder/file.pem").
-
- ${path} ${ext}= Split Extension ${file_path}
- Run Keyword If '${certificate_type}' == 'CA' and '${delete_cert}' == '${True}'
- ... Delete All CA Certificate Via Redfish
- ... ELSE IF '${certificate_type}' == 'Client' and '${delete_cert}' == '${True}'
- ... Delete Certificate Via BMC CLI ${certificate_type}
-
- Set Test Variable ${obmc_gui_url} https://${OPENBMC_HOST_1}
- Launch Browser And Login GUI
- Navigate To SSL Certificate Page
- Sleep 10s
- Click Element ${xpath_add_new_certificate}
-
- Wait Until Page Contains Element ${xpath_certificate_type} timeout=20s
- Run Keyword If '${certificate_type}' == 'CA'
- ... Select From List By Label ${xpath_certificate_type} CA Certificate
- ... ELSE IF '${certificate_type}' == 'Client'
- ... Select From List By Label ${xpath_certificate_type} LDAP Certificate
-
- Choose File ${xpath_upload_file} ${file_path}
- Click Element ${xpath_load_certificate}
-
- Run Keyword If '${ext}' !='pem' Wait Until Page Contains Error adding certificate.
-
- Run Keyword If '${certificate_type}' == 'CA'
- ... Wait Until Page Contains Successfully added CA Certificate.
- ... ELSE IF '${certificate_type}' == 'Client'
- ... Wait Until Page Contains Successfully added LDAP Certificate.
- Click Element ${xpath_close_poup}
-
-
-Navigate To SSL Certificate Page
- [Documentation] Navigate to SSL Certificate page.
-
- Click Element ${xpath_access_control_menu}
- Click Element ${xpath_ssl_certificates_sub_menu}
- Page Should Contain SSL certificates
-
diff --git a/gui/gui_test/server_config/test_network_settings_sub_menu.robot b/gui/gui_test/server_config/test_network_settings_sub_menu.robot
deleted file mode 100644
index 9dab942..0000000
--- a/gui/gui_test/server_config/test_network_settings_sub_menu.robot
+++ /dev/null
@@ -1,507 +0,0 @@
-*** Settings ***
-
-Documentation Test OpenBMC GUI "Network settings" sub-menu of
-... "Server configuration".
-
-Resource ../../lib/gui_resource.robot
-Resource ../../../lib/bmc_network_utils.robot
-
-Suite Setup Suite Setup Execution
-Suite Teardown Close Browser
-
-*** Variables ***
-
-${xpath_network_setting_heading} //h1[text()="Network settings"]
-${xpath_interface} //h2[text()="Interface"]
-${xpath_system} //h2[text()="System"]
-${xpath_static_ipv4} //h2[text()="IPV4"]
-${xpath_static_dns} //h2[text()="Static DNS"]
-${xpath_hostname_input} //*[@data-test-id="networkSettings-input-hostname"]
-${xpath_network_save_settings} //button[@data-test-id="networkSettings-button-saveNetworkSettings"]
-${xpath_default_gateway_input} //*[@data-test-id="networkSettings-input-gateway"]
-${xpath_mac_address_input} //*[@data-test-id="networkSettings-input-macAddress"]
-${xpath_static_input_ip0} //*[@data-test-id="networkSettings-input-staticIpv4-0"]
-${xpath_static_input_ip1} //*[@data-test-id="networkSettings-input-staticIpv4-1"]
-${xpath_add_static_ip} //button[contains(text(),"Add static IP")]
-${xpath_setting_success} //*[contains(text(),"Successfully saved network settings.")]
-${xpath_add_dns_server} //button[contains(text(),"Add DNS server")]
-${xpath_network_interface} //*[@data-test-id="networkSettings-select-interface"]
-${xpath_input_netmask_addr0} //*[@data-test-id="networkSettings-input-subnetMask-0"]
-${xpath_input_netmask_addr1} //*[@data-test-id="networkSettings-input-subnetMask-1"]
-${xpath_delete_static_ip} //*[@title="Delete IPv4 row"]
-${xpath_input_dns_server} //*[@data-test-id="networkSettings-input-dnsAddress-0"]
-${xpath_delete_dns_server} //*[@title="Delete DNS row"]
-${xpath_delete_static_ip} //*[@title="Delete IPv4 row"]
-
-@{static_name_servers} 10.10.10.10
-@{null_value} null
-@{empty_dictionary} {}
-@{string_value} aa.bb.cc.dd
-@{special_char_value} @@@.%%.44.11
-
-${test_ipv4_addr} 10.7.7.7
-${test_ipv4_addr2} 10.7.7.8
-${test_subnet_mask} 255.255.0.0
-
-# Valid netmask is 4 bytes long and has continuous block of 1s.
-# Maximum valid value in each octet is 255 and least value is 0.
-# Maximum value of octet in netmask is 255.
-${alpha_netmask} ff.ff.ff.ff
-${out_of_range_netmask} 255.256.255.0
-${more_byte_netmask} 255.255.255.0.0
-${lowest_netmask} 128.0.0.0
-${test_hostname} openbmc
-
-*** Test Cases ***
-
-Verify Navigation To Network Settings Page
- [Documentation] Verify navigation to network settings page.
- [Tags] Verify_Navigation_To_Network_Settings_Page
-
- Page Should Contain Element ${xpath_network_setting_heading}
-
-
-Verify Existence Of All Sections In Network Settings Page
- [Documentation] Verify existence of all sections in network settings page.
- [Tags] Verify_Existence_Of_All_Sections_In_Network_Settings_Page
-
- Page Should Contain Element ${xpath_interface}
- Page Should Contain Element ${xpath_system}
- Page Should Contain Element ${xpath_static_ipv4}
- Page Should Contain Element ${xpath_static_dns}
- Page Should Contain Button ${xpath_delete_static_ip}
-
-
-Verify Existence Of All Buttons In Network Settings Page
- [Documentation] Verify existence of all buttons in network settings page.
- [Tags] Verify_Existence_Of_All_Buttons_In_Network_Settings_Page
-
- Page Should Contain Element ${xpath_add_static_ip}
- Page Should Contain Element ${xpath_add_dns_server}
-
-
-Verify Network Settings From Server Configuration
- [Documentation] Verify ability to select "Network Settings" sub-menu option
- ... of "Server Configuration".
- [Tags] Verify_Network_Settings_From_Server_Configuration
-
- Page Should Contain IP address
-
-
-Verify Hostname Text Configuration
- [Documentation] Verify hostname text is configurable from "network settings"
- ... sub-menu.
- [Tags] Verify_Hostname_Text_Configuration
-
- Wait Until Element Is Enabled ${xpath_hostname_input}
- Input Text ${xpath_hostname_input} witherspoon1
- Click Button ${xpath_network_save_settings}
- Wait Until Page Contains Element ${xpath_setting_success} timeout=10
- Wait Until Keyword Succeeds 15 sec 5 sec Textfield Should Contain ${xpath_hostname_input}
- ... witherspoon1
-
-
-Verify Default Gateway Editable
- [Documentation] Verify default gateway text input allowed from "network
- ... settings".
- [Tags] Verify_Default_Gateway_Editable
- [Teardown] Click Element ${xpath_refresh_button}
-
- Wait Until Page Contains Element ${xpath_default_gateway_input}
- Input Text ${xpath_default_gateway_input} 10.6.6.7
-
-
-Verify MAC Address Editable
- [Documentation] Verify MAC address text input allowed from "network
- ... settings".
- [Tags] Verify_MAC_Address_Editable
- [Teardown] Click Element ${xpath_refresh_button}
-
- Wait Until Element Is Enabled ${xpath_mac_address_input}
- Input Text ${xpath_mac_address_input} AA:E2:84:14:28:79
-
-
-Verify Static IP Address Editable
- [Documentation] Verify static IP address is editable.
- [Tags] Verify_Static_IP_Address_Editable
- [Teardown] Click Element ${xpath_refresh_button}
-
- ${exists}= Run Keyword And Return Status Wait Until Page Contains Element ${xpath_static_input_ip0}
- Run Keyword If '${exists}' == '${False}'
- ... Click Element ${xpath_add_static_ip}
-
- Input Text ${xpath_static_input_ip0} ${OPENBMC_HOST}
-
-
-Verify System Section In Network Setting page
- [Documentation] Verify hostname, MAC address and default gateway
- ... under system section of network setting page.
- [Tags] Verify_System_Section
-
- ${host_name}= Redfish_Utils.Get Attribute ${REDFISH_NW_PROTOCOL_URI} HostName
- Textfield Value Should Be ${xpath_hostname_input} ${host_name}
-
- ${mac_address}= Get BMC MAC Address
- Textfield Value Should Be ${xpath_mac_address_input} ${mac_address}
-
- ${default_gateway}= Get BMC Default Gateway
- Textfield Value Should Be ${xpath_default_gateway_input} ${default_gateway}
-
-
-Verify Network Interface Details
- [Documentation] Verify network interface name in network setting page.
- [Tags] Verify_Network_Interface_Details
-
- ${active_channel_config}= Get Active Channel Config
- ${ethernet_interface_redfish}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
- ${ethernet_interface_gui}= Get Text ${xpath_network_interface}
- Should Contain ${ethernet_interface_gui} ${ethernet_interface_redfish}
-
-
-Verify Network Static IPv4 Details
- [Documentation] Verify network static IPv4 details.
- [Tags] Verify_Network_static_IPv4_Details
-
- @{network_configurations}= Get Network Configuration
- ${ip_addresses}= Get Static IPv4 Addresses From GUI
- FOR ${network_configuration} IN @{network_configurations}
- List Should Contain Value ${ip_addresses} ${network_configuration["Address"]}
- END
-
-
-Configure Invalid Network Addresses And Verify
- [Documentation] Configure invalid network addresses and verify.
- [Tags] Configure_Invalid_Network_Addresses_And_Verify
- [Template] Configure Invalid Network Address And Verify
-
- # locator invalid_address
- ${xpath_mac_address_input} A.A.A.A
- ${xpath_default_gateway_input} a.b.c.d
- ${xpath_static_input_ip0} a.b.c.d
- ${xpath_input_netmask_addr0} 255.256.255.0
-
-
-Configure And Verify Empty Network Addresses
- [Documentation] Configure and verify empty network addresses.
- [Tags] Configure_And_Verify_Empty_Network_Addresses
- [Template] Configure Invalid Network Address And Verify
-
- # locator invalid_address expected_error
- ${xpath_mac_address_input} ${empty} Field required
- ${xpath_default_gateway_input} ${empty} Field required
- ${xpath_static_input_ip0} ${empty} Field required
- ${xpath_input_netmask_addr0} ${empty} Field required
- ${xpath_hostname_input} ${empty} Field required
-
-
-Config And Verify DNS Server Via GUI
- [Documentation] Configure DNS server and verify.
- [Tags] Config_And_Verify_DNS_Server_Via_GUI
- [Setup] DNS Test Setup Execution
- [Teardown] Run Keywords Delete DNS Server And Verify ${static_name_servers}
- ... AND DNS Test Teardown Execution
-
- Add DNS Server And Verify ${static_name_servers}
-
-
-Delete And Verify DNS Server Via GUI
- [Documentation] Delete DNS server and verify.
- [Tags] Delete_And_Verify_DNS_Server_Via_GUI
- [Setup] Run Keywords DNS Test Setup Execution AND
- ... Add DNS Server And Verify ${static_name_servers}
- [Teardown] DNS Test Teardown Execution
-
- Delete DNS Server And Verify ${static_name_servers}
-
-Configure And Verify Static IP Address
- [Documentation] Configure and verify static ip addresses.
- [Tags] Configure_And_Verify_Static_IP_Address
- [Teardown] Delete And Verify Static IP Address On BMC ${test_ipv4_addr}
-
- Add Static IP Address And Verify ${test_ipv4_addr} ${test_subnet_mask}
-
-
-Configure And Verify Invalid DNS Server
- [Documentation] Configure invalid DNS server and verify error.
- [Tags] Configure_And_Verify_Invalid_DNS_Server
- [Template] Add DNS Server And Verify
- [Setup] DNS Test Setup Execution
- [Teardown] Run Keywords Click Element ${xpath_refresh_button}
- ... AND DNS Test Teardown Execution
-
- # invalid_ address expected_status
- ${string_value} Invalid format
- ${special_char_value} Invalid format
- ${empty_dictionary} Field required
- ${null_value} Invalid format
-
-Modify IP Address And Verify
- [Documentation] Modify IP address and verify.
- [Tags] Modify_IP_Address_And_Verify
- [Teardown] Delete And Verify Static IP Address On BMC ${test_ipv4_addr2}
-
- Add Static IP Address And Verify ${test_ipv4_addr} ${test_subnet_mask}
- Update IP Address And Verify ${test_ipv4_addr} ${test_ipv4_addr2}
-
-
-Configure Netmask And Verify
- [Documentation] Configure and verify netmask.
- [Tags] Configure_And_Verify_Netmask
- [Template] Add Static IP Address And Verify
- [Teardown] Run Keywords Click Element ${xpath_refresh_button}
- ... AND Delete And Verify Static IP Address On BMC ${test_ipv4_addr}
-
- # ip_addresses subnet_masks expected_status
- ${test_ipv4_addr} ${lowest_netmask} Valid format
- ${test_ipv4_addr} ${more_byte_netmask} Invalid format
- ${test_ipv4_addr} ${alpha_netmask} Invalid format
- ${test_ipv4_addr} ${out_of_range_netmask} Invalid format
-
-
-Configure Hostname And Verify
- [Documentation] Configure hostname and verify.
- [Tags] Configure_Hostname_And_Verify
- [Teardown] Configure And Verify Network Settings
- ... ${xpath_hostname_input} ${hostname}
-
- ${hostname}= Get Value ${xpath_hostname_input}
- Configure And Verify Network Settings ${xpath_hostname_input} ${test_hostname}
-
-
-*** Keywords ***
-
-Suite Setup Execution
- [Documentation] Do test case setup tasks.
-
- Launch Browser And Login GUI
- Click Element ${xpath_server_configuration}
- Click Element ${xpath_select_network_settings}
- Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network-settings
- ${host_name} ${BMC_IP}= Get Host Name IP host=${OPENBMC_HOST}
- Set Suite Variable ${BMC_IP}
-
-
-Configure Invalid Network Address And Verify
- [Documentation] Configure invalid network address And verify.
- [Arguments] ${locator} ${invalid_address} ${expected_error}=Invalid format
- [Teardown] Click Element ${xpath_refresh_button}
-
- # Description of the argument(s):
- # locator Xpath to identify an HTML element on a web page.
- # invalid_address Invalid address to be added.
- # expected_error Expected error optionally provided in testcase
- # .... (e.g. Invalid format / Field required)
-
- Wait Until Element Is Enabled ${locator}
- Clear Element Text ${locator}
- Input Text ${locator} ${invalid_address}
- Click Element ${xpath_network_save_settings}
- Page Should Contain ${expected_error}
-
-
-Add DNS Server And Verify
- [Documentation] Add DNS server on BMC and verify it via BMC CLI.
- [Arguments] ${static_name_servers} ${expected_status}=Valid format
-
- # Description of the argument(s):
- # static_name_servers A list of static name server IPs to be
- # configured on the BMC.
- # expected_status Expected status while adding DNS server address
- # ... (e.g. Invalid format / Field required).
-
- Wait Until Page Contains Element ${xpath_add_dns_server}
- ${length}= Get Length ${static_name_servers}
- FOR ${i} IN RANGE ${length}
- Click Button ${xpath_add_dns_server}
- Input Text //*[@data-test-id="networkSettings-input-dnsAddress-${i}"]
- ... ${static_name_servers}[${i}]
- END
-
- Click Button ${xpath_network_save_settings}
- Run keyword if '${expected_status}' != 'Valid format'
- ... Run keywords Page Should Contain ${expected_status} AND Return From Keyword
-
- Wait Until Page Contains Element ${xpath_setting_success} timeout=15
- Sleep ${NETWORK_TIMEOUT}s
- Verify Static Name Server Details On GUI ${static_name_servers}
- # Check if newly added DNS server is configured on BMC.
- ${cli_name_servers}= CLI Get Nameservers
- List Should Contain Sub List ${cli_name_servers} ${static_name_servers}
-
-
-Delete DNS Server And Verify
- [Documentation] Delete static name servers.
- [Arguments] ${static_name_servers}
-
- # Description of the argument(s):
- # static_name_servers A list of static name server IPs to be
- # configured on the BMC.
-
- ${length}= Get Length ${static_name_servers}
- FOR ${i} IN RANGE ${length}
- ${status}= Run Keyword And Return Status
- ... Page Should Contain Element ${xpath_delete_dns_server}
- Exit For Loop If "${status}" == "False"
- Wait Until Element Is Enabled ${xpath_delete_dns_server}
- Click Button ${xpath_delete_dns_server}
- END
-
- Click Button ${xpath_network_save_settings}
- Wait Until Page Contains Element ${xpath_setting_success} timeout=15
-
- Sleep ${NETWORK_TIMEOUT}s
- Page Should Not Contain Element ${xpath_input_dns_server}
- # Check if all name servers deleted on BMC.
- ${nameservers}= CLI Get Nameservers
- Should Be Empty ${nameservers}
-
-
-DNS Test Setup Execution
- [Documentation] Do DNS test setup execution.
-
- ${original_name_server}= CLI Get Nameservers
- Set Suite Variable ${original_name_server}
- Run Keyword If ${original_name_server} != @{EMPTY}
- ... Delete DNS Server And Verify ${original_name_server}
-
-
-DNS Test Teardown Execution
- [Documentation] Do DNS test teardown execution.
-
- Run Keyword If ${original_name_server} != @{EMPTY}
- ... Add DNS Server And Verify ${original_name_server}
-
-
-Verify Static Name Server Details On GUI
- [Documentation] Verify static name servers on GUI.
- [Arguments] ${static_name_servers}
-
- # Description of the argument(s):
- # static_name_servers A list of static name server IPs to be
- # configured on the BMC.
-
- ${length}= Get Length ${static_name_servers}
- FOR ${i} IN RANGE ${length}
- Page Should Contain Element //*[@data-test-id="networkSettings-input-dnsAddress-${i}"]
- Textfield Value Should Be //*[@data-test-id="networkSettings-input-dnsAddress-${i}"]
- ... ${static_name_servers}[${i}]
- END
-
-Add Static IP Address And Verify
- [Documentation] Add static IP on BMC and verify.
- [Arguments] ${ip_address} ${subnet_mask} ${expected_status}=Valid format
-
- # Description of argument(s):
- # ip_address IP address to be added (e.g. 10.7.7.7).
- # subnet_masks Subnet mask for the IP to be added (e.g. 255.255.0.0).
- # expected_status Expected status while adding static ipv4 address
- # .... (e.g. Invalid format / Field required).
-
- ${available_ip_addresses}= Get Static IPv4 Addresses From GUI
-
- # New IP address location is GUI is equivalent to the available IP address
- # in Redfish. i.e. if two IP address are available in GUI then location
- # on IP address in GUI is also 2.
- ${location}= Get Length ${available_ip_addresses}
- Wait Until Element Is Enabled ${xpath_add_static_ip}
- Click Button ${xpath_add_static_ip}
-
- Input Text
- ... //*[@data-test-id="networkSettings-input-staticIpv4-${location}"] ${ip_address}
- Input Text
- ... //*[@data-test-id="networkSettings-input-subnetMask-${location}"] ${subnet_mask}
-
- Click Button ${xpath_network_save_settings}
- Run keyword if '${expected_status}' != 'Valid format'
- ... Run keywords Page Should Contain ${expected_status} AND Return From Keyword
- Wait Until Page Contains Element ${xpath_setting_success} timeout=15
- Click Element ${xpath_refresh_button}
- Wait Until Page Contains Element ${xpath_static_input_ip0}
- Validate Network Config On BMC
- ${ip_addresses}= Get Static IPv4 Addresses From GUI
- Should Contain ${ip_addresses} ${ip_address}
-
-
-Delete And Verify Static IP Address On BMC
- [Documentation] Delete static IP address and verify
- [Arguments] ${ip_address}
-
- # Description of argument(s):
- # ip_address IP address to be deleted (e.g. "10.7.7.7").
-
- ${ip_addresses}= Get Static IPv4 Addresses From GUI
- Should Contain ${ip_addresses} ${ip_address} msg=${ip_address} does not exist on BMC
-
- ${delete_ip_buttons}= Get WebElements ${xpath_delete_static_ip}
- FOR ${location} IN RANGE len(${ip_addresses})
- ${gui_ip}= Get Value //*[@data-test-id="networkSettings-input-staticIpv4-${location}"]
- Run Keyword If '${gui_ip}' == '${ip_address}' and '${gui_ip}' != '${BMC_IP}'
- ... Run Keywords Click Element ${delete_ip_buttons}[${location}]
- ... AND Exit For Loop
- END
-
- Click Button ${xpath_network_save_settings}
- Wait Until Page Contains Element ${xpath_setting_success} timeout=15
- Wait Until Page Contains Element ${xpath_static_input_ip0}
- Validate Network Config On BMC
- ${ip_addresses}= Get Static IPv4 Addresses From GUI
- Should Not Contain ${ip_addresses} ${ip_address}
-
-
-Update IP Address And Verify
- [Documentation] Update and verify static IP address on BMC.
- [Arguments] ${ip} ${new_ip}
-
- # Description of argument(s):
- # ip IP address to be replaced (e.g. "10.7.7.7").
- # new_ip New IP address to be configured.
-
- ${ip_addresses}= Get Static IPv4 Addresses From GUI
- Should Contain ${ip_addresses} ${ip} msg=${ip} does not exist on BMC
-
- FOR ${location} IN RANGE len(${ip_addresses})
- ${gui_ip}= Get Value //*[@data-test-id="networkSettings-input-staticIpv4-${location}"]
- Run Keyword If '${gui_ip}' == '${ip}'
- ... Run Keywords
- ... Clear Element Text //*[@data-test-id="networkSettings-input-staticIpv4-${location}"]
- ... AND Input Text
- ... //*[@data-test-id="networkSettings-input-staticIpv4-${location}"] ${new_ip}
- ... AND Exit For Loop
- END
- Click Button ${xpath_network_save_settings}
- Wait Until Page Contains Element ${xpath_setting_success} timeout=15
- Click Element ${xpath_refresh_button}
- Wait Until Page Contains Element ${xpath_static_input_ip0}
- Validate Network Config On BMC
- ${ip_addresses}= Get Static IPv4 Addresses From GUI
- Should Contain ${ip_addresses} ${new_ip}
-
-
-Get Static IPv4 Addresses From GUI
- [Documentation] Get static IPV4 addresses from GUI.
-
- ${availble_ip_addresses}= Get Network Configuration
- ${static_ipv4_addresses}= Create List
-
- FOR ${locator} IN RANGE len(${availble_ip_addresses})
- ${ip_address}= Get value //*[@data-test-id="networkSettings-input-staticIpv4-${locator}"]
- Append To List ${static_ipv4_addresses} ${ip_address}
- END
-
- [Return] ${static_ipv4_addresses}
-
-
-Configure And Verify Network Settings
- [Documentation] Configure and verify network settings.
- [Arguments] ${xpath} ${nw_settings}
-
- # Description of argument(s):
- # xpath xpath of the network settings.
- # nw_settings The mac address, hostname etc.
-
- Wait Until Element Is Enabled ${xpath}
- Input Text ${xpath} ${nw_settings}
- Click Button ${xpath_network_save_settings}
- Wait Until Page Contains Element ${xpath_setting_success} timeout=10
- Textfield Value Should Be ${xpath} ${nw_settings}
-