blob: 0b0848f34615d7cab0e8ae640e6db4f45f70bead [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
6Test Teardown FFDC On Test Case Fail
George Keishingc5fab992019-02-02 08:50:37 -06007
8*** Test Cases ***
9
George Keishing5ee33d92019-02-02 12:33:25 -060010Verify Redfish Update Service Enabled
George Keishingc5fab992019-02-02 08:50:37 -060011 [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 Keishing5ee33d92019-02-02 12:33:25 -060027Verify Redfish Software Inventory Collection
George Keishingc5fab992019-02-02 08:50:37 -060028 [Documentation] Verify software inventory collection member and object entries.
George Keishing5ee33d92019-02-02 12:33:25 -060029 [Tags] Verify_Redfish_Software_Inventory_Collection
George Keishingc5fab992019-02-02 08:50:37 -060030
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 Keishing5ee33d92019-02-02 12:33:25 -060058Redfish Software Inventory Status Check
George Keishingc5fab992019-02-02 08:50:37 -060059 [Documentation] Get firmware inventory entries and do health check status.
George Keishing5ee33d92019-02-02 12:33:25 -060060 [Tags] Redfish_Software_Inventory_Status_Check
George Keishingc5fab992019-02-02 08:50:37 -060061
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 SRR0deb3362019-02-15 02:38:24 -060083 redfish.Logout