George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Resource ../../lib/resource.txt |
| 3 | Resource ../../lib/bmc_redfish_resource.robot |
| 4 | |
| 5 | *** Test Cases *** |
| 6 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 7 | Verify Redfish Update Service Enabled |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 8 | [Documentation] Verify "ServiceEnabled" is enabled. |
| 9 | [Tags] Verify_Update_Service_Enabled |
| 10 | |
| 11 | # Example: |
| 12 | # "HttpPushUri": "/redfish/v1/UpdateService", |
| 13 | # "Id": "UpdateService", |
| 14 | # "Name": "Update Service", |
| 15 | # "ServiceEnabled": true |
| 16 | |
| 17 | redfish.Login |
| 18 | ${resp}= redfish.Get /redfish/v1/UpdateService |
| 19 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 20 | Should Be Equal As Strings ${resp.dict["ServiceEnabled"]} ${True} |
| 21 | redfish.Logout |
| 22 | |
| 23 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 24 | Verify Redfish Software Inventory Collection |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 25 | [Documentation] Verify software inventory collection member and object entries. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 26 | [Tags] Verify_Redfish_Software_Inventory_Collection |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 27 | |
| 28 | # Example: |
| 29 | # { |
| 30 | # "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", |
| 31 | # "Members": [ |
| 32 | # { |
| 33 | # "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/a3522998" |
| 34 | # }, |
| 35 | # { |
| 36 | # "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/a7c79f71" |
| 37 | # }, |
| 38 | # { |
| 39 | # "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/ace821ef" |
| 40 | # } |
| 41 | # ], |
| 42 | # "Members@odata.count": 3, |
| 43 | # "Name": "Software Inventory Collection" |
| 44 | # } |
| 45 | |
| 46 | redfish.Login |
| 47 | ${resp}= redfish.Get /redfish/v1/UpdateService/FirmwareInventory |
| 48 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 49 | |
| 50 | Should Be True ${resp.dict["Members@odata.count"]} >= ${1} |
| 51 | Length Should Be ${resp.dict["Members"]} ${resp.dict["Members@odata.count"]} |
| 52 | redfish.Logout |
| 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 | |
| 59 | redfish.Login |
| 60 | ${resp}= redfish.Get /redfish/v1/UpdateService/FirmwareInventory |
| 61 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 62 | |
| 63 | # Entries "Members@odata.count": 3, |
| 64 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/a3522998'} |
| 65 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/a7c79f71'} |
| 66 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/ace821ef'} |
| 67 | |
| 68 | :FOR ${entry} IN RANGE 0 ${resp.dict["Members@odata.count"]} |
| 69 | \ ${resp_resource}= redfish.Get ${resp.dict["Members"][${entry}]["@odata.id"]} |
| 70 | \ Should Be Equal As Strings ${resp_resource.status} ${HTTP_OK} |
| 71 | # Example: |
| 72 | # "Status": { |
| 73 | # "Health": "OK", |
| 74 | # "HealthRollup": "OK", |
| 75 | # "State": "Enabled" |
| 76 | # }, |
| 77 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["Health"]} OK |
| 78 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["HealthRollup"]} OK |
| 79 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["State"]} Enabled |