07-02-2024 02:40 PM
Hi,
I struggle with a command in NSO CLI that I guess is caused by a "when" condition in the yang file.
I use NSO 6.3. I built the NED for my device and applied it to NSO - OK.
The concerned yang file is bbf-software-management.yang.
The command:
admin@ncs(config)# devices device mydevice live-status hardware component chassis software software package revisions download download source { url ftp } target { selected-by-user { operation create } }
Error: missing parameter: devices device live-status hardware component software software revisions download download target selected-by-user replace id
IMHO the command should be sufficient and the error should not happen.
In the yang file is a "when" condition, see below. I'd expect that if "operation" is "create" the "container replace" is not processed.
In the NED I found this (blue boxes are changes by NCS):
Is there a special way to handle "when" conditions in the CLI?
Is there a way to "convince" NSO the command is correct?
Can I split the command in 2 parts, such that NSO has a chance to act upon the "when" condition?
Or is this a problem with the NED build? If so, what is wrong?
Thanks,
Axel
07-03-2024 12:52 AM
To me it looks like a bug in processing the when statement. I would open a case with Cisco TAC. The when statement looks fine 'bbf-swm;' prefix is redundant but as long as that prefix is right it should work.
If you are looking for quick workaround, you could try the UI or an NBI. Maybe the bug is local to the CLI, or alternatively edit the yang file to remove the when statement on the container and replace with 'presence true;'. Then you should get an error from the device if you supply the container when it is not applicable or vice-versa.
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