Skip to content
Commit 19b8e9a0 authored by Willy Tu's avatar Willy Tu Committed by Ed Tanous
Browse files

Drive: Add MediaType, Capacity, and Protocol Resource for Drive

Populate the MediaType with DriveType to identify the Drive.

  - https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/44971

Populate the Capacity as the size in bytes of the Drive.
  - https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/46332

Populate the Protocol with DriveProtocol for the communication protocol
  types
  - https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/46333



Tested:

Passed Redfish Validator with no new error.
```
*** /redfish/v1/Systems/system/Storage/storage0/Drives/drive0
         Type (#Drive.v1_7_0.Drive), GET SUCCESS (time: 0.307086)
         PASS
```

```
{
  "@odata.id": "/redfish/v1/Systems/system/Storage/storage0/Drives/drive0",
  "@odata.type": "#Drive.v1_7_0.Drive",
  "CapacityBytes": 250059350016,
  "Id": "drive0",
  "Manufacturer": "",
  "MediaType": "SSD",
  "Name": "drive0",
  "PartNumber": "",
  "Protocol": "SATA",
  "SerialNumber": "0",
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Enabled"
  }
}

```

Change-Id: I533eade92ec461b957f0c13eb69d06fead8b10f3
Signed-off-by: default avatarWilly Tu <wltu@google.com>
parent 23952514
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment