Add GUI test cases for LDAP and HTTPS certificate installation

Added test cases:
- Verify Installed HTTPS Certificate
- Verify Installed LDAP Certificate

Change-Id: Ic155cd3fa89aa2d51a519ffcbe1a6dc220eb29c4
Signed-off-by: manashsarma <manashsarma@in.ibm.com>
diff --git a/lib/certificate_utils.robot b/lib/certificate_utils.robot
index 6deaf6c..413deff 100755
--- a/lib/certificate_utils.robot
+++ b/lib/certificate_utils.robot
@@ -164,3 +164,29 @@
     FOR  ${cert}  IN  @{cert_list}
       Redfish.Delete  ${cert}  valid_status_codes=[${HTTP_NO_CONTENT}]
     END
+
+
+Delete Certificate Via BMC CLI
+    [Documentation]  Delete certificate via BMC CLI.
+    [Arguments]  ${cert_type}
+
+    # Description of argument(s):
+    # cert_type           Certificate type (e.g. "Client" or "CA").
+
+    ${certificate_file_path}  ${certificate_service}  ${certificate_uri}=
+    ...  Run Keyword If  '${cert_type}' == 'Client'
+    ...    Set Variable  /etc/nslcd/certs/cert.pem  phosphor-certificate-manager@nslcd.service
+    ...    ${REDFISH_LDAP_CERTIFICATE_URI}
+    ...  ELSE IF  '${cert_type}' == 'CA'
+    ...    Set Variable  ${ROOT_CA_FILE_PATH}  phosphor-certificate-manager@authority.service
+    ...    ${REDFISH_CA_CERTIFICATE_URI}
+
+    ${file_status}  ${stderr}  ${rc}=  BMC Execute Command
+    ...  [ -f ${certificate_file_path} ] && echo "Found" || echo "Not Found"
+
+    Return From Keyword If  "${file_status}" != "Found"
+    BMC Execute Command  rm ${certificate_file_path}
+    BMC Execute Command  systemctl restart ${certificate_service}
+    BMC Execute Command  systemctl daemon-reload
+    Wait Until Keyword Succeeds  1 min  10 sec  Redfish.Get  ${certificate_uri}/1
+    ...  valid_status_codes=[${HTTP_NOT_FOUND}, ${HTTP_INTERNAL_SERVER_ERROR}]