blob: 74f1fd939fa233ea9e029b2ecd7d357c0b7da012 [file] [log] [blame]
Carol Wang79064a82019-12-24 13:34:03 +08001description: >
2 Implement to schedule Epoch time to power on/off the Host.
3properties:
4 - name: ScheduledTime
5 type: uint64
6 default: 0
7 description: >
8 ScheduledTime is a date time when the host will be
9 powered on/off. The time is the Epoch time, number
10 of seconds since 1 Jan 1970 00::00::00 UTC.
11
12 When ScheduledTime is 0, it means the functionality
13 is disabled.
14 When ScheduledTime is smaller than current time,
15 error InvalidTime will be thrown.
16 When the controller detects the ScheduledTime has passed,
Carol Wang8c364d92020-03-13 14:38:59 +080017 it will execute the ScheduledTransition and reset the
Carol Wang79064a82019-12-24 13:34:03 +080018 value to 0. Once the transition starts, there won't be
19 any retries.
20 When the real time changes, the controller shall check if
21 the time is still in the future. If so, it will stop the
22 existing timer and restart it with new wait time. Otherwise,
Carol Wang8c364d92020-03-13 14:38:59 +080023 stop the existing timer and execute the ScheduledTransition.
Carol Wang79064a82019-12-24 13:34:03 +080024 When ScheduledTime is reached, but the host is not ready
25 to power on/off, e.g. when BMC is rebooting, BMC shall
Carol Wang8c364d92020-03-13 14:38:59 +080026 set the host ScheduledTransition after it is ready.
Carol Wang79064a82019-12-24 13:34:03 +080027 errors:
Patrick Williams8da396c2022-03-14 14:21:02 -050028 - xyz.openbmc_project.ScheduledTime.Error.InvalidTime
Carol Wang79064a82019-12-24 13:34:03 +080029
Carol Wang8c364d92020-03-13 14:38:59 +080030 - name: ScheduledTransition
Carol Wang79064a82019-12-24 13:34:03 +080031 type: enum[xyz.openbmc_project.State.Host.Transition]
Patrick Williams8da396c2022-03-14 14:21:02 -050032 default: "On"
Carol Wang79064a82019-12-24 13:34:03 +080033 description: >
34 The desired power transition to support scheduled power on/off.
35 The default operation supports scheduled power on.