[NGO] Re: [YANG] YANG augment-stmt

Martin Bjorklund <mbj@tail-f.com> Mon, 10 December 2007 21:50 UTC

Return-path: <ngo-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1J1qWP-0002Wb-SX; Mon, 10 Dec 2007 16:50:41 -0500
Received: from ngo by megatron.ietf.org with local (Exim 4.43) id 1J1qWO-0002W1-LJ for ngo-confirm+ok@megatron.ietf.org; Mon, 10 Dec 2007 16:50:40 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1J1qWN-0002Vi-W0; Mon, 10 Dec 2007 16:50:39 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1J1qWL-0005DK-LL; Mon, 10 Dec 2007 16:50:39 -0500
Received: from localhost (c213-100-166-13.swipnet.se [213.100.166.13]) by mail.tail-f.com (Postfix) with ESMTP id B20541B80C6; Mon, 10 Dec 2007 22:50:35 +0100 (CET)
Date: Mon, 10 Dec 2007 22:46:47 +0100
Message-Id: <20071210.224647.240363363.mbj@tail-f.com>
To: ietf@andybierman.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <475D68D5.50400@andybierman.com>
References: <475D68D5.50400@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: 41c17b4b16d1eedaa8395c26e9a251c4
Cc: yang@ietf.org, ngo@ietf.org
Subject: [NGO] Re: [YANG] YANG augment-stmt
X-BeenThere: ngo@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: NETCONF Goes On - discussions on future work and extensions to NETCONF <ngo.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/ngo>, <mailto:ngo-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/ngo>
List-Post: <mailto:ngo@ietf.org>
List-Help: <mailto:ngo-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/ngo>, <mailto:ngo-request@ietf.org?subject=subscribe>
Errors-To: ngo-bounces@ietf.org

Andy Bierman <ietf@andybierman.com> wrote:
> Hi,
> 
> Looking at the ABNF for the all-powerful augment statement,
> I notice it can appear inside a list or inside an another augment,
> anywhere a data-def-stmt can go in fact.
> 
> Since this clause does not instantiate any data where it
> located, but rather at the target specified by the augment-arg-str,
> the containment for the augment seems pretty much irrelevant,
> except that the augment could be nested within N different 'when'
> statements, nested inside obsolete nodes, etc.
> 
> The key in a list with an augment-stmt has no affect on the target data,
> does it?

I'm not sure I understand this question.

> What does it mean to have an augment inside a grouping, so that
> it is copied everywhere a 'uses' for that grouping is specified?
> 
> What is the use-case for augment inside augment?

The use case for augment inside anything but on the top-level is to be
used in combination with 'uses'.  The idea is that you can do 'uses
foo', and then in a following augment add new nodes to the foo
grouping:

  grouping server {
    leaf name { type string; }
    container address {
      leaf ip { type inet:ip-address; }
    }
  }

  container foo {
    uses server;
    augment address {
      leaf port { type inet:port-number; } 
    }
  }      

Or the same thing as a reusable grouping:

  grouping server-with-port {
    uses server;
    augment address {
      leaf port { type inet:port-number; } 
    }
  }      
    
This way extensions to groupings ("complex types":) can be defined.

> That means while you are defining extra data to attach to /acme:foo
> you also define some extra data for /a:bar/b:baz?

Yes.

> I have only seen augment examples that appear at the top-level.
> Are there real examples of data models that actually need to
> nest the augment-stmt anywhere and everywhere in the data model,
> even inside the 'input' clause for an RPC method definition?
> 
> What are the requirements for WG or vendor data model augmentation exactly?

I'm not sure I understand this question either.


/martin


_______________________________________________
NGO mailing list
NGO@ietf.org
https://www1.ietf.org/mailman/listinfo/ngo