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

Andy Bierman <andy@yumaworks.com> Sun, 31 July 2022 10:03 UTC

Return-Path: <andy@yumaworks.com>
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 DDBC1C16ED1C for <cbor@ietfa.amsl.com>; Sun, 31 Jul 2022 03:03:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=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, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
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 oOEgLd_Cjap7 for <cbor@ietfa.amsl.com>; Sun, 31 Jul 2022 03:03:36 -0700 (PDT)
Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 1C2BAC16ED00 for <cbor@ietf.org>; Sun, 31 Jul 2022 03:03:35 -0700 (PDT)
Received: by mail-yb1-xb35.google.com with SMTP id y127so14623775yby.8 for <cbor@ietf.org>; Sun, 31 Jul 2022 03:03:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dqd1u/pGIkRNeunmY2/Wnd66Q2ZGRtOVZWFeUBLgxQM=; b=gpJi7naUKw0XWVFwBt0QzRlXIzM+cLFPVcG6Tf4YNCm6jvnSfl+O6K5ej8o+Lv/pmV ZlqAG8GQfVr4g/6/zOKyttndVe9Fx+gvZM5wpBBSUoIDAa53t4Pd+lrz4Rdn2B2ipTK+ OrUb4KMo7XW0fN3hzE+1PorYBXqeymzBZc1Aif59MkGtiETK6fTrVIepvaYKsFk9Wmb1 akvtR+oKZ1IBR9Jq7nBcB7UGzy7XPTJppKxI7NjpNP2Edt4L9Sau9VL66ZZsFRSfSeFL RR+N3xeMK+qqzhGjMyGB3fD7S26F03ZWm5SQ3UDSKTK9+Y8+a2O//o8ceH6R5Z52vzQA o/jA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dqd1u/pGIkRNeunmY2/Wnd66Q2ZGRtOVZWFeUBLgxQM=; b=wmB5Gkui03qsJApD3hva2qKcIx2gK+i65mIYt3I73qrzxaPynEJ9L/CM2lApo6mRrY hl5vre6gT4Y9+rhPzhAru28El6hWiJmSR5sFfii8IJ+cta603CPvm1ceSVxLZ5Ty1ZjZ 9s5eINlhhjqgGHv7xnClU/PeFBgCvTHN3piEja6ALZGA/97tvp/L+BFDQ/7kJDMUK38S zk5NY2+sZMOftnVfDQOYZ8uj9Apb4Of1Q6SJIPQrv3jS2IU6r9ToFDtlT+vl41zAgh5s 3J1+W8BjhcOyRD94Dz3TZgYoh/Jv4eDVeniZwiweiLqNR/epSf+9duSI/yi0L5QgOUUz +WDg==
X-Gm-Message-State: ACgBeo1MJlJoW2Dk1e4XwHNOIupDmnVcRDp9tVMCotlIunSh9SA568N8 2hRS3Y+/HJljC1l4/pNo81m5Q1wGpYvtXDvPfy7QEA==
X-Google-Smtp-Source: AA6agR5ZQDY2NjbKEKE1ZXG0QBbatpBvPHQndR2G/OVudCh4QnrPMxFHZDzKnLhYQFOVCPN/+lTBxOFGdCXlwJdWY2A=
X-Received: by 2002:a25:f50a:0:b0:66f:4f74:1417 with SMTP id a10-20020a25f50a000000b0066f4f741417mr7703994ybe.64.1659261814953; Sun, 31 Jul 2022 03:03:34 -0700 (PDT)
MIME-Version: 1.0
References: <686025.1659214422@dooku> <CABCOCHRoA8qw1KiBqooaR_0hB7p9cMp94tnuwwSfyXE7Jj_NHw@mail.gmail.com> <9DA496EC-1D59-4A7D-B17A-ED5503B5580C@tzi.org>
In-Reply-To: <9DA496EC-1D59-4A7D-B17A-ED5503B5580C@tzi.org>
From: Andy Bierman <andy@yumaworks.com>
Date: Sun, 31 Jul 2022 03:03:23 -0700
Message-ID: <CABCOCHR6QZ4yoiLSy5vF-CtbQTAiBr+gg6Nquu315u6ngpZSdA@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: Michael Richardson <mcr+ietf@sandelman.ca>, cbor@ietf.org, NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000011f09505e516ffa2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/01SqSnIa4i_nLG4iRSFeS-sSIdQ>
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 10:03:41 -0000

On Sat, Jul 30, 2022 at 10:05 PM Carsten Bormann <cabo@tzi.org> wrote:

> 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.
>
>
Agreed.
Both sender and receiver need to use the same "replacement encodings".
E.g, the SID file entry indicates certain objects that should use
date-and-time
are flagged to use Tag 1 instead.

If a YANG model is used to identify the server-specific replacements,
then the client code cannot be hard-wired at compile-time.
It has to be adjusted at run-time for each server.
I know it has been a priority for some WG members that a client should
be able to code to the SID files without any additional (run-time) data.


Grüße, Carsten
>

Andy


>
>
> (*) 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.
>
>