Skip purging REST/Redfish session post boot run
Changes:
- Added flag for user to control the behaviour of default
session delete to prevent function testing during BMC reset
which relies on persistency of the session.
Change-Id: I0b6e8926af99a8a1ec8193c0afab823a2c606864
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index ccc81c4..a0f3e77 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -68,6 +68,7 @@
status_dir_path = os.path.normpath(status_dir_path) + os.sep
redfish_supported = BuiltIn().get_variable_value("${REDFISH_SUPPORTED}", default=False)
redfish_rest_supported = BuiltIn().get_variable_value("${REDFISH_REST_SUPPORTED}", default=False)
+redfish_delete_sessions = int(BuiltIn().get_variable_value("${REDFISH_DELETE_SESSIONS}", default=1))
if redfish_supported:
redfish = BuiltIn().get_library_instance('redfish')
default_power_on = "Redfish Power On"
@@ -995,8 +996,9 @@
# This should help prevent ConnectionErrors.
# Purge all redfish and REST connection sessions.
- grk.run_key_u("Close All Connections", ignore=1)
- grk.run_key_u("Delete All Redfish Sessions", ignore=1)
+ if redfish_delete_sessions:
+ grk.run_key_u("Close All Connections", ignore=1)
+ grk.run_key_u("Delete All Redfish Sessions", ignore=1)
return True