Subject: [Netconf] RESTCONF data modeling issue

From: Kent Watsen <[email-masked]>
Date: Fri, 12 Sep 2014 22:23:28 +0000

I have this simplified data model in draft-ietf-netconf-server-model:

   +--rw netconf-server
      +--rw listen* [name]
      |  +--rw name    string
      |  ...
      +--rw call-home* [name]
         +--rw name    string
         | ...

This is following guidelines set in draft-schoenw-netmod-yang-pattern.

The RESTCONF issue is how to POST a new listen or call-home instance?
Normally we'd POST to the parent container, but here netconf-server is the
parent to more than one collection.  Since RESTCONF does not using
media-types to differentiate the subtrees, how can this be supported?  -
or is it that this data-model can not be supported by RESTCONF and it
should be restructured like this:

   +--rw netconf-server
      +--rw listen
      |  +--rw endpoint* [name]
      |     +--rw name    string
      |     ...
      +--rw call-home
         +--rw application* [name]
            +--rw name    string
            | ...

???

Thanks,
Kent

---

From: Andy Bierman <[email-masked]>
Date: Fri, 12 Sep 2014 15:36:59 -0700

>          +--rw application* [name]
I think you just use application/yang.data and the message body contains
either a listen or a call-home instance.

POST /restconf/data/netconf-server

{ "listen" : {
     "endpoint":"???",
     "name":"???"
   }
}

???
> Kent

Andy

> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
>

---

From: Kent Watsen <[email-masked]>
Date: Fri, 12 Sep 2014 23:34:55 +0000

So the "collections" solution says that, in case of ambiguity, the RESTCONF *server* MUST inspect the contents to discern which collection to POST to?

Kent

From: Andy Bierman <[email-masked]<mailto:[email-masked]>>
Date: Friday, September 12, 2014 at 6:36 PM
To: Kent Watsen <[email-masked]<mailto:[email-masked]>>
Cc: NetConf <[email-masked]<mailto:[email-masked]>>
Subject: Re: [Netconf] RESTCONF data modeling issue

On Fri, Sep 12, 2014 at 3:23 PM, Kent Watsen <[email-masked]<mailto:[email-masked]>> wrote:

   +--rw netconf-server
      +--rw listen* [name]
      |  +--rw name    string
      |  ...
      +--rw call-home* [name]
         +--rw name    string
         | ...

   +--rw netconf-server
      +--rw listen
      |  +--rw endpoint* [name]
      |     +--rw name    string
      |     ...
      +--rw call-home

{ "listen" : {
     "endpoint":"???",
     "name":"???"
   }
}

???

Thanks,
Kent

Andy

_______________________________________________
Netconf mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/netconf

---

From: Andy Bierman <[email-masked]>
Date: Fri, 12 Sep 2014 16:45:21 -0700

On Fri, Sep 12, 2014 at 4:34 PM, Kent Watsen <[email-masked]> wrote:

>
>  So the "collections" solution says that, in case of ambiguity, the
> RESTCONF *server* MUST inspect the contents to discern which collection to
> POST to?
>
>
I don't know what the collections have to do with it.
The server knows the YANG module so it knows the child nodes
(sub-resources) for the parent node.

Andy

>
>   From: Andy Bierman <[email-masked]>
> To: Kent Watsen <[email-masked]>
> Cc: NetConf <[email-masked]>