Re: [Netconf] RESTCONF modularilty

Ladislav Lhotka <lhotka@nic.cz> Thu, 21 August 2014 15:36 UTC

Return-Path: <lhotka@nic.cz>
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 DDE261A03FE for <netconf@ietfa.amsl.com>; Thu, 21 Aug 2014 08:36:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.319
X-Spam-Level:
X-Spam-Status: No, score=-1.319 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HELO_EQ_CZ=0.445, HOST_EQ_CZ=0.904, RP_MATCHES_RCVD=-0.668] 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 HJ0VZAAPl-a0 for <netconf@ietfa.amsl.com>; Thu, 21 Aug 2014 08:36:51 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 084431A03F1 for <netconf@ietf.org>; Thu, 21 Aug 2014 08:36:51 -0700 (PDT)
Received: from [172.29.2.202] (unknown [77.48.225.7]) by mail.nic.cz (Postfix) with ESMTPSA id 5005813FB0D; Thu, 21 Aug 2014 17:36:49 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nic.cz; s=default; t=1408635409; bh=pVRQFz0Cy56HRYVY+dhuwcAWDmyqvH94/RB2E3Mz1og=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Content-Transfer-Encoding:Message-Id:References:To; b=reNnldncHnS44WgZwjfPT8IepMUPAmtKWwYiyNX+HIE//F4x87hLPjP/twN2Orsmd usEu5wEeSoenhYRctXEa7jHdZp3+teGUmrqApwOgUH69BnU+mV816BTULYp1tURbY5 Rb/ncFUSWaKMLfeWrIPGylHAWs7CNP0RN/Fw6Nvg=
Content-Type: text/plain; charset="iso-8859-1"
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <CABCOCHQ9BMsZ1Kg79=oGoYgC9xge_gmWn+VvnH0PVP1Nva9oaw@mail.gmail.com>
Date: Thu, 21 Aug 2014 17:36:45 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <A81BBBBE-89C8-4470-8CB6-B611CB738E9D@nic.cz>
References: <D01263B1.7E18B%kwatsen@juniper.net> <m2a96xly0s.fsf@nic.cz> <CABCOCHQ9BMsZ1Kg79=oGoYgC9xge_gmWn+VvnH0PVP1Nva9oaw@mail.gmail.com>
To: Andy Bierman <andy@yumaworks.com>
X-Mailer: Apple Mail (2.1878.6)
X-Virus-Scanned: clamav-milter 0.98.1 at mail
X-Virus-Status: Clean
Archived-At: http://mailarchive.ietf.org/arch/msg/netconf/_YrpY4a7fW_96MM1QC88nyexdRg
Cc: Netconf <netconf@ietf.org>
Subject: Re: [Netconf] RESTCONF modularilty
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, 21 Aug 2014 15:36:53 -0000

On 21 Aug 2014, at 17:12, Andy Bierman <andy@yumaworks.com> wrote:

> 
> 
> 
> On Thu, Aug 21, 2014 at 7:26 AM, Ladislav Lhotka <lhotka@nic.cz> wrote:
> Hi,
> 
> Kent Watsen <kwatsen@juniper.net> writes:
> 
> > The RESTCONF authors recently discussed adding support for filtering,
> > sorting, and paging collections (i.e. lists).  One comment was that it
> > was complex and better defined in another draft.  I agree, but more
> > importantly, RESTCONF should be fully modular, providing an ability
> > for implementations to selectively advertise support for various
> > things.  This is exactly the approach we used for the NETCONF Light
> > draft (http://tools.ietf.org/html/draft-schoenw-netconf-light-01), but
> > RESTCONF being a new protocol, there is no reason to not do it from
> > the get go.  This strategy was discussed in Toronto, but we felt we
> > should take it to the list before restructuring the document...
> 
> I fully agree with this strategy. Support for individual capabilities
> will be indicated somehow under the "restconf" resource?
> 
> 
> I support this strategy as well. We made all 9 groups of RMON optional
> and let the market decide how to best deploy RMON-MIB.  Turned out
> that "RMON-Lite" was very useful.
> 
>  Option 1:  custom lists:
> 
>    container restconf {
>         container modules {  ... currently in tree ... }
>         container capabilities  { ... new ... format TBD }
>         container query-parameters { new ... format TBD }
>    }
> 

If the set of capabilities is open-ended then I would go for this option as it is the most flexible. Capability descriptions could then have more structure than a simple URI.

> 
> Option 2: back to simple list of URIs
> 
>      container restconf {
>         container capabilities  {
>             leaf-list capability { same as in ietf-netconf-monitoring }
>         }
>      }
> 
> 
> Option 3: Require implementation of the ietf-netconf-monitoring 'capability' node
> 
>      /restconf/data/netconf-state/capabilities/capability
>      ** This probably requires a 6022bis to make the
>          monitoring stats support NETCONF and RESTCONF
> 
> 
>  ** 2 & 3 require URI definitions for each query parameter and official protocol capability
> 
> 
> ...
> 
> >
> > The corollary to RESTCONF might be:
> >
> >     Base Support
> >           - the ability to GET and PUT on the top-level node using XML only
> >
> >     Optional Support:
> >           - the ability to do PATCH  (this is already optional)
> >           - the ability to use JSON encoding
> 
> I think XML and JSON should be given equal footing, i.e. the server
> could support either or both. Perhaps the "Accept" header on the client
> side and 406/415 status codes on the server side could be enough?
> 
> This approach doesn't work if each person picks their pet options to
> be mandatory.  Everything is optional, even XML. One might want
> to support only JSON and not implement XML.

This is what I am saying.

Lada

> 
> I would make read-only vs read-write vs read-create/delete 3 separate
> capabilities (server MUST support 1 of them)
> 
>   read-only: GET
>   read-write: GET, PUT
>   read-create: GET, POST, PUT, DELETE
> 
> I think this aligns better with capabilities of constrained devices.
> 
> 
> 
> Lada
> 
> >           - the ability to POST/GET/PUT/DELETE subtrees   (PATCH too, is support for it is advertised)
> >           - the ability to use "select" with GET operations
> >           - the ability to use "filter" with GET on collection resources (i.e. lists) and event streams
> >           - the ability to do pagination with GET on collection resources (i.e. lists)
> >           - the ability to do sorting with GET on collection resources (i.e. lists)
> >
> 
> Some of these are traditionally client-side tasks.  They should be optional.
> HTTP already makes PATCH optional. All query parameters should be optional.
> 
> 
>  
> >
> > Thoughts?
> >
> > Thanks,
> > Kent
> >
> 
> Andy
>  

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C