Re: [netmod] namespace encoding in draft-ietf-netmod-yang-json-02
Andy Bierman <andy@yumaworks.com> Thu, 11 December 2014 15:01 UTC
Return-Path: <andy@yumaworks.com>
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 9344C1ACEFF for <netmod@ietfa.amsl.com>; Thu, 11 Dec 2014 07:01:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.979
X-Spam-Level:
X-Spam-Status: No, score=-1.979 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] 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 QweGcTL2bJiN for <netmod@ietfa.amsl.com>; Thu, 11 Dec 2014 07:01:24 -0800 (PST)
Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8D88E1A9028 for <netmod@ietf.org>; Thu, 11 Dec 2014 07:01:24 -0800 (PST)
Received: by mail-lb0-f175.google.com with SMTP id u10so4208458lbd.6 for <netmod@ietf.org>; Thu, 11 Dec 2014 07:01:23 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ieUShtIIY0tJokEFUNj2ShOh4dtLP0RzqhcEnsJpGEU=; b=blprwM/p619uitYn1Svc5GGrrsjIPH1QOyabGvcxftpAmphdizqAf76WsGsy/pLGqt JopdaOOkUjd6qCJI0VcGwPNK/qtRW7PokIx68EFgeO7fgBRKQsoFQQLqRxRpttR6VGio 31I2Yp9oQxU0GJE44JKs8hjeqCDYliKRAJ+paDzx0aSuASioKXqsj4+8ttmIqAAPBAwA 1Udj2QH/abInMZio2AKPp2TvtFT8Nces2X6EexiG/xWf6wI1/8QOtQt72r1j9L2tVZu+ zss7Sevz//odQWQn8nFXsocKYnaCMQJoXrl3rwQz0ID32eLxnw/LY1ZDXiXQn6Z/Stra GCpQ==
X-Gm-Message-State: ALoCoQnALJquhIsMvAVu7kFAvInrPsMvlt/5QDvrwR1YgywL6bi3YmuPYGjOeUcsTX/HISIKsbyW
MIME-Version: 1.0
X-Received: by 10.112.101.100 with SMTP id ff4mr10233187lbb.94.1418310082928; Thu, 11 Dec 2014 07:01:22 -0800 (PST)
Received: by 10.112.157.233 with HTTP; Thu, 11 Dec 2014 07:01:22 -0800 (PST)
In-Reply-To: <m2388my5fb.fsf@nic.cz>
References: <CABCOCHQQ5YSnuj6UzuhrU0eaqxCW2e7autY980PasRdrp7XVww@mail.gmail.com> <m2388my5fb.fsf@nic.cz>
Date: Thu, 11 Dec 2014 07:01:22 -0800
Message-ID: <CABCOCHTvT0F2rE9SPm=-geY5DqKc27gcRoOUS2M2i+NcNBkLGg@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
To: Ladislav Lhotka <lhotka@nic.cz>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/netmod/F5JUik11ZQ3pfwLO799bzu7EFfQ
Cc: "netmod@ietf.org" <netmod@ietf.org>
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 15:01:26 -0000
On Thu, Dec 11, 2014 at 12:08 AM, Ladislav Lhotka <lhotka@nic.cz> wrote: > 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. > It is not robust at all. If the correct prefix is provided it should be accepted. That would be robust. Rejecting an identifier for using the correct prefix for a node is fragile, and quite counter-intuitive for anybody familiar with XPath. >> 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. > The receiver already has to check for a prefix so I do not see any burden. It is an added burden to check the prefix and decide it is invalid just because it is redundant. >> 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. > That encoding is also accepted. Redundant information is not the same thing as incorrect information. The receiver must be liberal in what it accepts. Rejecting redundant but valid data does not follow the Postel Principle. >> >> 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 >> 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