Re: [Cbor] [netmod] CBOR tags for Common YANG Data Types (RFC6991/bis)

Carsten Bormann <cabo@tzi.org> Sun, 31 July 2022 05:05 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6B7CFC13192B; Sat, 30 Jul 2022 22:05:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.908
X-Spam-Level:
X-Spam-Status: No, score=-1.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XNj8l_CmLmf6; Sat, 30 Jul 2022 22:05:11 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 602ACC13192C; Sat, 30 Jul 2022 22:05:08 -0700 (PDT)
Received: from smtpclient.apple (p5089abf5.dip0.t-ipconnect.de [80.137.171.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4LwThZ0TpyzDCcK; Sun, 31 Jul 2022 07:05:02 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CABCOCHRoA8qw1KiBqooaR_0hB7p9cMp94tnuwwSfyXE7Jj_NHw@mail.gmail.com>
Date: Sun, 31 Jul 2022 07:05:01 +0200
Cc: Michael Richardson <mcr+ietf@sandelman.ca>, cbor@ietf.org, NetMod WG <netmod@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <9DA496EC-1D59-4A7D-B17A-ED5503B5580C@tzi.org>
References: <686025.1659214422@dooku> <CABCOCHRoA8qw1KiBqooaR_0hB7p9cMp94tnuwwSfyXE7Jj_NHw@mail.gmail.com>
To: Andy Bierman <andy@yumaworks.com>
X-Mailer: Apple Mail (2.3696.100.31)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/fcm8qXhaHb5S4ngW2vTsZmU4Ikk>
Subject: Re: [Cbor] [netmod] CBOR tags for Common YANG Data Types (RFC6991/bis)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 31 Jul 2022 05:05:14 -0000

On 31. Jul 2022, at 02:12, Andy Bierman <andy@yumaworks.com> wrote:
> 
>     leaf foo {
>         type inet:ipv6-address;
>         ext:cbor-type cbor:bin-ipv6-address;
>     }

This looks like the right thing to do.
But it touches many moving parts, and I’m wondering whether we cannot do something with a more localized footprint.

This is all about the representation; the data model doesn’t actually change (*).
We don’t need to change the model to go from XML to JSON, why should we need to do that here?

Maybe this could be done via a concept that looks more like a SID file.
It would need to be visible in a yang-library-like model.

Grüße, Carsten


(*) Well, maybe it does: E.g., when using Tag 1 for a date/time, there is no way to represent a numerical offset.
That is generally not needed, so the conversion would work in the majority of cases.
If a numerical offset needs to be expressed, the text-based form could be used.