Re: [netmod] Using an empty type in a list key

worley@ariadne.com (Dale R. Worley) Wed, 31 August 2016 15:53 UTC

Return-Path: <worley@alum.mit.edu>
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 26B1812D57B for <netmod@ietfa.amsl.com>; Wed, 31 Aug 2016 08:53:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.934
X-Spam-Level:
X-Spam-Status: No, score=-1.934 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_SOFTFAIL=0.665] autolearn=no 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 ZeHtevvr1ZRL for <netmod@ietfa.amsl.com>; Wed, 31 Aug 2016 08:53:41 -0700 (PDT)
Received: from resqmta-ch2-12v.sys.comcast.net (resqmta-ch2-12v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:44]) (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 7FA1012D5CA for <netmod@ietf.org>; Wed, 31 Aug 2016 08:44:28 -0700 (PDT)
Received: from resomta-ch2-19v.sys.comcast.net ([69.252.207.115]) by resqmta-ch2-12v.sys.comcast.net with SMTP id f7fKbuaekxBKTf7ghbfNoh; Wed, 31 Aug 2016 15:44:27 +0000
Received: from hobgoblin.ariadne.com ([73.100.16.189]) by resomta-ch2-19v.sys.comcast.net with SMTP id f7ggbsQXrg3APf7ghbxNiL; Wed, 31 Aug 2016 15:44:27 +0000
Received: from hobgoblin.ariadne.com (hobgoblin.ariadne.com [127.0.0.1]) by hobgoblin.ariadne.com (8.14.7/8.14.7) with ESMTP id u7VFiRqn006972; Wed, 31 Aug 2016 11:44:27 -0400
Received: (from worley@localhost) by hobgoblin.ariadne.com (8.14.7/8.14.7/Submit) id u7VFiQLI006969; Wed, 31 Aug 2016 11:44:26 -0400
X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to worley@alum.mit.edu using -f
From: worley@ariadne.com
To: "Sterne, Jason (Nokia - CA)" <jason.sterne@nokia.com>
In-Reply-To: <A125E53CE190A749957C19483DC79F9F5CD0F6EA@US70TWXCHMBA11.zam.alcatel-lucent.com> (jason.sterne@nokia.com)
Sender: worley@ariadne.com
Date: Wed, 31 Aug 2016 11:44:26 -0400
Message-ID: <87fupl9c4l.fsf@hobgoblin.ariadne.com>
X-CMAE-Envelope: MS4wfFHEgwu2nSSzmAZILVjTiDXUJ2VWg6qrEEvQA/syrdmoG6jhkjFXo1xNx0gl+p9Fzkpr+GaNmsYtwJrN88bpheq9Cx/ElR4domRf2lNpLG7Wja/nMunf 16h8cmINIWdaN0+wgqzGPhwetqYHX8pzvfwT52t0QXNaa2Yi5iUVJNk84Kaw1yyJkQc3Op3N9295GrnbXQgZQjXPzpAcpBuRmtc=
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/4nYK8euCSAI5QXHyO69sfl6GDhg>
Cc: netmod@ietf.org
Subject: Re: [netmod] Using an empty type in a list key
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Wed, 31 Aug 2016 15:53:45 -0000

"Sterne, Jason (Nokia - CA)" <jason.sterne@nokia.com> writes:
> I saw the addition of empty types in list keys in YANG 1.1 but had
> troubles finding more details in the NETMOD list.  Is it discussed in
> the YANG 1.1 issues page (and if so, where is that now ?  I tried an
> old link and it didn't work) ?

> Doesn't the empty type have two states and the absence/presence of the
> leaf/tag indicates those states ?

The empty type has two states in the fullest sense, but remember that
missing values are not treated as first-class values.  In particular, if
a leaf is a key for a list, the leaf element must be present in all list
elements:

   7.8.2.  The list's key Statement

   The combined values of all the leafs specified in the key are used to
   uniquely identify a list entry.  All key leafs MUST be given values
   when a list entry is created.  Thus, any default values in the key
   leafs or their types are ignored.  It also implies that any mandatory
   statement in the key leafs are ignored.

So a leaf with empty type can be included in the key, but since it
always has the same value, it has no effect.

Dale