Hi,
I added custom callback completion handler. It is called in leaf-list in yang file. It is like:
leaf-list plugins {
tailf:cli-flat-list-syntax;
min-elements 0;
max-elements 30;
// custom callback completion handler.
}
On the cli, i can’t give plugins without any option. It always ask for input. Is there any way for giving cli command with plugins and no further elements?
It asks for:
Value for ‘plugins’ (list):
Error: missing value:
Any help is appreciated. Thanks.
I think you can achieve CLI behavior with tailf:cli-drop-node-name
, without any completion callback. E.g.:
container plugins {
choice plugins {
leaf-list plugins-list {
tailf:cli-drop-node-name;
type string;
tailf:cli-flat-list-syntax;
min-elements 0;
max-elements 30;
}
leaf plugins-empty {
tailf:cli-drop-node-name;
type empty;
}
}
}
In this way you can enter plugins
as empty
element and also as lea-flist
. In other northbound interfaces and in your code you must take into account that plugins
is no longer simple node, but choice.
Thanks. But, I can’t change structure for backward compatibility. Currently, it is fine with passing argument along plugins. In other words, no change needed.