[Netconf] RESTCONF modularilty

Kent Watsen <kwatsen@juniper.net> Thu, 14 August 2014 17:01 UTC

Return-Path: <kwatsen@juniper.net>
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 DBBD41A0903 for <netconf@ietfa.amsl.com>; Thu, 14 Aug 2014 10:01:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, 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 I3ybUHJAAA1O for <netconf@ietfa.amsl.com>; Thu, 14 Aug 2014 10:01:44 -0700 (PDT)
Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0182.outbound.protection.outlook.com [207.46.163.182]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0122D1A0916 for <netconf@ietf.org>; Thu, 14 Aug 2014 10:01:43 -0700 (PDT)
Received: from CO1PR05MB458.namprd05.prod.outlook.com (10.141.72.140) by CO1PR05MB458.namprd05.prod.outlook.com (10.141.72.140) with Microsoft SMTP Server (TLS) id 15.0.1005.10; Thu, 14 Aug 2014 17:01:40 +0000
Received: from CO1PR05MB458.namprd05.prod.outlook.com ([169.254.10.227]) by CO1PR05MB458.namprd05.prod.outlook.com ([169.254.10.120]) with mapi id 15.00.1005.008; Thu, 14 Aug 2014 17:01:40 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: NetConf <netconf@ietf.org>
Thread-Topic: RESTCONF modularilty
Thread-Index: AQHPt+FqdMjKJfbxJUGUd4a2DR/a/g==
Date: Thu, 14 Aug 2014 17:01:40 +0000
Message-ID: <D01263B1.7E18B%kwatsen@juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.4.3.140616
x-originating-ip: [66.129.241.13]
x-microsoft-antispam: BCL:0;PCL:0;RULEID:;UriScan:;
x-forefront-prvs: 03030B9493
x-forefront-antispam-report: SFV:NSPM; SFS:(164054003)(199003)(189002)(92566001)(229853001)(83322001)(101416001)(36756003)(50986999)(107886001)(2656002)(83072002)(85852003)(99396002)(15202345003)(21056001)(87936001)(95666004)(86362001)(99286002)(66066001)(16236675004)(221733001)(105586002)(54356999)(19580395003)(106356001)(77982001)(107046002)(19617315012)(80022001)(81542001)(79102001)(81342001)(20776003)(4396001)(106116001)(64706001)(46102001)(110136001)(83506001)(74662001)(15975445006)(77096002)(85306004)(92726001)(76482001)(74502001)(31966008); DIR:OUT; SFP:; SCL:1; SRVR:CO1PR05MB458; H:CO1PR05MB458.namprd05.prod.outlook.com; FPR:; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
Content-Type: multipart/alternative; boundary="_000_D01263B17E18Bkwatsenjunipernet_"
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
Archived-At: http://mailarchive.ietf.org/arch/msg/netconf/JBxTerHVsfCfq8b9Gm-UuFFgZNM
Subject: [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, 14 Aug 2014 17:01:50 -0000

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

Recapping the NETCONF Light strategy, the YANG module defined the follow features:

     feature get-config {
       description
        "This feature indicates that the server supports the
         <get-config> protocol operation, albeit without subtree
         filtering.   The server must additionally advertize
         the \"subtree-filtering\" feature to enable subtree
         filtering.  Alternatively, if the server only wants
         to support XPath filtering, it may just advertize
         the :xpath capability.";
     }

     feature subtree-filtering {
       description
        "This feature indicates that the server supports subtree
         filtering for the <get-config> operation.  This
         feature is only meaningful if the "get-config" feature
         is advertized; if "get-config" is not also advertized,
         this feature MUST be ignored.";
     }

     feature edit-config {
       description
        "This feature indicates that the server supports the
         <edit-config> protocol operation.  If the server is
         unable to support all the <edit-config> attributes
         (merge, replace, create, delete, remove), then it
         should advertize the \"copy-config\" feature instead.";
     }

     feature copy-config {
       description
        "This feature indicates that the server supports the
         <copy-config> protocol operation.";
     }

     feature delete-config {
       description
        "This feature indicates that the server supports the
         <delete-config> protocol operation.";
     }

     feature locking {
       description
        "This feature indicates that the server supports the
         <lock> and <unlock> protocol operations.";
     }

     feature get {
       description
        "This feature indicates that the server supports the
         <get> protocol operation.";
     }

     feature close-session {
       description
        "This feature indicates that the server supports the
         <close-session> protocol operation.  When this feature
         is not advertized, clients are expected to close the
         underlying transport directly.";
     }

     feature kill-session {
       description
        "This feature indicates that the server supports the
         <kill-session> protocol operation.";
     }



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


Thoughts?

Thanks,
Kent