Define Power State of Line Card Using Data Model
Feature Name |
Release Information |
Description |
---|---|---|
Control Line Card Power Using YANG Data Model |
Release 7.5.1 |
The |
This feature adds the following component paths to the model to configure and fetch the power state of the line card, enable/disable the power state, and slot ID of line cards:
-
/components/component/linecard/config/power-admin-state
-
/components/component/linecard/state/power-admin-state
-
/components/component/linecard/state/slot-id
module: openconfig-platform-linecard
augment /oc-platform:components/oc-platform:component:
+--rw linecard
+--rw config
| +--rw power-admin-state? oc-platform-types:component-power-type
+--ro state
+--ro power-admin-state? oc-platform-types:component-power-type
+--ro slot-id? string
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<candidate/>
</target>
<config>
<components xmlns="http://openconfig.net/yang/platform">
<component>
<name>0/0</name>
<linecard xmlns="http://openconfig.net/yang/platform/linecard">
<config>
<power-admin-state>POWER_ENABLED</power-admin-state>
</config>
</linecard>
</component>
</components>
</config>
</edit-config>
</rpc>
To disable the line card, use POWER_DISABLED
in the state field.
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<get>
<filter>
<components xmlns="http://openconfig.net/yang/platform">
<component>
<linecard xmlns="http://openconfig.net/yang/platform/linecard">
<state/>
</linecard>
</component>
</components>
</filter>
</get>
</rpc>
<?xml version="1.0"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<components xmlns="http://openconfig.net/yang/platform">
<component>
<name>0/0</name>
<linecard xmlns="http://openconfig.net/yang/platform/linecard">
<state>
<power-admin-state>POWER_ENABLED</power-admin-state>
<slot-id>0/0</slot-id>
</state>
</linecard>
</component>
</components>
</data>
</rpc-reply>