restore-policy: add option to do nothing
There are two use cases where this new option could be useful:
1) The user of the system wants to simply disable the power restore
logic.
2) The system implementer wishes to implement a one_time option for this
D-Bus property. The default for the one_time implementation can be
this new "None" option so the code logic knows to look at the
non-one_time setting. If the one_time implementation is not "None"
then the firmware knows to honor it and reset it to "None".
IBM has a use case for option 2 above. They wish to utilize a one_time
option of this property to cause an automatic power on after an in-band
firmware update.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I59ccf5ff8c0bd3b6e71f6a97e30f2f0feb78d165
diff --git a/xyz/openbmc_project/Control/Power/RestorePolicy.interface.yaml b/xyz/openbmc_project/Control/Power/RestorePolicy.interface.yaml
index 1f90937..d44e09e 100644
--- a/xyz/openbmc_project/Control/Power/RestorePolicy.interface.yaml
+++ b/xyz/openbmc_project/Control/Power/RestorePolicy.interface.yaml
@@ -6,6 +6,7 @@
properties:
- name: PowerRestorePolicy
type: enum[self.Policy]
+ default: 'Restore'
description: >
The policy to adopt after the BMC reset.
@@ -14,12 +15,15 @@
description: >
Possible power restoration policies.
values:
+ - name: None
+ description: >
+ Perform no power restore logic.
- name: AlwaysOn
description: >
Perform a complete power on process.
- name: AlwaysOff
description: >
- Remain powered off.
+ Perform a complete power off process.
- name: Restore
description: >
Restore power to last requested state recorded before the BMC was