Re: [Netconf] [netmod] Restconf - config and operational data sets

Wojciech Dec <wdec.ietf@gmail.com> Thu, 28 November 2013 10:43 UTC

Return-Path: <wdec.ietf@gmail.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 66D491ADFF3 for <netconf@ietfa.amsl.com>; Thu, 28 Nov 2013 02:43:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.799
X-Spam-Level:
X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, J_CHICKENPOX_44=0.6, J_CHICKENPOX_64=0.6, SPF_PASS=-0.001] autolearn=no
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 147mjn1nkHEY for <netconf@ietfa.amsl.com>; Thu, 28 Nov 2013 02:43:53 -0800 (PST)
Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) by ietfa.amsl.com (Postfix) with ESMTP id 5F0BA1AD939 for <netconf@ietf.org>; Thu, 28 Nov 2013 02:43:53 -0800 (PST)
Received: by mail-pd0-f182.google.com with SMTP id v10so11859279pde.27 for <netconf@ietf.org>; Thu, 28 Nov 2013 02:43:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zp7RxNc+bnoZCpwKCbDLANZ00LU5Wbz8j7ZRCCmsTyM=; b=t9ZXISP9jmdVckppzJ/z3FtbdWsYVY5RBIO2wMwhul3+yGIVwpLEwMrZJB/LNx/+mj 4U2MBPX0F13VUqdOkV5nIc7i97fzjrEENXpW+a/eiV6Yf2F7SjChn4tcmBsdIbVQah94 FLRN1kNXvJRpvgBUJVuh4CaCYutrUcLcK+7x9WBcbxBxuYstVQguDsTp91Tr/7//DSM6 QUwa0UsyEsCWUQC9GYhw58wZu4xQT7li3b+gwqnVcYAeTlG5mOZNfvjMzzi59e0jrG+E hcsl0vCKQoDzQFK7KlWe0tMATsHTRI2aEVwonO650/3xGerA6vvLCWlgL3gFYBi2W59y DAsg==
MIME-Version: 1.0
X-Received: by 10.67.1.101 with SMTP id bf5mr45716316pad.50.1385635432653; Thu, 28 Nov 2013 02:43:52 -0800 (PST)
Received: by 10.70.57.163 with HTTP; Thu, 28 Nov 2013 02:43:52 -0800 (PST)
In-Reply-To: <CABCOCHRK+zy6Gtt5i3qYYe0yLzoHowKw8sRaKhqks2V2TyG8Rg@mail.gmail.com>
References: <CAFFjW4j96ehWxFStgHWWLZkHAk3iPJjO1nMzVVOhsoLNy5bEpA@mail.gmail.com> <20131126140557.GA63168@elstar.local> <CABCOCHRZOQ2S83Zq1zOFoVRVDzfNC2uBoA0NEAP5ZiX-GmoV5A@mail.gmail.com> <CAFFjW4iofOm=xRBNDD0E3DY_+bGdJy5UbOtkMnRfhyZD_UQaOg@mail.gmail.com> <CABCOCHRK+zy6Gtt5i3qYYe0yLzoHowKw8sRaKhqks2V2TyG8Rg@mail.gmail.com>
Date: Thu, 28 Nov 2013 11:43:52 +0100
Message-ID: <CAFFjW4iiJW0f_uj=Eb1xPTz4mN=8VbcaJxtkQmWACfFfAKJn6Q@mail.gmail.com>
From: Wojciech Dec <wdec.ietf@gmail.com>
To: Andy Bierman <andy@yumaworks.com>
Content-Type: multipart/alternative; boundary="047d7b15ac23c0690a04ec3a631a"
Cc: Netconf <netconf@ietf.org>, draft-bierman-netconf-restconf@tools.ietf.org
Subject: Re: [Netconf] [netmod] Restconf - config and operational data sets
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: Thu, 28 Nov 2013 10:43:56 -0000

On 28 November 2013 01:16, Andy Bierman <andy@yumaworks.com> wrote:

