Re: [YANG] import statement

Martin Bjorklund <mbj@tail-f.com> Sat, 03 May 2008 21:21 UTC

Return-Path: <yang-bounces@ietf.org>
X-Original-To: yang-archive@optimus.ietf.org
Delivered-To: ietfarch-yang-archive@core3.amsl.com
Received: from core3.amsl.com (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id EFEDB3A6814; Sat, 3 May 2008 14:21:48 -0700 (PDT)
X-Original-To: yang@core3.amsl.com
Delivered-To: yang@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id F0DA83A6814 for <yang@core3.amsl.com>; Sat, 3 May 2008 14:21:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.154
X-Spam-Level:
X-Spam-Status: No, score=-0.154 tagged_above=-999 required=5 tests=[AWL=-0.259, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_COM=0.553, J_CHICKENPOX_33=0.6, RDNS_NONE=0.1]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id emclhBaY8ICQ for <yang@core3.amsl.com>; Sat, 3 May 2008 14:21:47 -0700 (PDT)
Received: from mail.tail-f.com (unknown [213.180.94.162]) by core3.amsl.com (Postfix) with ESMTP id 1D6BC3A6767 for <yang@ietf.org>; Sat, 3 May 2008 14:21:47 -0700 (PDT)
Received: from localhost (c213-100-166-13.swipnet.se [213.100.166.13]) by mail.tail-f.com (Postfix) with ESMTP id 5EF801B80D1; Sat, 3 May 2008 23:21:38 +0200 (CEST)
Date: Sat, 03 May 2008 23:21:24 +0200
Message-Id: <20080503.232124.70324721.mbj@tail-f.com>
To: lhotka@cesnet.cz
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <1209849048.14759.97.camel@missotis>
References: <1209845563.14759.70.camel@missotis> <20080503.222459.40411510.mbj@tail-f.com> <1209849048.14759.97.camel@missotis>
X-Mailer: Mew version 5.2.52 on Emacs 22.1 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Cc: yang@ietf.org
Subject: Re: [YANG] import statement
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Sender: yang-bounces@ietf.org
Errors-To: yang-bounces@ietf.org

Ladislav Lhotka <lhotka@cesnet.cz> wrote:
> Martin Bjorklund píše v So 03. 05. 2008 v 22:24 +0200:
> > > Then augment performs two fundamentally different things  
> > 
> > I don't agree.  Why?
> > 
> 
> With the absolute argument, augment inserts something carrying its own
> namespace in between foreign namespace nodes. In particular, no name
> conflicts can ever happen.
> 
> With uses and the descendant form of augment, you are first adopting
> something to your namespace and then modifying it. Names can clash here.
> For example, the author of the imported module may add an optional node
> to a grouping that from his point of view is perfectly backward
> compatible change. This may however break the importing module if a node
> added by augment happens to have the same name and is added at the same
> place.

This is more an effect of how uses work than how augment works.
Consider this case:

   uses foo:bar;
   uses goo:baz;

If foo:bar contains container 'a' and goo:baz container 'b',
everything is fine.  Now, if foo is updated and a container 'b' is
added to the bar grouping, there will be a name collision in my
module.

There are several solutions to this problem.  One is to use the
versioned imports we talk about in some other thread.


/martin
_______________________________________________
YANG mailing list
YANG@ietf.org
https://www.ietf.org/mailman/listinfo/yang