11-18-2021 12:07 AM - edited 11-18-2021 12:27 AM
NSO creates following YANG while running ncs-make-package --build --netconf-ned . aristanso:
grouping live_ncs_interface-acl-entries-top { description "Top-level grouping for per-interface ACL entries"; container acl-entries { description "Enclosing container for list of references to ACLs"; list acl-entry { key "sequence-id"; description "List of ACL entries assigned to an interface"; leaf sequence-id { type leafref { path "../state/sequence-id"; } description "Reference to per-interface acl entry key"; } container state { description "Operational state data for per-interface ACL entries"; uses live_ncs_interface-acl-entries-config; uses live_ncs_interface-acl-entries-state; } } } }
Following errors are observed:
augmented/openconfig-acl@2019-11-27.yang:1394: error: the node 'state' from module 'openconfig-acl' (in node 'acl-entry' in module 'openconfig-acl' from 'openconfig-acl') is not found augmented/openconfig-acl@2019-11-27.yang:1394: error: the node 'state' from module 'openconfig-acl' (in node 'acl-entry' in module 'openconfig-acl' from 'openconfig-acl') is not found make: *** [Makefile:51: ncsc-out/.done] Error 1
However, running yanger directly does not raise those errors:
root@1752fd170d48:/src/nsobuilddir# yanger -p aristanso/src/yang:aristanso/src/augmented/:aristanso/src/ncsc-out/modules/yang:/src/ncsyang aristanso/src/augmented/openconfig-acl@2019-11-27.yang root@1752fd170d48:/src/nsobuilddir#
Same is observed with https://github.com/aristanetworks/yang/blob/master/EOS-4.26.1F/openconfig/public/release/models/isis/openconfig-isis-routing.yang#L216
Problem seems to be related to leafref validation in all those cases.
11-19-2021 04:38 AM
Thanks for your report. When I try the same using EOS0-4.26.1F files form github, I don't get that error. Perhaps we're using different NSO versions? I'm using NSO 5.6:
$ for i in *; do echo `md5sum $i`; done
1f34e2721e95bac45d8c33d64473350b ietf-interfaces.yang
0b888fed449f5a648859c2a2c4d9b567 ietf-yang-types.yang
d046d473f3df9ca798d68cb6c1e7cea4 openconfig-acl.yang
e38aed42f7ef5d989bb39d24c48771ed openconfig-extensions.yang
bdfca94c7760d38f0b74b2d36629e219 openconfig-inet-types.yang
0f076b8adf15a9bc66d5aeb61ba5e14a openconfig-interfaces.yang
3f8b67a0a9d4e0d3417302e15f68bf48 openconfig-packet-match-types.yang
c46be2e17cfd331dfc049c091d414a54 openconfig-packet-match.yang
77e0a05fffc47316afc0a46821291a44 openconfig-types.yang
e67da5ad12c4d325b8d7bd294d5851e5 openconfig-yang-types.yang
$ ncs-make-package --netconf-ned . t --no-netsim --no-java --no-python; make -C t/src
rm -rf ../package-meta-data.xml
if [ -x /Users/jlindbla/nso/5.6/support/ned-make-package-meta-data ]; then \
/Users/jlindbla/nso/5.6/support/ned-make-package-meta-data package-meta-data.xml.in; \
else \
grep -v 'to be replaced by build' package-meta-data.xml.in > ../package-meta-data.xml; \
fi
--ncs-ned-id t-nc-1.0:t-nc-1.0
chmod -w ../package-meta-data.xml
/Users/jlindbla/nso/5.6/bin/ncsc --ncs-compile-bundle yang \
--ncs-device-dir ncsc-out \
--fail-on-warnings \
\
\
--ncs-device-type netconf \
\
--ncs-ned-id t-nc-1.0:t-nc-1.0 \
cp ncsc-out/modules/fxs/*.fxs ../load-dir
for f in `echo ../load-dir/*.fxs`; do \
true; \
done
touch ncsc-out/.done
$
11-19-2021 04:43 AM
Thanks Jan! I am using 5.3 (this is the only one I can download following link here https://github.com/NSO-developer/nso-docker)
11-19-2021 04:56 AM
I see error only if I compile all YANGs from this folder: https://github.com/aristanetworks/yang/tree/master/EOS-4.26.1F/release/openconfig/models in addition to https://github.com/aristanetworks/yang/tree/master/EOS-4.26.1F/openconfig/public/release/models
11-19-2021 05:30 AM
Thanks for the details. I think I found the issue now. As soon as I add the module arista-acl-deviations.yang to the build, I see the same issue as you reported. Looking inside that module, I find:
deviation "/oc-acl:acl/oc-acl:interfaces/oc-acl:interface/oc-acl:ingress-acl-sets/oc-acl:ingress-acl-set/oc-acl:acl-entries/oc-acl:acl-entry/oc-acl:state" {
description "Per-interface ACL state is not supported in EOS";
deviate not-supported;
}
deviation "/oc-acl:acl/oc-acl:interfaces/oc-acl:interface/oc-acl:egress-acl-sets/oc-acl:egress-acl-set/oc-acl:acl-entries/oc-acl:acl-entry/oc-acl:state" {
description "Per-interface ACL state is not supported in EOS";
deviate not-supported;
}
It seems the deviation file is removing some objects that the other YANG files are referencing. This works the same for NSO 5.3 and 5.6. Commenting out the two deviations above makes things compile just fine.
The deviations need to be updated to either not remove these elements, or more deviations need to be added to also remove the objects referring to the not implemented elements.
11-19-2021 05:37 AM
Thanks a lot Jan for taking a look!
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