Re: [netmod] NMDA <operational> output with "when' condition
Robert Wilton <rwilton@cisco.com> Wed, 11 July 2018 14:38 UTC
Return-Path: <rwilton@cisco.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 577FA1277CC for <netmod@ietfa.amsl.com>; Wed, 11 Jul 2018 07:38:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Level:
X-Spam-Status: No, score=-14.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 Qjx9is4TqYbU for <netmod@ietfa.amsl.com>; Wed, 11 Jul 2018 07:38:57 -0700 (PDT)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 20F1D126CB6 for <netmod@ietf.org>; Wed, 11 Jul 2018 07:38:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=11859; q=dns/txt; s=iport; t=1531319937; x=1532529537; h=subject:to:references:from:message-id:date:mime-version: in-reply-to; bh=hI6gP9TykZcqEXFcIyd0fSaFIJjbmLlTv+/8zdvSiCM=; b=ImtmRxxrzQDqwTdxjbODeSzbjhPGBXW/XjWskTOxGr021n8ypewbGljw allIhxD9pvpjYa5nV2bTQDTOv5uXT86IWVUA32pOHwfIrzXfEU2iHyLuI NqzTbuZzY7xXTIn4xsbRJob4ucdE0IFH7H9Zz+Yhasx5R5nWHsFqQ/yEo I=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AWAgCkFUZb/xbLJq1cGgEBAQEBAgEBAQEIAQEBAYJTgVltEiiMXY04LJAkhwgLGAEKhANGAoJeOBQBAgEBAgEBAm0cDIU3AQEBAwEBK0EbCxguJzAGAQwGAgEBgxwBgX8PqycfhDyFJQWKVT+BECeCaoMZAQGHNgKHZIoLh2gJjyEGiBmFSIw+hVSBWCGBUjMaCBsVO4JpixWFPz4wjWIBAQ
X-IronPort-AV: E=Sophos;i="5.51,338,1526342400"; d="scan'208,217";a="5107055"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 14:38:55 +0000
Received: from [10.63.23.105] (dhcp-ensft1-uk-vla370-10-63-23-105.cisco.com [10.63.23.105]) by aer-core-4.cisco.com (8.15.2/8.15.2) with ESMTP id w6BEcsPi028701; Wed, 11 Jul 2018 14:38:54 GMT
To: Rohit R Ranade <rohitrranade@huawei.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <991B70D8B4112A4699D5C00DDBBF878A6BBD305F@dggeml510-mbx.china.huawei.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <1ba44952-9ff7-ede1-985c-b03e08ff7daa@cisco.com>
Date: Wed, 11 Jul 2018 15:38:54 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0
MIME-Version: 1.0
In-Reply-To: <991B70D8B4112A4699D5C00DDBBF878A6BBD305F@dggeml510-mbx.china.huawei.com>
Content-Type: multipart/alternative; boundary="------------72279F4B8F825AA7AF62AC8B"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9igrhxqVNiW_7DC-3T9ipmK7Rn8>
Subject: Re: [netmod] NMDA <operational> output with "when' condition
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.27
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, 11 Jul 2018 14:39:00 -0000
Hi Rohit, The rule is that the operational state datastore always reports the value in use. So, if f1="foo" and f2="bar" then that is what should be returned. The fact that it violates a when statement is allowed, but in this scenario, not ideal. However, if leaf f2 can hold values even when f1 is not set to "hello" then I don't think the model below is as clear as it could be. Perhaps it would be better as: list list1{ key f1; leaf f1{ type string; } leaf f2{ config false; type string; } leaf f2-cfg-override { when ".../f1='hello'"; type string; description "Force f2 override" } Or, alternatively, remove the when statements from f2, perhaps add a default value "bar", and state in the description that it is only configurable when "f1 is set to hello". Thanks, Rob On 11/07/2018 15:23, Rohit R Ranade wrote: > > Hi All, > > Consider the model below: > > ---------------------------------- > > list list1{ > > key f1; > > leaf f1{ > > type string; > > } > > leaf f2{ > > when ".../f1='hello'"; > > type string; > > } > > } > > The intention of this model is to allow configuration of leaf f2 by > user, only when value of f1 is 'hello'.. For all other values of f1, > say 'foo', the system will internally choose some value say 'bar'. > > When query all fields on <operational>, using condition f1='foo', if > need to output its corresponding f2 value (i.e ‘bar’) the when > condition will get violated . Is there some way to keep the > restriction on <running> , but relaxing it when showing the > <operational> output ? > > RFC 8342 has the below section , but I think we cannot use the > statements below as there is no “abnormal” value here. > > <operational> SHOULD conform to any constraints specified in the data > > model, but given the principal aim of returning "in use" values, it > > is possible that constraints MAY be violated under some circumstances > > (e.g., an *abnormal value* is "in use", the structure of a list is > > being modified, or remnant configuration (see Section 5.3.1) still > > exists). > > Any help is appreciated. > > With Regards, > > Rohit R Ranade > > > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod
- [netmod] NMDA <operational> output with "when' co… Rohit R Ranade
- Re: [netmod] NMDA <operational> output with "when… Robert Wilton