Re: [netconf] [core] YANG encoding in CBOR

Andy Bierman <andy@yumaworks.com> Sun, 24 March 2019 22:52 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 80322120196 for <netconf@ietfa.amsl.com>; Sun, 24 Mar 2019 15:52:37 -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 i_UqsmylTiAZ for <netconf@ietfa.amsl.com>; Sun, 24 Mar 2019 15:52:34 -0700 (PDT)
Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) (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 438D3120183 for <netconf@ietf.org>; Sun, 24 Mar 2019 15:52:34 -0700 (PDT)
Received: by mail-lj1-x230.google.com with SMTP id l7so6144031ljg.6 for <netconf@ietf.org>; Sun, 24 Mar 2019 15:52:34 -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 :cc; bh=TM8maVfyZAVSpKur4uiZMSzyyF02YYyriq21lI9lGow=; b=qxjA3Z7guLGI6LpkeuJlD4JEWg1GP4zrwVTo7sVzjbkW9DxzlSjY63+ffncfS9grjK 4gK/ryfxX8M6HumwZtliDJlakUWeD54jcoWAzPNhnR9XfZd1j2O1T2ixa0QcZzROd1nM Kw3tsfI21Y0wJcxZLxCXTUiJIn62AfJXeCZ6wHld3y4ojiF4Ie6qGi/5y9V7o8PNUFTR Jwct3DMpogLQCLkd0OJf0FyXCxgDID87BAJ3nm3/CeeCjL5yjQuh1iOhGGGRaUlrQ/KC nel9gTfH11wPe06vgC8/OXeIPIXHgiRQfrGYVHhdWnm+Be1JyW3JXWl9TOUrND5Ultga 04cQ==
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:cc; bh=TM8maVfyZAVSpKur4uiZMSzyyF02YYyriq21lI9lGow=; b=A9ETWQFLLJrY2QDkRaqCV5gD0qKixfPat+NTrmhpA25+BvwU0bil/Og0mgXIPJJBau QfshwKcB83QNROflQFgL+N+KdOCfiSaQ/WisaGM4jee5U8nYYF+EJdzCSpoUA+A34l8i yGEi8Cig7Ib148e0/zFVIFcw/09mV3LYdvFq8VbMuLgd3gHp9utn7bb+FY7WK8OakYtr FrIMzdvdbwaCqqSXvLfSAxbVQR9ZsaFBSBL+iJZrmzKagfX10OUyJ/9jeaQzQhGufq4L zDwSkIzF31hoQaETWAh4Igtx6DJLN6XwvGKu/p/eg1V6g15v3iHKogVi3CJyrhui6Qgp ODaw==
X-Gm-Message-State: APjAAAUTZWF4h4d7q+L78R+xsgPZgIabl+07kAlEe2WlzTpWj02HB+C7 0bUGfBRrOWXDfehpozrVveND8jMv2D+WfHYRDKyppQ==
X-Google-Smtp-Source: APXvYqwj/ToUFdKyV1COGhFT29ws1WklEsfeixiu3jAcWWj3j7txvY8oVcGIrxPOfWUX1heOV6HU1CaICcVYCjAFbNM=
X-Received: by 2002:a2e:8616:: with SMTP id a22mr11493244lji.173.1553467952179; Sun, 24 Mar 2019 15:52:32 -0700 (PDT)
MIME-Version: 1.0
References: <6235c6683ff14848a661f8b8cec94280@XCH-RCD-007.cisco.com> <BL0PR06MB5042823429DB7CDA0F33408B9A430@BL0PR06MB5042.namprd06.prod.outlook.com> <588401AB-483E-40F5-95BB-20A066E56DAC@tzi.org> <15fbaf84b20343a1b83f40b571149a14@XCH-RCD-007.cisco.com> <1ADF8201-ABB4-44FD-A515-F3F8E0DBF5FC@tzi.org> <20190323101003.gp3zvsvqqwc26jip@anna.jacobs.jacobs-university.de> <6BAAAC0E-F91B-411B-8768-F628C57FF2E0@tzi.org> <20190323133519.nv6sw72upxchr7p3@anna.jacobs.jacobs-university.de> <3D7C33C9-CB86-4965-899D-93C4B7343DF7@tzi.org> <CABCOCHRcEPUB=Yf2Vdf6ZpN-SxjYeMPL_54-EKMYSpUO9b-RwA@mail.gmail.com> <640708E8-F80E-49EE-9AEF-DA8DAEE3AA57@tzi.org>
In-Reply-To: <640708E8-F80E-49EE-9AEF-DA8DAEE3AA57@tzi.org>
From: Andy Bierman <andy@yumaworks.com>
Date: Sun, 24 Mar 2019 15:52:21 -0700
Message-ID: <CABCOCHTNWz=VWZP3BzYxdBXTFytYyJjge2gX6fihz1B1Xf5bOQ@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "netconf@ietf.org" <netconf@ietf.org>, "core@ietf.org" <core@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000075be580584def1ba"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/dS00k3JunJ4NLSuuwULYmxDYIpg>
Subject: Re: [netconf] [core] 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: Sun, 24 Mar 2019 22:52:38 -0000

On Sun, Mar 24, 2019 at 3:24 PM Carsten Bormann <cabo@tzi.org>; wrote:

> On Mar 24, 2019, at 12:29, Andy Bierman <andy@yumaworks.com>; wrote:
> >
> > The answer seems to be simple but inefficient:
> > Always encode bits or enumeration as a string, if this is within a union
> type.
>
> For enum values within unions (which are already handled specially by
> giving them a CBOR tag) we could simply use a SID (that we then would have
> to generate for each enum value) instead of a string.  We could also extend
> this to enums outside unions; but here the recurrence to the (outside
> unions unambiguous) value sounds better to me.
>
> Bits.  Oh.  Same procedure, I’d say.
>
>
This seems like it would make the SID file very complicated.
Not sure it would work since leaf/leaf-list can define their own types.
Plus, all the enum typedefs would have to be numbered this way.
Maybe the SID authors can comment on how this would be done.




> Grüße, Carsten
>
>
Andy