Re: [Netconf] RESTCONF depth parameter
Andy Bierman <andy@yumaworks.com> Fri, 13 December 2013 18:04 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 A64951ADF7E for <netconf@ietfa.amsl.com>; Fri, 13 Dec 2013 10:04:55 -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 GyiUtrPGdPKv for <netconf@ietfa.amsl.com>; Fri, 13 Dec 2013 10:04:53 -0800 (PST)
Received: from mail-qe0-f53.google.com (mail-qe0-f53.google.com [209.85.128.53]) by ietfa.amsl.com (Postfix) with ESMTP id 4B9371ADF77 for <netconf@ietf.org>; Fri, 13 Dec 2013 10:04:53 -0800 (PST)
Received: by mail-qe0-f53.google.com with SMTP id nc12so1842065qeb.26 for <netconf@ietf.org>; Fri, 13 Dec 2013 10:04:46 -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=ojcPilMu6qaMtHbInbBim5a0mRFAUWOPjIoeWu5T38o=; b=VnZqe8qUBRBkCtOAHf11dQ7aqt87rAR2ywTgcKVsZcs+0IijaLN2DpLqa47mFGWVKT H5yCjvLxN7/pDvS36qx/Opj76i6mJQtoJv4Nz0ynvZJGYHy5J/wfWUUvtBsqPC8fdu3f 6u9vSpgiUdRVXuZi4SZNZY1MENSNUGmdoxWP1oa/brtVzxUUbVXz7P4mPFmyR9QqoouE 3z2fT9SoEtorSWf3268+1e7jQZCIaKTYYRR99ODb5Xz0TLSyn2FcNTfbReRCyrDlAssj Adzp1IwFwsCSreuyMr0p7SU3X55oVIxJoo0sbJwurK0CZbGnPPwlCVEMMb5CJbw17Q2z 214g==
X-Gm-Message-State: ALoCoQncvi4tXjvyYbCKZuNQU9awRnWzml8H4wkl6xrnoTB2nJtsFjxjUcTDNXjcSVrWALPunu3D
MIME-Version: 1.0
X-Received: by 10.224.60.69 with SMTP id o5mr6960153qah.92.1386957886799; Fri, 13 Dec 2013 10:04:46 -0800 (PST)
Received: by 10.140.48.75 with HTTP; Fri, 13 Dec 2013 10:04:46 -0800 (PST)
In-Reply-To: <CED085F2.370E2%uprajput@cisco.com>
References: <CECF7653.37003%uprajput@cisco.com> <CABCOCHT4+pXDYUZWPUtvcZ+O0KrXQhFuYc6esZdAhdwfgPmUkA@mail.gmail.com> <CED085F2.370E2%uprajput@cisco.com>
Date: Fri, 13 Dec 2013 10:04:46 -0800
Message-ID: <CABCOCHTrLRuV6zOiOimT4iDt_AOZBfhWckU_vTaGjuxi7UUkRw@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
To: "Upendra Rajput (uprajput)" <uprajput@cisco.com>
Content-Type: multipart/alternative; boundary="001a11c3e4882955c504ed6e4cda"
Cc: "netconf@ietf.org" <netconf@ietf.org>
Subject: Re: [Netconf] RESTCONF depth parameter
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: Fri, 13 Dec 2013 18:04:55 -0000
On Fri, Dec 13, 2013 at 9:47 AM, Upendra Rajput (uprajput) < uprajput@cisco.com> wrote: > Thanks Andy. > > In your example for depth=2 why is LIST "playlist" omitted. It is at the > same level as CONTAINER "library" and "player" are. So I was thinking it > will be part of depth=2 output for the example module that is being used in > the draft. > > GET /restconf/config/example-jukebox:jukebox?depth=2 > > { > "example-jukebox:jukebox" : { > "library" : [null], > > "playlist": [null], <<== Missing in your example for depth=2 > > "player" : [null] > } > } > > > Not based on the starting point (no depth parameter given). I will add 1 or 2 playlists in the draft example. > Thanks > ~Upendra > > Andy > > From: Andy Bierman <andy@yumaworks.com> > Date: Friday, December 13, 2013 9:28 AM > To: Cisco Employee <uprajput@cisco.com> > Cc: "netconf@ietf.org" <netconf@ietf.org> > Subject: Re: [Netconf] RESTCONF depth parameter > > > > > On Thu, Dec 12, 2013 at 2:18 PM, Upendra Rajput (uprajput) < > uprajput@cisco.com> wrote: > >> Hi, >> >> I was looking at the "depth" parameter example in RESTCONF draft >> version 2 in section 3.8.1. There they have an example that will retrieve 2 >> levels of configuration data nodes from "example-jukebox" module. And the >> result of retrieval is shown as: >> >> { >> "example-jukebox:jukebox" : { >> "library" : { >> "artist" : { >> "name" : "Foo Fighters" >> } >> }, >> "player" : { >> "gap" : 0.5 >> } >> } >> } >> >> >> > > > This example is wrong and needs to be fixed. > The depth parameter is affected by the decision to make > all YANG nodes be resources instead of just containers and lists. > The example did not get updated to adjust for this change. > > The example will be clarified so the starting data is shown, so it is > clear what is begin filtered by the depth parameter: > > GET /restconf/config/example-jukebox:jukebox > > { > "example-jukebox:jukebox" : { > "library" : { > "artist" : { > "name" : "Foo Fighters" > } > }, > "player" : { > "gap" : 0.5 > } > } > } > > GET /restconf/config/example-jukebox:jukebox?depth=1 > > { > "example-jukebox:jukebox" : [null] > } > > > GET /restconf/config/example-jukebox:jukebox?depth=2 > > { > "example-jukebox:jukebox" : { > "library" : [null], > "player" : [null] > } > } > > > GET /restconf/config/example-jukebox:jukebox?depth=3 > > { > "example-jukebox:jukebox" : { > "library" : { > "artist" : [null] > }, > "player" : { > "gap" : 0.5 > } > } > } > > > > >> My question is since *both containers and lists* are defined as >> resources then why *"list playlist"* is not included in the result shown >> above ? >> >> Will an error be returned when level is less then 1 ? >> >> > yes > > >> Also I will appreciate if you can provide sample of what will be >> returned when depth is 1 and 3. >> >> >> Thanks >> ~Upendra >> >> > > Andy > >
- Re: [Netconf] RESTCONF depth parameter Upendra Rajput (uprajput)
- [Netconf] RESTCONF depth parameter Upendra Rajput (uprajput)
- Re: [Netconf] RESTCONF depth parameter Andy Bierman
- Re: [Netconf] RESTCONF depth parameter Andy Bierman
- Re: [Netconf] RESTCONF depth parameter Upendra Rajput (uprajput)