blob: 9e26b880872880b9b2524703763b32c3379cbbff [file] [log] [blame]
George Keishingc5fab992019-02-02 08:50:37 -06001*** Settings ***
George Keishing2db7bca2019-02-14 13:03:08 -06002Resource ../../lib/resource.robot
George Keishingc5fab992019-02-02 08:50:37 -06003Resource ../../lib/bmc_redfish_resource.robot
George Keishing3298d5c2019-02-12 06:59:25 -06004Resource ../../lib/openbmc_ffdc.robot
5
George Keishing97c93942019-03-04 12:45:07 -06006Test Setup Test Setup Execution
7Test Teardown Test Teardown Execution
George Keishingc5fab992019-02-02 08:50:37 -06008
9*** Test Cases ***
10
George Keishing5ee33d92019-02-02 12:33:25 -060011Verify Redfish Update Service Enabled
George Keishingc5fab992019-02-02 08:50:37 -060012 [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 Keishing97c93942019-03-04 12:45:07 -060021 ${resp}= Redfish.Get /redfish/v1/UpdateService
George Keishingc5fab992019-02-02 08:50:37 -060022 Should Be Equal As Strings ${resp.dict["ServiceEnabled"]} ${True}
George Keishingc5fab992019-02-02 08:50:37 -060023
24
George Keishing5ee33d92019-02-02 12:33:25 -060025Verify Redfish Software Inventory Collection
George Keishingc5fab992019-02-02 08:50:37 -060026 [Documentation] Verify software inventory collection member and object entries.
George Keishing5ee33d92019-02-02 12:33:25 -060027 [Tags] Verify_Redfish_Software_Inventory_Collection
George Keishingc5fab992019-02-02 08:50:37 -060028
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 Keishing97c93942019-03-04 12:45:07 -060047 ${resp}= Redfish.Get /redfish/v1/UpdateService/FirmwareInventory
George Keishingc5fab992019-02-02 08:50:37 -060048
49 Should Be True ${resp.dict["Members@odata.count"]} >= ${1}
50 Length Should Be ${resp.dict["Members"]} ${resp.dict["Members@odata.count"]}
George Keishingc5fab992019-02-02 08:50:37 -060051
52
George Keishing5ee33d92019-02-02 12:33:25 -060053Redfish Software Inventory Status Check
George Keishingc5fab992019-02-02 08:50:37 -060054 [Documentation] Get firmware inventory entries and do health check status.
George Keishing5ee33d92019-02-02 12:33:25 -060055 [Tags] Redfish_Software_Inventory_Status_Check
George Keishingc5fab992019-02-02 08:50:37 -060056
George Keishing97c93942019-03-04 12:45:07 -060057 ${resp}= Redfish.Get /redfish/v1/UpdateService/FirmwareInventory
George Keishingc5fab992019-02-02 08:50:37 -060058
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 Keishing97c93942019-03-04 12:45:07 -060065 \ ${resp_resource}= Redfish.Get ${resp.dict["Members"][${entry}]["@odata.id"]}
George Keishingc5fab992019-02-02 08:50:37 -060066 # 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 Keishing97c93942019-03-04 12:45:07 -060075
76
77*** Keywords ***
78
79Test Setup Execution
80 [Documentation] Do test case setup tasks.
81
82 Redfish.Login
83
84
85Test Teardown Execution
86 [Documentation] Do the post test teardown.
87
88 FFDC On Test Case Fail
89 Redfish.Logout