Re: [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: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3F4E4C182D75 for <netmod@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.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 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_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham 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 a9tU6HGDVkBl for <netmod@ietfa.amsl.com>; Sun, 31 Jul 2022 03:03:36 -0700 (PDT)
Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) (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 38996C16ED1C for <netmod@ietf.org>; Sun, 31 Jul 2022 03:03:36 -0700 (PDT)
Received: by mail-yb1-xb33.google.com with SMTP id i62so12857307yba.5 for <netmod@ietf.org>; Sun, 31 Jul 2022 03:03:36 -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=D3ZxoLX68uCUJtQATkQoLjUxIOTWqyby0/Xb/8+r2RTLcgehiVs04MAZMq1tswqZRl xaxMhLQD6ksiIO4G4eDpWtgcURZ2dBqCEYNw2fIxgHODDGpSADN+9R9R4w+n9YSPo2Yb s/vjOqEfw5NgQ4P09DzIpb7RtPXFiKbt6PueOG3kiO9m7Y+s0TuC+2Aoe+3GYwBjvQLi lVSR/wmVHY78rLKrYEPLg3Amda+QqtvJ0V1bkPR6nTlnoVBV6KMGVnA2m39+WQSQjExn XlQHV2H1cT9lkwC6vwkjlfn6gRKyqMt8jH/zQt9MRPd3kSxmOq7tJMojxOYy2mh0DvHs nW1g==
X-Gm-Message-State: ACgBeo1oF1/ilylb0oA1Bzseb2d+GQ4dmqZKRcuie758u9FyJPbTMdgl bwIj22Q37+NhClwYIQ6TmLoWDMFhuvXlgftUwbuqjg==
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/netmod/SmLPS9hOjLugUrgbDlQX-eVq8LI>
Subject: Re: [netmod] CBOR tags for Common YANG Data Types (RFC6991/bis)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 31 Jul 2022 10:03:40 -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.
>
>