Re: [netmod] NETCONF server handling of 'when' statements

Martin Bjorklund <mbj@tail-f.com> Thu, 03 May 2018 11:27 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 C899112D875 for <netmod@ietfa.amsl.com>; Thu, 3 May 2018 04:27:50 -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_PASS=-0.001, URIBL_BLOCKED=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 fhJUmTD34drJ for <netmod@ietfa.amsl.com>; Thu, 3 May 2018 04:27:49 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id CABA412D80F for <netmod@ietf.org>; Thu, 3 May 2018 04:27:48 -0700 (PDT)
Received: from localhost (unknown [173.38.220.61]) by mail.tail-f.com (Postfix) with ESMTPSA id C31391AE030D; Thu, 3 May 2018 13:27:47 +0200 (CEST)
Date: Thu, 03 May 2018 13:27:47 +0200 (CEST)
Message-Id: <20180503.132747.1307909722991424896.mbj@tail-f.com>
To: rwilton@cisco.com
Cc: jason.sterne@nokia.com, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <903d8476-9e01-2ad7-cfe1-fe02283bb076@cisco.com>
References: <AM0PR07MB38442E8CF930E0D216C218459B800@AM0PR07MB3844.eurprd07.prod.outlook.com> <903d8476-9e01-2ad7-cfe1-fe02283bb076@cisco.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/N-W1-4gvg4SWhxMFupyMne1lvlo>
Subject: Re: [netmod] NETCONF server handling of 'when' 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: Thu, 03 May 2018 11:27:51 -0000

Robert Wilton <rwilton@cisco.com> wrote:

[...]

> Personally, I really dislike the implicit delete behaviour of when
> statements in steps (2) and (3) because I think that it adds a lot of
> unnecessarily complexity in the processing, and has a very surprising
> interaction with NACM.  I would much rather that the client was forced
> to delete everything explicitly.  I.e. rather than auto deleting some
> config due to an invalid when expression, instead just reject the
> config change with an appropriate error.  I would be all for changing
> this behaviour in a future version of YANG. :-)

This has been discussed quite a lot in the past...  Think of "when" as
a generalized version of "choice".  If you don't want the
auto-deletion aspects of "when", then use "must".  I agree that it is
a sharp tool; so use it with care.  But as with many sharp tools, it
is quite handy when used properly.


/martin

 


> 
> Thanks,
> Rob
> 
> 
> > Rgds,
> >
> > Jason
> >
> >
> >
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://secure-web.cisco.com/1fuFv0na4qfxbvBYug9IKC-mmyzxu1yP8GNikD9y4MUBFLzTufk-XIyIkQQrHLymAFnh5O5vcA-QoCWAFDfBuEsJQy0DpHJfhfVL3yhtZ6B9hHa0OI17Q2MfqLXBvRC3wylOGP9A2ZzeMn9DMara96FtuGPOLmNufjx3D1jE01LjrKo8uu22WTQMoo0Mn2E9HYQcZIL1UA4WJRTDVY7B3mtjkfWXKRQyGBI0ydzAZKkRO1JVLreMh5cv3ste_WLHzwx7LRVLUxNReQ7Lx4_fe5jRlkjJm8oEjVowunA5cLYRCfIgbGu7DJjhGoh4X1oP4yt7U9imcXzfwjGaHFvrtLRKn7YXWyIwWwkA-bzMFPchPR0MkfiYcZkI9LP3mBmcF/https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fnetmod
>