Re: [yang-doctors] [netmod] Operational State usage of YANG choices and constraints

Jürgen Schönwälder <jschoenwaelder@constructor.university> Fri, 22 December 2023 19:36 UTC

Return-Path: <jschoenwaelder@constructor.university>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 55D06C14F6E0; Fri, 22 Dec 2023 11:36:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.906
X-Spam-Level:
X-Spam-Status: No, score=-1.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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=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 wgapqlxVfYvd; Fri, 22 Dec 2023 11:36:51 -0800 (PST)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A7195C14F6E1; Fri, 22 Dec 2023 11:36:50 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id A2FBF4445; Fri, 22 Dec 2023 20:36:27 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.220]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id V87hcpAVLKOp; Fri, 22 Dec 2023 20:36:27 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "DFN-Verein Global Issuing CA" (not verified)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Fri, 22 Dec 2023 20:36:27 +0100 (CET)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by hermes.jacobs-university.de (Postfix) with ESMTP id 375DB20150; Fri, 22 Dec 2023 20:36:27 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10028) with ESMTP id W-Ra-fIxU5pC; Fri, 22 Dec 2023 20:36:26 +0100 (CET)
Received: from localhost (alice.jacobs.jacobs-university.de [10.50.244.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by hermes.jacobs-university.de (Postfix) with ESMTPS id AD04A20095; Fri, 22 Dec 2023 20:36:26 +0100 (CET)
Date: Fri, 22 Dec 2023 20:36:25 +0100
From: Jürgen Schönwälder <jschoenwaelder@constructor.university>
To: Kent Watsen <kent+ietf@watsen.net>
Cc: Acee Lindem <acee.ietf@gmail.com>, "netmod@ietf.org" <netmod@ietf.org>, YANG Doctors <yang-doctors@ietf.org>
Message-ID: <ZYXlOcZv8GUcfoBI@alice.eecs.jacobs-university.de>
Reply-To: Jürgen Schönwälder <jschoenwaelder@constructor.university>
Mail-Followup-To: Kent Watsen <kent+ietf@watsen.net>, Acee Lindem <acee.ietf@gmail.com>, "netmod@ietf.org" <netmod@ietf.org>, YANG Doctors <yang-doctors@ietf.org>
References: <C1B843D2-D178-4E83-AEF8-6C726BD22597@gmail.com> <0100018c92fb0b64-5950acf7-2b47-4062-a35a-c2ca8fab14ce-000000@email.amazonses.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <0100018c92fb0b64-5950acf7-2b47-4062-a35a-c2ca8fab14ce-000000@email.amazonses.com>
X-Clacks-Overhead: GNU Terry Pratchett
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/KRnWx4TWCSXiRVbvMVvI1q3YUjY>
Subject: Re: [yang-doctors] [netmod] Operational State usage of YANG choices and constraints
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Dec 2023 19:36:56 -0000

On Fri, Dec 22, 2023 at 07:22:55PM +0000, Kent Watsen wrote:
> With limited experience wrt the impact on servers, as a client, it’s always best for the opstate data to be modeled as accurately as possible, for better processing and user experience.
>

What is accurate?

I think the answer is "it depends". There are states that a model
allows to represent and there are states it does not allow to
represent. If a device ends up in a state that the model can't
represent, then the device has a problem, From a debugging point of
view, the worst is a device in a state that can't be represented
propoerly reporting a valid state it is not in.

So like everything else, it is a modeling decision, like picking types
and everything else. I am not sure that 'as accurate as possible" is a
helpful guideline; for operational state I prefer to see as much as
possible the device's true state. (But even picking data types for
leaves restricts what can be represented, so it is a judgement call.)

/js

-- 
Jürgen Schönwälder              Constructor University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://constructor.university/>