Re: [YANG] so many naming scopes

Martin Bjorklund <mbj@tail-f.com> Thu, 03 January 2008 19:50 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 1JAW57-0006Tr-03; Thu, 03 Jan 2008 14:50:21 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JAW55-0006Tg-C8 for yang-confirm+ok@megatron.ietf.org; Thu, 03 Jan 2008 14:50:19 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JAW55-0006TY-2M for yang@ietf.org; Thu, 03 Jan 2008 14:50:19 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JAW54-000626-MA for yang@ietf.org; Thu, 03 Jan 2008 14:50:19 -0500
Received: from localhost (c213-100-166-13.swipnet.se [213.100.166.13]) by mail.tail-f.com (Postfix) with ESMTP id AD2231B80CA; Thu, 3 Jan 2008 20:50:16 +0100 (CET)
Date: Thu, 03 Jan 2008 20:49:50 +0100 (CET)
Message-Id: <20080103.204950.147781910.mbj@tail-f.com>
To: ietf@andybierman.com
Subject: Re: [YANG] so many naming scopes
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <477D2D00.2010108@andybierman.com>
References: <477D2D00.2010108@andybierman.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.0 (/)
X-Scan-Signature: 5a9a1bd6c2d06a21d748b7d0070ddcb8
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

Andy Bierman <ietf@andybierman.com> wrote:
> Hi,
> 
> Sec. 6.2 lists several naming scopes for various YANG constructs.
> Most of it seems fine, except I am concerned about the confusion factor
> that can result:
> 
> module foo {
>    namespace "http://example.com/foo-ns";
>    prefix "foo";
>    description "do you have anything without foo in it?";
> 
>    typedef foo {
>      type int32;
>    }
> 
>    grouping foo {
>      leaf x { type foo; }
>    }
> 
>    container foo {
>      leaf a { type foo; }
>      uses foo;
>      choice b {
>        case foo {
>          leaf c { type foo; }
>        }
>        case b {
>          container d {
>            uses foo;
>          }
>        }
>      }
>    }
> 
> }
> 
> 
> Is this much flexibility such a good idea?

Maybe not.

> I don't think the lack of individual naming scopes for every
> type of identifier has been a big problem in the SNMP world.

No, but I don't think we should have a single flat namespace for
identifiers like SNMP has.  I can live with one namespace per nesting
level though.

Earlier we had a separate namespace for rpcs and a separate for
notifications as well, but the drawback with that was that we couldn't
use 'augment' to augment these, so we had to have separate statements
'augment-rpc' and 'augment-notification'.  Having a single namespace
actually made 'augment' more flexible.


/martin


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