| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 1 | description: Implement to provide the chassis power management | 
| Andrew Geissler | 2477d9a | 2016-11-22 12:09:21 -0600 | [diff] [blame] | 2 |  | 
 | 3 | properties: | 
 | 4 |     - name: RequestedPowerTransition | 
 | 5 |       type: enum[self.Transition] | 
| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 6 |       default: "Off" | 
| Andrew Geissler | 2477d9a | 2016-11-22 12:09:21 -0600 | [diff] [blame] | 7 |       description: > | 
| Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 8 |           The desired power transition to start on this chassis. This will be | 
 | 9 |           preserved across AC power cycles of the BMC. | 
| Andrew Geissler | abb61a0 | 2023-05-25 12:47:56 -0500 | [diff] [blame] | 10 |       errors: | 
 | 11 |           - xyz.openbmc_project.State.Chassis.Error.BMCNotReady | 
| Thang Tran | 57db6a1 | 2024-10-11 11:25:40 +0700 | [diff] [blame] | 12 |           - xyz.openbmc_project.Common.Error.Unavailable | 
| Andrew Geissler | 2477d9a | 2016-11-22 12:09:21 -0600 | [diff] [blame] | 13 |  | 
 | 14 |     - name: CurrentPowerState | 
 | 15 |       type: enum[self.PowerState] | 
 | 16 |       description: > | 
| Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 17 |           A read-only property describing the current chassis power state. A | 
 | 18 |           user can determine if a chassis is in transition by comparing the | 
 | 19 |           CurrentPowerState and RequestedPowerTransition properties. | 
| Andrew Geissler | 2477d9a | 2016-11-22 12:09:21 -0600 | [diff] [blame] | 20 |  | 
| Andrew Geissler | 9c91332 | 2021-11-08 16:09:45 -0600 | [diff] [blame] | 21 |     - name: CurrentPowerStatus | 
 | 22 |       type: enum[self.PowerStatus] | 
 | 23 |       description: > | 
| Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 24 |           A read-only property describing the current chassis power status. This | 
 | 25 |           property aggregates all available information about the status of the | 
 | 26 |           power coming into the chassis. Note that this is different then the | 
 | 27 |           CurrentPowerState in that it provides status of the power coming into | 
 | 28 |           the chassis, not the actual state of the chassis power. | 
| Andrew Geissler | 9c91332 | 2021-11-08 16:09:45 -0600 | [diff] [blame] | 29 |  | 
| Matt Spinler | e0c06d7 | 2018-07-09 11:15:21 -0500 | [diff] [blame] | 30 |     - name: LastStateChangeTime | 
 | 31 |       type: uint64 | 
 | 32 |       description: > | 
| Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 33 |           The last time at which the chassis power changed state, as tracked by | 
 | 34 |           the CurrentPowerState property, in epoch time, in milliseconds.  This | 
 | 35 |           can be used to tell when the chassis was last powered on or off. | 
| Matt Spinler | e0c06d7 | 2018-07-09 11:15:21 -0500 | [diff] [blame] | 36 |  | 
| Andrew Geissler | 2477d9a | 2016-11-22 12:09:21 -0600 | [diff] [blame] | 37 | enumerations: | 
 | 38 |     - name: Transition | 
 | 39 |       description: > | 
| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 40 |           The desired power transition for the chassis | 
| Andrew Geissler | 2477d9a | 2016-11-22 12:09:21 -0600 | [diff] [blame] | 41 |       values: | 
| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 42 |           - name: "Off" | 
 | 43 |             description: > | 
 | 44 |                 Chassis power should be off | 
 | 45 |           - name: "On" | 
 | 46 |             description: > | 
 | 47 |                 Chassis power should be on | 
 | 48 |           - name: "PowerCycle" | 
 | 49 |             description: > | 
 | 50 |                 Chassis power should be cycled from off to on. There will be a 5 | 
 | 51 |                 second delay between the off and the on. | 
| Andrew Geissler | 2477d9a | 2016-11-22 12:09:21 -0600 | [diff] [blame] | 52 |  | 
 | 53 |     - name: PowerState | 
 | 54 |       description: > | 
| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 55 |           The current state of the chassis power | 
| Andrew Geissler | 2477d9a | 2016-11-22 12:09:21 -0600 | [diff] [blame] | 56 |       values: | 
| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 57 |           - name: "Off" | 
 | 58 |             description: > | 
 | 59 |                 Chassis power is off | 
 | 60 |           - name: "TransitioningToOff" | 
 | 61 |             description: > | 
 | 62 |                 Firmware is transitioning the chassis to an Off state | 
 | 63 |           - name: "On" | 
 | 64 |             description: > | 
 | 65 |                 Chassis power is on | 
 | 66 |           - name: "TransitioningToOn" | 
 | 67 |             description: > | 
 | 68 |                 Firmware is transitioning the chassis to an On state | 
| Andrew Geissler | 9c91332 | 2021-11-08 16:09:45 -0600 | [diff] [blame] | 69 |  | 
 | 70 |     - name: PowerStatus | 
 | 71 |       description: > | 
| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 72 |           The current status of the chassis power | 
| Andrew Geissler | 9c91332 | 2021-11-08 16:09:45 -0600 | [diff] [blame] | 73 |       values: | 
| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 74 |           - name: "Undefined" | 
 | 75 |             description: > | 
 | 76 |                 Chassis power status is unknown | 
 | 77 |           - name: "BrownOut" | 
 | 78 |             description: > | 
 | 79 |                 Chassis power status is in a brownout condition. | 
 | 80 |           - name: "UninterruptiblePowerSupply" | 
 | 81 |             description: > | 
 | 82 |                 Chassis power is being provided via an uninterruptible power | 
| Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 83 |                 supply. Note that some systems may choose to continue to use | 
 | 84 |                 this status, even once power has returned to the system, to | 
 | 85 |                 indicate the uninterruptible power supply is charging or is | 
 | 86 |                 below a certain threshold of charged. This provides system | 
 | 87 |                 owners the flexibility on whether their system requires a | 
 | 88 |                 certain level of charged uninterruptible power supply to be in a | 
 | 89 |                 'Good' state or not. | 
| Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 90 |           - name: "Good" | 
 | 91 |             description: > | 
 | 92 |                 Chassis power status is in a good condition | 
| Patrick Williams | 855b46f | 2024-01-15 16:21:40 -0600 | [diff] [blame] | 93 |  | 
 | 94 | paths: | 
 | 95 |     - namespace: /xyz/openbmc_project/state | 
 | 96 |       segments: | 
 | 97 |           - name: Chassis | 
 | 98 |             value: chassis |