04-01-2020 11:19 AM
Started to compile another device last night and ran into a bunch of the following errors:
Here are a couple of examples of YANG snippets causing the errors:
leaf fec-type { when "(ancestor::port/port-type = 'client') or (ancestor::port/port-type = 'client-subport')"; type types:otuk-fec; default "G709"; description "The FEC type of client OTUk."; } leaf tx-trc { when "ancestor::card/switching-type = 'tdm'"; type types:tti-type-15; description "The transmitter trc(trail trace identification)"; } uses common-otn:als-prop { when "ancestor::card/card-mode = 'regen'"; }
I read the section on tailf:dependency in NSO 5.3.0.1 Manual Pages NCS man-pages, Volume 5 but being new to NCS this is beyond my understanding at the moment. Can anyone explain to me is simple terms what I am required to do?
Thank you!
04-02-2020 09:59 AM
I will try.
In your example, fec-type depends on another leaf called port-type. That means when someone make a change to port-type, NSO must check if the when-statement in fec-type still holds true or not.
To be efficient about this, NSO marks port-type has having a dependent leaf that has to be validated on change.
If you get the error/warning you get, it means NSO cannot figure out the dependency. If you don't fix this (turn of the error on that warning) you can potentially have a huge performance degradation. NSO now only knows that fec-type depends on something, but not on what. So for EVERY change in CDB, NSO will check fec-type's when statement, this can be VERY costly.
So to you specific problem, I've never used ancestor in NSO XPath, I'd recommend that you try relative paths, e.g. when "../port-type='client'" and NSO should be able to sort out the dependencies.
If you cannot figure it out, please share the YANG model and I can take 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