Re: Blog: YANG Really Takes Off in the Industry

Phillip Hallam-Baker <phill@hallambaker.com> Tue, 09 December 2014 17:08 UTC

Return-Path: <hallam@gmail.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 865AA1A89C7 for <ietf@ietfa.amsl.com>; Tue, 9 Dec 2014 09:08:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.277
X-Spam-Level:
X-Spam-Status: No, score=-1.277 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=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 Ka4XPg1U0KIM for <ietf@ietfa.amsl.com>; Tue, 9 Dec 2014 09:08:57 -0800 (PST)
Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3B5DA1A89EB for <ietf@ietf.org>; Tue, 9 Dec 2014 09:08:52 -0800 (PST)
Received: by mail-lb0-f177.google.com with SMTP id b6so862560lbj.36 for <ietf@ietf.org>; Tue, 09 Dec 2014 09:08:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=gkmr51iePF3X+ebyTYYqo/RiJJd6qvwyQ1gU17VPyPs=; b=Km5BqgRkip/e2H+ZZq5BEcbgYgw5uoTWwMlGD+PYy3dpTftdv8E9s89lbtPWqr1Y2r AoyNCn8+FfYttgxBb9E1KoIQVfBR27kWa6C5X6fAXiMa1XNX2Mrb5/2maHjYkEDblmp0 17D8hWcHX7bq9CWT3OXq2vC03+FeKbQGQVGJPWP4lOJvHvXKTiv3XTePfyrAYSWXHmiU yisv5QezliArJeRYDSRpw92ySxGkqeepUS6sBIDZ9SR/vuQncG0ESJqxX914TTl4fbhy aFj9ci2ymQSlY0Up9HNYxKmYfgaTIAPZsOtJVBiKEUMZC9F1TkmuQCRz4kfaCCl5pcNb XFLA==
MIME-Version: 1.0
X-Received: by 10.152.7.180 with SMTP id k20mr3030425laa.4.1418144930769; Tue, 09 Dec 2014 09:08:50 -0800 (PST)
Sender: hallam@gmail.com
Received: by 10.112.19.42 with HTTP; Tue, 9 Dec 2014 09:08:50 -0800 (PST)
In-Reply-To: <54872ABD.6010509@gmail.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> <822FFCEB-7848-484E-9231-9BFDA4B97672@nominum.com> <54872ABD.6010509@gmail.com>
Date: Tue, 09 Dec 2014 12:08:50 -0500
X-Google-Sender-Auth: cETprPuDkXbekv6kX1QOrpLxg8I
Message-ID: <CAMm+LwjLFjYBkV++w_JU1FGJ5MGqsGVSTYOfwOXDJDFvWiEeTQ@mail.gmail.com>
Subject: Re: Blog: YANG Really Takes Off in the Industry
From: Phillip Hallam-Baker <phill@hallambaker.com>
To: Tim Wicinski <tjw.ietf@gmail.com>
Content-Type: multipart/alternative; boundary="001a11c217d2d6b2ea0509cb980c"
Archived-At: http://mailarchive.ietf.org/arch/msg/ietf/AldyshN7G0NVZkxgOFWq94gusi8
Cc: IETF Discussion Mailing 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 17:08:58 -0000

On Tue, Dec 9, 2014 at 12:00 PM, Tim Wicinski <tjw.ietf@gmail.com> wrote:

>
>
> On 12/9/14 9:54 AM, Ted Lemon wrote:
>
>> 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?
>> 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.
>>
>>
> I would concur that is something that the everyday yang user should never
> have to do on a regular basis.  If we do, then we need to fix this.  I
> believe this is why libraries were invented.


I disagree.

Any tool capable of describing IPv6 should ONLY be used for describing
structures at the packet layer. That is the only layer where bit twiddling
to save a few bytes on the wire is acceptable.

When I design a tool, my objective is to narrow the gap between the
abstract formalism used to describe the specification and the concrete
specification. The above syntax does not look like this is a tool that is
of the slightest use to me because I don't think it reduces the likelihood
of error. I am just as likely to get the specification wrong as the code.

This is why I became disillusioned with formal methods back in the day.


Trying to use one tool for bit twiddling and for application work is a
disaster. The point of a specification is to take away flexibility that
does not matter. YANG is a general purpose tool that lets anything be
specified. I want greater constraints.