Re: [netconf] YANG encoding in CBOR

Andy Bierman <andy@yumaworks.com> Thu, 28 March 2019 16:31 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 9EBB312004B for <netconf@ietfa.amsl.com>; Thu, 28 Mar 2019 09:31:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable 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 waV1xc73UvEn for <netconf@ietfa.amsl.com>; Thu, 28 Mar 2019 09:30:59 -0700 (PDT)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 4B4F31200EF for <netconf@ietf.org>; Thu, 28 Mar 2019 09:30:42 -0700 (PDT)
Received: by mail-lj1-x234.google.com with SMTP id f23so18257665ljc.0 for <netconf@ietf.org>; Thu, 28 Mar 2019 09:30:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=RiosPYGuRqXlxbL/4YNBU0BmgPKmtsXQZ4xHz5XK+H0=; b=Rb2nPCiW/GYc0zu9b3dSc+FVvpzl5uq6rwokFoE3D+MOTtjsMcqkklwIo9lD+TIG93 0C8Y+xiOtGszJ9fG+ihGAzM+9aRiFBpqGXBzjoHhd3ZbKMQt6TfT45qA63jTSupcMh5Z jmC4yo8AQt/pbDfGw2RKjxfiRePO1wRiinaBOi9Qcof7iNLTsPLkNCwiLrGEPnoB+I5B HeISWRtFoknULrVgRhF8BeSbHOmqHbSVIDNSdMdr+vw9FSFKuk3xDob90iPZvNfyCS6E BF6QxeWRzRYkzpq05O4dv7dzLifwa4aluzz6RaDwNdBEE/JKhKrenFIuO7q03IUQPCAN GKtA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=RiosPYGuRqXlxbL/4YNBU0BmgPKmtsXQZ4xHz5XK+H0=; b=KW2PvDUVE3czBHZMqKNTtq0L38MF6xOHGtQ+RCGZD5vlb2JQqTN3XjNE1a9w/7bDlP lWAJ+QM+jxEzjTzVZiSL8upHjv/CcUMYP1OFyTlvZQmIpqJHvtjwniDqQNFc+YX3nYX6 +9y5ZzWzVa70IPMubk78XmstScjxSpon1Oif8vkwzL/+9dmEnqYnLPy7xId7Xx6u37oi 8tz8vZD+xh9k9ZVEHZ/6HV9q8ih5/blmhkedbstw/3/J9kfcK7TnwbhiLOXN82Hi9ihM n5VmiAWSFHcvAypavE05ng47Fh+3NRi3XVld56VsxMiW9EV4jvgl5bmbh28R+wZ8opu8 Zrxg==
X-Gm-Message-State: APjAAAXhPra/7A8JVPioamD0TuxaIuYr1DGVbF9Fjk3i3H9N+nutI0e8 e7h4GNOORTIIT/nG1q3VzuWtaQRmYE0uNh/kcRHrgA==
X-Google-Smtp-Source: APXvYqxkYd67kF+pX2p9pVK7YaNem36LhJCvYM1LVyPHchWin1m7q1lJNBR0S7xWXAn5s5HVHygfrslJinDJmNrNsgg=
X-Received: by 2002:a2e:844a:: with SMTP id u10mr12165033ljh.41.1553790640259; Thu, 28 Mar 2019 09:30:40 -0700 (PDT)
MIME-Version: 1.0
References: <1ADF8201-ABB4-44FD-A515-F3F8E0DBF5FC@tzi.org> <20190323101003.gp3zvsvqqwc26jip@anna.jacobs.jacobs-university.de> <871s2vqsxi.fsf@nic.cz> <BL0PR06MB5042C9AA6B4A0CCD913F50D89A580@BL0PR06MB5042.namprd06.prod.outlook.com> <20190327061637.g5a7t7nulk7kyh2v@anna.jacobs.jacobs-university.de> <BL0PR06MB5042C28B79FF95078C8A881F9A580@BL0PR06MB5042.namprd06.prod.outlook.com> <20190328113018.uzujjtc7a2ukhovl@anna.jacobs.jacobs-university.de> <4656560A-2135-4F51-B3E7-8DB31B43B17D@tzi.org> <BL0PR06MB5042C392E675385B2AB0148A9A590@BL0PR06MB5042.namprd06.prod.outlook.com> <CABCOCHRvoUnWewVSzLJD7pT0LDC8xmqdqqrtNB=SRTEVgQRheA@mail.gmail.com> <20190328160714.uuzfvxrjjxflktg5@anna.jacobs.jacobs-university.de>
In-Reply-To: <20190328160714.uuzfvxrjjxflktg5@anna.jacobs.jacobs-university.de>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 28 Mar 2019 09:30:28 -0700
Message-ID: <CABCOCHRxrnjY-dCeqMXPVjWzq0p2UD_YTG=YLYdJ+NXObv95Fw@mail.gmail.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Andy Bierman <andy@yumaworks.com>, Michel Veillette <Michel.Veillette@trilliant.com>, Carsten Bormann <cabo@tzi.org>, "core@ietf.org" <core@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000002b1c1d05852a136e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/552DQnwqnFwneeAQp_EblHnKEEY>
Subject: Re: [netconf] YANG encoding in CBOR
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG 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: Thu, 28 Mar 2019 16:31:02 -0000

On Thu, Mar 28, 2019 at 9:07 AM Juergen Schoenwaelder <
j.schoenwaelder@jacobs-university.de>; wrote:

> On Thu, Mar 28, 2019 at 08:50:34AM -0700, Andy Bierman wrote:
> > On Thu, Mar 28, 2019 at 7:06 AM Michel Veillette <
> > Michel.Veillette@trilliant.com>; wrote:
> >
> > > +1 for value outside, string inside union
> > >
> > >
> > This is simple, but I was trying to support some very common types (like
> > ip-address)
> > that are unions of strings, and are desirable to send as binary instead
> of
> > string representation.
> >
>
> How does CBOR deal with say inet:ipv4-address? Does inet:ipv4-address
> magically get converted into a binary format? If not, the surprise that
> it is a string in a union is not a bit surprise.
>
> It seems to take full advantage of binary formats efficiently we need
> some additional magic. The YANG language requires the definition of
> canonical (textual) format. Do we need a way to define corresponding
> canonical binary formats for some of the types (where the default
> textual format is inefficient to send as a string)?
>
>
I thought there was a magic tag for an IPv4 address.
I don't see it now.  Maybe it got removed.



> /js
>

Andy


>
> --
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
>