Re: [netmod] RFC 8342 : Query about NMDA Origin for Non-presence containers

Rohit R Ranade <rohitrranade@huawei.com> Thu, 27 September 2018 09:12 UTC

Return-Path: <rohitrranade@huawei.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C1AA8130FBB for <netmod@ietfa.amsl.com>; Thu, 27 Sep 2018 02:12:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IdmcYY7EGJoC for <netmod@ietfa.amsl.com>; Thu, 27 Sep 2018 02:12:39 -0700 (PDT)
Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F3450130E1D for <netmod@ietf.org>; Thu, 27 Sep 2018 02:12:38 -0700 (PDT)
Received: from lhreml707-cah.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 0AFEE9E973320; Thu, 27 Sep 2018 10:12:34 +0100 (IST)
Received: from DGGEML424-HUB.china.huawei.com (10.1.199.41) by lhreml707-cah.china.huawei.com (10.201.108.48) with Microsoft SMTP Server (TLS) id 14.3.399.0; Thu, 27 Sep 2018 10:12:35 +0100
Received: from DGGEML510-MBX.china.huawei.com ([169.254.2.22]) by dggeml424-hub.china.huawei.com ([10.1.199.41]) with mapi id 14.03.0399.000; Thu, 27 Sep 2018 17:11:41 +0800
From: Rohit R Ranade <rohitrranade@huawei.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] RFC 8342 : Query about NMDA Origin for Non-presence containers
Thread-Index: AdRWPLcxKIuEiDOcQMSB/ApCgMB4/f//fyUA//9159A=
Date: Thu, 27 Sep 2018 09:11:41 +0000
Message-ID: <991B70D8B4112A4699D5C00DDBBF878A6BC4D37B@dggeml510-mbx.china.huawei.com>
References: <991B70D8B4112A4699D5C00DDBBF878A6BC4CAFF@dggeml510-mbx.china.huawei.com> <20180927085156.vhfp6pcvpm35r6fb@anna.jacobs.jacobs-university.de>
In-Reply-To: <20180927085156.vhfp6pcvpm35r6fb@anna.jacobs.jacobs-university.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.18.150.121]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/bdqHR5qgqmL71BfDzk3M3OGFv4Q>
Subject: Re: [netmod] RFC 8342 : Query about NMDA Origin for Non-presence containers
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Sep 2018 09:12:41 -0000

Please find inline.

Rohit R Ranade


-----Original Message-----
From: Juergen Schoenwaelder [mailto:j.schoenwaelder@jacobs-university.de] 
Sent: 27 September 2018 14:22
To: Rohit R Ranade <rohitrranade@huawei.com>
Cc: netmod@ietf.org
Subject: Re: [netmod] RFC 8342 : Query about NMDA Origin for Non-presence containers

On Thu, Sep 27, 2018 at 08:40:10AM +0000, Rohit R Ranade wrote:
> Hi All,
> 
> Section 5.3.4:
> "The
>    origin applies to all configuration nodes except non-presence
>    containers.  "
> 
> In ietf-origin YANG module:
>      md:annotation origin {
>        type origin-ref;
>        description
>          "The 'origin' annotation can be present on any configuration
>           data node in the operational state datastore.  It specifies
>           from where the node originated.  If not specified for a given
>           configuration data node, then the origin is the same as the
>           origin of its parent node in the data tree.  The origin for
>           any top-level configuration data nodes must be specified.";
>      }
> 
> 
> C.1.  System Example:
> The root node "system", is config-true and a non-presence container, 
> and in the example, does not have the  "origin" meta-data attribute
> 
> 
> Keeping all the above points in mind, which is the correct way ? Whether the top-level configuration node should contain the "origin" attribute for Non-presence containers ?
> 

Let me first clarify the difference between 'a node carrying an origin annotation' and 'an origin annotation applying to a node':

- Any node can 'carry an origin annotation' (but it may not apply to
  the node). If a node does not 'carry an origin annotation', then the
  parent node is inspected whether it carries an origin annotation.

- An origin annotation applys to a node if it is a node to which an
  origin annotation can be applied. Since non-presence containers have
  meaning by themself, the origin annotation does not apply to
  non-presence containers (but they may still 'carry an origin
  annotation'.

Given the requirement stated in the definition md:annotation origin, it seems that the "system" top-level container should have an origin annotation. (One can debate whether this requirement is too strict since in the example an origin annotation of the "system" top-level container would not apply to anything since all the nodes below "system" have explicit origin annotations.)
[Rohit R Ranade] So how to decide the origin annotation for top-level non-presence container. Consider the case of "nacm" root node of ietf-netconf-acm module which is a container. 
Consider that "enable-nacm" came via "intended" origin, and "read-default" came via "default" origin.
      +--rw nacm
         +--rw enable-nacm?            boolean
         +--rw read-default?           action-type
         +--rw write-default?          action-type
         +--rw exec-default?           action-type
[Rohit R Ranade] So how to decide the origin for the container, when its child may have mixed origin ?
/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>