blob: 16eada0af0d81863aff75bfc9591b69f62aac8ab [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
12** Test Cases **
13
14Verify LDAP Configuration Exist
15 [Documentation] Verify LDAP configuration is available.
16 [Tags] Verify_LDAP_Configuration_Exist
17
18 ${resp}= Redfish.Get Attribute ${REDFISH_BASE_URI}AccountService
19 ... ${LDAP_TYPE} default=${EMPTY}
20 Should Not Be Empty ${resp} msg=LDAP configuration is not defined.
21
22
23Verify LDAP User Login
24 [Documentation] Verify LDAP user able to login into BMC.
25 [Tags] Verify_LDAP_User_Login
26
27 ${resp}= Run Keyword And Return Status Redfish.Login ${LDAP_USER}
28 ... ${LDAP_USER_PASSWORD}
29 Should Be Equal ${resp} ${True} msg=LDAP user is not able to login.
30 redfish.Logout
31
32
33Verify LDAP Service Available
34 [Documentation] Verify LDAP service is available.
35 [Tags] Verify_LDAP_Service_Available
36
37 @{ldap_configuration}= Get LDAP Configuration ${LDAP_TYPE}
38 Should Contain ${ldap_configuration} LDAPService
39 ... msg=LDAPService is not available.
40
41
42*** Keywords ***
43Suite Setup Execution
44 [Documentation] Do suite setup tasks.
45
46 Should Not Be Empty ${LDAP_TYPE}
47 redfish.Login
48 Get LDAP Configuration ${LDAP_TYPE}
49 redfish.Logout
50
51
52Test Setup Execution
53 [Documentation] Do test case setup tasks.
54
55 redfish.Login
56
57
58Test Teardown Execution
59 [Documentation] Do the post test teardown.
60 FFDC On Test Case Fail
61 redfish.Logout
62
63
64Get LDAP Configuration
65 [Documentation] Retrieve LDAP Configuration.
66 [Arguments] ${ldap_type}
67
68 # Description of argument(s):
69 # ldap_type The LDAP type ("ActiveDirectory" or "LDAP").
70
71 ${ldap_config}= Redfish.Get Properties ${REDFISH_BASE_URI}AccountService
72 [Return] ${ldap_config["${ldap_type}"]}