10-11-2017 07:19 AM - edited 03-01-2019 04:01 AM
I downloaded the IOS-XR 6.3.1 NETCONF YANG files from github here:
https://github.com/YangModels/yang/tree/master/vendor/cisco/xr/631
And created the NED package using “ncs-make-package --netconf-ned” command but then I get compilation errors when I try to make:
nsosandbox@tailf:~/ncs-run/packages/cisco-iosxr-netconf/src$ make
/home/nsosandbox/nso-4.4.2.1/bin/ncsc --ncs-compile-bundle yang \
--ncs-device-dir ncsc-out \
--ncs-device-type netconf \
&& \
cp ncsc-out/modules/fxs/*.fxs ../load-dir;
yang/openconfig-bgp-policy.yang:779: error: the node 'INLINE' from module 'openconfig-bgp-policy' (in node 'inline' in module 'openconfig-bgp-policy' from 'openconfig-bgp-policy') is not found
yang/openconfig-bgp-policy.yang:779: warning: The when expression refers to descendant node 'INLINE', will probably not work as intended.
yang/openconfig-bgp-policy.yang:838: error: the node 'REFERENCE' from module 'openconfig-bgp-policy' (in node 'reference' in module 'openconfig-bgp-policy' from 'openconfig-bgp-policy') is not found
yang/openconfig-bgp-policy.yang:838: warning: The when expression refers to descendant node 'REFERENCE', will probably not work as intended.
yang/openconfig-bgp-policy.yang:942: error: the node 'INLINE' from module 'openconfig-bgp-policy' (in node 'inline' in module 'openconfig-bgp-policy' from 'openconfig-bgp-policy') is not found
yang/openconfig-bgp-policy.yang:942: warning: The when expression refers to descendant node 'INLINE', will probably not work as intended.
yang/openconfig-bgp-policy.yang:1003: error: the node 'REFERENCE' from module 'openconfig-bgp-policy' (in node 'reference' in module 'openconfig-bgp-policy' from 'openconfig-bgp-policy') is not found
yang/openconfig-bgp-policy.yang:1003: warning: The when expression refers to descendant node 'REFERENCE', will probably not work as intended.
make: *** [ncsc-out/.done] Error 1
Any ideas as to how to resolve this issue?
10-11-2017 07:41 AM
In the best of worlds, what you did should work. The problem here is that the OpenConfig consortium releases YANG modules with many errors, and the XR organization is taking them in and publishes (unmodified). The easy way out is to remove all the openconfig-* files, but if you prefer to patch them, I can tell you what you need to do.
There's also a bunch of other YANG files you need to disable before you can get a successful build. I have done this many times for XR, so I can give you the list of YANGs to include, if you like. But if you're interested in understanding the process yourself, here's an article that does this for XE: https://communities.cisco.com/community/developer/nso-developer-hub/blog/2017/08/23/porting-an-existing-service-to-use-a-netconf-ned
I might also point out that generally speaking, it's wiser to get the YANGs directly from the device rather than some repository. You can use the NSO Pioneer tool to download them. That way you can be sure you have the right version of the module(s). Pioneer lives on the NSO GitHub: https://github.com/NSO-developer
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide