Update the robot library redfish instance only to suite level

ROBOT_LIBRARY_SCOPE = "TEST SUITE"

This ensures that the object is alive at suite level.

Change-Id: Ib0afed46c29e08d85601ffb266a2858bdf1f6ea8
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_redfish.py b/lib/bmc_redfish.py
index 6bb641c..ae78e8c 100644
--- a/lib/bmc_redfish.py
+++ b/lib/bmc_redfish.py
@@ -19,7 +19,7 @@
 
 class bmc_redfish(object):
 
-    ROBOT_LIBRARY_SCOPE = "GLOBAL"
+    ROBOT_LIBRARY_SCOPE = "TEST SUITE"
     ROBOT_EXIT_ON_FAILURE = True
 
     def __init__(self, hostname, username, password, *args, **kwargs):
@@ -42,7 +42,7 @@
         return self
 
     def __del__(self):
-        del self._robj_
+        del self
 
     def login(self, *args, **kwargs):
         r"""
diff --git a/redfish/service_root/test_service_root_security.robot b/redfish/service_root/test_service_root_security.robot
index 5d0b217..a5ec38d 100644
--- a/redfish/service_root/test_service_root_security.robot
+++ b/redfish/service_root/test_service_root_security.robot
@@ -45,9 +45,3 @@
 
     ${data}=  Create Dictionary  username=${username}  password=${password}
     Run Keyword And Expect Error  ${expected_response}  redfish.Login  ${data}
-
-    # Update __init__ with default credentials.
-    # robot doesn't flush the object per suite if executed in sequence suites.
-    ${data}=  Create Dictionary  username=${OPENBMC_USERNAME}  password=${OPENBMC_PASSWORD}
-    redfish.Login  ${data}
-