Re: [Netconf] "depth" parameter: nest-level semantics
Andy Bierman <andy@yumaworks.com> Tue, 03 December 2013 22:14 UTC
Return-Path: <andy@yumaworks.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 C25821AE1AF for <netconf@ietfa.amsl.com>; Tue, 3 Dec 2013 14:14:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] 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 EpoAGmjuUsXc for <netconf@ietfa.amsl.com>; Tue, 3 Dec 2013 14:14:05 -0800 (PST)
Received: from mail-qe0-f52.google.com (mail-qe0-f52.google.com [209.85.128.52]) by ietfa.amsl.com (Postfix) with ESMTP id 68F891AE1A3 for <netconf@ietf.org>; Tue, 3 Dec 2013 14:14:05 -0800 (PST)
Received: by mail-qe0-f52.google.com with SMTP id ne12so15592829qeb.11 for <netconf@ietf.org>; Tue, 03 Dec 2013 14:14:02 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=6guGAHnovANtKtyGFd9e/bOlKQ5xJrSm9Jgo7ueycpI=; b=NK9LqnTlVyD7r7EbCqlIIYttXWkCTHFycSPsgzL9L0h46LnZh+PccgplaNusRYadXg pg50DA8nAg1m8XVy9BTXkbQcEVtI6j1TtIkBZXVvV5HIfNJYTZovfmNIth7iIbWBQy6h CpAlYhevO2RRh1eDMHBRamXaua/hnffIpPpxxbQZIq8HzZq0DrPBdoMs5LyAaJFPUF49 809x6j9uHmyGkrKB160/tuid7ubaLZcOh7cGb0pRZVvFnsVyhtkaoDlTYTHHqTomCd7w HeoTXPBmvg0A0qRzJmu9sRpB0wAOnlMqnOh9qzKuiF+LT26C4sd8BbChrqreTUDyneOD eptg==
X-Gm-Message-State: ALoCoQn//JLsLWoJUbgByK53Qwsu8AF3vjf+pIkwYrI906c+picKjU3x8FUsYxDSFio+zFkU03sc
MIME-Version: 1.0
X-Received: by 10.229.5.4 with SMTP id 4mr129092838qct.2.1386108842383; Tue, 03 Dec 2013 14:14:02 -0800 (PST)
Received: by 10.140.48.75 with HTTP; Tue, 3 Dec 2013 14:14:02 -0800 (PST)
In-Reply-To: <CEC3942D.3AC4B%albertgo@cisco.com>
References: <CABCOCHTXXh51eAKzKQbUZg-o-Zw0VuRpNMBqSuXMsMj9_aEAjw@mail.gmail.com> <CEC3942D.3AC4B%albertgo@cisco.com>
Date: Tue, 03 Dec 2013 14:14:02 -0800
Message-ID: <CABCOCHTnZ7ExxsjpVvXWjsq5nm=JYyNMw+nEx6-U1wbsZ-oq2Q@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
To: "Alberto Gonzalez Prieto (albertgo)" <albertgo@cisco.com>
Content-Type: multipart/alternative; boundary="001a1135fd7a2bc7a004eca89d3a"
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:14:07 -0000
On Tue, Dec 3, 2013 at 2:09 PM, Alberto Gonzalez Prieto (albertgo) < albertgo@cisco.com> wrote: > 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? > > It would return an empty container no matter how many children it had > > - > - 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) ? > > One empty list node (no keys) would be returned if there are 1 or more instances. (I wanted a keys-only parameter but it got left out. depth=2 will return more than the keys with each list instance.) > > - > > Thanks, > > > Alberto > > Andy > > > On Tue, Dec 3, 2013 at 1:36 PM, Alberto Gonzalez Prieto (albertgo) < > 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 > >
- Re: [Netconf] "depth" parameter: nest-level seman… Alberto Gonzalez Prieto (albertgo)
- [Netconf] "depth" parameter: nest-level semantics Alberto Gonzalez Prieto (albertgo)
- Re: [Netconf] "depth" parameter: nest-level seman… Andy Bierman
- Re: [Netconf] "depth" parameter: nest-level seman… Andy Bierman