Subject: [Netconf] RESTCONF depth parameter

From: "Upendra Rajput (uprajput)" <[email-masked]>
Date: Thu, 12 Dec 2013 22:18:55 +0000

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
          }
        }
      }

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 ?

Also I will appreciate if you can provide sample of what will be returned when depth is 1 and 3.

Thanks
~Upendra

---

From: Andy Bierman <[email-masked]>
Date: Fri, 13 Dec 2013 09:28:15 -0800

On Thu, Dec 12, 2013 at 2:18 PM, Upendra Rajput (uprajput) <
[email-masked]> 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:
>
>       {

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

      {

GET /restconf/config/example-jukebox:jukebox?depth=1

     {
        "example-jukebox:jukebox" : [null]
     }

GET /restconf/config/example-jukebox:jukebox?depth=2

     {
          "library" : [null],
          "player" : [null]
        }
      }

GET /restconf/config/example-jukebox:jukebox?depth=3

     {
            "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 ?
>
yes

> returned when depth is 1 and 3.

Andy

---

From: "Upendra Rajput (uprajput)" <[email-masked]>
Date: Fri, 13 Dec 2013 17:47:58 +0000

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.

     {

    "playlist": [null],   <<== Missing in your example for depth=2

          "player" : [null]
        }
      }

Thanks
~Upendra

From: Andy Bierman <[email-masked]<mailto:[email-masked]>>
Date: Friday, December 13, 2013 9:28 AM
To: Cisco Employee <[email-masked]<mailto:[email-masked]>>
Cc: "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>
Subject: Re: [Netconf] RESTCONF depth parameter

On Thu, Dec 12, 2013 at 2:18 PM, Upendra Rajput (uprajput) <[email-masked]<mailto:[email-masked]>> wrote:
Hi,

      {

      {

     {

     {

     {

yes

Thanks
~Upendra

Andy

---

From: Andy Bierman <[email-masked]>
Date: Fri, 13 Dec 2013 10:04:46 -0800

On Fri, Dec 13, 2013 at 9:47 AM, Upendra Rajput (uprajput) <
[email-masked]> 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.
>
Not based on the starting point (no depth parameter given).
I will add 1 or 2 playlists in the draft example.

Andy

>
>   From: Andy Bierman <[email-masked]>
> To: Cisco Employee <[email-masked]>
> Cc: "[email-masked]" <[email-masked]>
>>  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:
>>
>>       {

---

From: "Upendra Rajput (uprajput)" <[email-masked]>
Date: Fri, 13 Dec 2013 18:28:26 +0000

Thank you Andy.

Date: Friday, December 13, 2013 10:04 AM

On Fri, Dec 13, 2013 at 9:47 AM, Upendra Rajput (uprajput) <[email-masked]<mailto:[email-masked]>> wrote:
Thanks Andy.

     {

          "player" : [null]
        }
      }

Thanks
~Upendra

Andy

      {

      {

     {

     {

     {

yes

Thanks
~Upendra

Andy