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: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 8 | ScheduledTime is a date time when the host will be powered on/off. The |
| 9 | time is the Epoch time, number of seconds since 1 Jan 1970 00::00::00 |
| 10 | UTC. |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 11 | |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 12 | When ScheduledTime is 0, it means the functionality is disabled. When |
| 13 | ScheduledTime is smaller than current time, error InvalidTime will be |
| 14 | thrown. When the controller detects the ScheduledTime has passed, it |
| 15 | will execute the ScheduledTransition and reset the value to 0. Once |
| 16 | the transition starts, there won't be any retries. When the real time |
| 17 | changes, the controller shall check if the time is still in the |
| 18 | future. If so, it will stop the existing timer and restart it with new |
| 19 | wait time. Otherwise, stop the existing timer and execute the |
| 20 | ScheduledTransition. When ScheduledTime is reached, but the host is |
| 21 | not ready to power on/off, e.g. when BMC is rebooting, BMC shall set |
| 22 | the host ScheduledTransition after it is ready. |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 23 | errors: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 24 | - xyz.openbmc_project.ScheduledTime.Error.InvalidTime |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 25 | |
Carol Wang | 8c364d9 | 2020-03-13 14:38:59 +0800 | [diff] [blame] | 26 | - name: ScheduledTransition |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 27 | type: enum[xyz.openbmc_project.State.Host.Transition] |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 28 | default: "On" |
Carol Wang | 79064a8 | 2019-12-24 13:34:03 +0800 | [diff] [blame] | 29 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 30 | The desired power transition to support scheduled power on/off. The |
| 31 | default operation supports scheduled power on. |