state: add errors for transition request
Sometimes, BMC/Chassis/Host should reject transition request to protect
the system (e.g: While BMC is flashing Host/BMC/CPLD ...).
In that case, BMC/Chassis/Host should return an error to inform this
transition request is unavailable at this time.
Change-Id: Ief36089266d8439d8e8bd5bcd68c1a7647120595
Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
diff --git a/yaml/xyz/openbmc_project/State/BMC.interface.yaml b/yaml/xyz/openbmc_project/State/BMC.interface.yaml
index d25e573..ff1a228 100644
--- a/yaml/xyz/openbmc_project/State/BMC.interface.yaml
+++ b/yaml/xyz/openbmc_project/State/BMC.interface.yaml
@@ -10,6 +10,8 @@
default: "None"
description: >
The desired BMC transition
+ errors:
+ - xyz.openbmc_project.Common.Error.Unavailable
- name: CurrentBMCState
type: enum[self.BMCState]
diff --git a/yaml/xyz/openbmc_project/State/Chassis.interface.yaml b/yaml/xyz/openbmc_project/State/Chassis.interface.yaml
index e368952..9121fd4 100644
--- a/yaml/xyz/openbmc_project/State/Chassis.interface.yaml
+++ b/yaml/xyz/openbmc_project/State/Chassis.interface.yaml
@@ -9,6 +9,7 @@
preserved across AC power cycles of the BMC.
errors:
- xyz.openbmc_project.State.Chassis.Error.BMCNotReady
+ - xyz.openbmc_project.Common.Error.Unavailable
- name: CurrentPowerState
type: enum[self.PowerState]
diff --git a/yaml/xyz/openbmc_project/State/Host.interface.yaml b/yaml/xyz/openbmc_project/State/Host.interface.yaml
index 95f3b19..bd73482 100644
--- a/yaml/xyz/openbmc_project/State/Host.interface.yaml
+++ b/yaml/xyz/openbmc_project/State/Host.interface.yaml
@@ -11,6 +11,7 @@
errors:
- xyz.openbmc_project.State.Host.Error.BMCNotReady
- xyz.openbmc_project.Common.Error.NotAllowed
+ - xyz.openbmc_project.Common.Error.Unavailable
- name: AllowedHostTransitions
type: set[enum[self.Transition]]