My linked model looks like -
container linked_items {
container my_container {
tailf:cli-sequence-commands;
tailf:cli-compact-syntax;
choice way {
case one-way-case {
leaf one-way {
tailf:cli-incomplete-command;
tailf:link "some-path/one-way";
type uint8 {
range "1..10";
}
}//end of onw-way
}//end of one-way-case
case two-way-case {
leaf two-way {
tailf:cli-incomplete-command;
tailf:link "some-path/two-way";
type uint8 {
range "1..10";
}
}//end of two-way
}//end of two-way-case
}//end of choice-way
leaf dummy_leaf {
tailf:cli-drop-node-name;
type string;
}
}
}
}
My target node structure looks like -
container target-node-container {
container my_container {
tailf:cli-sequence-commands;
tailf:cli-compact-syntax;
choice way {
case one-way-case {
leaf one-way {
tailf:cli-incomplete-command;
type uint8 {
range "1..10";
}
}//end of onw-way
}//end of one-way-case
case two-way-case {
leaf two-way {
tailf:cli-incomplete-command;
type uint8 {
range "1..10";
}
}//end of two-way
}//end of two-way-case
}//end of choice-way
leaf dummy_leaf {
tailf:cli-drop-node-name;
type string;
}
}
}
}
So on the CLI prompt if i type -
(config)# target-node-container my_container one-way 1 dummy_leaf abc
So basically, I am trying to set value on the target node, so the output looks like -
target-node-container my_container one-way 1 dummy_leaf abc
!
Here it is not setting the linked node! It has set only the target node.
However, on the CLI prompt, if i type the cmd -
(config)# linked_items my_container one-way 1 dummy_leaf abc
Here, I am setting the linked node. Output looks like-
linked_items my_container one-way 1 dummy_leaf abc
!
target-node-container my_container one-way 1 dummy_leaf abc
!
In this case, it is indirectly setting the target node as well along with the linked node.
And this behavior (not setting the linked node) is observed only when choice statement is used. So please help with this.
Instead if we hadn’t used choice statement, then setting either the linked node or the target node, would have set both the nodes.