State:Host: Add restart cause
Added support for Host restart cause.
Tested: Verified with generated server.hpp as well
as used it in phosphor-ipmi-host
Change-Id: I76bd115732e1e02432f3ddad251b89e2c5ac7b48
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
diff --git a/xyz/openbmc_project/State/Host.interface.yaml b/xyz/openbmc_project/State/Host.interface.yaml
index 1cbd2b4..b6d654b 100644
--- a/xyz/openbmc_project/State/Host.interface.yaml
+++ b/xyz/openbmc_project/State/Host.interface.yaml
@@ -17,6 +17,12 @@
comparing the CurrentHostState and the RequestedHostTransition
properties.
+ - name: RestartCause
+ type: enum[self.RestartCause]
+ default: 'Unknown'
+ description: >
+ A property to define restart cause of a host.
+
enumerations:
- name: Transition
description: >
@@ -61,3 +67,32 @@
system while the host is in this state will prevent the debug data
from being properly collected. The host will move to one of the
other states once complete.
+
+ - name: RestartCause
+ description: >
+ The reason for host restart.
+ values:
+ - name: 'Unknown'
+ description: >
+ Reason Unknown
+ - name: 'RemoteCommand'
+ description: >
+ Remote command issued
+ - name: 'ResetButton'
+ description: >
+ Reset button pressed
+ - name: 'PowerButton'
+ description: >
+ Power button pressed
+ - name: 'WatchdogTimer'
+ description: >
+ Watchdog Timer expired
+ - name: 'PowerPolicyAlwaysOn'
+ description: >
+ Power Policy Host Always on
+ - name: 'PowerPolicyPreviousState'
+ description: >
+ Power Policy Previous State of Host
+ - name: 'SoftReset'
+ description: >
+ Soft reset of Host