Re: [Netconf] RESTCONF modularilty

Andy Bierman <andy@yumaworks.com> Thu, 21 August 2014 15:12 UTC

Return-Path: <andy@yumaworks.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 4E6691A04A4 for <netconf@ietfa.amsl.com>; Thu, 21 Aug 2014 08:12:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 P6PxSAoGXN_1 for <netconf@ietfa.amsl.com>; Thu, 21 Aug 2014 08:12:10 -0700 (PDT)
Received: from mail-qc0-f171.google.com (mail-qc0-f171.google.com [209.85.216.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1B6021A03CA for <netconf@ietf.org>; Thu, 21 Aug 2014 08:12:09 -0700 (PDT)
Received: by mail-qc0-f171.google.com with SMTP id r5so9320470qcx.16 for <netconf@ietf.org>; Thu, 21 Aug 2014 08:12:09 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=i6nNEmP8s1viCgFm898HvwDJZ1LJ6lUUVz+cJytUm38=; b=ZX4zZigPz/BPEv7Ash7Vo8OhXeUbmwZbF+zOhOR8iGejwsWAse+tW5Wj4gX2FKNXzB rqT9Ty7z5bdUJd7RAQbOy+sxzx5KPxa1vb6NLOFhQ8hsmBzodza/fSY7e9H++LaKfoJ7 8Jvu1MrL9PpofpjIGyRPz7YShxuBVXKZXkquSTDgI6zXklrNxwR1oIPazei1uN5wZPJ7 Uo9C+Yzzcg1+QBS8J844GTUTZo1OKbmwvPL2g33aT4S26IKNx5sDn4j/v2lvApuNgrYf Gge65iRAkIn28fczt2qoG3JtHBrawKWHHb1sz76xRAbnnPnxxlH+BwyEqL+ZV6ZXlYST KtKQ==
X-Gm-Message-State: ALoCoQmpyFlQciy4ULzc2mlyVhA9Ws+uBRv39Dvq3Recxbb+OF8hDR41GIR45nRRJLSj/mr6B7jb
MIME-Version: 1.0
X-Received: by 10.140.28.6 with SMTP id 6mr83610069qgy.90.1408633928956; Thu, 21 Aug 2014 08:12:08 -0700 (PDT)
Received: by 10.140.83.137 with HTTP; Thu, 21 Aug 2014 08:12:08 -0700 (PDT)
In-Reply-To: <m2a96xly0s.fsf@nic.cz>
References: <D01263B1.7E18B%kwatsen@juniper.net> <m2a96xly0s.fsf@nic.cz>
Date: Thu, 21 Aug 2014 08:12:08 -0700
Message-ID: <CABCOCHQ9BMsZ1Kg79=oGoYgC9xge_gmWn+VvnH0PVP1Nva9oaw@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
To: Ladislav Lhotka <lhotka@nic.cz>
Content-Type: multipart/alternative; boundary="001a11398076f45aa80501252474"
Archived-At: http://mailarchive.ietf.org/arch/msg/netconf/1-qOBRpWonL8T1hhqjVVfUo1Pz4
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:12:12 -0000

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 }
   }


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.

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