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

Andy Bierman <andy@yumaworks.com> Tue, 25 August 2020 17:15 UTC

Return-Path: <andy@yumaworks.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 B39793A0FBF for <yang-doctors@ietfa.amsl.com>; Tue, 25 Aug 2020 10:15:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.013
X-Spam-Level:
X-Spam-Status: No, score=0.013 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.com
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 UTi3-1mfyjep for <yang-doctors@ietfa.amsl.com>; Tue, 25 Aug 2020 10:15:01 -0700 (PDT)
Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 07FD43A0FBE for <yang-doctors@ietf.org>; Tue, 25 Aug 2020 10:15:00 -0700 (PDT)
Received: by mail-lf1-x136.google.com with SMTP id d2so6855374lfj.1 for <yang-doctors@ietf.org>; Tue, 25 Aug 2020 10:15:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oizgN/cLT8K6mb05gHrpKNCg76IEwPj+8mVPdmOrfvc=; b=cpeevXEvr9NyKKFF/QGt5QbZvAGuvIXMbaXKuVYurayToHGmQdyiGNpnkGj585cVNS HTqA/wXGKF5IzyGCuPI8snVNtd/3UF3crQPJsintp7goc+mh/CKU5XMWAKx9xf3B8GL6 MNP/91SQ14aeXeM/FRQP4z11np/J+m8RRKo18D2FK/aBLcO59+SpUlf5KW9A5RkD45g1 3Bvr0c4kOb5dPQrYYPdi1fF8CITRVMDWjYzep9MlAvIaL/3ZyjWivUWpjAzDxWka/uv9 v7kQYdVL24eNOy0gdPhdQhdMG8tKt9LXo0+oRJc2R6bY9hZL5BDk/sACWh+yK/qmzijD PYKA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oizgN/cLT8K6mb05gHrpKNCg76IEwPj+8mVPdmOrfvc=; b=QngLz96OoLM6ZLdzo60vQaLA37rTnp3bM7X7h93pLMuBgS3hDXIS5BjlTdjWYMz2yy uJj2nE43EsBvwwt60fwSxfABuaGTY9u8f4bBM5w8BWrGHWbgQ0Yd7l9YIz4SG+edOUcB Qyz6EtUq/RizU+06hnQnmcX328T8hOK3hlSknpEgJhNcwhjIS/X3fdpapN3onz2b9PPK sNXbMpns3O026PEs6HIn3/Sa2g9COCvg0ww/c2G0Cj5scgm0RZLTeBczvr6mnt1D4mFq uNL0Xulp85GzOj1KSTxq11Lrv13VVz3hdHwLcrpIrY2wTdmq3ANnkHpSMEViq3yLAfXT TZ4w==
X-Gm-Message-State: AOAM532WC4Bc2lL98IGgNb7bqWMAIRLn4gepgnDStwf9hA6WeRGlep4/ FdW8hwl9BM9C70tUwFdTGDTmF+hsIdXpZJszFBrm+ZXMnRCvig==
X-Google-Smtp-Source: ABdhPJw0ENHUlHSkoaB3qq57vHp5qeI8ILQodVdqHrvrtptxVkCIe/ZDNBKhYrBb/6mtxFdUPkR6G+xmSlE3pVKpEAA=
X-Received: by 2002:ac2:5599:: with SMTP id v25mr4556604lfg.22.1598375698691; Tue, 25 Aug 2020 10:14:58 -0700 (PDT)
MIME-Version: 1.0
References: <0100017425c983cb-d9471cc6-34d3-4a49-ab7b-942bca5ae697-000000@email.amazonses.com> <CABCOCHRhE9EqpgKKHpvkCWrmE4JkQN6i5kAF4EMfXF=GA1EVQg@mail.gmail.com> <df41a832-7ebd-9abf-f9e5-d0838797ded0@nic.cz>
In-Reply-To: <df41a832-7ebd-9abf-f9e5-d0838797ded0@nic.cz>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 25 Aug 2020 10:14:47 -0700
Message-ID: <CABCOCHS-1XuWGf8U6z=r+WnTh4zH2qfDhbTX2YaPN2fcZt1twg@mail.gmail.com>
To: Ladislav Lhotka <ladislav.lhotka@nic.cz>
Cc: YANG Doctors <yang-doctors@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000bd152c05adb6d792"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/Zxd83qQ8e-XzRsXV5LFpTaJafv4>
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 17:15:04 -0000

On Tue, Aug 25, 2020 at 10:06 AM Ladislav Lhotka <ladislav.lhotka@nic.cz>
wrote:

>
>
> On 25. 08. 20 17:08, Andy Bierman wrote:
> >
> >
> > On Tue, Aug 25, 2020 at 6:23 AM Kent Watsen <kent@watsen.net
> > <mailto: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?
> >
> >
> > Isn't this a use-case for unique-stmt?
> >
> >    list tenant {
> >        unique "admins/admin/name";
> >        ...
> >    }
> >
>
> I am surprised it is you who is proposing this. :-)
>
> https://mailarchive.ietf.org/arch/msg/netmod/MYq9CT7BKuKBp63urg-q6-GP7mM/
>
>

This is a separate issue about intentionally augmenting a target with
multiple siblings with the same local-name.  This is not CLI friendly
(and that mattered a lot more in 2012 than it does now)



> Lada
>

Andy


>
> >
> >
> >     Kent
> >
> >
> >
> > Andy
> >
> >
> >     _______________________________________________
> >     yang-doctors mailing list
> >     yang-doctors@ietf.org <mailto:yang-doctors@ietf.org>
> >     https://www.ietf.org/mailman/listinfo/yang-doctors
> >
> >
> > _______________________________________________
> > yang-doctors mailing list
> > yang-doctors@ietf.org
> > https://www.ietf.org/mailman/listinfo/yang-doctors
> >
>
> --
> Ladislav Lhotka
> Head, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67
>
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors
>