Enhancements to Data Models

This section provides an overview of the enhancements made to data models.

Define Power State of Line Card Using Data Model

Table 1. Feature History Table

Feature Name

Release Information

Description

Control Line Card Power Using YANG Data Model

Release 7.5.1

The oc-platform.yang YANG data model enables or disables power to the line card and identifies its slot or chassis.

You can access this data model from the Github repository.

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
The following example shows the configuration to enable the line card in location "0/0" to power up:
<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.
In the following example, an RPC request is sent to retrieve the power state of all line cards:
<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>
The following example shows the RPC response to the request:
<?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>

Install Label in oc-platform Data Model

Table 2. Feature History Table

Feature Name

Release Information

Description

Enhancements to openconfig-platform YANG Data Model

Release 7.3.2

The openconfig-platform YANG data model provides a structure for querying hardware and software router components via the NETCONF protocol. This release delivers an enhanced openconfig-platform YANG data model to provide information about:

  • software version

  • golden ISO (GISO) label

  • committed IOS XR packages

You can access this data model from the Github repository.

The openconfig-platform (oc-platform.yang) data model is enhanced to provide the following data:

  • IOS XR software version (optionally with GISO label)

  • Type, description, operational status of the component. For example, a CPU component reports its utilization, temperature or other physical properties.

  • List of the committed IOS XR packages

To retrieve oc-platform information from a router via NETCONF, ensure you configured the router with the SH server and management interface:
Router#show run
Building configuration...
!! IOS XR Configuration version = 7.3.2
!! Last configuration change at Tue Sep  7 16:18:14 2016 by USER1
!
......
......
netconf-yang agent ssh
ssh server netconf vrf default
interface MgmtEth 0/RP0/CPU0/0
    no shut
    ipv4 address dhcp

The following example shows the enhanced OPERATING_SYSTEM node component (line card or route processor) of the oc-platform data model:

<component>
<name>IOSXR-NODE 0/RP0/CPU0</name>
<config>
<name>0/RP0/CPU0</name>
</config>
<state>
<name>0/RP0/CPU0</name>
<type xmlns:idx="http://openconfig.net/yang/platform-types">idx:OPERATING_SYSTEM</type>
<location>0/RP0/CPU0</location>
<description>IOS XR Operating System</description>
<software-version>7.3.2</software-version> -----------------------> Label Info
<removable>true</removable>
<oper-status xmlns:idx="http://openconfig.net/yang/platform-types">idx:ACTIVE</oper-status>
</state>
<subcomponents>
 <subcomponent>
  <name><platform>-af-ea-7.3.2v1.0.0.1</name>
  <config>
   <name><platform>-af-ea-7.3.2v1.0.0.1</name>
  </config>
  <state>
   <name><platform>-af-ea-7.3.2v1.0.0.1</name>
  </state>
 </subcomponent>
...
The following example shows the enhanced OPERATING_SYSTEM_UPDATE package component (RPMs) of the oc-platform data model:
<component>
<name>IOSXR-PKG/1 <platform>-isis-2.1.0.0-r732</name>
<config>
<name><platform>-isis-2.1.0.0-r732</name>
</config>
<state>
<name><platform>-isis-2.1.0.0-r732</name>
<type xmlns:idx="http://openconfig.net/yang/platform-types">idx:OPERATING_SYSTEM_UPDATE</type>
<description>IOS XR Operating System Update</description>
<software-version>7.3.2</software-version>-----------------------> Label Info
<removable>true</removable>
<oper-status xmlns:idx="http://openconfig.net/yang/platform-types">idx:ACTIVE</oper-status>
</state>
</component>

Associated Commands

  • show install committed—Shows the committed IOS XR packages.

  • show install committed summary—Shows a summary of the committed packages along with the committed IOS XR version that is displayed as a label.