Re: [netmod] yang-data-ext issues

Robert Varga <> Sat, 21 April 2018 01:16 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id EAC5F127909 for <>; Fri, 20 Apr 2018 18:16:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
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: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id iKfo3TlilZdL for <>; Fri, 20 Apr 2018 18:16:14 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 9A6A9126DED for <>; Fri, 20 Apr 2018 18:16:14 -0700 (PDT)
Received: from nitebug.localdomain ( []) by (Postfix) with ESMTPSA id 7B7BE2427D9; Sat, 21 Apr 2018 03:16:11 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;; 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 <>,
References: <> <>
From: Robert Varga <>
Message-ID: <>
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: <>
Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gt8gVFaMZhw7k0Dv07gkTlSELOcuuMAO7"
Archived-At: <>
Subject: Re: [netmod] yang-data-ext issues
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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.