Hi all,

I encounter a question about 'when', when I implement yang model associated 
when condition.

Yang model:

leaf password-type {
   type enumeration {
      enum null;
      enum simple;
      enum cipher;
   }
}

leaf password-text {
type string;
when "../password-type != null";
}

I config these two leafs as below:
<password-type>simple</password-type>
<password-text>123456</password-text>

And I changed password-type to null, I get the config like below:
<password-type>null</password-type>

And then, I reconfig the password-type to simple, what data should be returned?

Is
  <password-type>simple</password-type>

Or

  <password-type>simple</password-type>
  <password-text>123456</password-type>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to