Re: [netmod] Interaction of 'when' and 'default' statements

Martin Bjorklund <mbj@tail-f.com> Wed, 22 March 2017 17:52 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 97E2D129B72 for <netmod@ietfa.amsl.com>; Wed, 22 Mar 2017 10:52:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-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 mIgVJgSt-31Q for <netmod@ietfa.amsl.com>; Wed, 22 Mar 2017 10:52: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 EF8EB129BCD for <netmod@ietf.org>; Wed, 22 Mar 2017 10:52:43 -0700 (PDT)
Received: from localhost (h-148-188.a165.priv.bahnhof.se [176.10.148.188]) by mail.tail-f.com (Postfix) with ESMTPSA id EC3931AE05F4; Wed, 22 Mar 2017 18:52:42 +0100 (CET)
Date: Wed, 22 Mar 2017 18:52:42 +0100
Message-Id: <20170322.185242.1479962682961917887.mbj@tail-f.com>
To: wivory@Brocade.com
Cc: netmod@ietf.org, brownn@Brocade.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <ae8d8d4e64e34dc8bb21fac7d90eb2c0@EMEAWP-EXMB12.corp.brocade.com>
References: <ae8d8d4e64e34dc8bb21fac7d90eb2c0@EMEAWP-EXMB12.corp.brocade.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/MXjrzaXBXELYEsklwi7sG1YSchM>
Subject: Re: [netmod] Interaction of 'when' and 'default' statements
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: Wed, 22 Mar 2017 17:52:45 -0000

William Ivory <wivory@Brocade.com> wrote:
> Hi,
> 
> I'm looking for clarification of the 'when' and 'default' statements
> on a leaf.  For example, if a leaf has a 'default', can it also have a
> 'when' statement that could cause it to disappear if the 'when'
> condition evaluates to false?

Yes, and in that case the default doesn't apply.

> Section 8.3 or RFC 6020 isn't clear on
> how evaluation of constraints should be done here, and neither the
> section on the 'when' statement nor the 'default' section have any
> cross-references.

If the "when" expression evaluates to false, it's like if the whole
node doesn't exist.  A client can't set it etc.


/martin