Hi,
I need to implement below kind of CLI’s in YANG
ring 1 entrytime <int>
ring 1 forgettime <int>
ring 1 transittime <int>
ring value can be 1,2,3
I tried implementing this as a list with ring number as the key and with entrytime. forgettime, transittime as leaves.
But if we make ring number as key, “no ring 1” becomes a valid CLI in ConfD but I dont want this. “no” form should work for the entire CLI only, like “no ring 1 entrytime”
below is rough way I have modelled this.
container ring {
tailf:cli-incomplete-no;
list ring {
tailf:cli-incomplete-command;
tailf:cli-drop-node-name;
tailf:cli-suppress-mode;
tailf:cli-suppress-list-no;
key "ringnumber";
leaf ringnumber {
tailf:cli-incomplete-command;
tailf:cli-incomplete-no;
type uint8 {
range "1..3";
}
}
leaf entrytime {
tailf:cli-full-command;
type uint16 {
range "0..65535";
}
}
Is there any better way to solve the problem.
Also for one of the leaves, I need to show only the “no” of the CLI in the running config and dont generate any CLI while setting the leaf (boolen leaf). How can this be done?
Thanks