Managers ID : Introduced variable to declare Managers ID in resource.robot and updated all the scripts in openbmc-test-automation
Changes:
- Introduced ${MANAGER_ID} variable in resource.robot
- Replaced all the Managers/bmc to Managers/${MANAGER_ID} across all the scripts
- Also in data/variables.py updated chassis id for the few redfish uri.
Tested:
- Ran All The Scripts Successfully
Change-Id: Iff3673aae27657e0799dec5cb94c1651a0cd5d18
Signed-off-by: ganesanb <ganesanb@ami.com>
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/dump_utils.robot b/lib/dump_utils.robot
index bcd190e..cc26705 100644
--- a/lib/dump_utils.robot
+++ b/lib/dump_utils.robot
@@ -162,17 +162,17 @@
# Description of Argument(s):
# dump_id An integer value that identifies a particular dump (e.g. 1, 3).
- Redfish.Delete /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_id}
+ Redfish.Delete /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/${dump_id}
Redfish Delete All BMC Dumps
[Documentation] Delete all BMC dumps via Redfish.
# Check if dump entries exist, if not return.
- ${resp}= Redfish.Get /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ ${resp}= Redfish.Get /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries
Return From Keyword If ${resp.dict["Members@odata.count"]} == ${0}
- Redfish.Post /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.ClearLog
+ Redfish.Post /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.ClearLog
Get Redfish BMC Dump Log Entries
@@ -262,7 +262,7 @@
${payload}= Create Dictionary DiagnosticDataType=Manager
${resp}= Redfish.Post
- ... /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData
+ ... /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.CollectDiagnosticData
... body=${payload} valid_status_codes=[${HTTP_ACCEPTED}]
# Example of response from above Redfish POST request.
@@ -286,7 +286,7 @@
# initiating BMC dump and returns dump task id.
${payload}= Create Dictionary DiagnosticDataType=Manager
- ${resp}= Redfish.Post /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData
+ ${resp}= Redfish.Post /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.CollectDiagnosticData
... body=${payload} valid_status_codes=[${HTTP_ACCEPTED}]
# Example of response from above Redfish POST request.
@@ -310,11 +310,11 @@
# "Connection: Keep-Alive",
# "Accept: */*",
# "Content-Length: 33",
- # "Location: /redfish/v1/Managers/bmc/LogServices/Dump/Entries/2"]
+ # "Location: /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/2"]
# ],
# "HttpOperation": "POST",
# "JsonBody": "{\"DiagnosticDataType\":\"Manager\"}",
- # "TargetUri": "/redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData"
+ # "TargetUri": "/redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.CollectDiagnosticData"
# }
[Return] ${task_dict["Payload"]["HttpHeaders"][-1].split("/")[-1]}
@@ -369,12 +369,12 @@
# "Connection: Keep-Alive",
# "Accept: */*",
# "Content-Length: 33",
- # "Location: /redfish/v1/Managers/bmc/LogServices/Dump/Entries/2"]
+ # "Location: /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/2"]
# ],
# "HttpOperation": "POST",
# "JsonBody": "{\"DiagnosticDataType\":\"Manager\"}",
# "TargetUri":
- # "/redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData"
+ # "/redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.CollectDiagnosticData"
# }
${task_dict}= Redfish.Get Properties /redfish/v1/TaskService/Tasks/${task_id}
@@ -419,7 +419,7 @@
... the task instance Id and response object (e.g., "5").
${payload}= Create Dictionary DiagnosticDataType=Manager
- ${resp}= Redfish.Post /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData
+ ${resp}= Redfish.Post /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.CollectDiagnosticData
... body=${payload} valid_status_codes=[${HTTP_ACCEPTED}]
${ip_resp}= Evaluate json.loads(r'''${resp.text}''') json