Add operational power state reporting for platform components - #1513
Open
earies wants to merge 2 commits into
Open
Add operational power state reporting for platform components#1513earies wants to merge 2 commits into
earies wants to merge 2 commits into
Conversation
* (M) release/models/platform/openconfig-platform-types.yang
- Add component-power-oper-type typedef with an operational-only
POWER_TRANSITIONING value alongside POWER_ENABLED/POWER_DISABLED
- Increment version to 1.13.0
* (M) release/models/platform/openconfig-platform-common.yang
- Add component-power-management-state grouping with the read-only
power-oper-state leaf as the operational counterpart to
power-admin-state
- Increment version to 0.33.0
* (M) release/models/platform/openconfig-platform-controller-card.yang
- Add power-oper-state to controller-card state
- Increment version to 0.3.0
* (M) release/models/platform/openconfig-platform-fabric.yang
- Add power-oper-state to fabric state
- Increment version to 0.2.0
* (M) release/models/platform/openconfig-platform-linecard.yang
- Add power-oper-state to linecard state
- Increment version to 1.3.0
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new component-power-management-state grouping and a corresponding component-power-oper-type typedef to model the operational power state of platform components, supporting POWER_ENABLED, POWER_DISABLED, and POWER_TRANSITIONING states. This grouping is integrated into the state definitions for controller cards, fabrics, and linecards. I have no feedback to provide on these changes.
* (M) release/models/platform/openconfig-platform.yang
- Increment version to 0.33.0 to track openconfig-platform-common
submodule revision
navaneethyv
reviewed
Jul 14, 2026
| component"; | ||
|
|
||
| leaf power-oper-state { | ||
| type oc-platform-types:component-power-oper-type; |
Contributor
There was a problem hiding this comment.
How do we ensure that this is read only?
Contributor
Author
There was a problem hiding this comment.
Its in a *-state grouping that is only "used" under a r/o state/ container (same pattern as all other cases - e.g. interfaces oper-status)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
POWER_TRANSITIONING value alongside POWER_ENABLED/POWER_DISABLED
power-oper-state leaf as the operational counterpart to
power-admin-state
submodule revision
Change Scope
The
power-admin-stateleaf reflects the configured (intended) power stateof a component and today is the only power state modeled, with values of
POWER_ENABLEDorPOWER_DISABLED. There is no path that reports theactual, applied power state, so a configured value that is mirrored into
state is the only operational signal available.
This is problematic during a power transition. When a redundant
controller-card is powered down, a component is neither cleanly enabled nor
disabled while the shutdown is in progress, yet only those two values can be
represented. Consumers relying on state to gate a subsequent power
operation can therefore act prematurely - e.g. a
POWERUPissued afterstate reports
POWER_DISABLED, but before the node has fully powered off,is rejected as already online.
Introduce a read-only
power-oper-stateleaf as the operationalcounterpart to
power-admin-state, following the same intent vs.operational split modeled by interface
admin-status/oper-status. A newcomponent-power-oper-typetypedef mirrorscomponent-power-typeand addsan operational-only
POWER_TRANSITIONINGvalue that is not valid asconfiguration. A component reports
POWER_TRANSITIONINGwhile a powerchange is in progress and only reports
POWER_DISABLEDonce it has fullypowered off, giving a consistent operational view across telemetry and
other management interfaces.
power-admin-stateis reused across controller-card, fabric and linecardcomponents, so
power-oper-stateis added as a state-only sibling to thesame set of components.
Platform Implementations
N/A
Tree View
module: openconfig-platform +--rw components +--rw component* [name] +--rw controller-card | +--rw config | | +--rw oc-ctrl-card:power-admin-state? oc-platform-types:component-power-type | +--ro state | +--ro oc-ctrl-card:power-admin-state? oc-platform-types:component-power-type + | +--ro oc-ctrl-card:power-oper-state? oc-platform-types:component-power-oper-type +--rw fabric | +--rw config | | +--rw oc-fabric:power-admin-state? oc-platform-types:component-power-type | +--ro state | +--ro oc-fabric:power-admin-state? oc-platform-types:component-power-type + | +--ro oc-fabric:power-oper-state? oc-platform-types:component-power-oper-type +--rw oc-linecard:linecard +--rw oc-linecard:config | +--rw oc-linecard:power-admin-state? oc-platform-types:component-power-type +--ro oc-linecard:state +--ro oc-linecard:power-admin-state? oc-platform-types:component-power-type + +--ro oc-linecard:power-oper-state? oc-platform-types:component-power-oper-type