Re: [Netconf] New Version Notification for draft-mahesh-netconf-binary-encoding-00.txt

Mahesh Jethanandani <mjethanandani@gmail.com> Fri, 16 March 2018 02:08 UTC

Return-Path: <mjethanandani@gmail.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5208F12D574 for <netconf@ietfa.amsl.com>; Thu, 15 Mar 2018 19:08:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 IMbJINFTaqVm for <netconf@ietfa.amsl.com>; Thu, 15 Mar 2018 19:08:12 -0700 (PDT)
Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DCD5C1200B9 for <netconf@ietf.org>; Thu, 15 Mar 2018 19:08:11 -0700 (PDT)
Received: by mail-pg0-x22a.google.com with SMTP id t186so3525604pgc.4 for <netconf@ietf.org>; Thu, 15 Mar 2018 19:08:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=yWiAQgDUX7huGv6kZqyW0mBTkGVzOUbnGk8zZyfN2L8=; b=nWhKz43EC2L2VcMo+Qp0HfNaWP/Qn3cHNOv+meXlTJ3t+19ny8ylT2Qxl5LnTrjggM b4+cgFXsxEr8eI1WiQJuqIOlnJsatozQTmBonCrYLx4uRmNeWG7iwPjUiJsFyHQG9EGk EAGztZHlYREd7do8JU4PE65vfVsiSCUv8jYbaJHcS/tbz/gnDubZfjWfjoEhd8ACbF21 ZEi6IT9p0hj2xGkLPqGj8dwdm2LzID3CNvaOg937gkjy3eCdch3wQtrUIyu8e/xRDlge vEF02fAAXDD35AW68Nrno+VdGa/EJZaZ0eVP1aEQDIw2ftAPTIP4Ba8RnETiQTXFnfcI 5A1w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=yWiAQgDUX7huGv6kZqyW0mBTkGVzOUbnGk8zZyfN2L8=; b=rvNl1lpnuVfEyJPVJSU128hD90GK6LfjbrL3hYUiPy9nw9v1bMKXbCd/ULWTdFQqCI 1jpXwxAUU5/UlCgDTmw/ur4uq0gWm4Zklbh9252uMwlUi0ZgzvxyiDPWNiY6kZuOlWTf qN4ynPAjctlOv92T9YZ1pL0feBaSd8RmVu5LMLvjkqpb8FZCREuhuoH7J+SE2lq0QHex NFvR6gp3YTPlIFlAKDSDt7dKb5cUTOc02Jx/uPun+5Xp2oZNdHoX2fnJ2TqSlfre0wUP aY0PbDQ00pjoJM5ZiKFZxtNnXApxRiPiL8hjAvrBaQB73BmsZRDIgYPC8XfsQXCU3KsS 2Bhw==
X-Gm-Message-State: AElRT7EqngXBajUXXShNtBzZcmaz+LFNK2DiIsbJmPVhmSq2B2lK0yQL z5rEy6pJbY5NPebz630tFaU=
X-Google-Smtp-Source: AG47ELud4arFvUn4tnYojc+aFhs7F7tFwOEeS+QBvbjeBfCnX9Sdb8mxZrK9MGr5ePBU1OHxDDyWQQ==
X-Received: by 10.99.115.3 with SMTP id o3mr68829pgc.428.1521166091379; Thu, 15 Mar 2018 19:08:11 -0700 (PDT)
Received: from ?IPv6:2601:647:4700:1280:c997:c215:18e8:8f90? ([2601:647:4700:1280:c997:c215:18e8:8f90]) by smtp.gmail.com with ESMTPSA id e125sm10631132pgc.76.2018.03.15.19.08.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 19:08:10 -0700 (PDT)
From: Mahesh Jethanandani <mjethanandani@gmail.com>
Message-Id: <334C38A6-FB10-4B67-83E8-D90C73A32F26@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_C64203ED-AE54-44EE-AC58-E8145DC01174"
Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\))
Date: Thu, 15 Mar 2018 19:08:47 -0700
In-Reply-To: <54b79aa6-81f4-529e-b938-db568a279b31@cisco.com>
Cc: Netconf <netconf@ietf.org>, "Eric Voit (evoit)" <evoit@cisco.com>
To: Robert Wilton <rwilton@cisco.com>
References: <151926592573.21129.10584327721219406320.idtracker@ietfa.amsl.com> <C54CC647-9720-4A85-8026-4EFC90B9B290@gmail.com> <54b79aa6-81f4-529e-b938-db568a279b31@cisco.com>
X-Mailer: Apple Mail (2.3445.5.20)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/AZmiDfPx0a9zVPHuPyft6dtwXaY>
Subject: Re: [Netconf] New Version Notification for draft-mahesh-netconf-binary-encoding-00.txt
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
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: <https://mailarchive.ietf.org/arch/browse/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: Fri, 16 Mar 2018 02:08:15 -0000

Robert,

Thanks for your review of the document. Here are some initial responses, and we can discuss this further in London also.

