Subject: [Netconf] RESTCONF fields + depths

From: "Johan Vikman (jvikman)" <[email-masked]>
Date: Sat, 8 Jul 2017 07:15:43 +0000

Hi,

How does the fields and depths parameters work when they are combined?

Say that I ask for a couple of elements in a list, “fields=a/b/c” and then I combine that with “depths=5”.

Should I then get, all elements from “c”, or do I get all elements from “c”, but still count depths from the top resource?

E.g.
GET "http://localhost:8008/restconf/data/native:native?depth=2&fields=interface/GigabitEthernet&depth=2"

Using

module native {
  namespace "http://tail-f.com/native";
  prefix native;

  import ietf-inet-types {
    prefix inet;
  }

container native {
    container interface {
      list GigabitEthernet {
        key name;
        leaf name {
          type string;
        }
        container ip {
          leaf address {
            type inet:ip-address;
          }
          leaf port {
            type inet:port-number;
          }
        }
…

Should I then get ip/address and ip/port in the response? Assuming level from native is 1

Thanks,
Johan Vikman