Re: Blog: YANG Really Takes Off in the Industry

Ted Lemon <Ted.Lemon@nominum.com> Tue, 09 December 2014 14:55 UTC

Return-Path: <Ted.Lemon@nominum.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 23F4B1A872A for <ietf@ietfa.amsl.com>; Tue, 9 Dec 2014 06:55:19 -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, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 0wGj5JIvoELJ for <ietf@ietfa.amsl.com>; Tue, 9 Dec 2014 06:55:14 -0800 (PST)
Received: from sjc1-mx02-inside.nominum.com (sjc1-mx02-inside.nominum.com [64.89.234.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E2F691A870C for <ietf@ietf.org>; Tue, 9 Dec 2014 06:55:01 -0800 (PST)
Received: from archivist.nominum.com (archivist.nominum.com [64.89.228.108]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.nominum.com", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by sjc1-mx02-inside.nominum.com (Postfix) with ESMTPS id 7B57DDA00C1 for <ietf@ietf.org>; Tue, 9 Dec 2014 14:55:17 +0000 (UTC)
Received: from webmail.nominum.com (cas-02.win.nominum.com [64.89.228.132]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.nominum.com", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by archivist.nominum.com (Postfix) with ESMTP id 4867353E076; Tue, 9 Dec 2014 06:54:31 -0800 (PST)
Received: from [10.0.20.107] (71.233.43.215) by CAS-02.WIN.NOMINUM.COM (192.168.1.101) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 9 Dec 2014 06:54:25 -0800
Subject: Re: Blog: YANG Really Takes Off in the Industry
MIME-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Content-Type: text/plain; charset="windows-1252"
From: Ted Lemon <Ted.Lemon@nominum.com>
X-Priority: 3
In-Reply-To: <00f601d013bd$a1d23900$4001a8c0@gateway.2wire.net>
Date: Tue, 09 Dec 2014 09:54:05 -0500
Content-Transfer-Encoding: quoted-printable
Message-ID: <822FFCEB-7848-484E-9231-9BFDA4B97672@nominum.com>
References: <54770BA5.5060603@cisco.com> <809EFD2B-A845-46B7-A394-A9C9E5393CD5@piuha.net> <547874D6.1090001@cisco.com> <7890AE32-F7A9-4C32-9C3D-8251E70B1F29@lucidvision.com> <m2sigyhpxc.wl%randy@psg.com> <8BBBDF7F-00A0-44BD-AA64-DA7044D35012@lucidvision.com> <C51AC247-C16D-4452-874E-0D97BDB009EB@juniper.net> <547D0AEA.4020309@gmail.com> <0BFD0B22-EC45-473F-8E7A-7FB608B60E6F@juniper.net> <139D837E-F131-4791-A026-234699A7E617@nominum.com> <01f901d00ee4$3c077b40$4001a8c0@gateway.2wire.net> <FF42158A-AC42-4EBF-9FCB-1A3EF4162027@nominum.com> <00f601d013bd$a1d23900$4001a8c0@gateway.2wire.net>
To: "t.p." <daedulus@btconnect.com>
X-Mailer: Apple Mail (2.1878.6)
X-Originating-IP: [71.233.43.215]
Archived-At: http://mailarchive.ietf.org/arch/msg/ietf/-u9149WRyeCFStSCXBbTu3q1nA0
Cc: IETF-Discussion list <ietf@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Dec 2014 14:55:19 -0000

On Dec 9, 2014, at 9:31 AM, t.p. <daedulus@btconnect.com> wrote:
> The expression that controls the permissible format of IPv6 addresses in
> yang-types is of this ilk.
> "       type string {
>         pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
>               + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
>               + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
>               + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
>               + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))';
>         pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
>               + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
>               + '(/.+)'; "
> which was got wrong several times before it became what it is now (which
> rings alarm bells for me).

Wow, so there's no way to do this ABNF-style?

> netmod-routing-cfg-02 on the netmod WG list 29feb2012 tripped over that
> fact that a unique-stmt for container/list/leaf is not allowed in trying
> to make a name unique (because there is a 'list' in there) which led to
> a debate as to what YANG(RFC6020) was actually trying to say on this
> topic with the conclusion that the RFC is ambiguous.
> 
> By the time this I-D  was up to netmod-routing-cfg-08 13feb2013 Martin
> suggested
> "> I think the majestic must expression for the connected-routing-table
>> might be wrong.  The problem is that it checks that:
>>   not (*some* preceding-sibling has same afi
>>        AND
>>        *some* preceding-sibling has same safi)  "
> so it was revised from
> "                  must "not(/routing/routing-tables/"
>                    + "routing-table[name=current()/"
>                    + "preceding-sibling::connected-routing-table/"
>                    + "name]/address-family=/routing/routing-tables/"
>                    + "routing-table[name=current()/name]/"
>                    + "address-family and /routing/routing-tables/"
>                    + "routing-table[name=current()/"
>                    + "preceding-sibling::connected-routing-table/"
>                    + "name]/safi=/routing/routing-tables/"
>                    + "routing-table[name=current()/name]/safi)" {
>                   error-message "Duplicate address family for "
>                               + "connected routing tables.";   "
> to
> "    must "not(/routing/routing-tables/"
>       + "routing-table[name=current()/"
>       + "preceding-sibling::connected-routing-table/"
>       + "name and address-family=/routing/routing-tables/"
>       + "routing-table[name=current()/name]/"
>       + "address-family and safi=/routing/routing-tables/"
>       + "routing-table[name=current()/name]/safi])" {
>      error-message "Duplicate address family for "
>                  + "connected routing tables.";    "
> 
> draft-ietf-netmod-snmp-cfg-00 started out with
> "     when "../type = trap or ../type = inform";  "
> which looks ok, but isn't, generating the error message
> "Warning: no child nodes found in XPath expr '../type = trap or ../type
> = inform'
> ietf-snmp-proxy.yang:123.42: warning(432): no child node available "
> because unquoted strings are node names not values.  And
> "      when "snmp:params/snmp:v1 or snmp:params/snmp:v2c"; "
> generates the same error message because a solidus is missing while
> "         must '/snmp/usm/remote[engine-id=current()]/'
>           + 'user[name=current()/../usm/user-name]' "
> also generates the same error message which led to a lengthy discussion
> about interactions of 'augment', 'when' and such like; the condition got
> removed, but the discussions about those interactions continue still, as
> in issue Y26 of the enhacements for YANG 1.1.

This certainly seems quite ugly.   If it can be fixed in an update, that's a positive thing.

> On a slightly different tack, YANG enumerations have no mandatory value,
> unlike SMI, and this has triggered a number of discussions, such as an
> ambiguity when RFC6020 says
> "the assigned value is one greater than the current highest enum value."
> as to what the next value should be. This then has an impact on the
> ordering of lists.

Can this be fixed in an update, or is there some reason why this decision was made?

> Do I know what I am talking about?  On a good day, after I have been
> browsing recent posts to the netmod WG list (all of which I read),
> maybe; but after a time away from netmod, I struggle.  And the issues
> that arise on the netmod WG list suggests to me that those whom I
> clearly see are the experts on this topic in the IETF may, at times,
> struggle too.

This is certainly something to be concerned about.   A syntax that is difficult to internalize without working on it full-time is not a good idea.   OTOH, it's hard to have a syntax that is not at least _somewhat_ difficult to internalize if you aren't working on it full time, so to some extent this is a matter of degree.