Re: [netmod] yang-data-ext issues

Robert Varga <nite@hq.sk> Sat, 21 April 2018 01:16 UTC

Return-Path: <nite@hq.sk>
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 EAC5F127909 for <netmod@ietfa.amsl.com>; Fri, 20 Apr 2018 18:16:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=hq.sk
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 iKfo3TlilZdL for <netmod@ietfa.amsl.com>; Fri, 20 Apr 2018 18:16:14 -0700 (PDT)
Received: from mail.hq.sk (hq.sk [81.89.59.181]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9A6A9126DED for <netmod@ietf.org>; Fri, 20 Apr 2018 18:16:14 -0700 (PDT)
Received: from nitebug.localdomain (chello085216197060.chello.sk [85.216.197.60]) by mail.hq.sk (Postfix) with ESMTPSA id 7B7BE2427D9; Sat, 21 Apr 2018 03:16:11 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hq.sk; s=mail; t=1524273371; bh=a5TpPj9BmSCr64avo7qZ8A5p+UwlxdOT75qkd8lqXS8=; h=Subject:To:References:From:Date:In-Reply-To; b=mOGrGcDfzkdpPKXW1tkZOyu6vZ0ulr468YWOXsQ6wQSnF/+OxnwTzu7VkHuYKXHSe C5yL34Ldi0zhPK3xwG0xR2AB9xyASSQwgzbiCWnkvvbHHeZAcv2FX9Zydyw/4lBlCZ cPFUUkAtb06NVAzosGcpgV77Q7VJ3L/M9w+nQXVY=
To: Martin Bjorklund <mbj@tail-f.com>, netmod@ietf.org
References: <20180416.145617.1262098657698751846.mbj@tail-f.com> <87h8oal7iu.fsf@nic.cz>
From: Robert Varga <nite@hq.sk>
Message-ID: <a7d3702d-1406-7bd2-caf6-7c07812c86aa@hq.sk>
Date: Sat, 21 Apr 2018 03:16:04 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <87h8oal7iu.fsf@nic.cz>
Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gt8gVFaMZhw7k0Dv07gkTlSELOcuuMAO7"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/n2mJ56FsjT8Chczu63v8otQozuQ>
Subject: Re: [netmod] yang-data-ext issues
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 21 Apr 2018 01:16:17 -0000

On 17/04/18 07:35, Ladislav Lhotka wrote:
> Hi,
> 
> this is a slippery slope. If we want to turn YANG into a general-purpose
> schema language, it should IMO be done the other way around: design a
> general-purpose schema language with a sound architecture, and then use
> it for defining schemas of datastores, protocol messages or whatever.
> 
> YANG extensions make changes to the original YANG architecture way too
> easy, but the result may be a bastard with no architecture at all.

+1 in general, although I am not convinced we need to start from scratch.

The problem is that the metamodel behind YANG is not formally defined,
which means every implementer has to reverse-engineer it from
RFC6020/7960 (and 6241, and others). Since there is no metamodel spec,
it is very hard to reason about how an extension affects it, especially
in edge cases -- which can (and most probably will) lead to bastardization.

One example: YANG 1.1 was supposed to be a backwards-compatible, yet it
introduced multiple-inheritence to a language which was previously
strictly single-inheritence. That sort of change is a major revision of
the metamodel and certainly does not qualify as backwards-compatible at
that level of abstraction.

It may not be important for run-of-the-mill NETCONF operations, but
becomes pivotal when you are mapping YANG to other languages.

Regards,
Robert