Re: [netmod] 6991bis: address-with-prefix-length

Martin Bjorklund <mbj@tail-f.com> Mon, 01 April 2019 18:03 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 7418C1201A1 for <netmod@ietfa.amsl.com>; Mon, 1 Apr 2019 11:03:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, 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 5QWYODKjobxN for <netmod@ietfa.amsl.com>; Mon, 1 Apr 2019 11:03:42 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 45B07120187 for <netmod@ietf.org>; Mon, 1 Apr 2019 11:03:42 -0700 (PDT)
Received: from localhost (h-4-215.A165.priv.bahnhof.se [158.174.4.215]) by mail.tail-f.com (Postfix) with ESMTPSA id 392961AE0398; Mon, 1 Apr 2019 20:03:40 +0200 (CEST)
Date: Mon, 01 Apr 2019 20:03:40 +0200 (CEST)
Message-Id: <20190401.200340.285358162315609400.mbj@tail-f.com>
To: Michael.Rehder@Amdocs.com
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <AM0PR06MB4083C2D7B820D01C50C1F7CDE7550@AM0PR06MB4083.eurprd06.prod.outlook.com>
References: <AM0PR06MB4083C2D7B820D01C50C1F7CDE7550@AM0PR06MB4083.eurprd06.prod.outlook.com>
X-Mailer: Mew version 6.7 on Emacs 25.2 / 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/5j27M0-OgxEhdA_laFQc_HIwMak>
Subject: Re: [netmod] 6991bis: address-with-prefix-length
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: Mon, 01 Apr 2019 18:03:45 -0000

Hi,

Michael Rehder <Michael.Rehder@Amdocs.com>; wrote:

[...]

> Note also that the ietf pattern regexp are not anchored so
> " junk192.168.1.1"
> and
> "    192.168.1.1   "
> Are accepted.

No, this is not correct.  YANG uses the XSD "dialect" of regular
expressions.  In this dialect, all patterns are implicitly anchored.


/martin

