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/lib/logging_utils.robot b/lib/logging_utils.robot
index 9d6ca1f..bc77fc4 100644
--- a/lib/logging_utils.robot
+++ b/lib/logging_utils.robot
@@ -319,7 +319,7 @@
[Documentation] Do Redfish EventLog purge.
${target_action}= redfish_utils.Get Target Actions
- ... /redfish/v1/Systems/system/LogServices/EventLog/ LogService.ClearLog
+ ... /redfish/v1/Systems/${SYSTEM_ID}/LogServices/EventLog/ LogService.ClearLog
Redfish.Post ${target_action} body={'target': '${target_action}'}
... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
@@ -335,7 +335,7 @@
[Documentation] Do Redfish PostCodes purge from system.
${target_action}= redfish_utils.Get Target Actions
- ... /redfish/v1/Systems/system/LogServices/PostCodes/ LogService.ClearLog
+ ... /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/ LogService.ClearLog
Redfish.Post ${target_action} body={'target': '${target_action}'}
... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
@@ -361,7 +361,7 @@
# [Name]: POST Code Log Entry
# [Severity]: OK
- ${members}= Redfish.Get Attribute /redfish/v1/Systems/system/LogServices/PostCodes/Entries Members
+ ${members}= Redfish.Get Attribute /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries Members
... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
[Return] ${members}