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