Re: [netmod] draft-ietf-softwire-yang-13

Ladislav Lhotka <lhotka@nic.cz> Fri, 28 December 2018 13:03 UTC

Return-Path: <lhotka@nic.cz>
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 CCBF41292F1 for <netmod@ietfa.amsl.com>; Fri, 28 Dec 2018 05:03:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.999
X-Spam-Level:
X-Spam-Status: No, score=-6.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 5RuMxc1CoiD4 for <netmod@ietfa.amsl.com>; Fri, 28 Dec 2018 05:03:42 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (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 C8A2C128CF3 for <netmod@ietf.org>; Fri, 28 Dec 2018 05:03:40 -0800 (PST)
Received: from birdie (unknown [IPv6:2a01:5e0:29:ffff:ffc6:c393:cdb9:8db1]) by mail.nic.cz (Postfix) with ESMTPSA id 4D3E5624A7; Fri, 28 Dec 2018 14:03:37 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1546002217; bh=qcdly+DLCjC+18ulvaVD/KvTprn1xQbTiqqzk10d0Zc=; h=From:To:Date; b=Ac+24wd05j9Hi2U/DRrCeli+ltqmzP98L7vTqScK+Bq897Xn6PxAGWb50Nka+oGfS vkZCKgmboiSRsGkbcFBLbP+wBZxN2zBDhgPorgxNKuXPOWDrfeeINwmavypnGDD7cY lVVMFSBAtD3HNA/QwM+59+hmj48Lh68WDTTBhs00=
Message-ID: <0687c7291fba3b69336cb7e4a12c640b49cb75ea.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: tom petch <ietfc@btconnect.com>, Martin Bjorklund <mbj@tail-f.com>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Date: Fri, 28 Dec 2018 14:03:36 +0100
In-Reply-To: <00be01d49ea1$6a0f5520$4001a8c0@gateway.2wire.net>
References: <cd7412d5-3ad4-c9ff-a6f5-88348beed4dc@ericsson.com> <20181218.171018.1430858087061589506.mbj@tail-f.com> <01e801d49ba8$d6181320$4001a8c0@gateway.2wire.net> <20181227.130836.708030498710454309.mbj@tail-f.com> <003601d49df5$a7d094c0$4001a8c0@gateway.2wire.net> <87d0pm149u.fsf@nic.cz> <00be01d49ea1$6a0f5520$4001a8c0@gateway.2wire.net>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.30.3
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9T1yJAMlBMSsgdI-95b_wUHJEWk>
Subject: Re: [netmod] draft-ietf-softwire-yang-13
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 28 Dec 2018 13:03:45 -0000

On Fri, 2018-12-28 at 11:35 +0000, tom petch wrote:
> ----- Original Message -----
> From: "Ladislav Lhotka" <lhotka@nic.cz>
> Sent: Friday, December 28, 2018 7:47 AM
> > tom petch <ietfc@btconnect.com> writes:
> > 
> > > ----- Original Message -----
> > > From: "Martin Bjorklund" mbj@tail-f.com
> > > Sent: Thursday, December 27, 2018 12:08 PM
> > > 
> > > > tom petch <ietfc@btconnect.com> wrote:
> > > > > Martin
> > > > > 
> > > > > The Acknowledgements for
> > > > > draft-ietf-softwire-yang-13
> > > > > thank you for your work on this I-D (on the IESG Telechat for
> 10th
> > > > > January 2019) so can you tell me where my YANG is going wrong.
> > > > > 
> > > > > The module has
> > > > >   augment "/if:interfaces/if:interface" {
> > > > >     when "derived-from(if:type, 'iana-tunnel-type:aplusp')";
> > > > > and defines aplusp as a tunnel type in section 10.
> > > > > 
> > > > > A suggestion I made last October was to have a base for the three
> > > > > protocols covered here - MAP-E, MAP-T, Lw406 - and then derive
> three
> > > > > separate entities therefrom for the three protocols; I can see no
> > > > > derivation.  In which case, when is
> > > > > 
> > > > >     when "derived-from(if:type, 'iana-tunnel-type:aplusp')";
> > > > > 
> > > > > going to be true?
> > > > 
> > > > Right; either they have to define derived identities as you
> suggested,
> > > > or this need to change to 'derived-from-or-self'.
> > > 
> > > ... or drop the 'derived' altogether; if there is only 'aplusp', as
> at
> > > present, then I see no need for 'derived' and inserting one
> > > unnecessarily leaves scope for a future addition to be true when it
> is
> > > not wanted.  I can see it either way.
> > 
> > Do you mean writing something like
> > 
> >     when "if:type = 'iana-tunnel-type:aplusp'";
> > 
> > ?
> > 
> > This is brittle and shouldn't be used because it is a plain string
> > equality test and the result depends (in XML representation) on the
> > prefix that is declared for the namespace URI of the iana-tunnel-type
> > module.
> > 
> > It is true that derived-from/derived-from-or-self leaves scope for
> > future additions. However, if ever an identity is defined that
> > is derived from 'iana-tunnel-type:aplusp', then it IMO makes sense
> only
> > if the properties of the latter are inherited, so the "when" test
> > should still be true (and the augment applicable).
> 
> Lada
> 
> Thanks for that; I did indeed have the string equality test in mind,
> even though RFC8407 says otherwise.  I think that all this is too
> complicated, for me if not for the authors of I-D coming out of the

I agree it is complicated. On the other hand, using the string equality for
identities can lead to mysterious failures.

> Routing Area - I-D such as this one have already have several makeovers,
> courtesy of such as Martin and I, and for this in its present form to be
> on the next IESG Telechat - well, par for the course.
> 
> On a different tack, I was looking at teas-types and seeing
> uses path-objective-function_config
> Hang on, is underscore valid? Yes, but why use it? RFC8407 suggests do
> not.

Maybe the use of the underscore has some meaning? I personally woudn't be so
strict regarding naming conventions, as long as it makes sense to the module
authors and users. And as Randy Presuhn recently explained, there may in fact be
no practical difference between RFC 2119 terms MAY and SHOULD in cases like
this.

> or
>     type union {
>         type string {  length 0; // empty string      }
>         type string {  pattern ...
> and thinking why?  With no length restriction on the pattern, what does
> the complexity of a YANG union add?

It is either an empty string or a string matching the pattern. Of course, it
would be possible to make the pattern match an empty string.

> or
>   description  "Then index of the label restriction list entry."; }
>     container label-start {
>       must "not(../label-end/te-label/direction) or "
>         + "not(te-label/direction) "
>         + "or ../label-end/te-label/direction = te-label/direction" {
>         error-message "label-start and label-end must have the same
> direction.";
> where the error message tells me what is going on (not the description)
> but I wondered about the second 'not'  which I asssume is to cater for
>  "(te-label/direction) "
> not having a value.  All they want is
> 'start direction must = end direction'
> but it seems you need to be a contortionist to get there.

A simpler way to express this could be

    must "not(../label-end/te-label/direction != te-label/direction)"

The inequality test turns false if either of the terms doesn't exist.

Lada

> 
> I would appreciate any comment on this last - is there a simpler way of
> doing it?   After which, I shall return to lurking.
> 
> Tom Petch
> 
> > Lada
> > 
> > > Tom Petch
> > > 
> > > > /martin
> > > > 
> > > 
> > > _______________________________________________
> > > netmod mailing list
> > > netmod@ietf.org
> > > https://www.ietf.org/mailman/listinfo/netmod
> > 
> > --
> > Ladislav Lhotka
> > Head, CZ.NIC Labs
> > PGP Key ID: 0xB8F92B08A9F76C67
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67