Re: [YANG] Questions about submodule
Martin Bjorklund <mbj@tail-f.com> Fri, 18 January 2008 10:13 UTC
Return-path: <yang-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
by megatron.ietf.org with esmtp (Exim 4.43)
id 1JFoEY-0007vi-Bh; Fri, 18 Jan 2008 05:13:59 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JFoEX-0007vZ-3i
for yang-confirm+ok@megatron.ietf.org; Fri, 18 Jan 2008 05:13:57 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JFoEW-0007vR-G2
for yang@ietf.org; Fri, 18 Jan 2008 05:13:56 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com)
by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JFoEW-0006rB-2S
for yang@ietf.org; Fri, 18 Jan 2008 05:13:56 -0500
Received: from localhost (138.162.241.83.in-addr.dgcsystems.net
[83.241.162.138])
by mail.tail-f.com (Postfix) with ESMTP id AC3B41B80C9;
Fri, 18 Jan 2008 11:13:54 +0100 (CET)
Date: Fri, 18 Jan 2008 11:15:05 +0100 (CET)
Message-Id: <20080118.111505.89141499.mbj@tail-f.com>
To: liyan_77@huawei.com
Subject: Re: [YANG] Questions about submodule
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <000001c859b6$b0626ee0$ec0c6f0a@china.huawei.com>
References: <000001c859b6$b0626ee0$ec0c6f0a@china.huawei.com>
X-Mailer: Mew version 5.1.51 on Emacs 22.1 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.1 (/)
X-Scan-Signature: 02ec665d00de228c50c93ed6b5e4fc1a
Cc: yang@ietf.org
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/yang>,
<mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/yang>,
<mailto:yang-request@ietf.org?subject=subscribe>
Errors-To: yang-bounces@ietf.org
Hi Yan, Li Yan <liyan_77@huawei.com> wrote: > Hi, > > o Sec 7.2.1 tells me that the "submodule" statement can contain the > "include" statement. > > Does it imply that a submodule can be split further into multiple > submodules, and the separation is recursive? Yes. One use case for letting a submodule include another one is when you split a larger module into submodules, and you want a submodule with common types: main-module: includes sub-a, sub-b, sub-common-types sub-a: includes sub-common-types sub-b: includes sub-common-types > I think splitting submodule would complicate the relationship between > submodules, and is not useful. In larger projects, this might actually be useful. Instead of having one big centralized module, we allow people to split the task into submodules. If the submodule becomes big enough, it might be useful to split it into other submodules. Even though I cannot see that 100 levels are ever used, I don't think we should add a rule which says that you cannot nest more than 99 levels. > o A typo question > > The following examples are from sec 7.1.10 and 7.2.3 respectively. I am > confused if the module/submodule name should be quoted. > > module acme-system { > > . > > include acme-types; //no quotes > > . > > } > > submodule acme-types { > > belongs-to "acme-system"; //in quotes > > . > > } The argument to a statement is always a string. Quotes MUST be used if the string contains whitespaces etc, ane MAY be used otherwise (see 6.1.2 and 6.1.3). So the examples above are both correct. /martin _______________________________________________ YANG mailing list YANG@ietf.org https://www1.ietf.org/mailman/listinfo/yang
- [YANG] Questions about submodule Li Yan
- Re: [YANG] Questions about submodule Martin Bjorklund
- Re: [YANG] Questions about submodule Balazs Lengyel
- Re: [YANG] Questions about submodule Juergen Schoenwaelder