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/data/variables.py b/data/variables.py
index 286ae17..9c9ec42 100755
--- a/data/variables.py
+++ b/data/variables.py
@@ -184,29 +184,48 @@
REDFISH_BASE_URI = "/redfish/v1/"
REDFISH_SESSION = REDFISH_BASE_URI + "SessionService/Sessions"
REDFISH_SESSION_URI = "SessionService/Sessions/"
-REDFISH_NW_ETH0 = "Managers/bmc/EthernetInterfaces/eth0/"
+REDFISH_MANAGERS_ID = BuiltIn().get_variable_value(
+ "${MANAGER_ID}", default="bmc"
+)
+REDFISH_NW_ETH0 = (
+ "Managers/" + REDFISH_MANAGERS_ID + "/EthernetInterfaces/eth0/"
+)
REDFISH_NW_ETH0_URI = REDFISH_BASE_URI + REDFISH_NW_ETH0
-REDFISH_NW_ETH_IFACE = REDFISH_BASE_URI + "Managers/bmc/EthernetInterfaces/"
-REDFISH_NW_PROTOCOL = "Managers/bmc/NetworkProtocol"
+REDFISH_NW_ETH_IFACE = (
+ REDFISH_BASE_URI
+ + "Managers/"
+ + REDFISH_MANAGERS_ID
+ + "/EthernetInterfaces/"
+)
+REDFISH_NW_PROTOCOL = "Managers/" + REDFISH_MANAGERS_ID + "/NetworkProtocol"
REDFISH_NW_PROTOCOL_URI = REDFISH_BASE_URI + REDFISH_NW_PROTOCOL
REDFISH_ACCOUNTS_SERVICE = "AccountService/"
REDFISH_ACCOUNTS_SERVICE_URI = REDFISH_BASE_URI + REDFISH_ACCOUNTS_SERVICE
REDFISH_ACCOUNTS = "AccountService/Accounts/"
REDFISH_ACCOUNTS_URI = REDFISH_BASE_URI + REDFISH_ACCOUNTS
-REDFISH_HTTPS_CERTIFICATE = "Managers/bmc/NetworkProtocol/HTTPS/Certificates"
+REDFISH_HTTPS_CERTIFICATE = (
+ "Managers/" + REDFISH_MANAGERS_ID + "/NetworkProtocol/HTTPS/Certificates"
+)
REDFISH_HTTPS_CERTIFICATE_URI = REDFISH_BASE_URI + REDFISH_HTTPS_CERTIFICATE
REDFISH_LDAP_CERTIFICATE = "AccountService/LDAP/Certificates"
REDFISH_LDAP_CERTIFICATE_URI = REDFISH_BASE_URI + REDFISH_LDAP_CERTIFICATE
-REDFISH_CA_CERTIFICATE = "Managers/bmc/Truststore/Certificates"
+REDFISH_CA_CERTIFICATE = (
+ "Managers/" + REDFISH_MANAGERS_ID + "/Truststore/Certificates"
+)
REDFISH_CA_CERTIFICATE_URI = REDFISH_BASE_URI + REDFISH_CA_CERTIFICATE
+REDFISH_CHASSIS_ID = BuiltIn().get_variable_value(
+ "${CHASSIS_ID}", default="chassis"
+)
REDFISH_CHASSIS_URI = REDFISH_BASE_URI + "Chassis/"
-REDFISH_CHASSIS_THERMAL = "chassis/Thermal/"
+REDFISH_CHASSIS_THERMAL = REDFISH_CHASSIS_ID + "/Thermal/"
REDFISH_CHASSIS_THERMAL_URI = REDFISH_CHASSIS_URI + REDFISH_CHASSIS_THERMAL
-REDFISH_CHASSIS_POWER = "chassis/Power/"
+REDFISH_CHASSIS_POWER = REDFISH_CHASSIS_ID + "/Power/"
REDFISH_CHASSIS_POWER_URI = REDFISH_CHASSIS_URI + REDFISH_CHASSIS_POWER
-REDFISH_CHASSIS_SENSORS = "chassis/Sensors"
+REDFISH_CHASSIS_SENSORS = REDFISH_CHASSIS_ID + "/Sensors"
REDFISH_CHASSIS_SENSORS_URI = REDFISH_CHASSIS_URI + REDFISH_CHASSIS_SENSORS
-REDFISH_BMC_DUMP = "Managers/bmc/LogServices/Dump/Entries"
+REDFISH_BMC_DUMP = (
+ "Managers/" + REDFISH_MANAGERS_ID + "/LogServices/Dump/Entries"
+)
REDFISH_DUMP_URI = REDFISH_BASE_URI + REDFISH_BMC_DUMP
# Boot options and URI variables.
diff --git a/docs/certificate_generate.md b/docs/certificate_generate.md
index ff6c934..eaf7b04 100644
--- a/docs/certificate_generate.md
+++ b/docs/certificate_generate.md
@@ -51,7 +51,7 @@
{
"City": <City Name>,
"CertificateCollection": {
- "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/"
+ "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol/HTTPS/Certificates/"
},
"CommonName": "<BMC_IP>",
"Country": <Country Name>,
@@ -68,7 +68,7 @@
{
"City": "Austin",
"CertificateCollection": {
- "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/"
+ "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol/HTTPS/Certificates/"
},
"CommonName": "xx.xx.xx.xx",
"Country": "US",
@@ -86,7 +86,7 @@
{
"CSRString": "-----BEGIN CERTIFICATE REQUEST-----\nMIICyzCCAbMCAQEwgYUxDzANBgNVBAcMBkF1c3RpbjEUMBIGA1UEAwwLeHgueHgu\neHgueHgxCzAJBgNVBAYTAlVTMQ0wCwYEKw4DAgwDUlNBMR0wGwYDVR0lDBRTZXJ2\nZXJBdXRoZW50aWNhdGlvbjEUMBIGA1UECgwLQUJDIExpbWl0ZWQxCzAJBgNVBAgM\nAkFVMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7+OoXRmAI85W/5pB\nYjC5EdZ/atrPpkIxjT4sXANZLXm6/vkfR/BAxd5s8DYrifPjdfvJRv33cAPT6+pe\no/t793hdBx7Cwwzqlj3czfdbpvGp90I7BQ1OvKCo/NDmqeTm+5jphYpd8ZvKmBNC\nOfHV0sr3/dMPHME16aunDEHFJz1CzXpG5kSszRYbwcZrXC7rvmSi8UBX8BYoKWzx\nlAGdOYh9j5k/LVNQuKFJjqIfesYJ8fajgsJr8bj81o+bOzvG+zApvt+Ak8B8fqa7\nvET4jb1oeDuSi9D1/Xax+2qx3vInIQOOZz3OCVjxNLZMWOA+P86z59e/6YkXOg/Q\nkXG4uQIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAOTLICzJiYerbWa6VyXv/w8b\nr160bNDvIRXJf8E2b5+27NinZb+65WVa6oxE9Ai7UEN+mHkbnDpb2vujp/wuROER\nrgmjstePJST+EqX5PuoSxbPhE0ucHw7dTZf9agfvNLlpgTUo/Lv9A2pCSDa5KZ13\nu96AFsFBjBuanUK2k7aoEc/Rl7JhfxUaXNszzYqDgwIHggYWbZO7Ku7HHbY1qYGR\nD0XaLUyXAxgB76mcud004zu7swTJxDlM+c5+i0yqflWQiVWEAOW9HDeHvnYmShuT\n+HS1vhv+x/9HDHowxiWOt2Th18uzdf+F0446fR8uoIrG1z7KdNoxipUnVKfyXTg=\n-----END CERTIFICATE REQUEST-----\n",
"CertificateCollection": {
- "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/"
+ "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol/HTTPS/Certificates/"
}
```
@@ -134,7 +134,7 @@
"CertificateType": "PEM",
"CertificateUri":
{
- "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1"
+ "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol/HTTPS/Certificates/1"
}
}
```
@@ -148,7 +148,7 @@
$ curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST https://${BMC_IP}/redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate/ -d @certificate.json
{
"@odata.context": "/redfish/v1/$metadata#Certificate.Certificate",
- "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1",
+ "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol/HTTPS/Certificates/1",
"@odata.type": "#Certificate.v1_0_0.Certificate",
"CertificateString": "-----BEGIN CERTIFICATE-----\nMIIDkTCCAnkCCQD7oPxudsyOjTANBgkqhkiG9w0BAQsFADCBjjELMAkGA1UEBhMC\nVVMxDzANBgNVBAgMBk9yZWdvbjERMA8GA1UEBwwIUG9ydGxhbmQxDDAKBgNVBAoM\nA1hZWjELMAkGA1UECwwCSVQxIjAgBgNVBAMMGVhZWiBDRVJUSUZJQ0FURSBBVVRI\nT1JJVFkxHDAaBgkqhkiG9w0BCQEWDW5vbmVAbm9uZS5jb20wHhcNMTkwOTEyMDkx\nMzQwWhcNMjEwMTI0MDkxMzQwWjCBhTEPMA0GA1UEBwwGQXVzdGluMRQwEgYDVQQD\nDAt4eC54eC54eC54eDELMAkGA1UEBhMCVVMxDTALBgQrDgMCDANSU0ExHTAbBgNV\nHSUMFFNlcnZlckF1dGhlbnRpY2F0aW9uMRQwEgYDVQQKDAtBQkMgTGltaXRlZDEL\nMAkGA1UECAwCQVUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDv46hd\nGYAjzlb/mkFiMLkR1n9q2s+mQjGNPixcA1ktebr++R9H8EDF3mzwNiuJ8+N1+8lG\n/fdwA9Pr6l6j+3v3eF0HHsLDDOqWPdzN91um8an3QjsFDU68oKj80Oap5Ob7mOmF\nil3xm8qYE0I58dXSyvf90w8cwTXpq6cMQcUnPULNekbmRKzNFhvBxmtcLuu+ZKLx\nQFfwFigpbPGUAZ05iH2PmT8tU1C4oUmOoh96xgnx9qOCwmvxuPzWj5s7O8b7MCm+\n34CTwHx+pru8RPiNvWh4O5KL0PX9drH7arHe8ichA45nPc4JWPE0tkxY4D4/zrPn\n17/piRc6D9CRcbi5AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAJ+xLxyfBBpRXov/\noRVMyJSWRSSITfzvcZVMcbDXAWR591rdYPNmpmpuDSdtynIvJe33H9FyXRI1UMnw\n5BYpJrVjxxyEvIyoxbJSkLxjkO6TUJNI2w7wBJeUDpwdYWuwmUc6UfO5c5LGSb4z\nzbvfEdSsW+3pHuFopuhU8d/SR14rjZiGpU2MBF+/yEyUXmQ5jIU69UwvIvbch0Zy\naquTL4O3aL1Lc9ACVUsQ7mTUS+niduIsZLvvI+OWMShRo8CEUJl9BKijQJhwvUVf\nUBNa1pVzonLxdt3eRTv93X4cu5ole6wO2DA19PWnlt/16XYw61/5naYckslQTRdc\nGvsIpb0=\n-----END CERTIFICATE-----\n",
"Description": "HTTPS certificate",
diff --git a/extended/code_update/bmc_code_update.robot b/extended/code_update/bmc_code_update.robot
index e0233ad..dbd3ef8 100644
--- a/extended/code_update/bmc_code_update.robot
+++ b/extended/code_update/bmc_code_update.robot
@@ -217,7 +217,7 @@
Sleep 30s
${bmc_cert_content}= redfish_utils.Get Attribute
- ... /redfish/v1/Managers/bmc/Truststore/Certificates/${cert_id} CertificateString
+ ... /redfish/v1/Managers/${MANAGER_ID}/Truststore/Certificates/${cert_id} CertificateString
Should Contain ${cert_file_content} ${bmc_cert_content}
Upload And Activate Image ${IMAGE_FILE_PATH}
diff --git a/extended/test_bmc_stress_buster.robot b/extended/test_bmc_stress_buster.robot
index 977c8f9..025e4e1 100644
--- a/extended/test_bmc_stress_buster.robot
+++ b/extended/test_bmc_stress_buster.robot
@@ -63,8 +63,8 @@
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
# Trigger GET REST enumeration.
- ${resp}= GET On Session openbmc /redfish/v1/Managers/bmc expected_status=any
- Log To Console GET Request /redfish/v1/Managers/bmc
+ ${resp}= GET On Session openbmc /redfish/v1/Managers/${MANAGER_ID} expected_status=any
+ Log To Console GET Request /redfish/v1/Managers/${MANAGER_ID}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Delete All Sessions
diff --git a/ffdc/ffdc_config.yaml b/ffdc/ffdc_config.yaml
index d59c65b..10e5ecc 100644
--- a/ffdc/ffdc_config.yaml
+++ b/ffdc/ffdc_config.yaml
@@ -140,7 +140,8 @@
- redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
raw GET /redfish/v1/AccountService/Accounts
- redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
- raw GET /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ raw GET
+ /redfish/v1/Managers/${manager_id}/LogServices/Dump/Entries
- redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
raw GET /redfish/v1/Systems/system/LogServices/Dump/Entries
- redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
@@ -151,6 +152,7 @@
- ${hostname}
- ${username}
- ${password}
+ - ${manager_id}
- /redfish/v1/
- json
FILES:
diff --git a/ffdc/plugins/redfish.py b/ffdc/plugins/redfish.py
index 74f1370..0c4211f 100644
--- a/ffdc/plugins/redfish.py
+++ b/ffdc/plugins/redfish.py
@@ -82,7 +82,7 @@
# required in enumeration.
# Example: '/redfish/v1/JsonSchemas/' and sub resources.
# '/redfish/v1/SessionService'
- # '/redfish/v1/Managers/bmc#/Oem'
+ # '/redfish/v1/Managers/${MANAGER_ID}#/Oem'
if (
("JsonSchemas" in resource)
or ("SessionService" in resource)
diff --git a/gui/gui_test/overview_menu/test_overview_menu.robot b/gui/gui_test/overview_menu/test_overview_menu.robot
index 8ad4e6f..6ce4fab 100644
--- a/gui/gui_test/overview_menu/test_overview_menu.robot
+++ b/gui/gui_test/overview_menu/test_overview_menu.robot
@@ -58,7 +58,7 @@
# Get all IP addresses and prefix lengths on system.
- ${resp}= Redfish.Get Attribute /redfish/v1/Managers/bmc/EthernetInterfaces/eth0 IPv4StaticAddresses
+ ${resp}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0 IPv4StaticAddresses
${ip_addr}= Set Variable ${resp[0]['Address']}
Page Should Contain ${ip_addr}
@@ -183,7 +183,7 @@
[Documentation] Verify that BMC date from GUI matches with BMC time via Redfish.
[Tags] Verify_BMC_Time_In_Overview_Page
- ${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/bmc DateTime
+ ${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/${MANAGER_ID} DateTime
${converted_date}= Convert Date ${date_time} result_format=%Y-%m-%d
Page Should Contain ${converted_date}
diff --git a/ipmi/test_ipmi_general.robot b/ipmi/test_ipmi_general.robot
index 924147a..8995df9 100644
--- a/ipmi/test_ipmi_general.robot
+++ b/ipmi/test_ipmi_general.robot
@@ -30,7 +30,7 @@
[Tags] Test_Get_Device_GUID_Via_IPMI_Raw_Command
[Teardown] Run Keywords Redfish.Logout AND FFDC On Test Case Fail
# Get GUIDS via IPMI.
- # This should match the /redfish/v1/Managers/bmc's UUID data.
+ # This should match the /redfish/v1/Managers/${MANAGER_ID}'s UUID data.
${guids}= Run IPMI Standard Command raw ${IPMI_RAW_CMD['Device GUID']['Get'][0]}
# Reverse the order and remove space delims.
${guids}= Split String ${guids}
@@ -38,7 +38,7 @@
${guids}= Evaluate "".join(${guids})
Redfish.Login
- ${uuid}= Redfish.Get Attribute /redfish/v1/Managers/bmc UUID
+ ${uuid}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} UUID
${uuid}= Remove String ${uuid} -
Rprint Vars guids uuid
diff --git a/ipmi/test_ipmi_network_verification.robot b/ipmi/test_ipmi_network_verification.robot
index b1d4075..35a0df6 100644
--- a/ipmi/test_ipmi_network_verification.robot
+++ b/ipmi/test_ipmi_network_verification.robot
@@ -95,7 +95,7 @@
${lan_config}= Get LAN Print Dict ${CHANNEL_NUMBER}
${ipv4_addresses}= Redfish.Get Attribute
- ... /redfish/v1/Managers/bmc/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']}
+ ... /redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']}
... IPv4Addresses
FOR ${ipv4_address} IN @{ipv4_addresses}
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index d2c3543..7c9ce49 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -424,7 +424,7 @@
# Sample output:
#{
# "@odata.context": "/redfish/v1/$metadata#EthernetInterface.EthernetInterface",
- # "@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0",
+ # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0",
# "@odata.type": "#EthernetInterface.v1_2_0.EthernetInterface",
# "Description": "Management Network Interface",
# "IPv4Addresses": [
diff --git a/lib/bmc_redfish.py b/lib/bmc_redfish.py
index 0e97af7..a7a70c4 100644
--- a/lib/bmc_redfish.py
+++ b/lib/bmc_redfish.py
@@ -227,7 +227,7 @@
# JsonSchemas, SessionService or URLs containing # are not required in enumeration.
# Example: '/redfish/v1/JsonSchemas/' and sub resources.
# '/redfish/v1/SessionService'
- # '/redfish/v1/Managers/bmc#/Oem'
+ # '/redfish/v1/Managers/${MANAGER_ID}#/Oem'
if (
("JsonSchemas" in resource)
or ("SessionService" in resource)
diff --git a/lib/bmc_redfish_utils.py b/lib/bmc_redfish_utils.py
index e93eee3..e240d94 100644
--- a/lib/bmc_redfish_utils.py
+++ b/lib/bmc_redfish_utils.py
@@ -297,7 +297,7 @@
# required in enumeration.
# Example: '/redfish/v1/JsonSchemas/' and sub resources.
# '/redfish/v1/SessionService'
- # '/redfish/v1/Managers/bmc#/Oem'
+ # '/redfish/v1/Managers/${MANAGER_ID}#/Oem'
if (
("JsonSchemas" in resource)
or ("SessionService" in resource)
diff --git a/lib/bmc_redfish_utils.robot b/lib/bmc_redfish_utils.robot
index c95f7f5..3bc107c 100644
--- a/lib/bmc_redfish_utils.robot
+++ b/lib/bmc_redfish_utils.robot
@@ -48,10 +48,10 @@
# "GracefulRestart",
# "ForceRestart"
# ],
- # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
+ # "target": "/redfish/v1/Managers/${MANAGER_ID}/Actions/Manager.Reset"
# }
- ${target}= redfish_utils.Get Target Actions /redfish/v1/Managers/bmc/ Manager.Reset
+ ${target}= redfish_utils.Get Target Actions /redfish/v1/Managers/${MANAGER_ID}/ Manager.Reset
${payload}= Create Dictionary ResetType=${reset_type}
Redfish.Post ${target} body=&{payload}
@@ -359,6 +359,6 @@
Get BMC Last Reset Time
[Documentation] Return BMC LastResetTime.
- ${last_reset_time}= Redfish.Get Attribute /redfish/v1/Managers/bmc LastResetTime
+ ${last_reset_time}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} LastResetTime
[Return] ${last_reset_time}
diff --git a/lib/certificate_utils.robot b/lib/certificate_utils.robot
index 961178c..60dcb27 100755
--- a/lib/certificate_utils.robot
+++ b/lib/certificate_utils.robot
@@ -164,7 +164,7 @@
Delete All CA Certificate Via Redfish
[Documentation] Delete all CA certificate via Redfish.
- ${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
FOR ${cert} IN @{cert_list}
Redfish.Delete ${cert} valid_status_codes=[${HTTP_NO_CONTENT}]
Log To Console Wait Time started in seconds ${wait_time}
@@ -318,5 +318,5 @@
# NTP network takes few seconds to restart.
Wait Until Keyword Succeeds 30 sec 10 sec
- ... Redfish.Patch ${REDFISH_BASE_URI}Managers/bmc body={'DateTime': '${new_time}'}
+ ... Redfish.Patch ${REDFISH_BASE_URI}Managers/${MANAGER_ID} body={'DateTime': '${new_time}'}
... valid_status_codes=[${HTTP_OK}]
diff --git a/lib/common_utils.robot b/lib/common_utils.robot
index 26300da..afe6f80 100755
--- a/lib/common_utils.robot
+++ b/lib/common_utils.robot
@@ -857,7 +857,7 @@
Redfish Get BMC Version
[Documentation] Get BMC version via Redfish.
- ${output}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/bmc FirmwareVersion
+ ${output}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/${MANAGER_ID} FirmwareVersion
[Return] ${output}
Redfish Get Host Version
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
diff --git a/lib/protocol_setting_utils.robot b/lib/protocol_setting_utils.robot
index 46617fb..3242533 100644
--- a/lib/protocol_setting_utils.robot
+++ b/lib/protocol_setting_utils.robot
@@ -45,7 +45,7 @@
# Sample output:
# {
- # "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol",
+ # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol",
# "@odata.type": "#ManagerNetworkProtocol.v1_5_0.ManagerNetworkProtocol",
# "Description": "Manager Network Service",
# "FQDN": "bmc",
@@ -55,7 +55,7 @@
# },
# "HTTPS": {
# "Certificates": {
- # "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates"
+ # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol/HTTPS/Certificates"
# },
# "Port": xxx,
# "ProtocolEnabled": true
diff --git a/lib/redfish_code_update_utils.robot b/lib/redfish_code_update_utils.robot
index 5210c9b..8a55005 100644
--- a/lib/redfish_code_update_utils.robot
+++ b/lib/redfish_code_update_utils.robot
@@ -22,7 +22,7 @@
${sw_functional}= Run Keyword If
... '${image_info["Description"]}' == 'BMC image' or '${image_info["Description"]}' == 'BMC update'
- ... Redfish.Get Attribute /redfish/v1/Managers/bmc FirmwareVersion
+ ... Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} FirmwareVersion
... ELSE
... Redfish.Get Attribute /redfish/v1/Systems/system BiosVersion
@@ -53,7 +53,7 @@
# "ActiveSoftwareImage": {
# "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/5ca9fec0"
# },
- ${active_sw_img}= Redfish.Get Attribute /redfish/v1/Managers/bmc Links
+ ${active_sw_img}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} Links
${active_id}= Set Variable ${active_sw_img["ActiveSoftwareImage"]["@odata.id"].split("/")[-1]}
@@ -281,7 +281,7 @@
... Set Variable /redfish/v1/UpdateService/FirmwareInventory/${nonfunctional_sw_inv['image_id']}
# Below URI, change to backup image and reset the BMC.
- Redfish.Patch /redfish/v1/Managers/bmc
+ Redfish.Patch /redfish/v1/Managers/${MANAGER_ID}
... body={'Links': {'ActiveSoftwareImage': {'@odata.id': '${firmware_inv_path}'}}}
diff --git a/lib/redfish_plus.py b/lib/redfish_plus.py
index 2cc7531..c33895a 100755
--- a/lib/redfish_plus.py
+++ b/lib/redfish_plus.py
@@ -95,7 +95,7 @@
From a python program:
- response = bmc_redfish.get("/redfish/v1/Managers/bmc/EthernetInterfaces", [200, 201])
+ response = bmc_redfish.get("/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces", [200, 201])
If this call to the get method generates a response.status equal to anything other than 200 or 201,
an exception will be raised.
@@ -103,7 +103,7 @@
From a robot program:
BMC_Redfish.logout
- ${response}= BMC_Redfish.Get /redfish/v1/Managers/bmc/EthernetInterfaces valid_status_codes=[401]
+ ${response}= BMC_Redfish.Get /redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces valid_status_codes=[401]
As part of a robot test, the programmer has logged out to verify that the get request will generate a
status code of 401 (i.e. "Unauthorized").
diff --git a/lib/redfish_request.py b/lib/redfish_request.py
index da455a3..64463cf 100644
--- a/lib/redfish_request.py
+++ b/lib/redfish_request.py
@@ -383,8 +383,8 @@
'Actions' : {
'#Manager.Reset' : {
- '@Redfish.ActionInfo' : '/redfish/v1/Managers/bmc/ResetActionInfo',
- 'target' : '/redfish/v1/Managers/bmc/Actions/Manager.Reset'
+ '@Redfish.ActionInfo' : '/redfish/v1/Managers/${MANAGER_ID}/ResetActionInfo',
+ 'target' : '/redfish/v1/Managers/${MANAGER_ID}/Actions/Manager.Reset'
}
}
"""
diff --git a/lib/resource.robot b/lib/resource.robot
index 947f3fe..c343f86 100755
--- a/lib/resource.robot
+++ b/lib/resource.robot
@@ -37,6 +37,7 @@
# For users privilege admin or sudo.
${USER_TYPE} ${EMPTY}
+${MANAGER_ID} bmc
${CHASSIS_ID} chassis
# MTLS_ENABLED indicates whether mTLS is enabled.
diff --git a/lib/utils.robot b/lib/utils.robot
index 7567ea5..212dc04 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -904,7 +904,7 @@
# "State": "Enabled"
# },
- ${status}= Redfish.Get Attribute /redfish/v1/Managers/bmc Status
+ ${status}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} Status
[Return] ${status["State"]}
diff --git a/network/test_bmc_dhcp_conf.robot b/network/test_bmc_dhcp_conf.robot
index f5c13a5..48fc6d0 100644
--- a/network/test_bmc_dhcp_conf.robot
+++ b/network/test_bmc_dhcp_conf.robot
@@ -117,11 +117,11 @@
${active_channel_config}= Get Active Channel Config
Redfish.Patch
- ... /redfish/v1/Managers/bmc/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']}/
+ ... /redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']}/
... body={"DHCPv4":${property}} valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
${resp}= Redfish.Get
- ... /redfish/v1/Managers/bmc/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']}
+ ... /redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/${active_channel_config['${CHANNEL_NUMBER}']['name']}
Verify Ethernet Config Property ${property} ${resp.dict["DHCPv4"]}
diff --git a/openpower/mpipl/test_mpipl_basic.robot b/openpower/mpipl/test_mpipl_basic.robot
index 767b98d..cbe2754 100644
--- a/openpower/mpipl/test_mpipl_basic.robot
+++ b/openpower/mpipl/test_mpipl_basic.robot
@@ -114,17 +114,17 @@
[Documentation] Check for BMC and system dump.
# {
- # "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Dump/Entries/4",
+ # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/4",
# "@odata.type": "#LogEntry.v1_8_0.LogEntry",
# "AdditionalDataSizeBytes": 914254,
- # "AdditionalDataURI": "/redfish/v1/Managers/bmc/LogServices/Dump/Entries/4/attachment",
+ # "AdditionalDataURI": "/redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/4/attachment",
# "Created": "2022-07-22T03:36:23+00:00",
# "DiagnosticDataType": "Manager",
# "EntryType": "Event",
# "Id": "4",
# "Name": "BMC Dump Entry"
# }
- ${bmc_dump}= Redfish.Get Properties /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ ${bmc_dump}= Redfish.Get Properties /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries
Log To Console BMC dumps generated: ${bmc_dump['Members@odata.count']}
Should Be True ${bmc_dump['Members@odata.count']} >= 1 msg=No BMC dump generated.
diff --git a/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot b/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
index 3b42faf..fdba6ae 100644
--- a/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
+++ b/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
@@ -56,7 +56,7 @@
${validate_errs}= Shell Cmd cat validate_errs
Log ${validate_errs}
- # URL /redfish/v1/Managers/bmc strip the last ending string and save off
+ # URL /redfish/v1/Managers/${MANAGER_ID} strip the last ending string and save off
# the logs for debugging "validate_errs_AccountService" and move to logs/.
Run Keyword If ${status} == ${False}
... Shell Cmd mv validate_errs logs/validate_errs_${url.rsplit("/")[-1]}
diff --git a/redfish/dmtf_tools/test_redfishtool_certificate.robot b/redfish/dmtf_tools/test_redfishtool_certificate.robot
index 327d1f8..9c3a68b 100644
--- a/redfish/dmtf_tools/test_redfishtool_certificate.robot
+++ b/redfish/dmtf_tools/test_redfishtool_certificate.robot
@@ -137,7 +137,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
${dict_objects}= Create Dictionary CertificateString=${file_data}
... CertificateType=PEM CertificateUri=${certificate_dict}
@@ -284,7 +284,7 @@
Delete All CA Certificate Via Redfisthtool
[Documentation] Delete all CA certificate via Redfish.
- ${cmd_output}= Redfishtool Get /redfish/v1/Managers/bmc/Truststore/Certificates
+ ${cmd_output}= Redfishtool Get /redfish/v1/Managers/${MANAGER_ID}/Truststore/Certificates
${cmd_output}= Convert String to JSON ${cmd_output}
${cert_list}= Set Variable ${cmd_output["Members"]}
FOR ${cert} IN @{cert_list}
diff --git a/redfish/managers/test_bmc_dumps.robot b/redfish/managers/test_bmc_dumps.robot
index 3fa4382..c570a8c 100644
--- a/redfish/managers/test_bmc_dumps.robot
+++ b/redfish/managers/test_bmc_dumps.robot
@@ -52,12 +52,12 @@
Redfish Power Off stack_mode=skip
${dump_id}= Create User Initiated BMC Dump Via Redfish
- ${resp}= Redfish.Get Properties /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_id}
+ ${resp}= Redfish.Get Properties /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/${dump_id}
# Example of response from above Redfish GET request.
# "@odata.type": "#LogEntry.v1_7_0.LogEntry",
# "AdditionalDataSizeBytes": 31644,
- # "AdditionalDataURI": "/redfish/v1/Managers/bmc/LogServices/Dump/attachment/9",
+ # "AdditionalDataURI": "/redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/attachment/9",
# "Created": "2020-10-23T06:32:53+00:00",
# "DiagnosticDataType": "Manager",
# "EntryType": "Event",
@@ -87,7 +87,7 @@
# Max size for dump is 20 MB = 20x1024x1024 Byte.
${resp}= Redfish.Get Properties
- ... /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_entries[0]}
+ ... /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/${dump_entries[0]}
Should Be True 0 < ${resp["AdditionalDataSizeBytes"]} < 20971520
@@ -153,13 +153,13 @@
Redfish Power Off stack_mode=skip
Create User Initiated BMC Dump Via Redfish
- ${dump_entries_before}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ ${dump_entries_before}= redfish_utils.get_member_list /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries
# Restart dump service.
BMC Execute Command systemctl restart xyz.openbmc_project.Dump.Manager.service
Sleep 10s reason=Wait for BMC dump service to restart properly
- ${dump_entries_after}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ ${dump_entries_after}= redfish_utils.get_member_list /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries
Lists Should Be Equal ${dump_entries_before} ${dump_entries_after}
@@ -171,12 +171,12 @@
Redfish Power Off stack_mode=skip
Create User Initiated BMC Dump Via Redfish
- ${dump_entries_before}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ ${dump_entries_before}= redfish_utils.get_member_list /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries
# Reset BMC.
OBMC Reboot (off) stack_mode=skip
- ${dump_entries_after}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ ${dump_entries_after}= redfish_utils.get_member_list /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries
Lists Should Be Equal ${dump_entries_before} ${dump_entries_after}
@@ -265,7 +265,7 @@
# Check error while creating dump when dump size is full.
${payload}= Create Dictionary DiagnosticDataType=Manager
- Redfish.Post /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData
+ Redfish.Post /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions/LogService.CollectDiagnosticData
... body=${payload} valid_status_codes=[${HTTP_INTERNAL_SERVER_ERROR}]
@@ -297,7 +297,7 @@
Wait Until Keyword Succeeds 2 min 10 sec Is BMC Dump Available
${dump_entries}= Get BMC Dump Entries
${resp}= Redfish.Get Properties
- ... /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_entries[0]}
+ ... /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/${dump_entries[0]}
# Max size for dump is 20 MB = 20x1024x1024 Byte.
Should Be True 0 < ${resp["AdditionalDataSizeBytes"]} < 20971520
@@ -313,7 +313,7 @@
# Check error while initiating BMC dump while dump in progress.
${payload}= Create Dictionary DiagnosticDataType=Manager
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_SERVICE_UNAVAILABLE}]
# Wait for above initiated dump to complete. Otherwise, on going dump would impact next test.
@@ -336,7 +336,7 @@
${task_dict}= Redfish.Get Properties /redfish/v1/TaskService/Tasks/${task_id}
IF '${task_dict['TaskState']}' == 'Completed' BREAK
${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_SERVICE_UNAVAILABLE}, ${HTTP_ACCEPTED}]
# Sample response of above POST request:
@@ -385,7 +385,7 @@
# Wait for few seconds before initiating the dump.
Sleep 2s
${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}]
# Wait for above initiated dump to complete. Otherwise, on going dump would impact next test.
@@ -461,7 +461,7 @@
Get BMC Dump Entries
[Documentation] Return BMC dump ids list.
- ${dump_uris}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ ${dump_uris}= redfish_utils.get_member_list /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries
${dump_ids}= Create List
FOR ${dump_uri} IN @{dump_uris}
diff --git a/redfish/managers/test_bmc_ipv6.robot b/redfish/managers/test_bmc_ipv6.robot
index edabf98..8ab1f92 100644
--- a/redfish/managers/test_bmc_ipv6.robot
+++ b/redfish/managers/test_bmc_ipv6.robot
@@ -105,7 +105,7 @@
[Documentation] Get Ipv6 network configuration.
# Sample output:
# {
- # "@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0",
+ # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0",
# "@odata.type": "#EthernetInterface.v1_4_1.EthernetInterface",
# "DHCPv4": {
# "DHCPEnabled": false,
@@ -176,7 +176,7 @@
# "State": "Enabled"
# },
# "VLANs": {
- # "@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/VLANs"
+ # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0/VLANs"
${active_channel_config}= Get Active Channel Config
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}]
diff --git a/redfish/managers/test_managers_bmc.robot b/redfish/managers/test_managers_bmc.robot
index a19a12b..9cd1bdd 100644
--- a/redfish/managers/test_managers_bmc.robot
+++ b/redfish/managers/test_managers_bmc.robot
@@ -27,7 +27,7 @@
[Tags] Verify_Redfish_BMC_Firmware_Version
Redfish.Login
- ${resp}= Redfish.Get /redfish/v1/Managers/bmc
+ ${resp}= Redfish.Get /redfish/v1/Managers/${MANAGER_ID}
Should Be Equal As Strings ${resp.status} ${HTTP_OK}
${bmc_version}= Get BMC Version
Should Be Equal As Strings
@@ -39,7 +39,7 @@
[Tags] Verify_Redfish_BMC_Manager_Properties
Redfish.Login
- ${resp}= Redfish.Get /redfish/v1/Managers/bmc
+ ${resp}= Redfish.Get /redfish/v1/Managers/${MANAGER_ID}
Should Be Equal As Strings ${resp.status} ${HTTP_OK}
# Example:
# "Description": "Baseboard Management Controller"
@@ -83,12 +83,12 @@
... ${active_channel_config["${channel_number}"]["is_valid"]}==${FALSE}
# Get ethernet valid paths in redfish.
- # Example: ['/redfish/v1/Managers/bmc/EthernetInterfaces']
+ # Example: ['/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces']
${eth_interface}= redfish_utils.Get Endpoint Path List
... /redfish/v1/Managers/ EthernetInterfaces
# Get the MACAddress attrivute value with the 'name': 'eth0'.
- # Example: /redfish/v1/Managers/bmc/EthernetInterfaces/eth0
+ # Example: /redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0
${redfish_mac_addr}= Redfish.Get Attribute
... ${eth_interface[0]}/${active_channel_config["${channel_number}"]["name"]}
... MACAddress
@@ -113,7 +113,7 @@
# "GracefulRestart",
# "ForceRestart"
# ],
- # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
+ # "target": "/redfish/v1/Managers/${MANAGER_ID}/Actions/Manager.Reset"
# }
${test_file_path}= Set Variable /tmp/before_bmcreboot
@@ -143,7 +143,7 @@
# "GracefulRestart",
# "ForceRestart"
# ],
- # "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
+ # "target": "/redfish/v1/Managers/${MANAGER_ID}/Actions/Manager.Reset"
# }
${test_file_path}= Set Variable /tmp/before_bmcreboot
diff --git a/redfish/managers/test_managers_bmc_time.robot b/redfish/managers/test_managers_bmc_time.robot
index eea7496..a9796f9 100644
--- a/redfish/managers/test_managers_bmc_time.robot
+++ b/redfish/managers/test_managers_bmc_time.robot
@@ -201,7 +201,7 @@
Redfish Get DateTime
[Documentation] Returns BMC Datetime value from Redfish.
- ${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/bmc DateTime
+ ${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/${MANAGER_ID} DateTime
[Return] ${date_time}
@@ -225,7 +225,7 @@
... ELSE
... Set Variable ${date_time}
Wait Until Keyword Succeeds 1min 5sec
- ... Redfish.Patch ${REDFISH_BASE_URI}Managers/bmc body={'DateTime': '${date_time}'} &{kwargs}
+ ... Redfish.Patch ${REDFISH_BASE_URI}Managers/${MANAGER_ID} body={'DateTime': '${date_time}'} &{kwargs}
Set Time To Manual Mode
@@ -312,7 +312,7 @@
Should Be True '${time_diff}'<='3'
Verify NTP Servers Are Populated
- [Documentation] Redfish GET request /redfish/v1/Managers/bmc/NetworkProtocol response
+ [Documentation] Redfish GET request /redfish/v1/Managers/${MANAGER_ID}/NetworkProtocol response
... and verify if NTP servers are populated.
${network_protocol}= Redfish.Get Properties ${REDFISH_NW_PROTOCOL_URI}
diff --git a/redfish/managers/test_multiple_interfaces_dhcp.robot b/redfish/managers/test_multiple_interfaces_dhcp.robot
index 35baaec..da4bfc6 100644
--- a/redfish/managers/test_multiple_interfaces_dhcp.robot
+++ b/redfish/managers/test_multiple_interfaces_dhcp.robot
@@ -54,7 +54,7 @@
${data}= Set Variable If ${dhcp_enabled} == ${False} ${DISABLE_DHCP} ${ENABLE_DHCP}
${resp}= Redfish.Patch
- ... /redfish/v1/Managers/bmc/EthernetInterfaces/${interface}
+ ... /redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/${interface}
... body=${data} valid_status_codes=${valid_status_code}
Suite Setup Execution
diff --git a/redfish/service_root/test_service_root.robot b/redfish/service_root/test_service_root.robot
index a360c3f..3c33c69 100644
--- a/redfish/service_root/test_service_root.robot
+++ b/redfish/service_root/test_service_root.robot
@@ -49,7 +49,7 @@
${HTTP_OK} /redfish/v1/AccountService
${HTTP_OK} /redfish/v1/Systems/system
${HTTP_OK} /redfish/v1/Chassis/${CHASSIS_ID}
- ${HTTP_OK} /redfish/v1/Managers/bmc
+ ${HTTP_OK} /redfish/v1/Managers/${MANAGER_ID}
${HTTP_OK} /redfish/v1/UpdateService
diff --git a/redfish/service_root/test_sessions_management.robot b/redfish/service_root/test_sessions_management.robot
index ca07ddf..a627357 100644
--- a/redfish/service_root/test_sessions_management.robot
+++ b/redfish/service_root/test_sessions_management.robot
@@ -148,7 +148,7 @@
Valid Value managers['Members@odata.count'] [${managers_count}]
# Members can be one or more, hence checking in the list.
- Valid List managers['Members'] required_values=[{'@odata.id': '/redfish/v1/Managers/bmc'}]
+ Valid List managers['Members'] required_values=[{'@odata.id': '/redfish/v1/Managers/${MANAGER_ID}'}]
Verify Chassis Defaults
diff --git a/redfish/task_service/test_tasks.robot b/redfish/task_service/test_tasks.robot
index 2b5d7ad..f4559ec 100644
--- a/redfish/task_service/test_tasks.robot
+++ b/redfish/task_service/test_tasks.robot
@@ -103,7 +103,7 @@
# ],
# "HttpOperation": "POST",
# "JsonBody": "{\n \"DiagnosticDataType\": \"Manager\"\n}",
- # "TargetUri": "/redfish/v1/Managers/bmc/LogServices/Dump/Actions
+ # "TargetUri": "/redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Actions
# /LogService.CollectDiagnosticData"
# },
# "PercentComplete": 0,
diff --git a/redfish/test_xit.robot b/redfish/test_xit.robot
index 57dd3fe..a5675e8 100644
--- a/redfish/test_xit.robot
+++ b/redfish/test_xit.robot
@@ -22,7 +22,7 @@
# Check dump entry based on Redfish API availability.
Redfish.Login
- ${resp}= Redfish.Get /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ ${resp}= Redfish.Get /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries
... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
Log To Console ${resp}
diff --git a/redfish/update_service/test_bmc_image_switch.robot b/redfish/update_service/test_bmc_image_switch.robot
index 26ee0e5..9904334 100755
--- a/redfish/update_service/test_bmc_image_switch.robot
+++ b/redfish/update_service/test_bmc_image_switch.robot
@@ -110,14 +110,14 @@
Match BMC Release And Redifsh Firmware Version
[Documentation] The /etc/os-release vs Redfish FirmwareVersion attribute value from
- ... /redfish/v1/Managers/bmc should match.
+ ... /redfish/v1/Managers/${MANAGER_ID} should match.
# Python module: get_bmc_release_info()
${bmc_release_info}= utils.Get BMC Release Info
${bmc_release}= Set Variable ${bmc_release_info['version_id']}
Rprint Vars bmc_release
- ${firmware_version}= Redfish.Get Attribute /redfish/v1/Managers/bmc FirmwareVersion
+ ${firmware_version}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} FirmwareVersion
Rprint Vars firmware_version
Should Be Equal As Strings ${bmc_release} ${firmware_version}
@@ -139,6 +139,6 @@
Print Timen Switch to back up completed.
# Check if the BMC version after rebooted is the same version asked to switch.
- ${firmware_version}= Redfish.Get Attribute /redfish/v1/Managers/bmc FirmwareVersion
+ ${firmware_version}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} FirmwareVersion
Should Be Equal As Strings ${image_version} ${firmware_version}
... msg=${image_version} does not match redfish version ${firmware_version}
diff --git a/redfish/update_service/test_firmware_inventory.robot b/redfish/update_service/test_firmware_inventory.robot
index 7ee8835..b9b59c7 100644
--- a/redfish/update_service/test_firmware_inventory.robot
+++ b/redfish/update_service/test_firmware_inventory.robot
@@ -85,7 +85,7 @@
[Documentation] Verify BMC version from FirmwareInventory same as in manager.
[Tags] Verify_BMC_Version_Matches_With_FirmwareInventory
- ${bmc_manager}= Redfish.Get /redfish/v1/Managers/bmc
+ ${bmc_manager}= Redfish.Get /redfish/v1/Managers/${MANAGER_ID}
${manager_bmc_version}= Get BMC Version
# Check for manager version and cat /etc/os-release.
Should Be Equal As Strings
@@ -195,7 +195,7 @@
# /redfish/v1/UpdateService/FirmwareInventory/632c5114
# /redfish/v1/UpdateService/FirmwareInventory/e702a011
- ${firmware_inv_path}= Redfish.Get Properties ${REDFISH_BASE_URI}Managers/bmc
+ ${firmware_inv_path}= Redfish.Get Properties ${REDFISH_BASE_URI}Managers/${MANAGER_ID}
${firmware_inv_path}= Get From Dictionary ${firmware_inv_path} Links
${sw_image}= Get From Dictionary ${firmware_inv_path} SoftwareImages
@@ -271,11 +271,11 @@
${sw_inv_list}= Get Functional Firmware BMC image
${sw_inv_dict}= Get Non Functional Firmware ${sw_inv_list} True
- # /redfish/v1/Managers/bmc
+ # /redfish/v1/Managers/${MANAGER_ID}
# "FirmwareVersion": "2.8.0-dev-150-g04508dc9f"
${firmware_version}= Redfish.Get Attribute
- ... ${REDFISH_BASE_URI}Managers/bmc FirmwareVersion
+ ... ${REDFISH_BASE_URI}Managers/${MANAGER_ID} FirmwareVersion
Should Be Equal ${sw_inv_dict['version']} ${firmware_version}
@@ -297,11 +297,11 @@
${sw_inv_list}= Get Functional Firmware BMC image
${sw_inv_list}= Get Non Functional Firmware List ${sw_inv_list} False
- # /redfish/v1/Managers/bmc
+ # /redfish/v1/Managers/${MANAGER_ID}
# "FirmwareVersion": "2.8.0-dev-150-g04508dc9f"
${firmware_version}= Redfish.Get Attribute
- ... ${REDFISH_BASE_URI}Managers/bmc FirmwareVersion
+ ... ${REDFISH_BASE_URI}Managers/${MANAGER_ID} FirmwareVersion
FOR ${sw_inv} IN @{sw_inv_list}
Should Not Be Equal ${sw_inv['version']} ${firmware_version}
@@ -348,7 +348,7 @@
# /redfish/v1/UpdateService/FirmwareInventory/632c5114
# /redfish/v1/UpdateService/FirmwareInventory/632c5444
- ${firmware_inv_path}= Redfish.Get Properties ${REDFISH_BASE_URI}Managers/bmc
+ ${firmware_inv_path}= Redfish.Get Properties ${REDFISH_BASE_URI}Managers/${MANAGER_ID}
${firmware_inv_path}= Get From Dictionary ${firmware_inv_path} Links
${active_sw_image}= Get From Dictionary ${firmware_inv_path} ActiveSoftwareImage
${active_sw_image}= Get From Dictionary ${active_sw_image} @odata.id
diff --git a/redfish/update_service/test_redfish_bmc_code_update.robot b/redfish/update_service/test_redfish_bmc_code_update.robot
index c551135..ccfde94 100644
--- a/redfish/update_service/test_redfish_bmc_code_update.robot
+++ b/redfish/update_service/test_redfish_bmc_code_update.robot
@@ -338,7 +338,7 @@
Get Active Firmware Image
[Documentation] Return get active firmware image.
- ${active_image}= Redfish.Get Attribute /redfish/v1/Managers/bmc Links
+ ${active_image}= Redfish.Get Attribute /redfish/v1/Managers/${MANAGER_ID} Links
Rprint Vars active_image
[Return] ${active_image}