Replaced certificate delete method from REST to BMC CLI

Change-Id: Ia2fd728eed905e2dfd683b0e47ce4ad4cb835a51
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/redfish/managers/test_certificate.robot b/redfish/managers/test_certificate.robot
index 8b4b48a..b32e15b 100644
--- a/redfish/managers/test_certificate.robot
+++ b/redfish/managers/test_certificate.robot
@@ -82,7 +82,7 @@
     # expected_status     Expected status of certificate replace Redfish
     #                     request (i.e. "ok" or "error").
 
-    OpenBMC Delete Request  ${CLIENT_CERTIFICATE_URI}
+    Delete Client Certificate Via BMC CLI
     # Adding delay after certificate deletion.
     Sleep  15s
 
@@ -181,6 +181,17 @@
     Should Contain  ${cert_file_content}  ${openssl_cert_content}
 
 
+Delete Client Certificate Via BMC CLI
+    [Documentation]  Delete client certificate via BMC CLI.
+
+    ${file_status}  ${stderr}  ${rc}=  BMC Execute Command
+    ...  [ -f /etc/nslcd/certs/cert.pem ] && echo "Found" || echo "Not Found"
+
+    Run Keyword If  "${file_status}" == "Found"
+    ...  Run Keywords  BMC Execute Command  rm /etc/nslcd/certs/cert.pem  AND
+    ...  BMC Execute Command  systemctl restart phosphor-certificate-manager@nslcd.service
+
+
 Suite Setup Execution
     [Documentation]  Do suite setup tasks.