Re: [yang-doctors] Yang syntax for a globally-unique key?

Christian Hopps <chopps@chopps.org> Tue, 25 August 2020 14:48 UTC

Return-Path: <chopps@chopps.org>
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 489B33A0E45 for <yang-doctors@ietfa.amsl.com>; Tue, 25 Aug 2020 07:48:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.003
X-Spam-Level:
X-Spam-Status: No, score=0.003 tagged_above=-999 required=5 tests=[SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NW85bdn_lfp2 for <yang-doctors@ietfa.amsl.com>; Tue, 25 Aug 2020 07:48:50 -0700 (PDT)
Received: from smtp.chopps.org (smtp.chopps.org [54.88.81.56]) by ietfa.amsl.com (Postfix) with ESMTP id 36C4E3A0E56 for <yang-doctors@ietf.org>; Tue, 25 Aug 2020 07:48:50 -0700 (PDT)
Received: from stubbs.int.chopps.org (047-050-069-038.biz.spectrum.com [47.50.69.38]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by smtp.chopps.org (Postfix) with ESMTPSA id A8F9560CE4; Tue, 25 Aug 2020 14:48:49 +0000 (UTC)
From: Christian Hopps <chopps@chopps.org>
Message-Id: <D621D3BA-789D-4A43-BF11-6C31E8D706D2@chopps.org>
Content-Type: multipart/signed; boundary="Apple-Mail=_8C0B657F-318A-43AB-9971-4D98F0931727"; protocol="application/pgp-signature"; micalg="pgp-sha512"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
Date: Tue, 25 Aug 2020 10:48:48 -0400
In-Reply-To: <0100017425c983cb-d9471cc6-34d3-4a49-ab7b-942bca5ae697-000000@email.amazonses.com>
Cc: Christian Hopps <chopps@chopps.org>, YANG Doctors <yang-doctors@ietf.org>
To: Kent Watsen <kent@watsen.net>
References: <0100017425c983cb-d9471cc6-34d3-4a49-ab7b-942bca5ae697-000000@email.amazonses.com>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/9en0ZhCTy-HZWBkVGkzsCTBzDQM>
Subject: Re: [yang-doctors] Yang syntax for a globally-unique key?
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 25 Aug 2020 14:48:51 -0000

Could you create a root level global list of admins and then leaf-ref them under tenants?

Thanks,
Chris.

> On Aug 25, 2020, at 9:23 AM, Kent Watsen <kent@watsen.net> wrote:
> 
> [trying here before the “netmod” list]
> 
> YANG Doctors,
> 
> Assume data model:
> 
>  +—rw tenants
>      +—rw tenant [key]
>          +—rw  key        string
>          +—rw admins
>              +—rw admin [name]
>                   +—rw name     string
> 
> The "admin" list’s key “name” ensures that the names are unique per tenant, but not globally.   Is it possible to place a “must” statement on the “tenants” container to ensure globally-unique admin names?
> 
> Can anyone offer syntax to do so?
> 
> Kent
> 
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors