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

ivaylo petrov <ivaylo@ackl.io> Thu, 28 March 2019 14:40 UTC

Return-Path: <ivaylo@ackl.io>
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 43C04120494 for <core@ietfa.amsl.com>; Thu, 28 Mar 2019 07:40:23 -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=ackl-io.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 I4d1iD_KT_gF for <core@ietfa.amsl.com>; Thu, 28 Mar 2019 07:40:19 -0700 (PDT)
Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 B5B881202AC for <core@ietf.org>; Thu, 28 Mar 2019 07:40:18 -0700 (PDT)
Received: by mail-wr1-x42f.google.com with SMTP id p10so23253953wrq.1 for <core@ietf.org>; Thu, 28 Mar 2019 07:40:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ackl-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=SwjP9ELAmVPGfOjvjJcTg+zAXje9vGlU7RzYOrp8g1A=; b=OFENi4WB2FBdtDyU1keOe0mfCkfXBoTIsZwLjJ6E1w49nxaiX1MHmHLnDCLHnoSsD0 NVpROLZnkcHUfd9a6KB4VhKnqoU3lWVxjd2kpGEcRm/6Db5FLV5fpKck0ncEu8g+6dvB fd/dD7ZwypvhYZb3E31AA2Rq+uT39ieBNP8HdJdeR2lqcj3i8bZmaP01jSWu0YYDojuZ 6JbXrHCNe1EvsH9ot6f5GKc3bbIW8x+2J0kW2D0o8xeezQv1tnBQtL4YIMe+VL1CNKJK pNokMU/svCpU3o98nilTQVqvNVcqAq4R/T2lZghP/tpXPJXtvMUxDjOilp8xtwsCyOaI ispA==
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=SwjP9ELAmVPGfOjvjJcTg+zAXje9vGlU7RzYOrp8g1A=; b=NskTP3f3XFOkYAol6uqJ/8szLyJIMUaU3ckbhH4CyJyqrbDZTqA3OlhxdP4yH4f8uU ejGYggIs+XcMCfx5gjtPgUFTB26fqsvEAhAbRh/ZJ9zBUvZthFkj2ZTpQGEwDgqqFaKR p2e6ohcwyOj3XVn8JO3U46O+nHMZ+HE0rH2+AXeQwXKe1NfA/yQlVa20ibRaNb1b53yk jXWZeQKx6HtEqejxIJcMCnTiJediLxqxh+rexiNSsF3Cu2KBrjwYqpgn2veM8kTyr7av /EMnW7lyRnJEKaA0jZutpwSy8rvaJGOwAtglGWvcEyCfgc/fB/75SUWeXXjZ6U0AucSC eKOw==
X-Gm-Message-State: APjAAAUtwvxWuQwHUtG/pRIODIMmsAfEte6nIp96RH069+vVHbrOd8DG VUCBoTTheWEhBEk2/gvtmYYrkPcXl6XeKTF0als7wA==
X-Google-Smtp-Source: APXvYqzynPH2NhkNOYS4t29EWjddpTPDZB8c0u9yNJ/hYXRs382jVnfpPepEItOexBYNATXKWcsagHCUjT9ImYcnusM=
X-Received: by 2002:adf:b68d:: with SMTP id j13mr24358856wre.50.1553784017070; Thu, 28 Mar 2019 07:40:17 -0700 (PDT)
MIME-Version: 1.0
References: <15fbaf84b20343a1b83f40b571149a14@XCH-RCD-007.cisco.com> <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> <20190328143031.ho7nmhpg4jb373p7@anna.jacobs.jacobs-university.de>
In-Reply-To: <20190328143031.ho7nmhpg4jb373p7@anna.jacobs.jacobs-university.de>
From: ivaylo petrov <ivaylo@ackl.io>
Date: Thu, 28 Mar 2019 15:39:50 +0100
Message-ID: <CAJFkdRzc-KO=-SDSqPYzQP6rVWD_6=7qP=XsN93U=sRMNNfVNA@mail.gmail.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Michel Veillette <Michel.Veillette@trilliant.com>, Carsten Bormann <cabo@tzi.org>, Ladislav Lhotka <lhotka@nic.cz>, "netconf@ietf.org" <netconf@ietf.org>, "core@ietf.org" <core@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000654178058528889f"
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/PrMPPlpzp7Mlq6VKLvnjq_Vm7n8>
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 14:40:30 -0000

Hello,

I also support value outside and string inside unions. Michel gave a rather
good rationale why this is a good option and for me this seems as the best
option available right now.

Best regards,
Ivaylo

On Thu, Mar 28, 2019 at 3:32 PM Juergen Schoenwaelder <
j.schoenwaelder@jacobs-university.de> wrote:

> I agree with your points. It seems this is the best we can do right
> now and hopefully we can do better in the future.
>
> /js
>
> On Thu, Mar 28, 2019 at 02:06:17PM +0000, Michel Veillette wrote:
> > +1 for value outside, string inside union
> >
> > My rational:
> >
> > - SID can have up to 8 bytes and will provide a marginal compression.
> > - Generating SID for all 'enumeration' and 'bits' in case they are used
> in 'union' is lot of overhead to revolve a corner case.
> > - YANG also support the 'choice' statement (
> https://tools.ietf.org/html/rfc7950#section-4.2.7) which is similar to
> >    the concept of type tagging within union. This construct can be used
> by YANG modules specifically created for
> >   embedded applications to take advantage of 'enumeration' encoded as
> value and 'bits' encoded as bit.
> >
> > Michel
> >
> >
> > -----Original Message-----
> > From: Carsten Bormann <cabo@tzi.org>
> > Sent: Thursday, March 28, 2019 9:47 AM
> > To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
> > Cc: Michel Veillette <Michel.Veillette@trilliant.com>; Ladislav Lhotka <
> lhotka@nic.cz>; netconf@ietf.org; core@ietf.org
> > Subject: Re: [netconf] YANG encoding in CBOR
> >
> > So for enum/bits we are back to value outside, string inside union?
> > Can we use SIDs instead of the strings for the latter?
> > This can’t be much more complicated than assigning a SID to each string
> that occurs in an enum/bits in a union.
> >
> > Grüße, Carsten
> >
>
> --
> 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/>
>
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core
>