Hi, This is an issue that has been reported before. It is tracked in https://github.com/netmod-wg/yang-next/issues/14.
This said, I think in this particular case, where you define both the when expression and the if-feature leaf, I think the correct solution is to ensure that the when expression can handle the case that the leaf is not implemented (due to the if-feature). In this case, the when expression you have will be "true" if the node ../vrfAny is not implemented, which is what you want (I assume, since otherwise you should mark the node with the when expression with the same if-feature as ../vrfAny). /martin "Zhengguangying (Walker)" <[email protected]> wrote: > Hi Martin, > > When we define YANG model's deviation file, we find one scenario was > nor supported but we have one problem depend on it. > > Our scenario: > In ACl YANG module, there have two leafs: > acl/aclGroups/aclGroup/aclRuleBas4s/ aclRuleBas4/vrfName > acl/aclGroups/aclGroup/aclRuleBas4s/ aclRuleBas4/vrfAny > > And the acl/aclGroups/aclGroup/aclRuleBas4s/ aclRuleBas4/vrfName have > one Constraints: when "not (../vrfAny = 'true')" > > > In some product domain, the "vrfAny" does not supported, some they > deviate the leaf "vrfAny". From the sematic view, the Constraints of > vrfName when "not (../vrfAny = 'true')" should be deviated as "delete" > too. > > But, in RFC7950 7.20.3.2. The "deviate" Statement , "when " is not > the Substatement of deviate, we can not deviate the when statement, > and the problem coming, some industry netconf tools compile fail > because "../vrfAny" does not exist. > > And there have some other scenario about "when" deviate, So, I think > whether the YANG language should add "when" as the Substatement of > deviate? > > What's your opinion? > > > Thanks & regards > > Walker(guangying zheng) > > > [cid:[email protected]] > > _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
