cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
575
Views
5
Helpful
3
Replies

Unable to get rpc from Yang suite for the below cli commands.

Unable to get rpc from Yang suite for the below commands.

1 show install committed summary
2 show redundancy
3 show ipv4 interface brief
4 show ipv6 interface brief
5 show cef unresolved
6 show route summary
7 show context

 

please provide the yangmodels 

1 Accepted Solution

Accepted Solutions

@jayachandran.subramanian1 on XR 7.4.1 you can use yang-describe

 

To retrieve the Yang equivalent of a CLI, use the following command:

Router#yang-describe ?
  configuration  Describe configuration commands(cisco-support)
  operational    Describe operational commands(cisco-support)

The tool supports description of both operational and configurational commands.
Example: Configuration Data
In the following example, the Yang paths for configuring the MPLS label range with minimum and maximum static values are displayed:

Router#yang-describe configuration mpls label range table 0 34000 749999 static 34000 99999
Mon May 10 12:37:27.192 UTC
YANG Paths:
  Cisco-IOS-XR-um-mpls-lsd-cfg:mpls/label/range/table-0
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range/minvalue
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range/max-value
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range/min-static-value
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range/max-static-value
In the following example, the Yang paths for configuring the gRPC address are displayed:

Router#yang-describe configuration grpc address-family ipv4
Mon May 10 12:39:56.652 UTC
YANG Paths:
  Cisco-IOS-XR-man-ems-cfg:grpc/enable
  Cisco-IOS-XR-man-ems-cfg:grpc/address-family

Example: Operational Data

The operational data includes support for the show CLI commands.
The example shows the Yang paths to retrieve the operational data for MPLS interfaces:

Router#yang-describe operational show mpls interfaces
Mon May 10 12:34:05.198 UTC
YANG Paths:
  Cisco-IOS-XR-mpls-lsd-oper:mpls-lsd/interfaces/interface

The following example shows the Yang paths to retrieve the operational data for Virtual Router Redundancy Protocol (VRRP):

Router#yang-describe operational show vrrp brief
Mon May 10 12:34:38.041 UTC
YANG Paths:
  Cisco-IOS-XR-ipv4-vrrp-oper:vrrp/ipv4/virtual-routers/virtual-router
  Cisco-IOS-XR-ipv4-vrrp-oper:vrrp/ipv6/virtual-routers/virtual-router
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

3 Replies 3

Hi @jayachandran.subramanian1 i am not sure i understand the question or which platform you refer to you can find all the yang models here --> https://github.com/YangModels/yang

 

Hope this helps.

 

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Hi bigevilbeard,

We are not able to get RPC easily from Yang suite " for ex . "show ipv4 interface brief " 

Knowing yang model itself taking too much time . once we get the ios xr yang model , need to retrieve RPC from yang suite.

in Junos router , we can get rpc by entering command and display xml rpc , is there anyway can we get rpc by CLI command in IOS XR router .

 

Thanks 

Jay

@jayachandran.subramanian1 on XR 7.4.1 you can use yang-describe

 

To retrieve the Yang equivalent of a CLI, use the following command:

Router#yang-describe ?
  configuration  Describe configuration commands(cisco-support)
  operational    Describe operational commands(cisco-support)

The tool supports description of both operational and configurational commands.
Example: Configuration Data
In the following example, the Yang paths for configuring the MPLS label range with minimum and maximum static values are displayed:

Router#yang-describe configuration mpls label range table 0 34000 749999 static 34000 99999
Mon May 10 12:37:27.192 UTC
YANG Paths:
  Cisco-IOS-XR-um-mpls-lsd-cfg:mpls/label/range/table-0
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range/minvalue
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range/max-value
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range/min-static-value
  Cisco-IOS-XR-mpls-lsd-cfg:mpls-lsd/label-databases/label-database/label-range/max-static-value
In the following example, the Yang paths for configuring the gRPC address are displayed:

Router#yang-describe configuration grpc address-family ipv4
Mon May 10 12:39:56.652 UTC
YANG Paths:
  Cisco-IOS-XR-man-ems-cfg:grpc/enable
  Cisco-IOS-XR-man-ems-cfg:grpc/address-family

Example: Operational Data

The operational data includes support for the show CLI commands.
The example shows the Yang paths to retrieve the operational data for MPLS interfaces:

Router#yang-describe operational show mpls interfaces
Mon May 10 12:34:05.198 UTC
YANG Paths:
  Cisco-IOS-XR-mpls-lsd-oper:mpls-lsd/interfaces/interface

The following example shows the Yang paths to retrieve the operational data for Virtual Router Redundancy Protocol (VRRP):

Router#yang-describe operational show vrrp brief
Mon May 10 12:34:38.041 UTC
YANG Paths:
  Cisco-IOS-XR-ipv4-vrrp-oper:vrrp/ipv4/virtual-routers/virtual-router
  Cisco-IOS-XR-ipv4-vrrp-oper:vrrp/ipv6/virtual-routers/virtual-router
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io