Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 1 | description: > |
| 2 | Implement to schedule Epoch time to power on/off the Host. |
| 3 | properties: |
| 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 Wang | 8c364d9 | 2020-03-13 14:38:59 +0800 | [diff] [blame] | 17 | it will execute the ScheduledTransition and reset the |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 18 | 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 Wang | 8c364d9 | 2020-03-13 14:38:59 +0800 | [diff] [blame] | 23 | stop the existing timer and execute the ScheduledTransition. |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 24 | When ScheduledTime is reached, but the host is not ready |
| 25 | to power on/off, e.g. when BMC is rebooting, BMC shall |
Carol Wang | 8c364d9 | 2020-03-13 14:38:59 +0800 | [diff] [blame] | 26 | set the host ScheduledTransition after it is ready. |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 27 | errors: |
| 28 | - xyz.openbmc_project.ScheduledTime.Error.InvalidTime |
| 29 | |
Carol Wang | 8c364d9 | 2020-03-13 14:38:59 +0800 | [diff] [blame] | 30 | - name: ScheduledTransition |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 31 | 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. |