Re: [netmod] leafref and identityref

Martin Bjorklund <mbj@tail-f.com> Mon, 21 October 2019 11:40 UTC

Return-Path: <mbj@tail-f.com>
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 E7236120110 for <netmod@ietfa.amsl.com>; Mon, 21 Oct 2019 04:40:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-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 jX15b16SBPwe for <netmod@ietfa.amsl.com>; Mon, 21 Oct 2019 04:40:44 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 76C231200F6 for <netmod@ietf.org>; Mon, 21 Oct 2019 04:40:44 -0700 (PDT)
Received: from localhost (unknown [173.38.220.41]) by mail.tail-f.com (Postfix) with ESMTPSA id C94231AE018A; Mon, 21 Oct 2019 13:40:42 +0200 (CEST)
Date: Mon, 21 Oct 2019 13:40:14 +0200 (CEST)
Message-Id: <20191021.134014.40553165389352172.mbj@tail-f.com>
To: lhotka@nic.cz
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <8736fmtk3d.fsf@nic.cz>
References: <8736fmtk3d.fsf@nic.cz>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/snQDW5vNm-tpF-Si9gro6VOPV_0>
Subject: Re: [netmod] leafref and identityref
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Mon, 21 Oct 2019 11:40:46 -0000

Hi,

Ladislav Lhotka <lhotka@nic.cz>; wrote:
> Hi,
> 
> consider the following situation:
> 
> module A {
>   ...
>   prefix a
>   identity X;
>   leaf foo {
>     type identityref {
>       base X;
>     }
>   }
> }
> 
> module B {
>   ...
>   import A {
>     prefix a;
>   }
>   leaf fooref {
>     type leafref {
>       path "/a:foo";
>     }
>   }
> }
> 
> What is now a correct lexical form of fooref's value? Could it be just
> 'X', or is the prefix required, i.e. 'a:X'?
> 
> This is not very clear from RFC 7950 (sections 9.9.4 and 9.10.3). I am
> inclined to require the prefix.

9.10.3 says:

   If the prefix is not
   present, the namespace of the identityref is the default namespace
   in effect on the element that contains the identityref value.


so the interpretation of a missing prefix in "fooref" is that the
identity is defined in module B.

(a missing prefix in "foo" means that the identity is defined in
module A)



/martin