blob: 93498adfda0f41790d2a951da1cb0cbc2ea5e26f [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:
28 - xyz.openbmc_project.ScheduledTime.Error.InvalidTime
29
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]
32 default: 'On'
33 description: >
34 The desired power transition to support scheduled power on/off.
35 The default operation supports scheduled power on.