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 | |
| 6 | Test Teardown FFDC On Test Case Fail |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 7 | |
| 8 | *** Test Cases *** |
| 9 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 10 | Verify Redfish Update Service Enabled |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 11 | [Documentation] Verify "ServiceEnabled" is enabled. |
| 12 | [Tags] Verify_Update_Service_Enabled |
| 13 | |
| 14 | # Example: |
| 15 | # "HttpPushUri": "/redfish/v1/UpdateService", |
| 16 | # "Id": "UpdateService", |
| 17 | # "Name": "Update Service", |
| 18 | # "ServiceEnabled": true |
| 19 | |
| 20 | redfish.Login |
| 21 | ${resp}= redfish.Get /redfish/v1/UpdateService |
| 22 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 23 | Should Be Equal As Strings ${resp.dict["ServiceEnabled"]} ${True} |
| 24 | redfish.Logout |
| 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 | |
| 49 | redfish.Login |
| 50 | ${resp}= redfish.Get /redfish/v1/UpdateService/FirmwareInventory |
| 51 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 52 | |
| 53 | Should Be True ${resp.dict["Members@odata.count"]} >= ${1} |
| 54 | Length Should Be ${resp.dict["Members"]} ${resp.dict["Members@odata.count"]} |
| 55 | redfish.Logout |
| 56 | |
| 57 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 58 | Redfish Software Inventory Status Check |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 59 | [Documentation] Get firmware inventory entries and do health check status. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 60 | [Tags] Redfish_Software_Inventory_Status_Check |
George Keishing | c5fab99 | 2019-02-02 08:50:37 -0600 | [diff] [blame] | 61 | |
| 62 | redfish.Login |
| 63 | ${resp}= redfish.Get /redfish/v1/UpdateService/FirmwareInventory |
| 64 | Should Be Equal As Strings ${resp.status} ${HTTP_OK} |
| 65 | |
| 66 | # Entries "Members@odata.count": 3, |
| 67 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/a3522998'} |
| 68 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/a7c79f71'} |
| 69 | # {'@odata.id': '/redfish/v1/UpdateService/FirmwareInventory/ace821ef'} |
| 70 | |
| 71 | :FOR ${entry} IN RANGE 0 ${resp.dict["Members@odata.count"]} |
| 72 | \ ${resp_resource}= redfish.Get ${resp.dict["Members"][${entry}]["@odata.id"]} |
| 73 | \ Should Be Equal As Strings ${resp_resource.status} ${HTTP_OK} |
| 74 | # Example: |
| 75 | # "Status": { |
| 76 | # "Health": "OK", |
| 77 | # "HealthRollup": "OK", |
| 78 | # "State": "Enabled" |
| 79 | # }, |
| 80 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["Health"]} OK |
| 81 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["HealthRollup"]} OK |
| 82 | \ Should Be Equal As Strings ${resp_resource.dict["Status"]["State"]} Enabled |
Sivas SRR | 0deb336 | 2019-02-15 02:38:24 -0600 | [diff] [blame^] | 83 | redfish.Logout |