Pass in REDFISH_SUPPORT_TRANS_STATE to robot_cmd_fnc
Signed-off-by: Michael Shepos <shepos@us.ibm.com>
Change-Id: I68a824b706c6781b833c69f45f244baf62a8ce0e
diff --git a/bin/plug_ins/Auto_reboot/cp_master b/bin/plug_ins/Auto_reboot/cp_master
index 5d2a707..2f4851e 100755
--- a/bin/plug_ins/Auto_reboot/cp_master
+++ b/bin/plug_ins/Auto_reboot/cp_master
@@ -6,6 +6,7 @@
import os
import sys
+from robot.libraries.BuiltIn import BuiltIn
save_dir_path = sys.path.pop(0)
@@ -34,6 +35,12 @@
AUTO_REBOOT_DISABLE = "1"
+REDFISH_SUPPORT_TRANS_STATE = int(os.environ.get('REDFISH_SUPPORT_TRANS_STATE', 0))
+try:
+ REDFISH_SUPPORT_TRANS_STATE = REDFISH_SUPPORT_TRANS_STATE or \
+ int(BuiltIn().get_variable_value("${REDFISH_SUPPORT_TRANS_STATE}", default=0))
+except:
+ pass
def validate_parms():
@@ -73,8 +80,9 @@
cmd_buf = create_robot_cmd_string("extended/run_keyword.robot", OPENBMC_HOST, SSH_PORT, HTTPS_PORT,
REST_USERNAME, REST_PASSWORD, OPENBMC_USERNAME, OPENBMC_PASSWORD,
- keyword_string, lib_file_path, quiet,
+ REDFISH_SUPPORT_TRANS_STATE, keyword_string, lib_file_path, quiet,
test_mode, debug, outputdir, output, log, report)
+
if not robot_cmd_fnc(cmd_buf):
print_error_report("Robot command execution failed.")
exit(1)