George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 1 | *** Settings *** |
Joy Onyerikwu | dbfe97d | 2019-03-11 19:44:56 -0500 | [diff] [blame] | 2 | Documentation Verify that Redfish software inventory can be collected. |
| 3 | |
George Keishing | 2db7bca | 2019-02-14 13:03:08 -0600 | [diff] [blame] | 4 | Resource ../../lib/resource.robot |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 5 | Resource ../../lib/bmc_redfish_resource.robot |
George Keishing | 3298d5c | 2019-02-12 06:59:25 -0600 | [diff] [blame] | 6 | Resource ../../lib/openbmc_ffdc.robot |
| 7 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 8 | Test Setup Test Setup Execution |
| 9 | Test Teardown Test Teardown Execution |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 10 | |
| 11 | *** Test Cases *** |
| 12 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 13 | Verify Redfish Update Service Enabled |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 14 | [Documentation] Verify "ServiceEnabled" is enabled. |
| 15 | [Tags] Verify_Update_Service_Enabled |
| 16 | |
| 17 | # Example: |
| 18 | # "HttpPushUri": "/redfish/v1/UpdateService", |
| 19 | # "Id": "UpdateService", |
| 20 | # "Name": "Update Service", |
| 21 | # "ServiceEnabled": true |
| 22 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 23 | ${resp}= Redfish.Get /redfish/v1/UpdateService |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 24 | Should Be Equal As Strings ${resp.dict["ServiceEnabled"]} ${True} |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 25 | |
| 26 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 27 | Verify Redfish Software Inventory Collection |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 28 | [Documentation] Verify software inventory collection member and object entries. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 29 | [Tags] Verify_Redfish_Software_Inventory_Collection |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 30 | |
| 31 | # Example: |
| 32 | # { |
| 33 | # "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", |
| 34 | # "Members": [ |
| 35 | # { |
| 36 | # "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/a3522998" |
| 37 | # }, |
| 38 | # { |
| 39 | # "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/a7c79f71" |
| 40 | # }, |
| 41 | # { |
| 42 | # "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/ace821ef" |
| 43 | # } |
| 44 | # ], |
| 45 | # "Members@odata.count": 3, |
| 46 | # "Name": "Software Inventory Collection" |
| 47 | # } |
| 48 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 49 | ${resp}= Redfish.Get /redfish/v1/UpdateService/FirmwareInventory |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 50 | |
| 51 | Should Be True ${resp.dict["Members@odata.count"]} >= ${1} |
| 52 | Length Should Be ${resp.dict["Members"]} ${resp.dict["Members@odata.count"]} |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 53 | |
| 54 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 55 | Redfish Software Inventory Status Check |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 56 | [Documentation] Get firmware inventory entries and do health check status. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 57 | [Tags] Redfish_Software_Inventory_Status_Check |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 58 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 59 | ${resp}= Redfish.Get /redfish/v1/UpdateService/FirmwareInventory |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 60 | |
| 61 | # Entries "Members@odata.count": 3, |
| 62 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/a3522998'} |
| 63 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/a7c79f71'} |
| 64 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/ace821ef'} |
| 65 | |
| 66 | :FOR ${entry} IN RANGE 0 ${resp.dict["Members@odata.count"]} |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 67 | \ ${resp_resource}= Redfish.Get ${resp.dict["Members"][${entry}]["@odata.id"]} |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 68 | # Example: |
| 69 | # "Status": { |
| 70 | # "Health": "OK", |
| 71 | # "HealthRollup": "OK", |
| 72 | # "State": "Enabled" |
| 73 | # }, |
| 74 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["Health"]} OK |
| 75 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["HealthRollup"]} OK |
| 76 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["State"]} Enabled |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 77 | |
| 78 | |
| 79 | *** Keywords *** |
| 80 | |
| 81 | Test Setup Execution |
| 82 | [Documentation] Do test case setup tasks. |
| 83 | |
| 84 | Redfish.Login |
| 85 | |
| 86 | |
| 87 | Test Teardown Execution |
| 88 | [Documentation] Do the post test teardown. |
| 89 | |
| 90 | FFDC On Test Case Fail |
| 91 | Redfish.Logout |