Re: [netmod] hi Martin, one issue about RFC7950 7.20.3.2. The "deviate" Statement, please help to confirm

Martin Bjorklund <mbj@tail-f.com> Mon, 15 January 2018 09:13 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2D83D127076 for <netmod@ietfa.amsl.com>; Mon, 15 Jan 2018 01:13:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1HkRskSDXDiV for <netmod@ietfa.amsl.com>; Mon, 15 Jan 2018 01:13:52 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id D903F12D880 for <netmod@ietf.org>; Mon, 15 Jan 2018 01:13:51 -0800 (PST)
Received: from localhost (unknown [173.38.220.56]) by mail.tail-f.com (Postfix) with ESMTPSA id EA6901AE0144; Mon, 15 Jan 2018 10:13:50 +0100 (CET)
Date: Mon, 15 Jan 2018 10:13:50 +0100
Message-Id: <20180115.101350.1803615051443159645.mbj@tail-f.com>
To: zhengguangying@huawei.com
Cc: netmod@ietf.org, qudan.qudan@huawei.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <381D7D55085B1E4D8B581BD652E1E140C92641FB@nkgeml513-mbs.china.huawei.com>
References: <381D7D55085B1E4D8B581BD652E1E140C92641FB@nkgeml513-mbs.china.huawei.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/jupEYZD5Nd7LmLlqC_2Z915zSu0>
Subject: Re: [netmod] hi Martin, one issue about RFC7950 7.20.3.2. The "deviate" Statement, please help to confirm
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Jan 2018 09:13:53 -0000

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)" <zhengguangying@huawei.com> 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:image001.png@01D38B9C.D7570600]
> 
>