| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 1 | *** Settings *** |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 2 | Documentation Inventory of hardware FRUs under redfish. |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 3 | |
| 4 | Resource ../../lib/bmc_redfish_resource.robot |
| 5 | Resource ../../lib/bmc_redfish_utils.robot |
| 6 | Resource ../../lib/openbmc_ffdc.robot |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 7 | Library ../../lib/gen_robot_valid.py |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 8 | |
| 9 | Suite Setup Suite Setup Execution |
| 10 | Suite Teardown Suite Teardown Execution |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 11 | Test Setup Printn |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 12 | Test Teardown Test Teardown Execution |
| 13 | |
| Igor Kanyuka | feb79d6 | 2025-10-20 21:24:03 +0100 | [diff] [blame] | 14 | Test Tags Systems_Inventory |
| 15 | |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 16 | *** Variables *** |
| 17 | |
| 18 | # The passing criteria. Must have at least this many. |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 19 | ${min_num_dimms} 2 |
| 20 | ${min_num_cpus} 1 |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 21 | ${min_num_cores} 18 |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 22 | ${min_num_power_supplies} 1 |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 23 | |
| 24 | |
| 25 | *** Test Cases *** |
| 26 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 27 | Verify CPU And Core Count |
| 28 | [Documentation] Get the total number of CPUs and cores in the system. |
| 29 | ... Verify counts are above minimums. |
| 30 | [Tags] Verify_CPU_And_Core_Count |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 31 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 32 | # Select only CPUs with Health = "OK". |
| 33 | ${cpus_ok}= Filter Struct ${cpu_info} [('Health', 'OK')] |
| 34 | ${num_cpus}= Get Length ${cpus_ok} |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 35 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 36 | Rprint Vars num_cpus min_num_cpus |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 37 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 38 | # Assert that num_cpus is greater than or equal to min_num_cpus. |
| 39 | Valid Range num_cpus ${min_num_cpus} |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 40 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 41 | # Get the number of cores. |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 42 | ${total_num_cores}= Set Variable ${0} |
| Sushma M M | d27fc31 | 2020-06-19 08:26:50 -0500 | [diff] [blame] | 43 | FOR ${cpu} IN @{cpus_ok} |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 44 | ${cores}= Get CPU TotalCores ${cpu} |
| 45 | ${total_num_cores}= Evaluate $total_num_cores + ${cores} |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 46 | END |
| 47 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 48 | Rprint Vars total_num_cores min_num_cores |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 49 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 50 | # Assert that total_num_cores is greater than or equal to |
| 51 | # min_num_cores. |
| 52 | Valid Range total_num_cores ${min_num_cores} |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 53 | |
| 54 | |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 55 | Get Memory Inventory Via Redfish And Verify |
| 56 | [Documentation] Get the number of DIMMs that are functional and enabled. |
| 57 | [Tags] Get_Memory_Inventory_Via_Redfish_And_Verify |
| 58 | |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 59 | Verify FRU Inventory Minimums Memory ${min_num_dimms} |
| 60 | |
| 61 | |
| Steven Sombar | c5d6584 | 2019-08-21 15:39:08 -0500 | [diff] [blame] | 62 | Get Memory Summary State And Verify Enabled |
| 63 | [Documentation] Check that the state of the MemorySummary attribute |
| 64 | ... under /redfish/v1/Systems/system is 'Enabled'. |
| 65 | [Tags] Get_Memory_Summary_State_And_Verify_Enabled |
| 66 | |
| 67 | ${status}= Redfish.Get Attribute ${SYSTEM_BASE_URI} MemorySummary |
| 68 | ${memory_summary_state}= Set Variable ${status['Status']['State']} |
| 69 | Rprint Vars memory_summary_state |
| 70 | |
| 71 | Should Be Equal As Strings Enabled ${memory_summary_state} |
| 72 | ... msg=MemorySummary State is not 'Enabled'. |
| 73 | |
| 74 | |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 75 | Get System Serial And Verify Populated |
| 76 | [Documentation] Check that the System SerialNumber is non-blank. |
| 77 | [Tags] Get_System_Serial_And_Verify_Populated |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 78 | |
| 79 | ${serial_number}= Redfish.Get Attribute ${SYSTEM_BASE_URI} SerialNumber |
| Michael Walsh | e7edb22 | 2019-08-19 17:39:38 -0500 | [diff] [blame] | 80 | Valid Value serial_number |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 81 | Rprint Vars serial_number |
| 82 | |
| 83 | |
| 84 | Get Model And Verify Populated |
| 85 | [Documentation] Check that the Model is non-blank. |
| 86 | [Tags] Get_Model_And_Verify_Populated |
| 87 | |
| 88 | ${model}= Redfish.Get Attribute ${SYSTEM_BASE_URI} Model |
| Michael Walsh | e7edb22 | 2019-08-19 17:39:38 -0500 | [diff] [blame] | 89 | Valid Value model |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 90 | Rprint Vars model |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 91 | |
| 92 | |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 93 | Get Available Power Supplies And Verify |
| 94 | [Documentation] Get the number of functional power supplies and |
| 95 | ... verify that it is at or above the minimum. |
| 96 | [Tags] Get_Available_Power_Supplies_And_Verify |
| 97 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 98 | # Select only power supplies with Health = "OK". |
| 99 | ${power_supplies_ok}= Filter Struct ${power_supplies} [('Health', 'OK')] |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 100 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 101 | # Count the power supplies that are Enabled or StandbyOffline. |
| 102 | ${total_num_supplies}= Set Variable ${0} |
| Sushma M M | d27fc31 | 2020-06-19 08:26:50 -0500 | [diff] [blame] | 103 | FOR ${power_supply} IN @{power_supplies_ok} |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 104 | # Example of power_supply: |
| 105 | # power_supply = {'@odata.id': '/redfish/v1/Chassis/chassis/Power#/PowerSupplies/0', |
| 106 | # 'Manufacturer': '', 'MemberId': 'powersupply0', 'Model': '2100', 'Name': |
| 107 | # 'powersupply0', 'PartNumber': 'PNPWR123', 'PowerInputWatts': 394.0, |
| 108 | # 'SerialNumber': '75B12W', 'Status': {'Health': 'OK', 'State': 'Enabled'}} |
| 109 | ${state}= Set Variable ${power_supply['Status']['State']} |
| 110 | ${good_state}= Evaluate |
| 111 | ... any(x in '${state}' for x in ('Enabled', 'StandbyOffline')) |
| Sridevi Ramesh | c6e7f93 | 2025-05-07 11:26:54 -0500 | [diff] [blame] | 112 | |
| Sridevi Ramesh | e54be14 | 2025-05-05 00:52:45 -0500 | [diff] [blame] | 113 | IF not ${good_state} CONTINUE |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 114 | ${total_num_supplies}= Evaluate $total_num_supplies + ${1} |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 115 | END |
| 116 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 117 | Rprint Vars total_num_supplies min_num_power_supplies |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 118 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 119 | Valid Range total_num_supplies ${min_num_power_supplies} |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 120 | |
| 121 | |
| 122 | Get Motherboard Serial And Verify Populated |
| 123 | [Documentation] Check that the Motherboard SerialNumber is non-blank. |
| 124 | [Tags] Get_Motherboard_Serial_And_Verify_Populated |
| 125 | |
| George Keishing | 6ec9d70 | 2022-03-07 11:46:53 -0600 | [diff] [blame] | 126 | ${serial_number}= Redfish.Get Attribute ${REDFISH_CHASSIS_URI}${CHASSIS_ID} SerialNumber |
| Michael Walsh | e7edb22 | 2019-08-19 17:39:38 -0500 | [diff] [blame] | 127 | Valid Value serial_number |
| Steven Sombar | 815fa63 | 2019-07-16 14:24:40 -0500 | [diff] [blame] | 128 | Rprint Vars serial_number |
| 129 | |
| 130 | |
| Steven Sombar | c2ace20 | 2019-09-04 13:17:32 -0500 | [diff] [blame] | 131 | Verify Motherboard Manufacturer Field Value Populated |
| 132 | [Documentation] Check that the Motherboard manufacturer is non-blank. |
| 133 | [Tags] Verify_Motherboard_Manufacturer_Field_Value_Populated |
| 134 | |
| George Keishing | 6ec9d70 | 2022-03-07 11:46:53 -0600 | [diff] [blame] | 135 | ${motherboard_manufacturer}= Redfish.Get Attribute ${REDFISH_CHASSIS_URI}${CHASSIS_ID} Manufacturer |
| Steven Sombar | c2ace20 | 2019-09-04 13:17:32 -0500 | [diff] [blame] | 136 | Valid Value motherboard_manufacturer |
| George Keishing | d2f210a | 2022-02-23 10:44:10 -0600 | [diff] [blame] | 137 | Rprint Vars motherboard_manufacturer |
| Steven Sombar | c2ace20 | 2019-09-04 13:17:32 -0500 | [diff] [blame] | 138 | |
| 139 | |
| 140 | Verify Motherboard Partnumber Field Value Populated |
| 141 | [Documentation] Check that the Motherboard partnumber is non-blank. |
| 142 | [Tags] Verify_Motherboard_Partnumber_Field_Value_Populated |
| 143 | |
| George Keishing | 6ec9d70 | 2022-03-07 11:46:53 -0600 | [diff] [blame] | 144 | ${motherboard_part_number}= Redfish.Get Attribute ${REDFISH_CHASSIS_URI}${CHASSIS_ID} PartNumber |
| Steven Sombar | c2ace20 | 2019-09-04 13:17:32 -0500 | [diff] [blame] | 145 | Valid Value motherboard_part_number |
| George Keishing | d2f210a | 2022-02-23 10:44:10 -0600 | [diff] [blame] | 146 | Rprint Vars motherboard_part_number |
| Steven Sombar | c2ace20 | 2019-09-04 13:17:32 -0500 | [diff] [blame] | 147 | |
| 148 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 149 | Check GPU States When Power On |
| 150 | [Documentation] Check the State of each of the GPUs |
| 151 | ... in the system. A system may have 0-6 GPUs. |
| 152 | [Tags] Check_GPU_States_When_Power_On |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 153 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 154 | # System was powered-on in Suite Setup. |
| 155 | GPU State Check |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 156 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 157 | |
| 158 | Check GPU States When Power Off |
| 159 | [Documentation] Check the State of the GPUs when power is Off. |
| 160 | [Tags] Check_GPU_States_When_Power_Off |
| 161 | |
| 162 | Redfish Power Off |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 163 | GPU State Check |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 164 | |
| Nandakumar B | 122c41f | 2025-11-05 13:38:29 +0530 | [diff] [blame] | 165 | Verify Systems Collection With Unsupported Methods |
| 166 | [Documentation] Verify Systems collection with Unsupported methods |
| 167 | [Tags] Verify_Systems_Collection_With_Unsupported_Methods |
| 168 | |
| 169 | # Get operation on Systems Collection |
| 170 | Redfish.Get /redfish/v1/Systems |
| 171 | ... valid_status_codes=[${HTTP_OK}] |
| 172 | |
| 173 | # Put operation on Systems Collection |
| 174 | Redfish.Put /redfish/v1/Systems |
| 175 | ... valid_status_codes=[${HTTP_METHOD_NOT_ALLOWED}] |
| 176 | |
| 177 | # Post operation on Systems Collection |
| 178 | Redfish.Post /redfish/v1/Systems |
| 179 | ... valid_status_codes=[${HTTP_METHOD_NOT_ALLOWED}] |
| 180 | |
| 181 | # Delete operation on Systems Collection |
| 182 | Redfish.Delete /redfish/v1/Systems |
| 183 | ... valid_status_codes=[${HTTP_METHOD_NOT_ALLOWED}] |
| 184 | |
| 185 | # Patch operation on Systems Collection |
| 186 | Redfish.Patch /redfish/v1/Systems |
| 187 | ... valid_status_codes=[${HTTP_METHOD_NOT_ALLOWED}] |
| 188 | |
| 189 | Verify Systems Instance Collection With Unsupported Methods |
| 190 | [Documentation] Verify Systems Instance collection with Unsupported methods |
| 191 | [Tags] Verify_Systems_Instance_Collection_With_Unsupported_Methods |
| 192 | |
| 193 | # Get operation on Systems Instance Collection |
| 194 | Redfish.Get /redfish/v1/Systems/system |
| 195 | ... valid_status_codes=[${HTTP_OK}] |
| 196 | |
| 197 | # Put operation on Systems Instance Collection |
| 198 | Redfish.Put /redfish/v1/Systems/system |
| 199 | ... valid_status_codes=[${HTTP_METHOD_NOT_ALLOWED}] |
| 200 | |
| 201 | # Post operation on Systems Instance Collection |
| 202 | Redfish.Post /redfish/v1/Systems/system |
| 203 | ... valid_status_codes=[${HTTP_METHOD_NOT_ALLOWED}] |
| 204 | |
| 205 | # Delete operation on Systems Instance Collection |
| 206 | Redfish.Delete /redfish/v1/Systems/system |
| 207 | ... valid_status_codes=[${HTTP_METHOD_NOT_ALLOWED}] |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 208 | |
| Nandakumar B | 3da8ead | 2025-11-21 12:26:39 +0530 | [diff] [blame^] | 209 | Verify And Modify Systems Instance Collection Properties |
| 210 | [Documentation] Verify And Modify Systems Instance Collection Properties |
| 211 | [Tags] Verify_And_Modify_Systems_Instance_Collection_Properties |
| 212 | [Template] Modify Systems Instance Collection Properties |
| 213 | |
| 214 | #Action_type #Parameter |
| 215 | AutomaticRetryConfig Disabled |
| 216 | AutomaticRetryConfig RetryAttempts |
| 217 | BootSourceOverrideTarget Pxe |
| 218 | BootSourceOverrideTarget Hdd |
| 219 | BootSourceOverrideTarget Cd |
| 220 | BootSourceOverrideTarget Usb |
| 221 | BootSourceOverrideTarget BiosSetup |
| 222 | BootSourceOverrideTarget Diags |
| 223 | BootSourceOverrideTarget None |
| 224 | BootSourceOverrideMode Legacy |
| 225 | BootSourceOverrideMode UEFI |
| 226 | |
| 227 | |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 228 | *** Keywords *** |
| 229 | |
| Nandakumar B | 3da8ead | 2025-11-21 12:26:39 +0530 | [diff] [blame^] | 230 | Modify Systems Instance Collection Properties |
| 231 | [Documentation] Modify Systems Instance Collection Properties |
| 232 | [Arguments] ${action_type} ${parameter} |
| 233 | # Description of argument(s): |
| 234 | # action_type The action_type to modify the systems Instance Properties. |
| 235 | # parameter The parameter value to set for the specified action_type. |
| 236 | |
| 237 | # Get original action_type from Systems Instance Properties |
| 238 | ${resp}= Redfish.Get Properties /redfish/v1/Systems/system |
| 239 | ... valid_status_codes=[${HTTP_OK}] |
| 240 | ${default_action_type}= Set Variable ${resp["Boot"]["${action_type}"]} |
| 241 | |
| 242 | # Set new action_type in Systems Instance Properties |
| 243 | ${payload}= Catenate { "Boot":{"${action_type}":"${parameter}"}} |
| 244 | Redfish.Patch /redfish/v1/Systems/system body=${payload} |
| 245 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}] |
| 246 | |
| 247 | # Verify Modified action_type in Systems Instance Properties |
| 248 | ${resp}= Redfish.Get Properties /redfish/v1/Systems/system |
| 249 | ... valid_status_codes=[${HTTP_OK}] |
| 250 | Should Be Equal As Strings ${resp["Boot"]["${action_type}"]} ${parameter} |
| 251 | |
| 252 | # Restore default action_type in Systems Instance Properties |
| 253 | ${payload}= Catenate { "Boot":{"${action_type}":"${default_action_type}"}} |
| 254 | Redfish.Patch /redfish/v1/Systems/system body=${payload} |
| 255 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NO_CONTENT}] |
| 256 | |
| 257 | # Verify Restored action_type in Systems Instance Properties |
| 258 | ${resp}= Redfish.Get Properties /redfish/v1/Systems/system |
| 259 | ... valid_status_codes=[${HTTP_OK}] |
| 260 | Should Be Equal As Strings ${resp["Boot"]["${action_type}"]} ${default_action_type} |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 261 | |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 262 | Get CPU TotalCores |
| 263 | [Documentation] Return the TotalCores of a CPU. |
| 264 | ... Return 0 if this attribute is missing or NONE. |
| 265 | [Arguments] ${processor} |
| 266 | |
| 267 | # Description of Argument(s): |
| 268 | # processor The Redfish URI of a CPU (e.g. |
| 269 | # "/redfish/v1/Systems/system/Processors/cpu0"). |
| 270 | |
| 271 | ${total_cores}= Redfish.Get Attribute ${processor} TotalCores |
| Sridevi Ramesh | e54be14 | 2025-05-05 00:52:45 -0500 | [diff] [blame] | 272 | IF ${total_cores} is ${NONE} RETURN ${0} |
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 273 | RETURN ${total_cores} |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 274 | |
| 275 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 276 | GPU State Check |
| 277 | [Documentation] The state of every "OK" GPU should be |
| 278 | ... "Absent", "Enabled", or "UnavailableOffline". |
| 279 | |
| 280 | # Select only GPUs with Health = "OK". |
| 281 | ${gpus_ok}= Filter Struct ${gpu_info} [('Health', 'OK')] |
| 282 | |
| Sushma M M | d27fc31 | 2020-06-19 08:26:50 -0500 | [diff] [blame] | 283 | FOR ${gpu} IN @{gpus_ok} |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 284 | ${status}= Redfish.Get Attribute ${gpu} Status |
| 285 | ${state}= Set Variable ${status['State']} |
| 286 | ${good_state}= Evaluate |
| 287 | ... any(x in '${state}' for x in ('Absent', 'Enabled', 'UnavailableOffline')) |
| 288 | Rprint Vars gpu state |
| Sridevi Ramesh | e54be14 | 2025-05-05 00:52:45 -0500 | [diff] [blame] | 289 | IF not ${good_state} |
| 290 | Fail msg=GPU State is not Absent, Enabled, or UnavailableOffline. |
| 291 | END |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 292 | END |
| 293 | |
| 294 | |
| 295 | Get Inventory URIs |
| 296 | [Documentation] Get and return a tuple of lists of URIs for CPU, |
| 297 | ... GPU and PowerSupplies. |
| 298 | |
| Sridevi Ramesh | e54be14 | 2025-05-05 00:52:45 -0500 | [diff] [blame] | 299 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 300 | ${processor_info}= Redfish_Utils.Enumerate Request |
| 301 | ... ${SYSTEM_BASE_URI}Processors return_json=0 |
| 302 | |
| 303 | ${cpu_info}= Filter Struct ${processor_info} |
| 304 | ... [('ProcessorType', 'CPU')] regex=1 |
| 305 | |
| 306 | ${gpu_info}= Filter Struct ${processor_info} |
| 307 | ... [('ProcessorType', 'Accelerator')] regex=1 |
| 308 | |
| 309 | ${power_supplies}= Redfish.Get Attribute |
| Glukhov Mikhail | 148b5b8 | 2023-01-20 15:14:44 +0300 | [diff] [blame] | 310 | ... ${REDFISH_CHASSIS_URI}${CHASSIS_ID}/Power PowerSupplies |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 311 | |
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 312 | RETURN ${cpu_info} ${gpu_info} ${power_supplies} |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 313 | |
| 314 | |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 315 | Verify FRU Inventory Minimums |
| George Keishing | 3292d4a | 2019-06-19 02:04:53 -0500 | [diff] [blame] | 316 | [Documentation] Verify a minimum number of FRUs. |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 317 | [Arguments] ${fru_type} ${min_num_frus} |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 318 | |
| 319 | # Description of Argument(s): |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 320 | # fru_type The type of FRU (e.g. "Processors", "Memory", etc.). |
| 321 | # min_num_frus The minimum acceptable number of FRUs found. |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 322 | |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 323 | # A valid FRU will have a "State" key of "Enabled" and a "Health" key |
| 324 | # of "OK". |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 325 | |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 326 | ${status} ${num_valid_frus}= Run Key U Get Num Valid FRUs \ ${fru_type} |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 327 | |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 328 | Rprint Vars fru_type num_valid_frus min_num_frus |
| 329 | |
| Steven Sombar | bccfd51 | 2019-06-05 15:50:35 -0500 | [diff] [blame] | 330 | Return From Keyword If ${num_valid_frus} >= ${min_num_frus} |
| 331 | Fail Too few "${fru_type}" FRUs found, found only ${num_valid_frus}. |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 332 | |
| 333 | |
| 334 | Suite Teardown Execution |
| 335 | [Documentation] Do the post suite teardown. |
| 336 | |
| 337 | Redfish.Logout |
| 338 | |
| 339 | |
| 340 | Suite Setup Execution |
| 341 | [Documentation] Do test case setup tasks. |
| 342 | |
| 343 | Redfish.Login |
| George Keishing | 07fb41f | 2020-06-16 08:09:19 -0500 | [diff] [blame] | 344 | Redfish Power On stack_mode=skip |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 345 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 346 | ${cpu_info} ${gpu_info} ${power_supplies}= Get Inventory URIs |
| Steven Sombar | ecf10e3 | 2019-07-25 08:51:00 -0500 | [diff] [blame] | 347 | |
| Steven Sombar | b76d4df | 2019-08-06 15:03:47 -0500 | [diff] [blame] | 348 | Set Suite Variable ${cpu_info} |
| 349 | Set Suite Variable ${gpu_info} |
| 350 | Set Suite Variable ${power_supplies} |
| Steven Sombar | c90c8e2 | 2019-05-21 11:28:48 -0500 | [diff] [blame] | 351 | |
| 352 | |
| 353 | Test Teardown Execution |
| 354 | [Documentation] Do the post test teardown. |
| 355 | |
| 356 | FFDC On Test Case Fail |