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

Acee Lindem <acee.ietf@gmail.com> Fri, 22 December 2023 18:37 UTC

Return-Path: <acee.ietf@gmail.com>
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 781C5C151065; Fri, 22 Dec 2023 10:37:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 f_s3AlPonl5u; Fri, 22 Dec 2023 10:37:49 -0800 (PST)
Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (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 5CC94C14F71B; Fri, 22 Dec 2023 10:37:49 -0800 (PST)
Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-781045f1d23so147908285a.1; Fri, 22 Dec 2023 10:37:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703270268; x=1703875068; darn=ietf.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=6SkGh/DvnfK3CO3bHwLqGSZF+7W/j4LK/xVvsDn4Ljo=; b=KiVrIojKJ6UpWOXCB4nHZ5XJzrD+8JHY9BXrPhmjk09zc+9GM1fN0F7RD3TPsELJKt Dgr+wLyAtaHEOF6krNvIQ8WulPzjKwpwzKzTmimzRQd+pR3wrd1YU2pDHBGURfU0YnpN 1W6MNLZINHOU44gyZRJDozHhC2dZIlXOv3e9HR6riELrS8avWM7gv3OAPz3oxRWzP2CF 7OmcvfZZaObDOHYFNrl1EHnu6NEhY83yoWaU5UjTgCyHrpbF4Z/zbBCPQ9s5BoqLL6Hm IFF6RIaazSiIl0SREsK0i0LBfAkhCRsugJQx+ojlMx8A72hPAlVQ33219wnWlXoLr0MN VJiQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703270268; x=1703875068; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6SkGh/DvnfK3CO3bHwLqGSZF+7W/j4LK/xVvsDn4Ljo=; b=ZmcFTW+j1UqXk/3zYu5kbt9Konf/BBW6EwE7sS2AqZAHAgSfADT7MVFXekPp8X0/y2 snudZq2Brx3k1CtXU2a26unbfN+gaAs39Xyt0iS8lrfoQsm7kEXdRilt7RmWHVgTuyVL qfckhIg8dZ0Eq292i5dpIaR8PNusz3cfPLzo5M5vfI/zqnssw3Ez3bPOvNAkVcOaI/K0 SZPaHpPhjAfOgN45Wy2y7UPHORgD2rLB2Flug8KE/dqS2rMNwzHbsLGAI3Edf8xfgWF8 06cCawUixSlLboUHjnrY8hadsOXrqVuNTeJzncxX7kMl+Q9bxh+DGJ6lKsVfvG2uN6Ow iRzQ==
X-Gm-Message-State: AOJu0Yxy9By2N1egx4V5uhyd8TKNuHtP4mTGVlE0NdeW1yXmU4X7do+w VRdaweeCz73P8HRVBtPCjhqLZD+wghU=
X-Google-Smtp-Source: AGHT+IG7boQtLbYeAtGnGsZ2sgwLoI73p2FEWtVypthbbXwLFD/BwHfUOm7TUAcsDoEWh/dNLojS8A==
X-Received: by 2002:a05:6214:519c:b0:67f:511:9cde with SMTP id kl28-20020a056214519c00b0067f05119cdemr2778486qvb.51.1703270267979; Fri, 22 Dec 2023 10:37:47 -0800 (PST)
Received: from smtpclient.apple ([136.54.28.118]) by smtp.gmail.com with ESMTPSA id w6-20020a0cef86000000b0067f77ca8d18sm1542152qvr.96.2023.12.22.10.37.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2023 10:37:47 -0800 (PST)
From: Acee Lindem <acee.ietf@gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\))
Message-Id: <C1B843D2-D178-4E83-AEF8-6C726BD22597@gmail.com>
Date: Fri, 22 Dec 2023 13:37:37 -0500
To: NETMOD Group <netmod@ietf.org>, YANG Doctors <yang-doctors@ietf.org>
X-Mailer: Apple Mail (2.3774.300.61.1.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/QJ0Gi76zcZ3734PODMObHvD5BZI>
Subject: [yang-doctors] 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 18:37:51 -0000

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