Hello Experts,
I have few queries regarding yang. Can someone please help me to sort out this. Below is my yang file and I have few questions
container ntp {
tailf:info "NTP Configuration";
tailf:cli-oper-info "Display NTP information";
tailf:cli-incomplete-show-path;
container auth {
tailf:info "Configure NTP authentication keys";
list server {
tailf:info "Configured ip addresses";
tailf:cli-suppress-mode;
tailf:cli-sequence-commands;
tailf:cli-incomplete-command;
tailf:cli-compact-syntax;
key "serverip";
leaf serverip {
tailf:info "ip address";
type leafref {
path "/gw-system:ntp/server";
}
}
leaf key {
tailf:info "Authentication key ID for this server";
type uint32 {
range "1..65535";
}
}
choice authtype {
tailf:cli-incomplete-command;
leaf sha256 {
tailf:info "Value of the sha256 key";
type tailf:aes-cfb-128-encrypted-string {
tailf:info "Cleartext or AES encrypted key";
}
}
}
}
}
}
-
Don’t show
<cr>
until full command is completed.
I am getting<cr>
atchoice authtype
attribute. I have already usedcli-incomplete-command
withcli-sequence-command
but still I am getting<cr>
atchoice authtype
attribute.
It works fine till attributeleaf key
but after that I get<cr>
along withleaf sha256
. How to make sure user enters full command. -
I have used
leafref serverip
so that user can input only available options to which thisleaf serverip
is referring to it is working fine.
But the problem is if user give any input which is not in the bucket to whichleafref serverip
is referring then it gives error while commit. Is there any way to restrict user during input only and not while commit. -
Is it possible to delete all leaf references automatically if the main leaf which is getting referred by other leafs get deleted.
Can someone please provide your input to the above questions