Re: [yang-doctors] YANG dialects?

"Rob Wilton (rwilton)" <rwilton@cisco.com> Thu, 19 December 2019 17:52 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 74312120993 for <yang-doctors@ietfa.amsl.com>; Thu, 19 Dec 2019 09:52:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.497
X-Spam-Level:
X-Spam-Status: No, score=-14.497 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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=MmZ8JAnk; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=fZG29S8S
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 nNYTMWZ06Vtd for <yang-doctors@ietfa.amsl.com>; Thu, 19 Dec 2019 09:52:53 -0800 (PST)
Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 36570120992 for <yang-doctors@ietf.org>; Thu, 19 Dec 2019 09:52:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=11431; q=dns/txt; s=iport; t=1576777973; x=1577987573; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=8fM7IW2H9w82+pJt89VxiIPUtwRy7IubSI/PbGXIoCc=; b=MmZ8JAnkxK158UWyvLYNy/l9Y93BgobHwtkeIEfOXQL8RE4VQ+bvIOOX lKzIKNCRfOqLH/W4yK0ZmzKLJdK3+6Np9n0HL5XFI/UIcz4YOxzKQUZ18 WeSmgGoGr7M5l1RB8hlVMm7DobFCnps+gGzRq2Ghe7vgJTTAscZKwxQpW M=;
IronPort-PHdr: =?us-ascii?q?9a23=3A1OivgR2jZqH72Xu4smDT+zVfbzU7u7jyIg8e44?= =?us-ascii?q?YmjLQLaKm44pD+JxKHt+51ggrPWoPWo7JfhuzavrqoeFRI4I3J8RVgOIdJSw?= =?us-ascii?q?dDjMwXmwI6B8vQE1L6KOLtaQQxHd9JUxlu+HToeUU=3D?=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CPBwDqt/td/4UNJK1lHgELHIFxC4E?= =?us-ascii?q?eL1AFbFggBAsqCodCA4p0gl+TJ4RhgS4UgRADVAkBAQEMAQEtAgEBhEACghw?= =?us-ascii?q?kNQgOAgMNAQEEAQEBAgEFBG2FNwyFXgEBAQEDEhsTAQEoDwEPAgEIEQQBAS8?= =?us-ascii?q?yHQgCBA4FCBECB4MBgXlNAy4BAqFrAoE4iGGCJ4J+AQEFhR0YggwJgTaMGRq?= =?us-ascii?q?BQT+BEUeCTD6EMQIYg0CCCiKWDpkBCoI0ljOaUakiAgQCBAUCDgEBBYFUATa?= =?us-ascii?q?BWHAVgydQGA2NEoNzilN0gSiOXAGBDwEB?=
X-IronPort-AV: E=Sophos;i="5.69,332,1571702400"; d="scan'208,217";a="690753601"
Received: from alln-core-11.cisco.com ([173.36.13.133]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 19 Dec 2019 17:52:51 +0000
Received: from XCH-ALN-001.cisco.com (xch-aln-001.cisco.com [173.36.7.11]) by alln-core-11.cisco.com (8.15.2/8.15.2) with ESMTPS id xBJHqpvQ002830 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 19 Dec 2019 17:52:52 GMT
Received: from xhs-rtp-001.cisco.com (64.101.210.228) by XCH-ALN-001.cisco.com (173.36.7.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 19 Dec 2019 11:52:51 -0600
Received: from xhs-rtp-003.cisco.com (64.101.210.230) by xhs-rtp-001.cisco.com (64.101.210.228) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 19 Dec 2019 12:52:50 -0500
Received: from NAM02-BL2-obe.outbound.protection.outlook.com (64.101.32.56) by xhs-rtp-003.cisco.com (64.101.210.230) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 19 Dec 2019 12:52:50 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQtbMJCkTVnou4CWJh5sdbcQ/m5Wtq9KRDQPzyv1AwKvg3AuafcCW57v4Lmsrz2rgFLn+o+L1QUKdopOQ2oX7CuVrW88xp1mULKvjMbE6jdhZwFHYRdbYum0WjJlp8oeQyLj8l+yZdf6S5MK2nDlBSEwzVcWVp4QXu06cx739BaooP6j6OJLh+pjQa6OJ7b5Hp1HoUqaXgzoHO1eY6BqF9/xQ0kCo5mCOBMatj0pzTwpNF85J5bLZOVkJrzpykaX3LaT7knluByz3CuSLlpUQL9vTdqxnhMF/nHDiOJgDzDhbkEF9e4KvNw9ekVTLymzXAzkfNnbDTDUFruPCZveow==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m5lD8x3O1sPhEuGFCvtjrGpWr2RFF7Kf2zefulWynRU=; b=T9ndVju4zCyZqC/xa/0/WVBQoCzpehnXTeUj8gI6ARmHC+/zpkBMSr3AcxaGiADv+3k2xFXLq6BWLYQN4zQLD1fkdqSAYLA4kiDqiaRLbZNZzPMDAvOiMc+hRZ5DwesiZsWwReslnFMUFWeUWp+LDxApk+TE7tfhqyiQCCWoX1Tnr9r6pTlfmQzhSQ8Fk2vyOjw8kWGszAj1OWuofCjcwO2mb/sih0ue1wyGnZU3rPOc0O07zfAHFaguxwRYpDTZQSi4UoYBZpFXzKw8Jh1k8bWKbqhNNkcTo7AjlEbdGAR99aQPkdwuCrnGrDd7hHgwdWEpH2KiTcIlGulzkXtycg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
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=m5lD8x3O1sPhEuGFCvtjrGpWr2RFF7Kf2zefulWynRU=; b=fZG29S8SiiVFspY3Z5C+Ar/Thy4Im8e+SveYgPUoiYXpO86XmcafBpyodjxupU0UcAg8blst6AsgZDvETX4nHHXidQ7jfmLdw19p7zOkYohV283xJq2Ny1Xy85PPpWe+R9YrZBzaluBJhhj4HM666VjaCGo5yNuU2C7OIohpGsw=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (52.135.38.209) by MN2PR11MB4223.namprd11.prod.outlook.com (52.135.37.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.16; Thu, 19 Dec 2019 17:52:49 +0000
Received: from MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::8106:b538:2920:a44f]) by MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::8106:b538:2920:a44f%5]) with mapi id 15.20.2559.012; Thu, 19 Dec 2019 17:52:49 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Jan Lindblad <janl@tail-f.com>
CC: Martin Bjorklund <mbj@tail-f.com>, "andy@yumaworks.com" <andy@yumaworks.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
Thread-Topic: [yang-doctors] YANG dialects?
Thread-Index: AQHVtdlN9Q9/pQqZU06QplN4E6S++afAYPEAgAAgvYCAAJk9AIAAl5yAgAAHcoCAAAOwgA==
Date: Thu, 19 Dec 2019 17:52:49 +0000
Message-ID: <MN2PR11MB43660FCB1D9AD2DCBE034A62B5520@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <CABCOCHTB+V6sV8hRcAC+OfseBBN=jUQnHQxzEVB_1drWhaEVXg@mail.gmail.com> <20191218.220130.545256750871048075.mbj@tail-f.com> <CABCOCHRfNrz+cNMA8ciRYGEM-7aR=S2NYJzU-t8JQ620Zs=hvQ@mail.gmail.com> <20191219.090708.1031388562992503497.mbj@tail-f.com> <MN2PR11MB4366F797234C963E23734BA1B5520@MN2PR11MB4366.namprd11.prod.outlook.com> <6684E0F3-DC49-4E94-B4FB-1109662F394D@tail-f.com>
In-Reply-To: <6684E0F3-DC49-4E94-B4FB-1109662F394D@tail-f.com>
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.52]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 4bf5e792-cb5f-40a0-fec9-08d784ac4364
x-ms-traffictypediagnostic: MN2PR11MB4223:
x-microsoft-antispam-prvs: <MN2PR11MB4223D274F34202975AC8C690B5520@MN2PR11MB4223.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 0256C18696
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(39860400002)(346002)(136003)(51444003)(199004)(189003)(186003)(55016002)(8676002)(316002)(9686003)(33656002)(54906003)(71200400001)(81166006)(6506007)(478600001)(6916009)(53546011)(81156014)(66446008)(4326008)(76116006)(7696005)(8936002)(66476007)(66556008)(5660300002)(64756008)(2906002)(66946007)(86362001)(52536014)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB4223; H:MN2PR11MB4366.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: CKrCmbBfKQevmOt6hjGaXOWZyFumXnOHfvHUMQAAsUNyGNO+ORYK1SlshDQ3rjBzuTpYYWIeue4Moer7d/TwQ4ipFe+7eQSsxekpz4Dz8S4lfnCegIAS6J2OWYKdi24jepIHKOYP2y1550wje3bKiITDlQCoDM2/0L8ZBHULm2JpJqyj+o0Ns+blAiyRJPpBY+/OSr9Y6xSyxHdwGKbghO6qe+0NDr6o4yBl/wBqIbzaanA6Xehkd4ppeLOYkNBFbEl/k/ZOlnUHCgxPFE2QbDzjdhLX+ykPxkxNrKu9S+hdx7mb6h/LI9JGp+uG7uC0oALZd2H9K/8dAVJElP4uE+1ZnaSPmjQRpRzr7/PcndTRxe4JTN5rS1MJsQGOhQLs+KpI3RVyAkP5ClRgOm11UrQhtUQKU8Dn7JxgR9fgabyZvL2a5seBBCzrkyh+ohbTb9DhvxoNtkKL6zA1V99tmiCHyeaZz8i95+X223dKVXNiGVRGy5xD3QLTjrA7DUjK
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_MN2PR11MB43660FCB1D9AD2DCBE034A62B5520MN2PR11MB4366namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 4bf5e792-cb5f-40a0-fec9-08d784ac4364
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2019 17:52:49.3309 (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: xnXp+3fQ2VqpzGV9wEDMEMXcDtvM7Q12FlNCYRfRrtb0UWnyBPIpG88Er8A7RuGQTDdz5hFqeGz5M49DkvrjmA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4223
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.11, xch-aln-001.cisco.com
X-Outbound-Node: alln-core-11.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/h2JXq4iqx9HdcJe-Bq0HGWMdDaE>
Subject: Re: [yang-doctors] YANG dialects?
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Dec 2019 17:52:55 -0000


From: Jan Lindblad <janl@tail-f.com>
Sent: 19 December 2019 17:36
To: Rob Wilton (rwilton) <rwilton@cisco.com>
Cc: Martin Bjorklund <mbj@tail-f.com>om>; andy@yumaworks.com; yang-doctors@ietf.org
Subject: Re: [yang-doctors] YANG dialects?


Not so easy for all of them.
(1)
The pattern-stmt disaster cannot be addressed.

I think the solution is trivial, and it has been proposed to OpenConfig -
introduce a new extension statement oc:posix-pattern.
This will make the modules *legal*, and tools can use existing mechanisms
to deal (or not) with this new statement.

I don't think it is legal, because

o  extension: An extension attaches non-YANG semantics to statements.

This is not the case here, it is only syntactically compatible. If tool A says
that some instance data is valid, but tool B says it isn't, then the standard is
gone.

Lada

Of course it would be legal. It's always legal for a NETCONF server to reject an edit-config for no apparent reason (from a YANG perspective), so all device YANG models would still be legal if all pattern statements were removed, but the same string pattern constraints still enforced by the devices. The OC group could therefore remove their pattern statements and introduce a YANG extension oc:posix-pattern (or oc:go-pattern, or whatever) that gives a hint to some clients what is expected. The clients that don't understand this extension would just se a rejection for no apparent reason (from a YANG perspective).

But, as I understand it, the regex implementations are not POSIX either.  E.g. I think that they are using RE2 for Go, which is somewhat derived from PCRE which is derived from POSIX regex, but not exactly compatible either.

So, it would end up replacing one regex language that can't be 100% directly implemented with another regex language that can't be 100% directly implemented.  This seems to make the life more complex not less.

I still believe that the only solution is to define as subset of XML regex that can easily be translated into common regex engines. Although, as Juergen has stated previously, this effectively defines a new regex language ...

I don't think a subset is possible here. The subset would be the null set, since basically all the posix expressions have caret+dollar ^(...)$ surrounding the actual expression, which are interpreted very differently than intended in the W3C world. So two separate pattern statements will be needed.
[RW]
Adding beginning/end anchors before processing a regex is trivial.  I.e. if the pattern is defined in XML regex, where the anchors are missing, implementations that want to put them into a POSIX regex need to add the anchors before processing the regex.

Thanks,
Rob



/jan