> I don't know why they are unanchored. This makes them
> unusable in my view.
> 
> As a result I've written my own regxp and a somewhat elaborate MUST
> clause for canonical format check but a specific type would be better.
> Another perspective is to ensure there is some way to avoid using MUST
> to simply constrain type.
> Has that ever been discussed?
> 
> Thanks
> Mike
> 
> > -----Original Message-----
> > ----------------------------------------------------------------------
> > 
> > Message: 1
> > Date: Mon, 1 Apr 2019 16:38:34 +0200
> > From: Kristian Larsson <kristian@spritelink.net>;
> > To: netmod@ietf.org
> > Subject: [netmod] 6991bis: address-with-prefix-length
> > Message-ID: <10d3413c-df96-6e7d-df82-5542bb02348d@spritelink.net>;
> > Content-Type: text/plain; charset=utf-8; format=flowed
> > 
> > Hello,
> > 
> > seeing that 6991 is up for a refresh I wonder if this would be the
> > time to
> > suggest the addition of a type for address-and-prefix-length, for
> > example like
> > 192.0.2.1/24?
> > 
> > I find that it's the most natural way express the address and
> > prefix-length to
> > configure on an interface or for some other use. We currently have an
> > ip-prefix
> > type which allows CIDR style prefixes but since all bits to the right
> > of the mask
> > is to be 0 it is only possible to use for describing the IP prefix /
> > network address
> > itself - not the address of a host in that network.
> > 
> > I actually wish the interface-ip modules would have used a combined
> > leaf for
> > these settings rather than the dual-leaf approach it currently has,
> > but I suppose
> > that ship has sailed :/
> > 
> > Regardless, can we add such a type? Is this the document and time to
> > do it? :)
> > 
> > Kind regard,
> >     Kristian.
> > 
> > 
> > 
> > ------------------------------
> > 
> > Message: 2
> > Date: Mon, 1 Apr 2019 18:13:21 +0200
> > From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>;
> > To: Kristian Larsson <kristian@spritelink.net>;
> > Cc: <netmod@ietf.org>;
> > Subject: Re: [netmod] 6991bis: address-with-prefix-length
> > Message-ID:
> > 	<20190401161321.seiodlfsmjjvjcp5@anna.jacobs.jacobs-university.de>;
> > Content-Type: text/plain; charset="us-ascii"
> > 
> > This is the right time for this and I would call these
> > ip-address-prefix, ipv4-
> > address-prefix and ipv6-address prefix.
> > 
> > /js
> > 
> > On Mon, Apr 01, 2019 at 04:38:34PM +0200, Kristian Larsson wrote:
> > > Hello,
> > >
> > > seeing that 6991 is up for a refresh I wonder if this would be the
> > > time to suggest the addition of a type for address-and-prefix-length,
> > > for example like 192.0.2.1/24?
> > >
> > > I find that it's the most natural way express the address and
> > > prefix-length to configure on an interface or for some other use. We
> > > currently have an ip-prefix type which allows CIDR style prefixes but
> > > since all bits to the right of the mask is to be 0 it is only possible
> > > to use for describing the IP prefix / network address itself - not the
> > > address of a host in that network.
> > >
> > > I actually wish the interface-ip modules would have used a combined
> > > leaf for these settings rather than the dual-leaf approach it
> > > currently has, but I suppose that ship has sailed :/
> > >
> > > Regardless, can we add such a type? Is this the document and time to
> > > do it?
> > > :)
> > >
> > > Kind regard,
> > >    Kristian.
> > >
> > > _______________________________________________
> > > netmod mailing list
> > > netmod@ietf.org
> > > https://www.ietf.org/mailman/listinfo/netmod
> > 
> > --
> > Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> > Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> > Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> > 
> > 
> > 
> > ------------------------------
> > 
> > Message: 3
> > Date: Mon, 1 Apr 2019 16:31:12 +0000
> > From: "Acee Lindem (acee)" <acee@cisco.com>;
> > To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>;,
> > 	"Kristian Larsson" <kristian@spritelink.net>;
> > Cc: "netmod@ietf.org"; <netmod@ietf.org>;
> > Subject: Re: [netmod] 6991bis: address-with-prefix-length
> > Message-ID: <F1537180-6BF3-40C7-BCFA-3AAE0290AE9D@cisco.com>;
> > Content-Type: text/plain; charset="utf-8"
> > 
> > I believe the "address-" could be omitted from the type
> > identifiers. At least
> > within the routing area, "ipv4-prefix" is unambiguous.
> > Thanks,
> > Acee
> > 
> > ?On 4/1/19, 12:14 PM, "netmod on behalf of Juergen Schoenwaelder"
> > <netmod-bounces@ietf.org on behalf of j.schoenwaelder@jacobs-
> > university.de> wrote:
> > 
> >     This is the right time for this and I would call these
> >     ip-address-prefix, ipv4-address-prefix and ipv6-address
> >     prefix.
> > 
> >     /js
> > 
> >     On Mon, Apr 01, 2019 at 04:38:34PM +0200, Kristian Larsson wrote:
> >     > Hello,
> >     >
> >     > seeing that 6991 is up for a refresh I wonder if this would be the
> >     > time to
> >     > suggest the addition of a type for address-and-prefix-length, for
> >     > example
> >     > like 192.0.2.1/24?
> >     >
> >     > I find that it's the most natural way express the address and
> >     > prefix-length
> >     > to configure on an interface or for some other use. We currently have
> >     > an
> >     > ip-prefix type which allows CIDR style prefixes but since all bits to
> >     > the
> >     > right of the mask is to be 0 it is only possible to use for describing
> >     > the
> >     > IP prefix / network address itself - not the address of a host in that
> >     > network.
> >     >
> >     > I actually wish the interface-ip modules would have used a combined
> >     > leaf
> > for
> >     > these settings rather than the dual-leaf approach it currently has,
> >     > but I
> >     > suppose that ship has sailed :/
> >     >
> >     > Regardless, can we add such a type? Is this the document and time to
> >     > do it?
> >     > :)
> >     >
> >     > Kind regard,
> >     >    Kristian.
> >     >
> >     > _______________________________________________
> >     > netmod mailing list
> >     > netmod@ietf.org
> >     > https://www.ietf.org/mailman/listinfo/netmod
> > 
> >     --
> >     Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> >     Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> >     Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> > 
> >     _______________________________________________
> >     netmod mailing list
> >     netmod@ietf.org
> >     https://www.ietf.org/mailman/listinfo/netmod
> > 
> > 
> > 
> > ------------------------------
> > 
> > Message: 4
> > Date: Mon, 1 Apr 2019 17:23:37 +0000
> > From: "Acee Lindem (acee)" <acee@cisco.com>;
> > To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>;,
> > 	"Kristian Larsson" <kristian@spritelink.net>;
> > Cc: "netmod@ietf.org"; <netmod@ietf.org>;
> > Subject: Re: [netmod] 6991bis: address-with-prefix-length
> > Message-ID: <A0F7987F-AA67-4A63-8FEE-3B74B5B47CF1@cisco.com>;
> > Content-Type: text/plain; charset="utf-8"
> > 
> > Ok, now I'm confused. I see that the ietf-inet-type model already has
> > the types
> > ipv4-prefix and ipv6-prefix. How are these any different???
> > Thanks,
> > Acee
> > 
> > ?On 4/1/19, 12:31 PM, "Acee Lindem (acee)" <acee@cisco.com>; wrote:
> > 
> >     I believe the "address-" could be omitted from the type
> >     identifiers. At least
> > within the routing area, "ipv4-prefix" is unambiguous.
> >     Thanks,
> >     Acee
> > 
> >     On 4/1/19, 12:14 PM, "netmod on behalf of Juergen Schoenwaelder"
> > <netmod-bounces@ietf.org on behalf of j.schoenwaelder@jacobs-
> > university.de> wrote:
> > 
> >         This is the right time for this and I would call these
> >         ip-address-prefix, ipv4-address-prefix and ipv6-address
> >         prefix.
> > 
> >         /js
> > 
> >         On Mon, Apr 01, 2019 at 04:38:34PM +0200, Kristian Larsson wrote:
> >         > Hello,
> >         >
> >         > seeing that 6991 is up for a refresh I wonder if this would be the
> >         > time to
> >         > suggest the addition of a type for address-and-prefix-length, for
> >         > example
> >         > like 192.0.2.1/24?
> >         >
> >         > I find that it's the most natural way express the address and
> >         > prefix-
> > length
> >         > to configure on an interface or for some other use. We currently
> >         > have an
> >         > ip-prefix type which allows CIDR style prefixes but since all bits
> >         > to the
> >         > right of the mask is to be 0 it is only possible to use for
> >         > describing the
> >         > IP prefix / network address itself - not the address of a host in
> >         > that
> >         > network.
> >         >
> >         > I actually wish the interface-ip modules would have used a combined
> > leaf for
> >         > these settings rather than the dual-leaf approach it currently has,
> >         > but I
> >         > suppose that ship has sailed :/
> >         >
> >         > Regardless, can we add such a type? Is this the document and time
> >         > to do
> > it?
> >         > :)
> >         >
> >         > Kind regard,
> >         >    Kristian.
> >         >
> >         > _______________________________________________
> >         > netmod mailing list
> >         > netmod@ietf.org
> >         > https://www.ietf.org/mailman/listinfo/netmod
> > 
> >         --
> >         Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> >         Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany
> >         Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> > 
> >         _______________________________________________
> >         netmod mailing list
> >         netmod@ietf.org
> >         https://www.ietf.org/mailman/listinfo/netmod
> > 
> > 
> > 
> > 
> > 
> > ------------------------------
> > 
> > Subject: Digest Footer
> > 
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod
> > 
> > 
> > ------------------------------
> > 
> > End of netmod Digest, Vol 133, Issue 2
> > **************************************
> This email and the information contained herein is proprietary and
> confidential and subject to the Amdocs Email Terms of Service, which
> you may review at https://www.amdocs.com/about/email-terms-of-service
> <https://www.amdocs.com/about/email-terms-of-service>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>