State: Drive: Update the State interface for Drive
The State interface will have the state of the Drive and transition
states.
Added RequestedDriveTransition, DriveState, and LastRebootTime
based off xyz.openbmc_project.State.BMC.
The RequestedDriveTransition allow actions like reset and powercycles.
For systems that does not support it, it is defaulted to `NotSupported`.
The current DriveState provides different available state the drive can
be in. The `UpdateInProgress` in DriveState can be used to replace
the current `Rebuilding`.
Required:
https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/45142
for sdbusplus maxint uint64 support.
Change-Id: I5350de29554a0a0a41307f1f009d942135471abe
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/yaml/xyz/openbmc_project/State/Drive.interface.yaml b/yaml/xyz/openbmc_project/State/Drive.interface.yaml
index 3ad2793..b0500e8 100644
--- a/yaml/xyz/openbmc_project/State/Drive.interface.yaml
+++ b/yaml/xyz/openbmc_project/State/Drive.interface.yaml
@@ -7,3 +7,73 @@
default: false
description: >
Describes if the drive is currently rebuilding.
+ - name: RequestedDriveTransition
+ type: enum[self.Transition]
+ default: "NotSupported"
+ description: >
+ The desired Drive transition
+ - name: CurrentDriveState
+ type: enum[self.DriveState]
+ default: "Unknown"
+ description: >
+ The current state of the Drive and is a read-only property.
+ flags:
+ - readonly
+ - name: LastRebootTime
+ type: uint64
+ default: maxint
+ description: >
+ Time when the Drive last rebooted represented in EpochTime.
+ The time reference should be based on the BMC's time.
+ If not supported, it will be represented as maxint.
+ flags:
+ - readonly
+
+enumerations:
+ - name: Transition
+ description: >
+ The desired transition for the Drive
+ values:
+ - name: "Reboot"
+ description: >
+ The Drive should be rebooted.
+ - name: "HardReboot"
+ description: >
+ The Drive should be non-gracefully rebooted.
+ - name: "Powercycle"
+ description: >
+ The Drive should be powercycled.
+ - name: "None"
+ description: >
+ No transition is in progress.
+ - name: "NotSupported"
+ description: >
+ Transition request is not supported.
+
+ - name: DriveState
+ description: >
+ The current state of the Drive
+ values:
+ - name: "Unknown"
+ description: >
+ The Drive State is unknown.
+ - name: "Ready"
+ description: >
+ Ready implies all services started and are running successfully
+ - name: "NotReady"
+ description: >
+ Not ready implies not all services have started or are not
+ running successfully
+ - name: "Offline"
+ description: >
+ The Drive is ready, but waiting for external action to enable it
+ - name: "Debug"
+ description: >
+ The Drive is ready and in debug mode. The functionalities might
+ be limited
+ - name: "UpdateInProgress"
+ description: >
+ UpdateInProgress implies the Drive is in firmware update mode.
+ Current DriveState will be set to "UpdateInProgress" while
+ starting firmware download and reset to "Ready", once activation
+ is done or error occurs during update process.