Re: [netmod] YANG identities and identityref's

Ladislav Lhotka <lhotka@nic.cz> Thu, 03 May 2018 18:40 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D902512DA06 for <netmod@ietfa.amsl.com>; Thu, 3 May 2018 11:40:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.999
X-Spam-Level:
X-Spam-Status: No, score=-6.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 jZBnoN4HlKvs for <netmod@ietfa.amsl.com>; Thu, 3 May 2018 11:40:49 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0ED2212DA28 for <netmod@ietf.org>; Thu, 3 May 2018 11:40:48 -0700 (PDT)
Received: from birdie (unknown [IPv6:2a01:5e0:29:ffff:ffc6:c393:cdb9:8db1]) by mail.nic.cz (Postfix) with ESMTPSA id CF2DA600FB; Thu, 3 May 2018 20:40:46 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1525372846; bh=PpCytVAPx10J45MHFEeUkTKZsOlN+NiyMuXejzJ935w=; h=From:To:Date; b=YFxkCCPPlIgGQi6p1dhyJR4bffbYKaZ03UxssX6x3lCMlnaMG7wXp2t3r35oGXMW6 +S7wmYQ1CecqAoQcd/uDxvLUaOEOhqVrTChEsbAw2rxNx+xUm2j7EyQlJKx89a5u/P 5VfE7Qd3lgw+gv746j8BD92SdJ/ij4Og5ZsqOrdM=
Message-ID: <92458ec3b02ba207239df397d4c8fe9cdbdfd244.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: "Acee Lindem (acee)" <acee@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>
Date: Thu, 03 May 2018 20:40:55 +0200
In-Reply-To: <3B5F31C4-1504-4F0D-875D-A9B559B01A82@cisco.com>
References: <739F53FB-DD16-4AE3-B1D5-C06DC6972FAB@cisco.com> <09f8964cb246be35d82cba2819891cd4210b3bad.camel@nic.cz> <3B5F31C4-1504-4F0D-875D-A9B559B01A82@cisco.com>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.28.1
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/-Y9ScyoBsq9MFV4ihsy9PvaXC80>
Subject: Re: [netmod] YANG identities and identityref's
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 03 May 2018 18:40:52 -0000

On Thu, 2018-05-03 at 18:00 +0000, Acee Lindem (acee) wrote:
> Hi Lada, 
> 
> So you have a base identify of foo-type and subordinates of foo-type-1, foo-
> type-2, ... foo-type-9. You have a data leaf that type identityref foo-type
> but the actual instantiation is not one of the known foo-types. Should a foo-
> type-unknown be defined to return for this case or should one just return foo-
> type? 

Hmm, the actual instantiation looks like invalid data. If the leaf is an
identityref with "foo-type" as its base, then permitted values are exactly those
"foo-type-[1-9]".

If the server supports a particular type, then I would expect it to implement a
module where the identity corresponding to that type is defined.

Lada 

>  
> 
> Thanks,
> Acee
> 
> On 5/3/18, 1:49 PM, "netmod on behalf of Ladislav Lhotka" <netmod-bounces@iet
> f.org on behalf of lhotka@nic.cz> wrote:
> 
>     Hi Acee,
>     
>     I am not sure what you mean by unknown identities. In general, the
> identity used
>     as the base of an identityref (or in Xpath functions derived-from/derived-
> from-
>     or-self) should be the most general identity that can match at the given
> place.
>     
>     Do you have any example illustrating your case?
>     
>     Lada
>     
>     
>     On Thu, 2018-05-03 at 17:30 +0000, Acee Lindem (acee) wrote:
>     > Let’s say one define a base identity with a hierarchy of identifyref’s
> using
>     > it. This will allow for augmentation in future models. Should one also
> define
>     > an identityref for the class of unknown identities? Or, should one
> simply
>     > return the lowest parent in the hierarchy matching the value? Many
> times, this
>     > would be the base identity.
>     >  
>     > Thanks,
>     > Acee
>     > _______________________________________________
>     > netmod mailing list
>     > netmod@ietf.org
>     > https://www.ietf.org/mailman/listinfo/netmod
>     -- 
>     Ladislav Lhotka
>     Head, CZ.NIC Labs
>     PGP Key ID: 0xB8F92B08A9F76C67
>     
>     _______________________________________________
>     netmod mailing list
>     netmod@ietf.org
>     https://www.ietf.org/mailman/listinfo/netmod
>     
> 
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67