Re: [Netconf] "depth" parameter: nest-level semantics

"Alberto Gonzalez Prieto (albertgo)" <albertgo@cisco.com> Tue, 03 December 2013 22:09 UTC

Return-Path: <albertgo@cisco.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E879C1AC7EE for <netconf@ietfa.amsl.com>; Tue, 3 Dec 2013 14:09:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
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 VQWx0f6SN5bq for <netconf@ietfa.amsl.com>; Tue, 3 Dec 2013 14:09:24 -0800 (PST)
Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) by ietfa.amsl.com (Postfix) with ESMTP id DAE1C1ADD9D for <netconf@ietf.org>; Tue, 3 Dec 2013 14:09:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=9505; q=dns/txt; s=iport; t=1386108561; x=1387318161; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=J+w0RDu4FNnYkm8Ik2M3gB7bEwcbBD7Dgw6u+xNYfZo=; b=WiV+WpyJGL8wB6FSt4UvFoNdlwSHqREJsEbzw+Cz3DndU0m3yLUlw68J JJC2QEqLIANLnuROvIPNzp+toFs/f+L+wOUFyZscby3BfCyGn6QPqqaQ8 rV2iwXOZF8EQwkaf6fUsWtfn3cav2x5WrWP9L4m56+pe6nsLFepe6HoR7 E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AhMFAH1VnlKtJXHA/2dsb2JhbABagkNEgQu4aIEbFnSCJQECBHkSAQgRAwECKDkUCQgCBA4FiAHBSReObREHhDMDlDGDY5ITgymCKg
X-IronPort-AV: E=Sophos; i="4.93,820,1378857600"; d="scan'208,217"; a="289168231"
Received: from rcdn-core2-5.cisco.com ([173.37.113.192]) by rcdn-iport-5.cisco.com with ESMTP; 03 Dec 2013 22:09:21 +0000
Received: from xhc-rcd-x04.cisco.com (xhc-rcd-x04.cisco.com [173.37.183.78]) by rcdn-core2-5.cisco.com (8.14.5/8.14.5) with ESMTP id rB3M9KgR010207 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 3 Dec 2013 22:09:20 GMT
Received: from xmb-rcd-x14.cisco.com ([169.254.4.50]) by xhc-rcd-x04.cisco.com ([fe80::200:5efe:173.37.183.34%12]) with mapi id 14.03.0123.003; Tue, 3 Dec 2013 16:09:19 -0600
From: "Alberto Gonzalez Prieto (albertgo)" <albertgo@cisco.com>
To: Andy Bierman <andy@yumaworks.com>
Thread-Topic: [Netconf] "depth" parameter: nest-level semantics
Thread-Index: AQHO8G/JHFyrNhD7hUyEToIqJC/K0ppDZ/yA//9+OIA=
Date: Tue, 03 Dec 2013 22:09:19 +0000
Message-ID: <CEC3942D.3AC4B%albertgo@cisco.com>
In-Reply-To: <CABCOCHTXXh51eAKzKQbUZg-o-Zw0VuRpNMBqSuXMsMj9_aEAjw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.2.3.120616
x-originating-ip: [10.154.204.28]
Content-Type: multipart/alternative; boundary="_000_CEC3942D3AC4Balbertgociscocom_"
MIME-Version: 1.0
Cc: Netconf <netconf@ietf.org>
Subject: Re: [Netconf] "depth" parameter: nest-level semantics
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 22:09:26 -0000

Thanks Andy,

So I understand that (in the context of data resources) a nest level is composed by all the "real" nodes that share parent. I.e., container, list, leaf, leaf-list, anyxml.
Two follow-up questions. Two use cases:

  *   a GET for a container w/ depth =1,
     *   should it just return an empty container if it exists? This makes sense for presence containers. How about non-presence ones? Would it return an empty container it the containers contains data?
  *   a GET for a list w/ depth =1,
     *   should it return just an empty list if it exists (I.e., if the list has at least 1 element) ?

Thanks,


Alberto


From: Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>>
Date: Tuesday, December 3, 2013 1:53 PM
To: Alberto Gonzalez Prieto <albertgo@cisco.com<mailto:albertgo@cisco.com>>
Cc: Netconf <netconf@ietf.org<mailto:netconf@ietf.org>>
Subject: Re: [Netconf] "depth" parameter: nest-level semantics




On Tue, Dec 3, 2013 at 1:36 PM, Alberto Gonzalez Prieto (albertgo) <albertgo@cisco.com<mailto:albertgo@cisco.com>> wrote:
Hello,

I wanted to confirm my understanding of the semantics of a nest-level.

I understand that a nest-level is composed of a resource + its children.
Data resources are: containers and lists.
Children of a data resource are: leaves, leaf-lists, anyxml. How about presence containers?


This is changing in restconf-03.
In order to allow optional YANG terminals to be deleted without
requiring implementation of YANG Patch, all YANG node types
will be considered data resources.



1) In the example of 3.8.1, for a depth of 2, the response includes  2 containers (I.e., jukebox and library) and 1 list (I.e., artist). Would that make it 3 resources, and therefore 3 nest-levels?

2) I am assuming that choice and case nodes are "transparent"  wrt nest-levels. Is this the case?


yes -- the depth applies to real nodes.


That is, for the following resource


Container alpha {

     choice interface-type {
         case a {
             leaf foo { ... }
         }
         case b {
             container bar { ...}
         }
     }


}


For a get for "alpha" and depth = 1, the leaf "foo" should be returned if it existed. "Bar" would not be returned if it existed.

Not in restconf-03.  The approach above is kind of broken
because there is no way for a client to just test for the existence
of a container without retrieving all the leafs.

depth=2 would return the leaf foo and an empty container bar.
depth=3 would return the leaf foo, the container bar, and the children of bar.


Thanks,

Alberto




Andy