blob: 4e062b6e070999dd9f02497fc38ef30e88b02885 [file] [log] [blame]
George Keishingc5fab992019-02-02 08:50:37 -06001*** Settings ***
2Resource ../../lib/resource.txt
3Resource ../../lib/bmc_redfish_resource.robot
4
5*** Test Cases ***
6
George Keishing5ee33d92019-02-02 12:33:25 -06007Verify Redfish Update Service Enabled
George Keishingc5fab992019-02-02 08:50:37 -06008 [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 Keishing5ee33d92019-02-02 12:33:25 -060024Verify Redfish Software Inventory Collection
George Keishingc5fab992019-02-02 08:50:37 -060025 [Documentation] Verify software inventory collection member and object entries.
George Keishing5ee33d92019-02-02 12:33:25 -060026 [Tags] Verify_Redfish_Software_Inventory_Collection
George Keishingc5fab992019-02-02 08:50:37 -060027
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 Keishing5ee33d92019-02-02 12:33:25 -060055Redfish Software Inventory Status Check
George Keishingc5fab992019-02-02 08:50:37 -060056 [Documentation] Get firmware inventory entries and do health check status.
George Keishing5ee33d92019-02-02 12:33:25 -060057 [Tags] Redfish_Software_Inventory_Status_Check
George Keishingc5fab992019-02-02 08:50:37 -060058
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