Re: [netmod] regular expression flavours (again)

"Rob Wilton (rwilton)" <rwilton@cisco.com> Wed, 12 June 2019 09:53 UTC

Return-Path: <rwilton@cisco.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 CAAB91200F9 for <netmod@ietfa.amsl.com>; Wed, 12 Jun 2019 02:53:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 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, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=f1Hb4d5f; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=Dy4xrgzI
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 V4NHHq2LQspc for <netmod@ietfa.amsl.com>; Wed, 12 Jun 2019 02:53:06 -0700 (PDT)
Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 78B481200B6 for <netmod@ietf.org>; Wed, 12 Jun 2019 02:53:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5162; q=dns/txt; s=iport; t=1560333186; x=1561542786; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=z/uHHI7kPnRSFnAYIBsZ/xYNyFJ9QSYxXP38mYIJyQ4=; b=f1Hb4d5f8blD93gSOPO750pYDO5kXpmcFVoEQs0BlLqsKo4QmqHhYQv0 xhLU5V0IDfEqCFUnC6/uBLQcYLH7y5SUdTJyTeajyAgIldoDC58AY9qgv 0KWcYj/ZKv7y9sdONWrLYpHvYIDG61vr8rJzA20rdqaAG9f3c2iM1boA5 k=;
IronPort-PHdr: 9a23:EGreyBK4S3F0h/oRkNmcpTVXNCE6p7X5OBIU4ZM7irVIN76u5InmIFeBvad2lFGcW4Ld5roEkOfQv636EU04qZea+DFnEtRXUgMdz8AfngguGsmAXFfkLfr2aCoSF8VZX1gj9Ha+YgBY
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0ATAABvygBd/49dJa1lGgEBAQEBAgEBAQEHAgEBAQGBUwMBAQEBCwGBPVADalUgBAsoCoQLg0cDjmGCV5czgS6BJANUCQEBAQwBARgLCgIBAYN6RgIXgi0jNgcOAQMBAQQBAQIBBG0cDIVKAQEBAQIBAQEQEREMAQEsDAQHBAIBCBEEAQEBAgImAgICJQsVCAgCBAESCBMHgwGBagMODwECDJ0tAoE4iF9xgTGCeQEBBYUDGIIPCYEMKAGLXBeBQD+BEUaCTD6CVgsBAQKBYYMIMoImjjCaKmoJAoIQhkeNHoMOlBiNF4cXjzACBAIEBQIOAQEFgVYFLIFYcBU7gmwJggaDcIUUhT9ygSmNSQGBIAEB
X-IronPort-AV: E=Sophos;i="5.63,365,1557187200"; d="scan'208";a="573727822"
Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 12 Jun 2019 09:53:04 +0000
Received: from XCH-ALN-015.cisco.com (xch-aln-015.cisco.com [173.36.7.25]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id x5C9r4K3003385 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 12 Jun 2019 09:53:04 GMT
Received: from xhs-aln-002.cisco.com (173.37.135.119) by XCH-ALN-015.cisco.com (173.36.7.25) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 12 Jun 2019 04:53:03 -0500
Received: from xhs-rcd-003.cisco.com (173.37.227.248) by xhs-aln-002.cisco.com (173.37.135.119) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 12 Jun 2019 04:53:02 -0500
Received: from NAM05-DM3-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-003.cisco.com (173.37.227.248) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 12 Jun 2019 04:53:02 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z/uHHI7kPnRSFnAYIBsZ/xYNyFJ9QSYxXP38mYIJyQ4=; b=Dy4xrgzIDR666bHWNbqhbf5ZEIohhBWROiSVOURpTC0EG+oXk6ceayRCs6GhyhDA/3bp0qriTVKS/d0tzvc71Fgc0CUQTVtJDMM8d9gLTMQd6jMd6qulhoOLyvMJ+CWu/vo2ehbN9WsfPG00CCDrCJIqx5S/Vkv1S3cFNPkPTd4=
Received: from BYAPR11MB2631.namprd11.prod.outlook.com (52.135.227.28) by BYAPR11MB2776.namprd11.prod.outlook.com (52.135.228.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.15; Wed, 12 Jun 2019 09:53:01 +0000
Received: from BYAPR11MB2631.namprd11.prod.outlook.com ([fe80::d837:c1dd:cdb1:bb78]) by BYAPR11MB2631.namprd11.prod.outlook.com ([fe80::d837:c1dd:cdb1:bb78%7]) with mapi id 15.20.1965.017; Wed, 12 Jun 2019 09:53:01 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Ladislav Lhotka <lhotka@nic.cz>, NETMOD WG <netmod@ietf.org>
Thread-Topic: [netmod] regular expression flavours (again)
Thread-Index: AQHVIPUyXZrpgNnnhkC8kWX+UPfSraaXt5pggAAL+4CAAACa4A==
Date: Wed, 12 Jun 2019 09:53:01 +0000
Message-ID: <BYAPR11MB26310B96E28B846081615F50B5EC0@BYAPR11MB2631.namprd11.prod.outlook.com>
References: <291106e34498ebd68f26bf9ff9b679dd5bd8f0cd.camel@nic.cz> <BYAPR11MB26316E09A62C11012CAFDA15B5EC0@BYAPR11MB2631.namprd11.prod.outlook.com> <d11c243ec323610a3179d06fe9b594c9b4d548d8.camel@nic.cz>
In-Reply-To: <d11c243ec323610a3179d06fe9b594c9b4d548d8.camel@nic.cz>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=rwilton@cisco.com;
x-originating-ip: [173.38.220.62]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 68bacf74-82aa-45a8-4c79-08d6ef1bc1c0
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR11MB2776;
x-ms-traffictypediagnostic: BYAPR11MB2776:
x-ms-exchange-purlcount: 4
x-microsoft-antispam-prvs: <BYAPR11MB277675729A2F1356C957998DB5EC0@BYAPR11MB2776.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0066D63CE6
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(346002)(136003)(366004)(376002)(39860400002)(396003)(478694002)(13464003)(189003)(199004)(52314003)(6246003)(6436002)(446003)(7736002)(561944003)(53936002)(66556008)(11346002)(55016002)(8676002)(66476007)(64756008)(186003)(110136005)(3846002)(66446008)(102836004)(66946007)(229853002)(76176011)(81156014)(6116002)(76116006)(73956011)(486006)(9686003)(316002)(99286004)(6306002)(2906002)(25786009)(81166006)(476003)(26005)(53546011)(6506007)(19273905006)(305945005)(7696005)(86362001)(68736007)(33656002)(66066001)(74316002)(478600001)(966005)(52536014)(14454004)(5660300002)(71200400001)(8936002)(256004)(71190400001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR11MB2776; H:BYAPR11MB2631.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: 1iypLZJhX4JpEGLC+xdtIAjlL9eIwqmruHLU7XgRW/UmRyAKdDaKwDG90FgSOHAwP72ARzCAIkexb4psai73sF5T/kw2IxtcUdUj/gtbrGQV34sS4bJKQFnnZK3CZimWfig9aQsdhIYpR3Q/bb++oTOW33IlXhqt9GsTCI3YzwUGWMv7zzmZ+k/H4IgSw7SsnSKNRM2Sscv8F4uJR/tEr2B8nzXBnFBqdGUinby5kcx1I4ypdS/80VV0aMdKawlSuXRuXYBMdEF5W3ZEkZBHrT6bdGbBehXPApXfpJNjW8leSzDENO3u+JaRUIG8o9A7qjR8UOA3FamDYOLo0/tkiN9RVgq80woBwlfiUzHLR6vyGCzoq3a49+y7JXvBziTugd5RbZhG04DnUPOVwfG2NJjrC76t2nDstPWGUjXWWxQ=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 68bacf74-82aa-45a8-4c79-08d6ef1bc1c0
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jun 2019 09:53:01.0745 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: rwilton@cisco.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2776
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.25, xch-aln-015.cisco.com
X-Outbound-Node: rcdn-core-7.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/TnOViFzXztY-sZqN3IRa3d3pFQs>
Subject: Re: [netmod] regular expression flavours (again)
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: Wed, 12 Jun 2019 09:53:09 -0000

Hi Lada,

> -----Original Message-----
> From: Ladislav Lhotka <lhotka@nic.cz>
> Sent: 12 June 2019 10:40
> To: Rob Wilton (rwilton) <rwilton@cisco.com>; NETMOD WG <netmod@ietf.org>
> Subject: Re: [netmod] regular expression flavours (again)
> 
> Hi Rob,
> 
> On Wed, 2019-06-12 at 09:25 +0000, Rob Wilton (rwilton) wrote:
> > Hi Lada,
> >
> > OpenConfig have already introduced a module level extension statement
> > to indicate that their pattern statements use POSIX regular expressions.
> 
> What I meant was rather something like
> 
>     pattern-language "POSIX";
> 

But depending on how many pattern languages are supported, wouldn’t that make implementing YANG a lot harder, since implementations would need to support all the allowed pattern languages?

Also, IIRC, POSIX regex doesn't support unicode, which means that it isn't necessarily a good choice for a language that does support unicode strings by default.


> with the default being "XSD". It could possibly also include your proposal
> of XSD regex subset (issue #21).

Really my aim was the other way around.  I.e. have all YANG pattern statements in just one simple regex language that could trivially be converted to run on any common regex engine.


> 
> This could in fact be a good candidate for a critical extension.
> 
> >
> >   extension regexp-posix {
> >      description
> >       "This extension indicates that the regular expressions included
> >       within the YANG module specified are conformant with the POSIX
> >       regular expression format rather than the W3C standard that is
> >       specified by RFC6020 and RFC7950.";
> >   }
> >
> > Defined in
> > https://github.com/openconfig/public/blob/master/release/models/openco
> > nfig-extensions.yang
> >
> > I don't think that this should become part of the YANG standard.
> 
> I suspect that developers of YANG tools are being pushed by users to
> include support for this anyway, so I don't see much benefit from blocking
> it.

I don't see this as blocking it at all, but rather that a pragmatic common solution already exists without requiring any standardization work.

Thanks,
Rob


> 
> Lada
> 
> >
> > Thanks,
> > Rob
> >
> >
> > > -----Original Message-----
> > > From: netmod <netmod-bounces@ietf.org> On Behalf Of Ladislav Lhotka
> > > Sent: 12 June 2019 09:02
> > > To: NETMOD WG <netmod@ietf.org>
> > > Subject: [netmod] regular expression flavours (again)
> > >
> > > Hi,
> > >
> > > I think it is very unfortunate that OpenConfig folks use POSIX
> > > regular expressions instead of XSD. This of course causes confusion,
> > > see e.g. this
> > > PR:
> > >
> > > https://github.com/CZ-NIC/yangson/pull/22
> > >
> > > Given the popularity of OpenConfig models, it seems to me that it
> > > would be better if YANG somehow accomodates such (largely cosmetic)
> differences.
> > >
> > > One option would be that each YANG module declares the regex flavour
> > > used in its patterns. Yes, it is a complication, but having separate
> > > forks of YANG is much worse.
> > >
> > > ISO Schematron adopted a similar approach with "query language
> binding"
> > > that can be declared with the schema element, for example
> > >
> > > <schema xmlns="http://purl.oclc.org/dsdl/schematron"
> > > queryBinding="exslt">
> > >
> > > Any thoughts on this?
> > >
> > > Lada
> > >
> > > --
> > > Ladislav Lhotka
> > > Head, CZ.NIC Labs
> > > PGP Key ID: 0xB8F92B08A9F76C67
> > >
> > > _______________________________________________
> > > netmod mailing list
> > > netmod@ietf.org
> > > https://www.ietf.org/mailman/listinfo/netmod
> --
> Ladislav Lhotka
> Head, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67