Non readable - YANG

180 Views Asked by At

There is a way to define non readable data in yang?

module system{
   leaf name{
      type string;
   }
   leaf password{
      type string;
   }
}

So in this case 'password' is the non readable data.

1

There are 1 best solutions below

0
On

If you wish to make the data "unreadable", you can use binary built-in type, which enables you to set an arbitrary blob of bytes (base64 encoded) as the value for a leaf. Encrypted bytes included.

leaf password {
  type binary;
  default "cGFzc3dvcmQ="; // <-- plain text "password"
}