Delete test users at the end of suites wherever created

Signed-off-by: Vijay Kantanavar <vikantan@in.ibm.com>
Change-Id: I55ad1f8a9f7fa7ea94f5a0d3495889e6423b8ae9
diff --git a/lib/bmc_redfish_utils.robot b/lib/bmc_redfish_utils.robot
index aca2950..718cc44 100644
--- a/lib/bmc_redfish_utils.robot
+++ b/lib/bmc_redfish_utils.robot
@@ -198,3 +198,16 @@
       Redfish Create User  ${users['${role}'][0]}  ${users['${role}']}[1]  ${role}  ${True}  ${force}
     END
 
+
+Delete BMC Users Via Redfish
+    [Documentation]  Delete BMC users via redfish.
+    [Arguments]  ${users}
+
+    # Description of argument(s):
+    # users    Dictionary of roles and user credentials to be deleted.
+
+    FOR  ${role}  IN  @{users}
+        Redfish.Delete  /redfish/v1/AccountService/Accounts/${users['${role}'][0]}
+        ...  valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
+    END
+