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/redfish/managers/test_certificate.robot b/redfish/managers/test_certificate.robot
index dd2c6d4..4f62eb4 100644
--- a/redfish/managers/test_certificate.robot
+++ b/redfish/managers/test_certificate.robot
@@ -84,7 +84,7 @@
[Teardown] Run Keywords FFDC On Test Case Fail AND Delete All CA Certificate Via Redfish
# Get CA certificate count from BMC.
- ${cert_list}= Redfish_Utils.Get Member List /redfish/v1/Managers/bmc/Truststore/Certificates
+ ${cert_list}= Redfish_Utils.Get Member List /redfish/v1/Managers/${MANAGER_ID}/Truststore/Certificates
${cert_count}= Get Length ${cert_list}
# Install CA certificate to reach maximum count of 10.
@@ -125,7 +125,7 @@
${file_data}= Decode Bytes To String ${bytes} UTF-8
${certificate_dict}= Create Dictionary
- ... @odata.id=/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1
+ ... @odata.id=/redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol/HTTPS/Certificates/1
${payload}= Create Dictionary CertificateString=${file_data}
... CertificateType=PEM CertificateUri=${certificate_dict}
@@ -239,7 +239,7 @@
${Links}= Get From Dictionary ${resp.dict} Links
${match_cert}= Catenate
- ... /redfish/v1/Managers/bmc/Truststore/Certificates/${cert_id}
+ ... /redfish/v1/Managers/${MANAGER_ID}/Truststore/Certificates/${cert_id}
${match}= Set Variable ${False}
FOR ${Certificates_dict} IN @{Links['Certificates']}
@@ -263,7 +263,7 @@
Restore BMC Date
[Documentation] Restore BMC date to its prior value.
- Redfish.Patch ${REDFISH_BASE_URI}Managers/bmc body={'DateTime': '${cli_date_time}'}
+ Redfish.Patch ${REDFISH_BASE_URI}Managers/${MANAGER_ID} body={'DateTime': '${cli_date_time}'}
... valid_status_codes=[${HTTP_OK}]