Subject: [netmod] Restconf - config and operational data sets

From: Wojciech Dec <[email-masked]>
Date: Tue, 26 Nov 2013 15:02:07 +0100

Hello Restconf authors,

(retrying)

got a question regarding your latest Restconf draft. This features the split
between /config and /operational URIs .

The text in section 5.1.1 and 5.1.2 indicates that the data in these URIs
use
data-stores that are effectively dis-joint sets, i.e. Rw data is in /config
and
ro data is in /operational.
Is that the intent, correct interpretation?

If so, then the following example also in the draft indicates something
else:

The jukebox data model is:

         |  +--ro artist-count?   uint32
        |  +--ro album-count?    uint32
        |  +--rw song-count?     uint32

(p102)

While on p52 we see the following returned from the operational store:

GET /restconf/operational/example-jukebox:jukebox/library
        HTTP/1.1
     Host: example.com <http://example.com/>
     Accept: application/yang.data+json

  The server might respond:

     HTTP/1.1 200 OK
     Date: Mon, 23 Apr 2012 17:01:30 GMT
     Server: example-server
     Cache-Control: no-cache
     Pragma: no-cache
     Content-Type: application/yang.data+json

     {
       "example-jukebox:library" : {
          "artist-count" : 42,
          "album-count" : 59,
          "song-count" : 374
       }
     }

Which interpretation is correct?

That said, personally I find this URI "fork" undesirable, and not
something a Rest-like interface ought to provide. If anything, the
example, even if it turns out to be due to a typo, offers a better
alternative; ie have a resource that provides "all" info, config and
operational, and another that delivers an oper or config only set. Some
better even better options can also be thought of. Anyway, before going
there, it would be great to understand whether my interpretation is
correct.

Regards,
Wojciech.