Boot Test: Move Get Redfish Instance
Moved the call for getting the Redfish test library version
to the if Redfish supported section.
Change-Id: Iebe82f4c2b370f6e38e793d7252fdb98c45923ef
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 93d89ab..68db581 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -38,8 +38,6 @@
sys.path.append(base_path + "extended/")
import run_keyword as rk
-redfish = BuiltIn().get_library_instance('redfish')
-
# Setting master_pid correctly influences the behavior of plug-ins like
# DB_Logging
program_pid = os.getpid()
@@ -68,6 +66,7 @@
status_dir_path = os.path.normpath(status_dir_path) + os.sep
redfish_supported = BuiltIn().get_variable_value("${REDFISH_SUPPORTED}", default=False)
if redfish_supported:
+ redfish = BuiltIn().get_library_instance('redfish')
default_power_on = "Redfish Power On"
default_power_off = "Redfish Power Off"
delete_errlogs_cmd = "Delete Error Logs"