Re: [netmod] namespace encoding in draft-ietf-netmod-yang-json-02
Ladislav Lhotka <lhotka@nic.cz> Thu, 11 December 2014 08:08 UTC
Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7E0B31ACCFD for <netmod@ietfa.amsl.com>; Thu, 11 Dec 2014 00:08:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.8
X-Spam-Level:
X-Spam-Status: No, score=0.8 tagged_above=-999 required=5 tests=[BAYES_50=0.8] autolearn=ham
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 w8YmgGcsFQBZ for <netmod@ietfa.amsl.com>; Thu, 11 Dec 2014 00:08:44 -0800 (PST)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id DC3C81A90E1 for <netmod@ietf.org>; Thu, 11 Dec 2014 00:08:43 -0800 (PST)
Received: from localhost (unknown [195.113.220.110]) by trail.lhotka.name (Postfix) with ESMTPSA id 9ED0C1CC0456; Thu, 11 Dec 2014 09:08:43 +0100 (CET)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Andy Bierman <andy@yumaworks.com>, "netmod@ietf.org" <netmod@ietf.org>
In-Reply-To: <CABCOCHQQ5YSnuj6UzuhrU0eaqxCW2e7autY980PasRdrp7XVww@mail.gmail.com>
References: <CABCOCHQQ5YSnuj6UzuhrU0eaqxCW2e7autY980PasRdrp7XVww@mail.gmail.com>
User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.51.2 (x86_64-apple-darwin14.0.0)
Date: Thu, 11 Dec 2014 09:08:40 +0100
Message-ID: <m2388my5fb.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: http://mailarchive.ietf.org/arch/msg/netmod/nnNNZQsROsSbqVjZM4Nz-toFkNA
Subject: Re: [netmod] namespace encoding in draft-ietf-netmod-yang-json-02
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Thu, 11 Dec 2014 08:08:46 -0000
Andy Bierman <andy@yumaworks.com> writes: > Hi, > > Sec 4 has changed the rules for module names: > > Names with namespace identifiers in the form shown in Figure 1 MUST > be used for all top-level YANG data nodes, and also for all nodes > whose parent node belongs to a different namespace. Otherwise, names > with namespace identifiers MUST NOT be used. > > > So it is a protocol error if a prefix is used twice in a row: > > /A:foo/A:bar --> causes a protocol error and MUST be rejected > /A:foo/bar MUST be used instead > > IMO this is very fragile and does not follow the Postel Principle. I don't agree it is fragile. The rule for deciding about the presence or absence of a namespace ID is robust and dead simple: compare the namespaces of the current node and its parent - if they differ, add the namespace ID. > In this example the server knows module 'A' and it is the correct > module for node 'bar'. Yet it MUST reject the input according > to the new rules. > > I prefer these rules: > > - The namespace for a node MUST be uses in top-level > nodes and if the namespace is changing. > - If no prefix is present, then the namespace associated with > the parent node is used > This would be useful for senders that want to skip making the above decision a instead attach namespace IDs to all names. But this just shifts the burden to the receiving side. > IMO it is too much work for the server to verify that > a prefix is not used. Parsing a prefix is not a burden, I don't think it is difficult, see above. > since the code to parse the prefix must be already there. Parsing is one thing and comparing the namespace ID with the parent is another. With the existing rules, the namespace change is signalled in a much clearer way. > > It is also more hassle on clients that are constructing URLs > from multiple functions. They have to know which prefix > MUST NOT be used. I am not sure I understand the part about multiple functions but IMO constructing an URL could still be very simple if it is done from left to right: The namespace is on the first component and then whenever it changes. Lada > > > > Andy > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C
- [netmod] namespace encoding in draft-ietf-netmod-… Andy Bierman
- Re: [netmod] namespace encoding in draft-ietf-net… Ladislav Lhotka
- Re: [netmod] namespace encoding in draft-ietf-net… Andy Bierman
- Re: [netmod] namespace encoding in draft-ietf-net… Ladislav Lhotka
- Re: [netmod] namespace encoding in draft-ietf-net… Martin Bjorklund
- Re: [netmod] namespace encoding in draft-ietf-net… Andy Bierman
- Re: [netmod] namespace encoding in draft-ietf-net… Randy Presuhn
- Re: [netmod] namespace encoding in draft-ietf-net… Ladislav Lhotka