How to mask characters in YANG model

currently:

please enter oldpassword: oldpassword

I want it as:

please enter oldpassword: **************

How can I mask users entry for a field in YANG? how can I use the tailf: suppress-echo type?

Not clear how the above is being printed without seeing your YANG model.

If the oldpassword prompt above came from the input statement of a tailf:action, then the “tailf:suppress-echo true” annotation will cause “*” to be shown as the oldpassword field is being entered. If this came from your custom CLI command, you will need to hide it in your shell script or C code.

Its a leaf node that was customs added

Given the following YANG snippet of an example password field:

container test {
  leaf password {
    type string;
    tailf:suppress-echo true;
  }
}

Following is the auto-rendered CLI behavior:

localhost(config)# test password 
(<string>): *********
localhost(config)#

Hello,
Can you please tell me how this can be used in netconf requests too. The catch with this one is to press enter. Can I do without pressing enter key for the same.
Please clarify.
Thanks

This isn’t supported for NETCONF.

Hi, I have one more followup question with the same topic.
Sorry to keep using this thread.
container test {
leaf password {
type string;
tailf:suppress-echo true;
}
}

is there, that way I can prevent, giving password inline?
Meaning,
localhost(config)#test password test$123 - shouldnt be allowed.

But only allow below way:
localhost(config)# test password
(): *********
localhost(config)#

Please suggest.
Thanks,