Remove LDAP files assocaite with REST
Change-Id: Ib16a643f03d6d4ef406f3d7bdca1d2be526d0ec6
Signed-off-by: Sivas SRR <sivas.srr@in.ibm.com>
diff --git a/tests_ldap/test_user_ldap_management.robot b/tests_ldap/test_user_ldap_management.robot
deleted file mode 100644
index 0062e60..0000000
--- a/tests_ldap/test_user_ldap_management.robot
+++ /dev/null
@@ -1,171 +0,0 @@
-*** Settings ***
-Documentation OpenBMC LDAP user management test.
-
-Resource ../lib/rest_client.robot
-Resource ../lib/openbmc_ffdc.robot
-Resource ../lib/user_utils.robot
-Library ../lib/bmc_ssh_utils.py
-
-Suite Setup Suite Setup Execution
-Test Teardown FFDC On Test Case Fail
-
-*** Variables ****
-
-*** Test Cases ***
-
-Verify LDAP API Available
- [Documentation] Verify LDAP client service is running and API available.
- [Tags] Verify_LDAP_API_Available
-
- ${resp}= Read Properties ${BMC_LDAP_URI}
- Should Be Empty ${resp}
-
-
-Verify User Group And Privilege Created
- [Documentation] Verify user group and associated privilege is created.
- [Tags] Verify_User_Group_And_Privilege_Created
- [Teardown] FFDC On Test Case Fail
-
- Create Group And Privilege ${GROUP_NAME} ${GROUP_PRIVILEGE}
- ${bmc_user_uris}= Read Properties ${BMC_USER_URI}ldap/enumerate
- ${bmc_user_uris}= Convert To String ${bmc_user_uris}
- Should Contain ${bmc_user_uris} ${GROUP_NAME}
- Should Contain ${bmc_user_uris} ${GROUP_PRIVILEGE}
-
-Verify LDAP Config Is Created
- [Documentation] Verify LDAP config is created in BMC.
- [Tags] Verify_LDAP_Config_Is_Created
-
- Configure LDAP Server On BMC
- Check LDAP Config File Generated
-
-
-Verify LDAP Config Is Deleted
- [Documentation] Verify LDAP config is deleted in BMC.
- [Tags] Verify_LDAP_Config_Is_Deleted
-
- Delete LDAP Config
- Check LDAP Config File Deleted
-
-
-Verify LDAP User Able To Login Using REST
- [Documentation] Verify LDAP user able to login using REST.
- [Tags] Verify_LDAP_User_Able_To_Login_Using_REST
-
- Configure LDAP Server On BMC
- Check LDAP Config File Generated
- Sleep 60s
-
- # REST Login to BMC with LDAP user and password.
- Initialize OpenBMC 60 1 ${LDAP_USER} ${LDAP_USER_PASSWORD}
-
- ${bmc_user_uris}= Read Properties ${BMC_USER_URI}list
- Should Not Be Empty ${bmc_user_uris}
-
-
-Verify LDAP User Able to Logout Using REST
- [Documentation] Verify LDAP user able to logout using REST.
- [Tags] Verify_LDAP_User_Able_To_Logout_Using_REST
-
- Configure LDAP Server On BMC
- Sleep 60s
- Check LDAP Config File Generated
- Sleep 60s
-
- # REST Login to BMC with LDAP user and password.
- Initialize OpenBMC 60 1 ${LDAP_USER} ${LDAP_USER_PASSWORD}
-
- # REST Logout from BMC.
- Log Out OpenBMC
-
-
-Verify LDAP Server URI Is Set
- [Documentation] Verify LDAP Server URI is set using REST.
- [Tags] Verify_LDAP_Server_URI_Is_Set
-
- # Example: LDAP URI should be either ldap://<LDAP IP / Hostname> or
- # ldaps://<LDAP IP / Hostname>
- Should Contain ${LDAP_SERVER_URI} ldap
- ${ldap_server}= Create Dictionary data=${LDAP_SERVER_URI}
- Write Attribute ${BMC_LDAP_URI}/config LDAPServerURI data=${ldap_server}
- ... verify=${True} expected_value=${LDAP_SERVER_URI}
-
-
-Verify LDAP Server BIND DN Is Set
- [Documentation] Verify LDAP BIND DN is set using REST.
- [Tags] Verify_LDAP_Server_BIND_DN_Is_Set
-
- ${ldap_server_binddn}= Create Dictionary data=${LDAP_BIND_DN}
- Write Attribute ${BMC_LDAP_URI}/config LDAPBindDN data=${ldap_server_binddn}
- ... verify=${True} expected_value=${LDAP_BIND_DN}
-
-
-Verify LDAP Server BASE DN Is Set
- [Documentation] Verify LDAP BASE DN is set using REST.
- [Tags] Verify_LDAP_Server_BASE_DN_Is_Set
-
- ${ldap_server_basedn}= Create Dictionary data=${LDAP_BASE_DN}
- Write Attribute ${BMC_LDAP_URI}/config LDAPBaseDN data=${ldap_server_basedn}
- ... verify=${True} expected_value=${LDAP_BASE_DN}
-
-
-Verify LDAP Server Type Is Set As Active Directory
- [Documentation] Verify LDAP server type is set as "Active Directory"
- ... using REST.
- [Tags] Verify_LDAP_Server_Type_Is_Set_As_Active_Directory
- [Template] Modify LDAP Server Type
-
- # Server type as ActiveDirectory
- xyz.openbmc_project.User.Ldap.Config.Type.ActiveDirectory
-
-
-Verify LDAP Server Type Is Set As Open LDAP
- [Documentation] Verify LDAP server type is set as "OpenLDAP"
- ... using REST.
- [Tags] Verify_LDAP_Server_Type_Is_Set_As_Open_LDAP
- [Template] Modify LDAP Server Type
-
- # Server type as OpenLdap
- xyz.openbmc_project.User.Ldap.Config.Type.OpenLdap
-
-
-Verify LDAP Search Scope Is Set As One
- [Documentation] Verify LDAP search scope is set as "one" using REST.
- [Tags] Verify_LDAP_Search_Scope_Is_Set_As_One
- [Template] Modify LDAP Search Scope
-
- # Search Scope as one
- xyz.openbmc_project.User.Ldap.Config.SearchScope.one
-
-
-Verify LDAP Search Scope Is Set As Base
- [Documentation] Verify LDAP search scope is set as "base" using REST.
- [Tags] Verify_LDAP_Search_Scope_Is_Set_As_Base
- [Template] Modify LDAP Search Scope
-
- # Search Scope as base
- xyz.openbmc_project.User.Ldap.Config.SearchScope.base
-
-Verify LDAP Search Scope Is Set As Sub
- [Documentation] Verify LDAP search scope is set as "sub" using REST.
- [Tags] Verify_LDAP_Search_Scope_Is_Set_As_Sub
- [Template] Modify LDAP Search Scope
-
- # Search Scope as sub
- xyz.openbmc_project.User.Ldap.Config.SearchScope.sub
-
-
-Verify LDAP Binddn Password Is Set
- [Documentation] Verify LDAP Binddn password is set using REST.
- [Tags] Verify_LDAP_Binddn_Password_Is_Set
-
- ${ldap_binddn_passwd}= Create Dictionary data=${LDAP_BIND_DN_PASSWORD}
- Write Attribute ${BMC_LDAP_URI}/config LDAPBINDDNpassword data=${ldap_binddn_passwd}
- ... verify=${True} expected_value=${LDAP_BIND_DN_PASSWORD}
-
-
-Delete LDAP Group
- [Documentation] Delete LDAP group which is configured.
- [Tags] Delete_LDAP_Group
-
- Delete Defined LDAP Group And Privilege ${GROUP_NAME}
diff --git a/tests_ldap/test_user_management.robot b/tests_ldap/test_user_management.robot
deleted file mode 100644
index 25fb474..0000000
--- a/tests_ldap/test_user_management.robot
+++ /dev/null
@@ -1,177 +0,0 @@
-*** Settings ***
-Documentation OpenBMC user management test.
-
-Resource ../lib/rest_client.robot
-Resource ../lib/openbmc_ffdc.robot
-Resource ../lib/utils.robot
-Resource ../lib/user_utils.robot
-Library SSHLibrary
-
-Test Teardown Test Teardown Execution
-
-*** Variables ****
-
-${test_password} 0penBmc123
-
-*** Test Cases ***
-
-
-Verify At Least One User In List
- [Documentation] Verify user list API list minimum one user.
- [Tags] Verify_At_Least_One_User_In_List
- [Teardown] FFDC On Test Case Fail
-
- ${bmc_user_uris}= Read Properties ${BMC_USER_URI}list
- Should Not Be Empty ${bmc_user_uris}
-
-
-Verify User Group And Privilege Created
- [Documentation] Verify user group and associated privilege is created.
- [Tags] Verify_User_Group_And_Privilege_Created
- [Teardown] FFDC On Test Case Fail
-
- Create Group And Privilege ${GROUP_NAME} ${GROUP_PRIVILEGE}
- ${bmc_user_uris}= Read Properties ${BMC_USER_URI}ldap/enumerate
- ${bmc_user_uris}= Convert To String ${bmc_user_uris}
- Should Contain ${bmc_user_uris} ${GROUP_NAME}
- Should Contain ${bmc_user_uris} ${GROUP_PRIVILEGE}
- Delete Defined LDAP Group And Privilege ${GROUP_NAME}
-
-
-Verify LDAP User With Privilege Admin Able To Power On
- [Documentation] Verify LDAP user with privilege admin able to power on.
- [Tags] Verify_LDAP_User_With_Privilege_Admin_Able_To_Power_On
- [Teardown] FFDC On Test Case Fail
-
- Create Privilege priv-admin
- Initialize OpenBMC 60 1 ${LDAP_USER} ${LDAP_USER_PASSWORD}
- REST Power On stack_mode=normal quiet=1
- Delete Defined LDAP Group And Privilege ${GROUP_NAME}
-
-
-Verify LDAP User With Privilege Admin Able To Power Off
- [Documentation] Verify LDAP user with privilege admin able to power off.
- [Tags] Verify_LDAP_User_With_Privilege_Admin_Able_To_Power_Off
- [Teardown] FFDC On Test Case Fail
-
- Create Privilege priv-admin
- Initialize OpenBMC 60 1 ${LDAP_USER} ${LDAP_USER_PASSWORD}
- REST Hard Power Off stack_mode=normal quiet=1
- Delete Defined LDAP Group And Privilege ${GROUP_NAME}
-
-
-Verify LDAP User With Privilege User Able To Read Inventory
- [Documentation] Verify LDAP user with privilege usern able to read
- ... inventory assettag.
- [Tags] Verify_LDAP_User_With_Privilege_User_Able_To_Read_Inventory
- [Teardown] FFDC On Test Case Fail
-
- Create Privilege priv-user
- Initialize OpenBMC 60 1 ${LDAP_USER} ${LDAP_USER_PASSWORD}
- Read Attribute /xyz/openbmc_project/inventory/system AssetTag
- Delete Defined LDAP Group And Privilege ${GROUP_NAME}
-
-
-Verify Root Password Update
- [Documentation] Update system "root" user password and verify.
- [Tags] Verify_Root_Password_Update
-
- Delete All Sessions
-
- Initialize OpenBMC
- Update Root Password ${test_password}
-
- # Time for user manager to sync.
- Sleep 5 s
-
- Delete All Sessions
-
- # SSH Login to BMC with new "root" password.
- SSHLibrary.Open Connection ${OPENBMC_HOST}
- Login ${OPENBMC_USERNAME} ${test_password}
-
- # REST Login to BMC with new "root" password.
- Initialize OpenBMC REST_PASSWORD=${test_password}
-
- ${resp}= Get Request openbmc ${BMC_USER_URI}enumerate
- Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ... msg=Verify of new root password failed, RC=${resp.status_code}.
-
-
-*** Keywords ***
-
-Test Teardown Execution
- [Documentation] Do test teardown task.
-
- # REST Login to BMC with new "root" password.
- Initialize OpenBMC REST_PASSWORD=${test_password}
- Update Root Password
- Sleep 5 s
- Delete All Sessions
-
- # SSH Login to BMC with user default "root" password.
- SSHLibrary.Open Connection ${OPENBMC_HOST}
- Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
-
- # REST Login to BMC with user default "root" password.
- Initialize OpenBMC
-
- FFDC On Test Case Fail
- Close All Connections
-
-
-Create Group And Privilege
- [Documentation] Create group and privilege for users.
- [Arguments] ${user_group} ${user_privilege}
-
- # Description of argument(s):
- # user_group User group string.
- # user_privilege User privilge string like priv-admin, priv-user.
-
- @{ldap_parm_list}= Create List
- ... ${user_group} ${user_privilege}
-
- ${data}= Create Dictionary data=@{ldap_parm_list}
-
- ${resp}= OpenBMC Post Request
- ... ${BMC_USER_URI}ldap/action/Create data=${data}
- Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ... msg=Updating the new root password failed, RC=${resp.status_code}.
-
-
-Create Privilege
- [Documentation] Create privilege as priv-admin.
- [Arguments] ${user_privilege}
-
- Create Group And Privilege ${GROUP_NAME} ${user_privilege}
- ${bmc_user_uris}= Read Properties ${BMC_USER_URI}ldap/enumerate
- ${bmc_user_uris}= Convert To String ${bmc_user_uris}
- Should Contain ${bmc_user_uris} ${user_privilege}
- ... msg=Could not create ${user_privilege} privilege.
-
-
-
-Verify Root Password Update
- [Documentation] Update system "root" user password and verify.
- [Tags] Verify_Root_Password_Update
-
- Delete All Sessions
-
- Initialize OpenBMC
- Update Root Password ${test_password}
-
- # Time for user manager to sync.
- Sleep 5 s
-
- Delete All Sessions
-
- # SSH Login to BMC with new "root" password.
- SSHLibrary.Open Connection ${OPENBMC_HOST}
- Login ${OPENBMC_USERNAME} ${test_password}
-
- # REST Login to BMC with new "root" password.
- Initialize OpenBMC REST_PASSWORD=${test_password}
-
- ${resp}= Get Request openbmc ${BMC_USER_URI}enumerate
- Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ... msg=Verify of new root password failed, RC=${resp.status_code}.