cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
696
Views
1
Helpful
2
Replies

LSA: Upper Node Yang Leafref to Lower Node ncs:devices

e.meffert
Level 1
Level 1

Hi all,

we are developing an cfs and rfs service for use on a LSA NSO setup. On the cfs service and the upper LSA node I want configure a leaf, which has a leafref to devices/device of the lower LSA Node.

Like this:

leaf vmanage {
tailf:info "the vmanage used for this customer";
type leafref {
path "/ncs:devices/ncs:device[ncs:name=current()/../../../rfs-node]/ncs:config/ncs:devices/ncs:device/ncs:name"
}
}

we import the tailf-ncs module with the ncs prefix:

import tailf-ncs {
prefix ncs;
}

When I try to compile this yang it does not work, because it can not find the second ncs:devices node from the lower-node:

../../cfs-sdwan-cisco/src/yang/csc-sm-customer-central-rfs-settings.yang:30: error: the node 'devices' from module 'tailf-ncs' (in node 'config' from 'tailf-ncs') is not found

the path works until "/ncs:devices/ncs:device[ncs:name=current()/../../../rfs-node]/ncs:config". the question is: why does it not find the "ncs:devices" node behind "ncs:config" of the lower-node?

Interestingly, if I do a "show | display xpath" on the nso cli of the upper-node it shows the path to the lower-node like this:

[edit devices device rfs_sdwan config ncs:devices device]
cloud@ncs% show | display xpath
/devices/device[name='rfs_sdwan']/config/ncs:devices/device

I guess there is some problem regarding the ncs prefix and the duplicated "devices/device" nodes, but i can not figure out how to address this correctly in the xpath of the leafref in the yang.

Edit:

I also tried a deref like this:

path "deref(../../../rfs-node)/../ncs:config/ncs:devices/ncs:device/ncs:name";

With the same result.

../../cfs-sdwan-cisco/src/yang/csc-sm-customer-central-rfs-settings.yang:31: error: the node 'devices' from module 'tailf-ncs' (in node 'config' from 'tailf-ncs') is not found
make: *** [Makefile:27: ../load-dir/cfs-sdwan-cisco.fxs] Error 1

By the way, the NSO Version is this:

cloud@ncs> show ncs-state version
ncs-state version 6.1.2.1

2 Replies 2

erdemk
Level 1
Level 1

Hi,

I didnot try it my self, so i do not know whether it is possible to leafref rfs-devices from cfs.

On the other hand, just in case , because you haven't mentioned it :

Did you do the installation in single-version-mode or multi-version-mode. It should be multi-version-mode in order to be able to see the rfs-devices tree from rfs. Probably you know but let me also mention that you may find examples for both in examples.com/getting-started.../developing-with-ncs../22- and 24- for single and multi-version-mode for lsa deployment ..

regards. 

Hi, yes we use the multi-version-mode with the LSA NED package for nso 6.1:

[edit devices device rfs_sdwan]
cloud@ncs% show device-type
netconf {
ned-id cisco-nso-nc-6.1;
}

Bot both CFS and RFS Nodes currently have the same nso version. Like we currently switch to using nso 6.1.5.