Re: [YANG] legal uses-stmt?

Andy Bierman <ietf@andybierman.com> Thu, 27 December 2007 17:12 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 1J7wHT-0000wM-1K; Thu, 27 Dec 2007 12:12:27 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1J7wHR-0000rr-Du for yang-confirm+ok@megatron.ietf.org; Thu, 27 Dec 2007 12:12:25 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1J7wHR-0000ri-22 for yang@ietf.org; Thu, 27 Dec 2007 12:12:25 -0500
Received: from smtp113.sbc.mail.mud.yahoo.com ([68.142.198.212]) by ietf-mx.ietf.org with smtp (Exim 4.43) id 1J7wHO-0004OF-NZ for yang@ietf.org; Thu, 27 Dec 2007 12:12:25 -0500
Received: (qmail 40032 invoked from network); 27 Dec 2007 17:12:22 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@68.120.80.25 with plain) by smtp113.sbc.mail.mud.yahoo.com with SMTP; 27 Dec 2007 17:12:21 -0000
X-YMail-OSG: RTxIltwVM1kNy4awWF7ybery13yuqrEaPXSKE3fhMsdA42RO
Message-ID: <4773DCFF.2080206@andybierman.com>
Date: Thu, 27 Dec 2007 09:12:31 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Martin Bjorklund <mbj@tail-f.com>
Subject: Re: [YANG] legal uses-stmt?
References: <4773207A.7020004@andybierman.com> <20071227.083836.15618460.mbj@tail-f.com>
In-Reply-To: <20071227.083836.15618460.mbj@tail-f.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 538aad3a3c4f01d8b6a6477ca4248793
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

Martin Bjorklund wrote:
> Andy Bierman <ietf@andybierman.com> wrote:
>> Hi,
>>
>> Is this legal?
>>
>>    grouping A {
>>      leaf x { type string; }
>>    }
>>
>>    container foo {
>>      uses A {
>>        leaf x { description "blah"; }
>>        leaf x { default "blah-blah"; }
>>      }
>>    }
>>
>>
>> Or is each leaf from 'grouping A' allowed to be specified 0 or 1 time
>> within the 'uses A' statement? 
> 
> Yes, that was the idea.

good -- then it works the same as the rules for container or list

> 
>> The ABNF allows the above,
> 
> The ABNF cannot make these kind of restrictions, since the identifier
> is dynamic.
> 
>> and sec 7.11.2 doesn't say (although there is a CLR about the
>> clauses being in the same order as in the grouping).
> 
> I'll update 7.11.2
> 

What about removing the CLR about the clauses in the 'uses' must
match the exact order of clauses in the grouping?   One of the
things that makes YANG user-friendly (and a pain to implement ;-)
is that forward references are allowed, and most sub-statements
can appear in any order.  Statement order is only forced when
it really matters, like imports before the body statements.


> 
> /martin
> 
> 


Andy



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