Re: [core] [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: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E046A12004B for <core@ietfa.amsl.com>; Thu, 28 Mar 2019 09:31:00 -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=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 YCs6eP8z7cP7 for <core@ietfa.amsl.com>; Thu, 28 Mar 2019 09:30:58 -0700 (PDT)
Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 4B310120077 for <core@ietf.org>; Thu, 28 Mar 2019 09:30:42 -0700 (PDT)
Received: by mail-lj1-x22e.google.com with SMTP id f18so18210708lja.10 for <core@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=FUREoewy3p/8yMYqXEqb9SZihmdm7WnhGboZ2qRlt+VE9CI2ABPIV9LlwTirk9GyZJ 3wwzWHnb9sQN2jBTYQdiQ6FJcdXgx8AoSilbaic9KzmaPmyj/IOAOVOGD7ilWTFoNDV2 M2Zi1Tc9pGc+JsTjTwdpifggNL0hvMQevjB5gPu+OxA307rn57bOrcThhT6IB/Fmb68M 2PD2JhLKqSgISnpnKo5/OTZACNBKVa9rB8o0I3loEHX7Xer3W+5pC8gecF3ZL/xsC4og PVtyZoCiiXmJ51SGioLTeExbkYhXz8qr/B13/rT1vMFJhlv9hrplh4E1gjQbcNExM5nY g1Ew==
X-Gm-Message-State: APjAAAWopmex1EJ/mWfXdauQvv852GeYGm+ui8rZGkTTsJaSPtohTt1w kU0Bx5rzOgG2Je59B1gArf3Xia2dEWRQ0Tv0pxjpqg==
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/core/Rdwf-lIfVJ4omNsXl5XAfC1SKsI>
Subject: Re: [core] [netconf] YANG encoding in CBOR
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Mar 2019 16:31:01 -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/>
>