【发布时间】:2020-05-26 22:19:06
【问题描述】:
有没有办法在 yang 中定义不可读的数据?
module system{
leaf name{
type string;
}
leaf password{
type string;
}
}
所以在这种情况下,“密码”是不可读的数据。
【问题讨论】:
标签: ietf-netmod-yang ietf-restconf
有没有办法在 yang 中定义不可读的数据?
module system{
leaf name{
type string;
}
leaf password{
type string;
}
}
所以在这种情况下,“密码”是不可读的数据。
【问题讨论】:
标签: ietf-netmod-yang ietf-restconf
如果您希望使数据“不可读”,您可以使用binary 内置类型,它使您能够将任意字节的 blob(base64 编码)设置为叶子的值。包括加密字节。
leaf password {
type binary;
default "cGFzc3dvcmQ="; // <-- plain text "password"
}
【讨论】: