Re: [netmod] Comment on draft-clacla-netmod-yang-model-update-02

Ladislav Lhotka <lhotka@nic.cz> Wed, 15 November 2017 07:45 UTC

Return-Path: <lhotka@nic.cz>
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 980B0129553 for <netmod@ietfa.amsl.com>; Tue, 14 Nov 2017 23:45:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.999
X-Spam-Level:
X-Spam-Status: No, score=-6.999 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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 2RpdfG-ahWcY for <netmod@ietfa.amsl.com>; Tue, 14 Nov 2017 23:45:52 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 99905127444 for <netmod@ietf.org>; Tue, 14 Nov 2017 23:45:52 -0800 (PST)
Received: from birdie (unknown [IPv6:2001:67c:370:128:e0e6:7446:b50f:deb9]) by mail.nic.cz (Postfix) with ESMTPSA id 1B33B64007 for <netmod@ietf.org>; Wed, 15 Nov 2017 08:45:49 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1510731950; bh=yZpVBHVtH8mqds++fry87kf7v7ibwdGOUyfakUTenOQ=; h=From:To:Date; b=NZI36H/BLTkjSQ2ZRk51gZWnSsgRVj7w1Yl3G72d1Uf3DSAp5c16Ud+egBceQ1rU0 2phyzgH4i0kvjo+obATjN0NDpPRtdgjbrVULEwDmuHaB3uRi1zbE+2Y4XnMWZ7DxIZ a0CPvneM6SRs2dz8OGw25MtkyeaHDPl27xQ8c8ag=
Message-ID: <1510732017.12151.27.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: NETMOD WG <netmod@ietf.org>
Date: Wed, 15 Nov 2017 15:46:57 +0800
In-Reply-To: <20171115.082424.47357575757430906.mbj@tail-f.com>
References: <66e88c5b-41fc-7607-e1a9-ebe76eded836@ericsson.com> <20171115.080029.1828084423046734849.mbj@tail-f.com> <1510729980.12151.17.camel@nic.cz> <20171115.082424.47357575757430906.mbj@tail-f.com>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.26.2
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/ZxnwHjtIphND415ZQaQTlTca6Fo>
Subject: Re: [netmod] Comment on draft-clacla-netmod-yang-model-update-02
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: Wed, 15 Nov 2017 07:45:56 -0000

On Wed, 2017-11-15 at 08:24 +0100, Martin Bjorklund wrote:
> Ladislav Lhotka <lhotka@nic.cz> wrote:
> > On Wed, 2017-11-15 at 08:00 +0100, Martin Bjorklund wrote:
> > > Balazs Lengyel <balazs.lengyel@ericsson.com> wrote:
> > > > See bellow!
> > > > 
> > > > 
> > > > On 2017-11-15 05:22, Juergen Schoenwaelder wrote:
> > > > > In XML land, this is mostly a change of the namespace (not of the
> > > > > prefix) if one keeps the same structure, no? In JSON land, the change
> > > > > of the module name more directly becomes visible in instance data; but
> > > > > this is all encoding details.
> > > > 
> > > > BALAZS: Even in XMLland we store the prefix as part of any leaf with
> > > > type instance-identifier or identityref and potentially CLI scripts.
> > > 
> > > This would be a broken implementation.  Since the prefix might change
> > > you cannot store them as is.  You have to translate the prefix to
> > > namespace/module name, and store that.
> > 
> > I agree. In XML land, there was a lot of software that relied on specific
> > prefixes, and it turned out to be a big problem.
> > 
> > > 
> > > That said, this encoding rule is really unfortunate.  We fixed it in
> > > the JSON encoding, and I wish we had the same in XML...
> > 
> > Prefixes still give you some flexibility, for example the ability to import two
> > different revisions of the same module.
> 
> Sure, but that's not reflected in the encoding on-the-wire.

XML has its own rules, so unless tools take a specific prefix for granted,
everything should be OK. One can also declare full module names as NS prefixes
in XML encoding to make it closer to JSON encoding.

The only minor problem is the paragraph in sec. 7.1.4 of RFC 7950 stating that
XML and XPath SHOULD use the prefix defined in YANG. IMO, this should be removed
(but, after all, it is only a SHOULD).

Lada

> 
> 
> /martin
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67