cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
127
Views
0
Helpful
0
Replies

Using operational data in NSO in YANG module

BasharAziz
Level 1
Level 1

I'm trying to select between IOS and IOS-XR using operational data in NSO in YANG. Here are my xpath eval results:

admin@ncs(config)# xpath eval ncs:devices/ncs:device[ncs:name='ASR1006-X']/ncs:module/name='tailf-ned-cisco-ios-xr'
false
admin@ncs(config)# xpath eval ncs:devices/ncs:device[ncs:name='DLP-NCS540']/ncs:module/name='tailf-ned-cisco-ios-xr'
true
admin@ncs(config)# 

result is  correct.

However, when I apply this in a service to expose the platform-name leaf and rebuild, I encounter the following error:

 

            leaf platform-name {
                tailf:info "Platform name for BFD Location";
                type enumeration {
                    enum NCS-5500;
                    enum NCS540L;
                }
                when "/ncs:devices/ncs:device[ncs:name=current()/../device]/ncs:platform/ncs:name = 'ios-xr'";

Error message:

yang/device-provisioning.yang:208: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/ncs-6.1.15/src/ncs/yang/tailf-ncs-devices.yang:5383

make: *** [Makefile:32: ../load-dir/device-provisioning.fxs] Error 1

 

image (1).png

 

 

 

 

 

 

 

 

 

 

Has anyone encountered this issue before? Any ideas on how to resolve it?

Thanks in advance

0 Replies 0