Pass CHASSIS_ID, MANAGER_ID and SYSTEM_ID to subcommands
Changes:
- Read env variables and pass it as variables to the robot command
that runs tests. This makes tests using correct Redfish URLs if the
system uses non default IDs.
Tested:
Ran tests against 2 platforms and it fixed tests that had failed
before due to usage of default IDs despite correct IDs were set in env
and passed to the main robot process as variables.
Change-Id: I3ed04f2237f0ef250b9568f4833fbf99fd5dfc65
Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
diff --git a/bin/plug_ins/Auto_reboot/cp_master b/bin/plug_ins/Auto_reboot/cp_master
index 94264d3..44f2eb0 100755
--- a/bin/plug_ins/Auto_reboot/cp_master
+++ b/bin/plug_ins/Auto_reboot/cp_master
@@ -83,6 +83,10 @@
os.environ.get("REDFISH_SUPPORT_TRANS_STATE", 0)
) or int(os.environ.get("AUTOBOOT_REDFISH_SUPPORT_TRANS_STATE", 0))
+ CHASSIS_ID = os.environ.get("CHASSIS_ID", "chassis")
+ MANAGER_ID = os.environ.get("MANAGER_ID", "bmc")
+ SYSTEM_ID = os.environ.get("SYSTEM_ID", "system")
+
enable_auto_reboot = 1 - AUTO_REBOOT_DISABLE
print_var(enable_auto_reboot)
keyword_string = "Set Auto Reboot Setting ${%i}" % enable_auto_reboot
@@ -96,6 +100,9 @@
OPENBMC_PASSWORD,
IPMI_USERNAME,
IPMI_PASSWORD,
+ CHASSIS_ID,
+ MANAGER_ID,
+ SYSTEM_ID,
REDFISH_SUPPORT_TRANS_STATE,
keyword_string,
lib_file_path,