Re: [netmod] Hi all, one issue about YANG deviate's Substatements
Andy Bierman <andy@yumaworks.com> Wed, 22 February 2017 18:01 UTC
Return-Path: <andy@yumaworks.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 51B861296EE for <netmod@ietfa.amsl.com>; Wed, 22 Feb 2017 10:01:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.com
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 4QhsLoP7WAOY for <netmod@ietfa.amsl.com>; Wed, 22 Feb 2017 10:01:26 -0800 (PST)
Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 65DF61296C4 for <netmod@ietf.org>; Wed, 22 Feb 2017 10:01:26 -0800 (PST)
Received: by mail-wm0-x22f.google.com with SMTP id v77so7834992wmv.0 for <netmod@ietf.org>; Wed, 22 Feb 2017 10:01:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Kh+G60NoFD8IFtrI0Pm7ojA6pc/WL28b0hP+BhNKkcw=; b=0rTuovHHg6ZxES6jIA69TB1DACLbRc+x6KWmsE83jQ7jRtW4ZnmycSzBKU3sMilhFE /+/3Lup0vZ/i+Rf474IzdOnLRhnSKaTWC/SsTueGNFT+X8EKu2tKTQoeyIRLMHCdvvBo DAfVk66K8OM0lYCZMt49BfMCxktjf20tK3riYUrYgWXKSp1pB0CohpKe9lLlWvDqVpai Gmt4ma4X0P61oXcMbpkfy/crJPZ2ClRMR3eIgfyW5t+pNzvGNrXiiLDYLGEtJ40beXXt eMel4DcnbuXnzHoRxyoiOj2CsuFaD3z+X9XglmOIq2qS1FJs56FUnqKI6SathwIeiY01 dLEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Kh+G60NoFD8IFtrI0Pm7ojA6pc/WL28b0hP+BhNKkcw=; b=U6Qw4nWYBwlPeTlxWEHQ/Ljgkuo3DWoqllcA/qymwKvD8vaZ4VFDBIkMdXg3RRSCtC 34XPUnvIbg5oZv9LKDEOztFNzcm28lzd4lvOioaa7vOmpYs/1i3t1HFyGsDfCltH2mF+ rX8kLpRqxxJ+JM5DP4OIFyn6wEVRJd97WX7HCuCPfov//RXBZPQKq0DWBXRFC9WRA9N/ iyPUFH3q2b0wCg/HSPfTcBNXM/6q2Abr87rdJuLrPMkCkrSNRe3taU7CS3ctEAclDGQU hPnNL7M1Sp+HloIW0KbMApbZE3L+SelltxVr+6Je+1k1SrqHZktdhfIR8YlR5+08Lpn+ u6Wg==
X-Gm-Message-State: AMke39k83UpOJ15gj/CURJzAMhGE5J9Pg9N82+CkA1mDY7BJdCXUXd3TX0ALVBRVuISA86BG394f3BCxgkmd+g==
X-Received: by 10.28.214.144 with SMTP id n138mr3397083wmg.136.1487786484857; Wed, 22 Feb 2017 10:01:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.223.165.154 with HTTP; Wed, 22 Feb 2017 10:01:23 -0800 (PST)
In-Reply-To: <381D7D55085B1E4D8B581BD652E1E140B2A1BDD2@nkgeml513-mbs.china.huawei.com>
References: <381D7D55085B1E4D8B581BD652E1E140B2A1B7A3@nkgeml513-mbs.china.huawei.com> <CABCOCHTthMC0VzU9X8gboZVSr+J7+=QyUJ2DVPKBfWO52ciH6w@mail.gmail.com> <381D7D55085B1E4D8B581BD652E1E140B2A1BDD2@nkgeml513-mbs.china.huawei.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 22 Feb 2017 10:01:23 -0800
Message-ID: <CABCOCHRj9MkamovTc6G0ksrhh0nRsKoZRLN1cOB1HxhgYCsjGA@mail.gmail.com>
To: "Zhengguangying (Walker)" <zhengguangying@huawei.com>
Content-Type: multipart/alternative; boundary="001a113fb18aeea33a0549224822"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/VIdMdBA1xjbEOy4FvcJ7QK3T3cU>
Cc: "Qudan (Beijing-NOS)" <qudan.qudan@huawei.com>, "netmod@ietf.org" <netmod@ietf.org>, Yangang <yangang@huawei.com>
Subject: Re: [netmod] Hi all, one issue about YANG deviate's Substatements
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Wed, 22 Feb 2017 18:01:28 -0000
On Tue, Feb 21, 2017 at 10:02 PM, Zhengguangying (Walker) < zhengguangying@huawei.com> wrote: > Hi Andy, > > > > Thanks for your reply, my mean is not make the “Deviations be > conditional”, but want to add “when” statements to exist module > definition, because vendor may cannot support all specifications defined > in IETF-YANG but need to add some constrains. > > > YANG deviations do not support when-stmt at all. You can add and delete must-stmts (but not replace them (replace can be done with delate + add). You cannot add, delete, or replace a when-stmt. Add is not allowed since only 1 when-stmt per data node is permitted. I don't see any reason why replace and delete should have been left out, but they were. I also don't get why it is safe to replace the type-stmt but not the status-stmt. Lots of restrictions on deviations are hard to understand. > Thanks & Regards > > > > Walker (Guangying zheng) > > > Andy > > > *From:* Andy Bierman [mailto:andy@yumaworks.com] > *Sent:* 2017年2月22日 3:24 > *To:* Zhengguangying (Walker) > *Cc:* netmod@ietf.org; Qudan (Beijing-NOS); Guopeipei (Peipei Guo); > Yangang > *Subject:* Re: [netmod] Hi all, one issue about YANG deviate's > Substatements > > > > > > > > On Tue, Feb 21, 2017 at 12:32 AM, Zhengguangying (Walker) < > zhengguangying@huawei.com> 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 > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod > > >
- [netmod] Hi all, one issue about YANG deviate's S… Zhengguangying (Walker)
- Re: [netmod] Hi all, one issue about YANG deviate… Andy Bierman
- Re: [netmod] Hi all, one issue about YANG deviate… Alex Campbell
- Re: [netmod] Hi all, one issue about YANG deviate… Zhengguangying (Walker)
- Re: [netmod] Hi all, one issue about YANG deviate… Andy Bierman