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

Kent Watsen <kent+ietf@watsen.net> Fri, 22 December 2023 19:23 UTC

Return-Path: <0100018c92fb0b64-5950acf7-2b47-4062-a35a-c2ca8fab14ce-000000@amazonses.watsen.net>
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 7176EC14F70A; Fri, 22 Dec 2023 11:23:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.908
X-Spam-Level:
X-Spam-Status: No, score=-6.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-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_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.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 GUrnTeAGs6Ya; Fri, 22 Dec 2023 11:22:56 -0800 (PST)
Received: from a48-90.smtp-out.amazonses.com (a48-90.smtp-out.amazonses.com [54.240.48.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 574C0C14F616; Fri, 22 Dec 2023 11:22:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1703272975; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=kRM+0CUAc2No64TpPJBM5t4IDsr+wPSdElMXpMEOlT0=; b=FBYtmqkP0onOgwETdefG/+Lw9C8CTEK6b/l854x86a7aq7ITfeYmAd/w06YeetkO 66e8uf4jH2zXH1448R+Z0alJ9enTKYiXhl24DYfMVtJo7xDLeiQmGLYFSc24kxXF+3L WvfKiFrGfuT31gryGyXCbXpVRFudUZ5Fd+h47iIY=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\))
From: Kent Watsen <kent+ietf@watsen.net>
In-Reply-To: <C1B843D2-D178-4E83-AEF8-6C726BD22597@gmail.com>
Date: Fri, 22 Dec 2023 19:22:55 +0000
Cc: "netmod@ietf.org" <netmod@ietf.org>, YANG Doctors <yang-doctors@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-ID: <0100018c92fb0b64-5950acf7-2b47-4062-a35a-c2ca8fab14ce-000000@email.amazonses.com>
References: <C1B843D2-D178-4E83-AEF8-6C726BD22597@gmail.com>
To: Acee Lindem <acee.ietf@gmail.com>
X-Mailer: Apple Mail (2.3731.600.7)
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2023.12.22-54.240.48.90
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/H917VjRJ-GfeD3HaIISupQ9BhT0>
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:23:00 -0000

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.

K.


> On Dec 22, 2023, at 1:37 PM, Acee Lindem <acee.ietf@gmail.com> wrote:
> 
> We’ve had some discussions as to whether YANG models should put constraints or use choices for ‘config false’ data nodes. For example, if you have a two mutually exclusive containers, should the YANG model reflect this for ‘config false’ data? Or, if you have a leaf that would only make sense to return if the value of a preceding leaf has a certain value, should the ‘when’ clause be included in modeling? 
> 
> My thought was that it was better to reflect this in the model even for ‘config false’ data. 
> 
> Thanks,
> Acee
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod