Skip to content

Add operational power state reporting for platform components - #1513

Open
earies wants to merge 2 commits into
openconfig:masterfrom
earies:power-oper-status
Open

Add operational power state reporting for platform components#1513
earies wants to merge 2 commits into
openconfig:masterfrom
earies:power-oper-status

Conversation

@earies

@earies earies commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
  • (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
  • (M) release/models/platform/openconfig-platform.yang
  • Increment version to 0.33.0 to track openconfig-platform-common
    submodule revision

Change Scope

The power-admin-state leaf reflects the configured (intended) power state
of a component and today is the only power state modeled, with values of
POWER_ENABLED or POWER_DISABLED. There is no path that reports the
actual, 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 POWERUP issued after
state reports POWER_DISABLED, but before the node has fully powered off,
is rejected as already online.

Introduce a read-only power-oper-state leaf as the operational
counterpart to power-admin-state, following the same intent vs.
operational split modeled by interface admin-status/oper-status. A new
component-power-oper-type typedef mirrors component-power-type and adds
an operational-only POWER_TRANSITIONING value that is not valid as
configuration. A component reports POWER_TRANSITIONING while a power
change is in progress and only reports POWER_DISABLED once it has fully
powered off, giving a consistent operational view across telemetry and
other management interfaces.

power-admin-state is reused across controller-card, fabric and linecard
components, so power-oper-state is added as a state-only sibling to the
same 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

  * (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
@earies
earies requested a review from a team as a code owner July 8, 2026 18:42

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
component";

leaf power-oper-state {
type oc-platform-types:component-power-oper-type;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we ensure that this is read only?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@navaneethyv navaneethyv moved this to Ready to discuss in OC Operator Review Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to discuss

Development

Successfully merging this pull request may close these issues.

2 participants