Hide a leaf-node in YANG

Hi All,

I have a use case to hide leaf C from CLI. I cannot comment/remove code for this leaf. However, if any user wants to configure leaf C, he/she should be able to configure it. The only thing is this leaf should be hidden when configuring in CLI. When pressed TAB or “?” is entered this should not get displayed.

list test{
  key "A";
  leaf A {}
  leaf B{}
  leaf C{}
}

Expected output:

[(config)# test demoCLI ? # or when pressed TAB
Possible completions:
  A
  B

This is config CLI.
I checked for other responses to similar requirements, none helped.

This also didn’t help.

I tried tailf:hidden, tailf:info "suppress suppress-show-path";, tailf:cli-drop-node-name;, tailf:cli-suppress-show-conf-path;, tailf:info "suppress suppress-show-match"; but none helped.

Kindly assist in getting desired result.

Thanks in advance.

I am guessing your example should be something like the below instead of the above?:

(config)# test demoCLI ? # or when pressed TAB
Possible completions:
  B

I need to hide C leaf so, A and B leaves only should be visible. However, if needed, user should be able to configure C leaf too.