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

Andy Bierman <andy@yumaworks.com> Sun, 18 March 2018 15:42 UTC

Return-Path: <andy@yumaworks.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 7E82C12D86A for <netconf@ietfa.amsl.com>; Sun, 18 Mar 2018 08:42:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 BrWqeLrFS3tC for <netconf@ietfa.amsl.com>; Sun, 18 Mar 2018 08:42:24 -0700 (PDT)
Received: from mail-lf0-x236.google.com (mail-lf0-x236.google.com [IPv6:2a00:1450:4010:c07::236]) (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 BAB6612711B for <netconf@ietf.org>; Sun, 18 Mar 2018 08:42:23 -0700 (PDT)
Received: by mail-lf0-x236.google.com with SMTP id y19-v6so21889654lfd.4 for <netconf@ietf.org>; Sun, 18 Mar 2018 08:42:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5C1es08D+fimU8xDb+p5Gg4zz2nlXj7AsOMvwNT5Re4=; b=OPDKO1qgEsNLz1zfOeWplCQFzEmJ2RO7R2pE5AZuhjA8s1mnaEkzG9urBiI2HP+5sl OwKCkpRP/15X3+li4IFUE3uMq0x2mzYG7/ScrQCHlIwEKbsxpkzBTKQuhLQ8FACFIzNz 1tfivPAUZcchgsDzf0pocxCG4dKMsOtBlFkWYlptA5bqGgvm9pCuoPVXXf3MPQ1AuEVn JHxvZ7izCekbhRGqa5scO0HR+HyafOL930Jg6CuyWfZdUYYExAxRjqDabGW4Wz912E0d 9fn3x8Yu+lJZoUFaTMu4pR3I8i7iUQ5tFyEdbORAEKEAtpA6WxL6PXk4RlmvKtE1EXBY SJ7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5C1es08D+fimU8xDb+p5Gg4zz2nlXj7AsOMvwNT5Re4=; b=Q0VrQTgv3OFcGiGDPuXNpaPop65NyWiyR+3pACmhMuBZJLaoABDHg/5LBJ2t8I2VtZ JfuzZ7/MLYfZlFbX8s7tnIp6462iHtRH3GFRDvb04atJ+nfQvfRw4OAbE6j3wiHwMetO BiMU0LTRSPpLAoX+HqvuqaWwcyDcFlP+0CV8EljUmQuEKhCd154xMpzfr5L0m0HQjD// yfOp1VJ6SSMNWuPX0FZ3lWnvZW9S/XDPcOQG1fzm/vI2Z2I7rXqhPbPkQ7owFFOChaqQ IE+zIv1yVtMiH5Frg2KUFMyQqGH3MGyTroMlgG0LpvdLn0x1HJghCKweNGAfKF64b4/O /KJg==
X-Gm-Message-State: AElRT7HgvCYeyc4+W66QmhPmPoxRoQ8mkZAHoNrJN/vvJuCGuI0cV6MB eDan5/Kfq40fXwaUoCGDgfUDLrbivIWuMsX0V6MuIg==
X-Google-Smtp-Source: AG47ELvcpWiKKuCvKGlQjgx0pW2g9bxHlxsgtkk3WqDeccRqN55KgCi2joMoLhJJoHUm2hvzXAX6DgyAhYiRF11e+Wo=
X-Received: by 2002:a19:5c84:: with SMTP id u4-v6mr5797917lfi.14.1521387741876; Sun, 18 Mar 2018 08:42:21 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:1a50:0:0:0:0:0 with HTTP; Sun, 18 Mar 2018 08:42:21 -0700 (PDT)
In-Reply-To: <20180318.161147.112215286522155341.mbj@tail-f.com>
References: <C54CC647-9720-4A85-8026-4EFC90B9B290@gmail.com> <54b79aa6-81f4-529e-b938-db568a279b31@cisco.com> <334C38A6-FB10-4B67-83E8-D90C73A32F26@gmail.com> <20180318.161147.112215286522155341.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Sun, 18 Mar 2018 08:42:21 -0700
Message-ID: <CABCOCHQcANNOb2hUBcojRcvAEvxmKsCHCpgMnseQBckn2ea3SA@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: Mahesh Jethanandani <mjethanandani@gmail.com>, Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ebb2ae0567b1af31"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/md8TpInHXSIWqD63sBfhLHCV6io>
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: Sun, 18 Mar 2018 15:42:27 -0000

On Sun, Mar 18, 2018 at 8:11 AM, Martin Bjorklund <mbj@tail-f.com> wrote:

> Hi,
>
>
> Mahesh Jethanandani <mjethanandani@gmail.com> wrote:
> > 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.
>
> Regarding the proposed solution, I think we should use the same
> mechanism as is used for negotiation of the framing mechanism.
> Specifically, the server would in its <hello> advertise the supported
> encodings, and the client would advertise the supported encodings in
> preferred order.  Both sides would then immediately start to use the
> first encoding in the client's list that also the server supports, or
> xml if no such encoding exists.
>



+1

In fact, I proposed this exact mechanism 4 years ago:


https://tools.ietf.org/html/draft-bierman-netconf-efficiency-extensions-01#section-2.2



> > > 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.
>
> I think we should use a simple IANA-maintained registry of encoding names
> ("xml", "cbor", "json", ...).  I don't think we need the
> flexibility of YANG identities for these encodings.
>



The existing media types registry should be sufficient



>
>
> > > 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.
>
> If a new version of some encodings is developed, it would be a new string
> ("cbor-2"), which would be registered in the IANA registry (if we
> choose that route, otherwise it would be a new identity).
>


https://tools.ietf.org/html/draft-ietf-core-yang-cbor-06

The CBOR work is already being done in CORE WG (not CBOR WG, just to
confuse you ;-)



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


Lack of support for metadata impacts operational data as well (e.g.
'origin' attribute).


>
> I think this would be odd.  Note that you can't pass arbitrary binary
> data in XML.  I think the entire Messages layer (and above) should use
> the new encoding.
>
> What's needed for each encoding is probably that each encoding defines
> how the Messages layer is encoded (i.e., rpc, rpc-reply and
> notification).
>
> > 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.
>
> I think this is a mistake.  I think the encoding for notifs should be
> fixed.
>
>
+1


> BTW, we should probably ensure that we use the same encodings for the
> notif draft and this one.
>
>
> /martin
>
>
>

Andy


>
>
> > > 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
> >
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
>