1

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.

Shira E
  • 25
  • 5

1 Answers1

0

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"
}
predi
  • 5,528
  • 32
  • 60