Re: [YANG] import statement

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Sat, 03 May 2008 12:02 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 F26FF3A6B14; Sat, 3 May 2008 05:02:25 -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 EE1A93A6B14 for <yang@core3.amsl.com>; Sat, 3 May 2008 05:02:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.009
X-Spam-Level:
X-Spam-Status: No, score=-2.009 tagged_above=-999 required=5 tests=[AWL=0.240, BAYES_00=-2.599, HELO_EQ_DE=0.35]
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 5foYAs9OYD-g for <yang@core3.amsl.com>; Sat, 3 May 2008 05:02:24 -0700 (PDT)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) by core3.amsl.com (Postfix) with ESMTP id 8955F3A6A30 for <yang@ietf.org>; Sat, 3 May 2008 05:02:22 -0700 (PDT)
Received: from localhost (demetrius3.jacobs-university.de [212.201.44.48]) by hermes.jacobs-university.de (Postfix) with ESMTP id C70DCC0010; Sat, 3 May 2008 14:02:30 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius3.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id iqlV2QCw5aOs; Sat, 3 May 2008 14:02:18 +0200 (CEST)
Received: from elstar.local (elstar.iuhb02.iu-bremen.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id AA870C000E; Sat, 3 May 2008 14:02:25 +0200 (CEST)
Received: by elstar.local (Postfix, from userid 501) id 2FDCB56E08B; Sat, 3 May 2008 14:02:17 +0200 (CEST)
Date: Sat, 03 May 2008 14:02:17 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Ladislav Lhotka <lhotka@cesnet.cz>
Message-ID: <20080503120217.GA24899@elstar.local>
Mail-Followup-To: Ladislav Lhotka <lhotka@cesnet.cz>, yang <yang@ietf.org>
References: <1209812833.14759.12.camel@missotis>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <1209812833.14759.12.camel@missotis>
User-Agent: Mutt/1.5.17 (2007-11-01)
Cc: yang <yang@ietf.org>
Subject: Re: [YANG] import statement
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: j.schoenwaelder@jacobs-university.de
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="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: yang-bounces@ietf.org
Errors-To: yang-bounces@ietf.org

On Sat, May 03, 2008 at 01:07:13PM +0200, Ladislav Lhotka wrote:
 
> I have difficulties in understanding what happens when a module imports
> another and the latter contains "real" data tree, not just groupings and
> typedefs. For example:
> 
> module foo {
>   namespace "urn:foo";
>   prefix foo;
>   container foo-cont {
>     leaf foo-leaf {
>       ...
>     }
>   }
> }
> 
> module bar {
>   namespace "urn:bar";
>   prefix bar;
>   import foo {
>     prefix foo;
>   }
>   container bar-cont {
>     leaf bar-leaf {
>       ...
>     }
>   }
> }  

No. An import simply means that the names defined in the imported
module become known and accessible - there are no side-effects of
imports.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
_______________________________________________
YANG mailing list
YANG@ietf.org
https://www.ietf.org/mailman/listinfo/yang