Set system, chassis, and bmc as global variables
Changes:
- Add SYSTEM_ID as a global variable and set to default value system
- Replace redfish/v1/Systems/system to redfish/v1/Systems/SYSTEM_ID
- Replace redfish/v1/Chassis/chassis to redfish/v1/Chassis/CHASSIS_ID
- Replace redfish/v1/Managers/bmc to redfish/v1/Managers/MANAGER_ID
Tested:
- Tested on sandbox with the changes with sample test run with
sample test ID runs
1. without SYSTEM_ID provided
2. with -v SYSTEM_ID:system1
3. with export SYSTEM_ID=""
3. with export SYSTEM_ID="system2"
Change-Id: Ifc412b20038cef1eba632caaa6c300be328259bd
Signed-off-by: Wilson Suen <wilsons@supermicro.com>
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ipmi/test_ipmi_general.robot b/ipmi/test_ipmi_general.robot
index 0eba9ab..4f9fa3b 100644
--- a/ipmi/test_ipmi_general.robot
+++ b/ipmi/test_ipmi_general.robot
@@ -435,6 +435,6 @@
# power_cap_value Power cap value which need to be set.
# Set power cap value based on argument.
- Redfish.Patch /redfish/v1/Chassis/chassis/EnvironmentMetrics
+ Redfish.Patch /redfish/v1/Chassis/${CHASSIS_ID}/EnvironmentMetrics
... body={"PowerLimitWatts":{"SetPoint": ${power_cap_value}}}
... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
diff --git a/ipmi/test_ipmi_sensor.robot b/ipmi/test_ipmi_sensor.robot
index 6a312c5..cd16d88 100644
--- a/ipmi/test_ipmi_sensor.robot
+++ b/ipmi/test_ipmi_sensor.robot
@@ -384,7 +384,7 @@
# Redfish cpu components have "-" instead of "_" (e.g.: dcm0-cpu0).
${cpu_name}= Replace String ${sensor_name} _ -
- ${sensor_properties}= Redfish.Get Properties /redfish/v1/Systems/system/Processors/${cpu_name}
+ ${sensor_properties}= Redfish.Get Properties /redfish/v1/Systems/${SYSTEM_ID}/Processors/${cpu_name}
# Example of CPU state via Redfish