Re: [Netconf] [netmod] Restconf - config and operational data sets
Wojciech Dec <wdec.ietf@gmail.com> Wed, 27 November 2013 19:33 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 496A81ADF7B for <netconf@ietfa.amsl.com>; Wed, 27 Nov 2013 11:33:42 -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 5ByLI_eZeJ0W for <netconf@ietfa.amsl.com>; Wed, 27 Nov 2013 11:33:24 -0800 (PST)
Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) by ietfa.amsl.com (Postfix) with ESMTP id 4964C1AD8DA for <netconf@ietf.org>; Wed, 27 Nov 2013 11:29:05 -0800 (PST)
Received: by mail-pd0-f179.google.com with SMTP id r10so10524308pdi.38 for <netconf@ietf.org>; Wed, 27 Nov 2013 11:29:04 -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=Cl8oCI1T668G2noUeKfmMcxJUeEUWxrYG9Le8hVMdcU=; b=VoFca2RT9dsTycpDVJmpN5HuOIuLBxoGhdG0H1cM0uZ9WRFmTDg5Q1ZEXQXwxPtK9m S0aL4yMxH7y0F917uBkU+7ibPrzB/WxXKiUUBRSPx7Vo9gTXAx+KHLRghum7E3QUOv1m Gxn4oqO1OF4oqC57fOwjKzjLqWJDq7nTMAdK7q7MYWEBzgmB4VHntMHEX+ggWQNB8x/F wmJ3jhKatDqO0enP/Zm+1U9DZWMCAixkDzLew/f0nXZRGi+Ei8hfQopocAIwr1XfrHtt G+Agc1HzfDPD06Sufj68O+rk2Ua931wDeoJEuVw7KR2FYao8lIYWgkh6OyqxS/Cc2hnC QTcA==
MIME-Version: 1.0
X-Received: by 10.68.172.65 with SMTP id ba1mr6774099pbc.18.1385580544834; Wed, 27 Nov 2013 11:29:04 -0800 (PST)
Received: by 10.70.57.163 with HTTP; Wed, 27 Nov 2013 11:29:04 -0800 (PST)
In-Reply-To: <CABCOCHRZOQ2S83Zq1zOFoVRVDzfNC2uBoA0NEAP5ZiX-GmoV5A@mail.gmail.com>
References: <CAFFjW4j96ehWxFStgHWWLZkHAk3iPJjO1nMzVVOhsoLNy5bEpA@mail.gmail.com> <20131126140557.GA63168@elstar.local> <CABCOCHRZOQ2S83Zq1zOFoVRVDzfNC2uBoA0NEAP5ZiX-GmoV5A@mail.gmail.com>
Date: Wed, 27 Nov 2013 20:29:04 +0100
Message-ID: <CAFFjW4iofOm=xRBNDD0E3DY_+bGdJy5UbOtkMnRfhyZD_UQaOg@mail.gmail.com>
From: Wojciech Dec <wdec.ietf@gmail.com>
To: Andy Bierman <andy@yumaworks.com>
Content-Type: multipart/alternative; boundary="047d7b10cc852ec25f04ec2d9c63"
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: Wed, 27 Nov 2013 19:33:42 -0000
X-List-Received-Date: Wed, 27 Nov 2013 19:33:42 -0000
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? > > >> > 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. Regards, Wojciech. > > 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/> >> > >
- Re: [Netconf] [netmod] Restconf - config and oper… Juergen Schoenwaelder
- Re: [Netconf] [netmod] Restconf - config and oper… Andy Bierman
- Re: [Netconf] [netmod] Restconf - config and oper… Wojciech Dec
- Re: [Netconf] [netmod] Restconf - config and oper… Andy Bierman
- Re: [Netconf] [netmod] Restconf - config and oper… Wojciech Dec