blob: 43d1a0fe62f43cda8090626d472e4b528b03229a [file] [log] [blame]
Sivas SRR7d7bae32019-05-29 00:31:14 -05001*** Settings ***
2Documentation Test Redfish LDAP user configuration.
3
4Resource ../../lib/resource.robot
5Resource ../../lib/bmc_redfish_resource.robot
6Resource ../../lib/openbmc_ffdc.robot
7
8Suite Setup Suite Setup Execution
9Test Setup Test Setup Execution
10Test Teardown Test Teardown Execution
11
Sivas SRR9358b5c2019-06-06 04:57:03 -050012Force Tags LDAP_Test
13
Sivas SRR7d7bae32019-05-29 00:31:14 -050014** Test Cases **
15
16Verify LDAP Configuration Exist
17 [Documentation] Verify LDAP configuration is available.
18 [Tags] Verify_LDAP_Configuration_Exist
19
20 ${resp}= Redfish.Get Attribute ${REDFISH_BASE_URI}AccountService
21 ... ${LDAP_TYPE} default=${EMPTY}
22 Should Not Be Empty ${resp} msg=LDAP configuration is not defined.
23
24
25Verify LDAP User Login
26 [Documentation] Verify LDAP user able to login into BMC.
27 [Tags] Verify_LDAP_User_Login
28
29 ${resp}= Run Keyword And Return Status Redfish.Login ${LDAP_USER}
30 ... ${LDAP_USER_PASSWORD}
31 Should Be Equal ${resp} ${True} msg=LDAP user is not able to login.
32 redfish.Logout
33
34
35Verify LDAP Service Available
36 [Documentation] Verify LDAP service is available.
37 [Tags] Verify_LDAP_Service_Available
38
39 @{ldap_configuration}= Get LDAP Configuration ${LDAP_TYPE}
40 Should Contain ${ldap_configuration} LDAPService
41 ... msg=LDAPService is not available.
42
43
44*** Keywords ***
45Suite Setup Execution
46 [Documentation] Do suite setup tasks.
47
48 Should Not Be Empty ${LDAP_TYPE}
49 redfish.Login
50 Get LDAP Configuration ${LDAP_TYPE}
51 redfish.Logout
52
53
54Test Setup Execution
55 [Documentation] Do test case setup tasks.
56
57 redfish.Login
58
59
60Test Teardown Execution
61 [Documentation] Do the post test teardown.
62 FFDC On Test Case Fail
63 redfish.Logout
64
65
66Get LDAP Configuration
67 [Documentation] Retrieve LDAP Configuration.
68 [Arguments] ${ldap_type}
69
70 # Description of argument(s):
71 # ldap_type The LDAP type ("ActiveDirectory" or "LDAP").
72
73 ${ldap_config}= Redfish.Get Properties ${REDFISH_BASE_URI}AccountService
74 [Return] ${ldap_config["${ldap_type}"]}