> On Feb 23, 2018, at 4:08 AM, Robert Wilton <rwilton@cisco.com> wrote:
> 
> Hi Mahesh,
> 
> Some quick thoughts/comments on this draft:
> 
> 1) I think that it is good for NETCONF to support other encodings, particularly CBOR, and possibly JSON as well.  I particularly the like the CBOR+SID encoding that seems to be compact but not hard to support.
> 
Agree. 
> 2) I think that it would be good if RESTCONF could also support CBOR as well.  I'm not sure whether that could be covered by this draft of something else.
> 
Are you looking for a similar new capability URI for restconf to be added?
> 3) There needs to be a well defined registry of encodings, perhaps as identities.
> 
Ok. We need to decide where these identities can be defined. Currently, there is no YANG model defined in the draft.
> 4) CBOR supports using SIDs or strings for identifiers, so there would need to be a way of choosing between these.  Perhaps these would be listed as two different encodings.
> 
Yes.
> 5) Versioning might want to be considered, e.g. if there was an updated version of CBOR how would that be reported.
> 
How does CBOR report its version today? Or do they?
> 6) If CBOR is being used, and in which case, SIDs is probably the way to go, then there might need to be some consideration about how the client learns the SIDs, this may be covered by some of the CORE WG drafts, or might require new NETCONF/RESTCONF RPCs.
> 
I need to be educated here. We can discuss this further in London.
> 7) There is no encoding of metadata in CBOR, it might be useful if that was also considered, probably that would end up being a separate draft.
> 7b) Related to 7, how would the <edit-config> operations (merge, create, remove,  etc) be encoded.
> 7c) Would errors also be reported using a binary encoding, or would they stay in XML?
> 
Juergen had a similar question. After discussing with him, we will clarify in the next version of the document that the encoding will be for everything above the Messages layer per Figure 1 of RFC 6241. So the answer to 7c is that it will stay in XML. 

For 7b, and example conversion of a XML to JSON encoding would look like this:

In XML:

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
  <source>
    <running/>
  </source>
  <filter type="subtree">
        <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
     <interface-configuration>
      <active>act</active>
      <interface-name>GigabitEthernet0/0/0/0</interface-name>
     </interface-configuration>
    </interface-configurations>
  </filter>
</get-config>
</rpc> 

After switching to JSON encoding the same request would look something like (just noticed that type=“subtree” got dropped)

<rpc message-id="103" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
{
  "ietf-netconf:get-config": {
    "source": {
      "running": null
   },
    "filter": {
      "interface-configurations": {
        “xmlns":"http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg <http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg>",
        "interface-configuration": {
          "active": "act",
          "interface-name": "GigabitEthernet0/0/0/0"
        }
      }
    }
  }
}
</rpc>


> 8) Does there need to be any comment/considerations regarding YANG push and friends.
> 
Yes, there are considerations for YANG push and friends drafts. Eric tells me that there is an ability in subscribed notifications to change the encoding mid-stream.
> But in general, I'm supportive of IETF allowing binary encodings to be used in NETCONF/RESTCONF for devices that want to use them.  They seem to be particularly relevant to streaming telemetry related applications.
> 
Agree.
> Thanks,
> Rob
> 
> On 22/02/2018 02:29, Mahesh Jethanandani wrote:
>> This short draft proposes a mechanism for NETCONF clients and servers to negotiate an alternate form of encoding, e.g. binary encoding.
>> 
>> Cheers.
>> 
>>> Begin forwarded message:
>>> 
>>> From: internet-drafts@ietf.org <mailto:internet-drafts@ietf.org>
>>> Subject: New Version Notification for draft-mahesh-netconf-binary-encoding-00.txt
>>> Date: February 21, 2018 at 6:18:45 PM PST
>>> To: "Jason Lam" <lamj@cisco.com <mailto:lamj@cisco.com>>, "Alfred Leung" <alfleung@cisco.com <mailto:alfleung@cisco.com>>, "Mahesh Jethanandani" <mjethanandani@gmail.com <mailto:mjethanandani@gmail.com>>
>>> 
>>> 
>>> A new version of I-D, draft-mahesh-netconf-binary-encoding-00.txt
>>> has been successfully submitted by Mahesh Jethanandani and posted to the
>>> IETF repository.
>>> 
>>> Name:		draft-mahesh-netconf-binary-encoding
>>> Revision:	00
>>> Title:		Binary Encoding for NETCONF
>>> Document date:	2018-02-23
>>> Group:		Individual Submission
>>> Pages:		6
>>> URL:            https://www.ietf.org/internet-drafts/draft-mahesh-netconf-binary-encoding-00.txt <https://www.ietf.org/internet-drafts/draft-mahesh-netconf-binary-encoding-00.txt>
>>> Status:         https://datatracker.ietf.org/doc/draft-mahesh-netconf-binary-encoding/ <https://datatracker.ietf.org/doc/draft-mahesh-netconf-binary-encoding/>
>>> Htmlized:       https://tools.ietf.org/html/draft-mahesh-netconf-binary-encoding-00 <https://tools.ietf.org/html/draft-mahesh-netconf-binary-encoding-00>
>>> Htmlized:       https://datatracker.ietf.org/doc/html/draft-mahesh-netconf-binary-encoding-00 <https://datatracker.ietf.org/doc/html/draft-mahesh-netconf-binary-encoding-00>
>>> 
>>> 
>>> Abstract:
>>>   This document describes a method by which a NETCONF [RFC6241] client
>>>   and server can negotiate an alternate form of encoding.
>>> 
>>>   This document updates RFC 6241.
>>> 
>>> 
>>> 
>>> 
>>> Please note that it may take a couple of minutes from the time of submission
>>> until the htmlized version and diff are available at tools.ietf.org <http://tools.ietf.org/>.
>>> 
>>> The IETF Secretariat
>>> 
>> 
>> Mahesh Jethanandani
>> mjethanandani@gmail.com <mailto:mjethanandani@gmail.com>
>> 
>> 
>> _______________________________________________
>> Netconf mailing list
>> Netconf@ietf.org <mailto:Netconf@ietf.org>
>> https://www.ietf.org/mailman/listinfo/netconf <https://www.ietf.org/mailman/listinfo/netconf>
> 

Mahesh Jethanandani
mjethanandani@gmail.com