Hi,

I believe you misunderstood the intention.

A "when" statement inside a deviation would simply add/remove/update a "when" 
statement in the target module. It would not make the deviation conditional.


I asked this some time ago, and for some reason I was told that it would be 
overly complex to implement, and to use a "must" statement instead. But I 
disagree with this resolution.


Alex


________________________________
From: netmod <[email protected]> on behalf of Andy Bierman 
<[email protected]>
Sent: Wednesday, 22 February 2017 8:23 a.m.
To: Zhengguangying (Walker)
Cc: Qudan (Beijing-NOS); [email protected]; Yangang
Subject: Re: [netmod] Hi all, one issue about YANG deviate's Substatements



On Tue, Feb 21, 2017 at 12:32 AM, Zhengguangying (Walker) 
<[email protected]<mailto:[email protected]>> wrote:
Hi all,

  When we define YANG models, there has one issue about "deviate's 
Substatements"

  In section 7.20.3.2.  The "deviate" Statement given the Substatements 
supported, but "when" not there.
config       | 7.21.1       | 0..1        |
               | default      | 7.6.4, 7.7.4 | 0..n        |
               | mandatory    | 7.6.5        | 0..1        |
               | max-elements | 7.7.6        | 0..1        |
               | min-elements | 7.7.5        | 0..1        |
               | must         | 7.5.3        | 0..n        |
               | type         | 7.4          | 0..1        |
               | unique       | 7.8.3        | 0..n        |
               | units        | 7.3.3        | 0..1        |
               +--------------+--------------+-------------+
Now, we have the scenario to add "when" constrains when deviate the existed 
YANG module, how I can do it?


You cannot add when-stmts to deviations.
It is not supported.  Deviations cannot be conditional.

May be it need extend the Substatements of "devite" to add "when", what's yours 
opinion, please help to share, thanks.

Thanks & regards

Walker (Guangying zheng)




Andy


_______________________________________________
netmod mailing list
[email protected]<mailto:[email protected]>
https://www.ietf.org/mailman/listinfo/netmod


_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to