LDAP additonal test cases

- Verify LDAP BaseDN Is Updated And LDAP Login Works
- Verify LDAP BindDN Is Updated And LDAP Login Works
- Verify LDAP BindDN Password Is Updated And LDAP Login Works
- Verify LDAP Type Is Updated And LDAP Login Works

Resolves openbmc/openbmc-test-automation#1927

Change-Id: I20e5af0e84e0cd9f2f7595e3ed7a4a9aad730d64
Signed-off-by: Sivas SRR <sivas.srr@in.ibm.com>
diff --git a/redfish/account_service/test_ldap_configuration.robot b/redfish/account_service/test_ldap_configuration.robot
index 61d2641..7141d20 100644
--- a/redfish/account_service/test_ldap_configuration.robot
+++ b/redfish/account_service/test_ldap_configuration.robot
@@ -227,8 +227,73 @@
     Invalid_LDAP_Group_Name  Callback         [${HTTP_UNAUTHORIZED}, ${HTTP_FORBIDDEN}]
 
 
+Verify LDAP BaseDN Update And LDAP Login
+    [Documentation]  Update LDAP BaseDN of LDAP configuration and verify
+    ...  LDAP login works.
+    [Tags]  Verify_LDAP_BaseDN_Update_And_LDAP_Login
+
+
+    ${body}=  Catenate  {'${LDAP_TYPE}': { 'LDAPService': {'SearchSettings':
+    ...   {'BaseDistinguishedNames': ['${LDAP_BASE_DN}']}}}}
+    Redfish.Patch  ${REDFISH_BASE_URI}AccountService  body=${body}
+    Sleep  15s
+    Redfish Verify LDAP Login
+
+
+Verify LDAP BindDN Update And LDAP Login
+    [Documentation]  Update LDAP BindDN of LDAP configuration and verify
+    ...  LDAP login works.
+    [Tags]  Verify_LDAP_BindDN_Update_And_LDAP_Login
+
+    ${body}=  Catenate  {'${LDAP_TYPE}': { 'Authentication':
+    ...   {'AuthenticationType':'UsernameAndPassword', 'Username':
+    ...  '${LDAP_BIND_DN}'}}}
+    Redfish.Patch  ${REDFISH_BASE_URI}AccountService  body=${body}
+    Sleep  15s
+    Redfish Verify LDAP Login
+
+
+Verify LDAP BindDN Password Update And LDAP Login
+    [Documentation]  Update LDAP BindDN password of LDAP configuration and
+    ...  verify LDAP login works.
+    [Tags]  Verify_LDAP_BindDN_Passsword_Update_And_LDAP_Login
+
+
+    ${body}=  Catenate  {'${LDAP_TYPE}': { 'Authentication':
+    ...   {'AuthenticationType':'UsernameAndPassword', 'Password':
+    ...  '${LDAP_BIND_DN_PASSWORD}'}}}
+    Redfish.Patch  ${REDFISH_BASE_URI}AccountService  body=${body}
+    Sleep  15s
+    Redfish Verify LDAP Login
+
+
+Verify LDAP Type Update And LDAP Login
+    [Documentation]  Update LDAP type of LDAP configuration and verify
+    ...  LDAP login works.
+    [Tags]  Verify_LDAP_Type_Update_And_LDAP_Login
+
+    Disable Other LDAP
+    Redfish.Patch  ${REDFISH_BASE_URI}AccountService
+    ...  body={'${LDAP_TYPE}': {'ServiceEnabled': ${True}}}
+    Sleep  15s
+    Redfish Verify LDAP Login
+
+
 *** Keywords ***
 
+Redfish Verify LDAP Login
+    [Documentation]  LDAP user log into BMC.
+
+    # According to our repo coding rules, Redfish.Login is to be done in Suite
+    # Setup and Redfish.Logout is to be done in Suite Teardown.  For any
+    # deviation from this rule (such as in this keyword), the deviant code
+    # must take steps to restore us to our original logged-in state.
+
+    Redfish.Login  ${LDAP_USER}  ${LDAP_USER_PASSWORD}
+    Redfish.Logout
+    Redfish.Login
+
+
 Update LDAP Config And Verify Set Host Name
     [Documentation]  Update LDAP config and verify by attempting to set host name.
     [Arguments]  ${group_name}  ${group_privilege}=Administrator