cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
116
Views
0
Helpful
1
Replies

NSO CLI - problem with "when" condition

KMawal
Level 1
Level 1

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. 

KMawal_0-1719955894380.png

In the NED I found this (blue boxes are changes by NCS):

KMawal_1-1719955931887.png

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

 

 

 

1 Reply 1

snovello
Cisco Employee
Cisco Employee

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.