Default Value not applied for a leaf under input

Hi All!

I have following model…

input {

leaf x {
type inet:ipv4_address;

I seeif leaf x is not under input default statement is taken. But if the same leaf is inside input its asking for ip and not taking default value.


Correct. The default value of a leaf is the value that the server uses if the leaf does not exist in the data tree.

If you want to see that when doing completion you’ll have to write a custom completion callbacks as described in section 16.12 Using CLI completion in the User Guide and the cli/completion example.