>
>
>
> On Wed, Nov 27, 2013 at 11:29 AM, Wojciech Dec <wdec.ietf@gmail.com>wrote:
>
>> Hi Andy,
>>
>> thanks for the reply. Continued inline...
>>
>>
>> On 26 November 2013 17:43, Andy Bierman <andy@yumaworks.com> wrote:
>>
>>>
>>>
>>>
>>> On Tue, Nov 26, 2013 at 6:05 AM, Juergen Schoenwaelder <
>>> j.schoenwaelder@jacobs-university.de> wrote:
>>>
>>>> Hi,
>>>>
>>>> I think the current home for restconf discussions is the NETCONF WG
>>>> mailing list and not the NETMOD WG mailing list.
>>>>
>>>> /js
>>>>
>>>> On Tue, Nov 26, 2013 at 03:02:07PM +0100, Wojciech Dec wrote:
>>>> > 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?
>>>> >
>>>>
>>>
>>> This is a conceptual API so the split is an implementation detail.
>>> The operational data includes ancestor list+keys and containers.
>>>
>>
>> Well, not sure I understand. The /config and /operational "resources"
>> would appear to be anything but conceptual. I.e. Any restconf API
>> implementation would expose these two top level resources, irrespective of
>> the data-store implementation used.  Any client following the Restconf API
>> would use these URIs as absolutes. What am I missing?
>>
>
>
> Yes they would use these APIs, but it doesn't mean the server maintains the
> data in a way that resembles the API.  That's what I mean by conceptual.
>
>
>>
>>>
>>>> > 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
>>>> >
>>>>
>>>
>>> Thanks for finding this bug (song-count is supposed to be config false
>>> in the example-jukebox YANG module.
>>>
>>>
>>>
>>>> >
>>>> > (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?
>>>> >
>>>>
>>>
>>> The retrieval is correct.
>>> The YANG example will be fixed.
>>>
>>
>> Cool.
>>
>>>
>>>
>>>
>>>> > 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.
>>>> >
>>>>
>>>
>>>
>>> I thought about this idea some more and it doesn't really work
>>> because the entity tags and last-modified timestamps for
>>> config=true data nodes would be affected by changes to
>>> descendant operational data nodes.
>>>
>>
>> Well, the big downside of the current approach is that, for a client to
>> get a "complete view" of the state of some resource, it needs to do two API
>> calls to two rather distinct URIs.
>> Now, perhaps I should have explained better above, but the following
>> would still appear to offer the ETag and timestamps behaviour that you
>> appear to be indicating as a concern:
>> - the operational "tree" shows everything (config and run time state). No
>> one can assume that last-modified timestamps have to do with "last time
>> some config was changed"
>> - the config "tree" shows just the config  and there  one can assume that
>> last-modified timestamps have to do with "last time some config was
>> changed".
>>
>> Clients could pick which one they want to use, or both.
>>
>>
>
> Yes -- I think that's what we discussed offline....
>
>   /restconf/config  == config=true only
>     config parameter ignored
>
>   /restconf/data == operational data or all
>     config=true ==> all
>     config == false ==> operational data only
>
>
>
Am I correct in assuming that this will be reflected in the next version of
the draft?

Thanks.


>
>
>> Regards,
>> Wojciech.
>>
>
>
> Andy
>
>
>
>>
>>
>>>
>>> From and HTTP caching POV, the ETag and Last-Modified headers
>>> need to be updated if the resource changes at all. From a RESTCONF POV,
>>> only the configuration data nodes can affect these headers or else they
>>> are useless for If-Match testing for editing operations.
>>>
>>>
>>> > Regards,
>>>> > Wojciech.
>>>>
>>>>
>>> Andy
>>>
>>>
>>>> > _______________________________________________
>>>> > netmod mailing list
>>>> > netmod@ietf.org
>>>> > https://www.ietf.org/mailman/listinfo/netmod
>>>>
>>>>
>>>> --
>>>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>>>> Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
>>>> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
>>>>
>>>
>>>
>>
>