Re: [netmod] draft-srivastav-netmod-formulae-00

Robert Wilton <rwilton@cisco.com> Wed, 13 September 2017 09:41 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 9C47C13301E for <netmod@ietfa.amsl.com>; Wed, 13 Sep 2017 02:41:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.499
X-Spam-Level:
X-Spam-Status: No, score=-14.499 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, URIBL_BLOCKED=0.001, 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 Gwg99vMfoPRz for <netmod@ietfa.amsl.com>; Wed, 13 Sep 2017 02:41:35 -0700 (PDT)
Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EA6661321A7 for <netmod@ietf.org>; Wed, 13 Sep 2017 02:41:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=60135; q=dns/txt; s=iport; t=1505295695; x=1506505295; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to; bh=K/ywVsKLk6/1wq2LCNcniSo/Kkgf0MKqRTSW9U7+vE4=; b=EhNUOSFYdtzPEl9RPFRGWgZZuRtDKBYGM7yFXJT7kgcK3TOOnsTBN6Nh 6Q1vJCB9L+9l1MPgKTX+buGTixsk8jbIsTyqeaNhlbR5uJgH44bC8aw3c z7/2hABoe3e2XYZuH2QEJQtCcAKnAT1iHkJHoK6awo5v5achguFUWKG98 o=;
X-Files: 201602111742151_N3WZA6X7.png : 33527
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BWBwBW/LhZ/xbLJq1dGQEBAQEBAQEBAQEBBwEBAQEBgm8+gRFuJ4N3ixWQeSuQZ4VNggEDBwECGAEHhE9PAoUMFQECAQEBAQEBAWsohRkBAQQBAQMeCkELEAkCGAUBAQEiAgICFQEOATAGAQwFAQIBAQIVihYQjxOdZoInJ4sPAQEBAQEBAQEBAQEBAQEBAQEBAQEBDg+BIYIKg1KCDguCcoMngRgRES2CfBaCSwWRKYcNiEKGWgGBAIx3ghOFaINaJIZ7jVqHVYE5NSKBDTIhCBwVICqHHT82AYV4gkEBAQE
X-IronPort-AV: E=Sophos;i="5.42,387,1500940800"; d="png'150?scan'150,208,217,150";a="657429577"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Sep 2017 09:41:32 +0000
Received: from [10.63.23.66] (dhcp-ensft1-uk-vla370-10-63-23-66.cisco.com [10.63.23.66]) by aer-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id v8D9fWgd012950; Wed, 13 Sep 2017 09:41:32 GMT
To: sk.srivastav@samsung.com, "netmod@ietf.org" <netmod@ietf.org>
Cc: KARTHIKEYAN SUBRAMANIAM <karthikeyan.s@samsung.com>, "cpgs ." <cpgs@samsung.com>
References: <CGME20170913073034epcms5p3ba5e2a0c180d8cd9f4464d8e5921d106@epcms5p3> <20170913073034epcms5p3ba5e2a0c180d8cd9f4464d8e5921d106@epcms5p3>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <c3199b8d-b90a-e1e7-2930-6ed47d823286@cisco.com>
Date: Wed, 13 Sep 2017 10:41:32 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <20170913073034epcms5p3ba5e2a0c180d8cd9f4464d8e5921d106@epcms5p3>
Content-Type: multipart/alternative; boundary="------------10939D576D7DD9B32C2DC8F2"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/vOcTm8pZznMNquGJuWOF8KbaHf0>
Subject: Re: [netmod] draft-srivastav-netmod-formulae-00
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, 13 Sep 2017 09:41:38 -0000

Hi Sudhanshu,


Thanks for posting this.


The premise of what you are trying to achieve here is interesting.  My 
interpretation is that your idea is to allow a NETCONF/RESTCONF 
server/device to take existing data in the operational state data tree 
and to construct new derived data (or perhaps just metadata) by 
executing a client defined algorithm that is described via extensions 
statements to YANG.


This broadly seems a reasonable idea to me, but I'm not sure that I 
would implement it in quite the same way, and I've put forward some 
other points or issues that you may want to consider.


1) In particular, rather than modeling the expression directly in YANG 
using YANG extensions, which effectively makes the expression look like 
quite a verbose abstract syntax tree, I think that you may be better off 
defining a separate expression language, similar to how Xpath is used 
today.  Probably it could be related to Xpath, perhaps it could be a 
superset.


E.g .to take your example in 3.10, I think that it would be better if 
the expression was written more like a normal mathematical expression.  
E.g. I think that the following would be easier to read/understand.  
Obviously an implementation needs to parse the expression, but that 
shouldn't be too difficult, and they would need to write code to 
interpret the expression anyway.

    container formula {
       leaf a {
          type int32;
       }
       ... leaves b to d defined similarly ...
       leaf e {
          type int32;
       }
       mt:math x {
         leaf x {
           type int32;
           mt:expression"((a+b) - (c-d)/(e*100))";
         }
       }

2) I think that there are some questions about how these expressions 
would get programmed into the device.  Are they statically included as 
part of the schema loaded by the NETCONF/RESTCONF server?  Or are they 
programmed dynamically via the NETCONF/RESTCONF client.  For the latter 
case it would be necessary to either define new RPC operations, or 
perhaps better a configuration and operational YANG data model to manage 
the expressions.


3) I think that it would also need to be considered whether the 
constructed expression values are represented as new nodes in the YANG 
schema (which would probably prevent them from be constructed 
dynamically), or perhaps they should make use of YANG metadata (RFC 
7952) instead so that the base underlying schema isn't changed.


4) Any solution should probably also consider how it would inter-operate 
with the work currently being doing in NETCONF on YANG push and related 
technologies.


5) They may be security implications of allowing a client to execute 
arbitrarily complex expressions would may degrade the performance of the 
system, although perhaps the memory and cpu available to execute the 
expressions could be limited.


I hope the brief feedback is useful.  I'm not sure how familiar you are 
with the IETF process, but please note that these comments just 
represent my personal opinion and do not necessarily reflect those of 
the wider participants in the NETMOD WG. Other opinions may, and in my 
experience probably will, differ :-)


Thanks,
Rob



On 13/09/2017 08:30, Sudhanshu Kumar Srivastav wrote:
>
> Dear NETMOD Team,
>
>   I have submitted a draft for new YANG module that defines new YANG 
> extension statements and method to model the formulae/KPI's.
>
>   Request you to please check and provide your comments.
>
> *Draft Details:*
>
> Name: draft-srivastav-netmod-formulae
> Revision: 00
> Title: YANG extension Statements for formulae modeling
> Document date: 2017-09-12
> Group: Individual Submission
> Pages: 28
> URL: 
> https://www.ietf.org/internet-drafts/draft-srivastav-netmod-formulae-00.txt
> Status: https://datatracker.ietf.org/doc/draft-srivastav-netmod-formulae/
> Htmlized: https://tools.ietf.org/html/draft-srivastav-netmod-formulae-00
> Htmlized: 
> https://datatracker.ietf.org/doc/html/draft-srivastav-netmod-formulae-00
>
> Regards
>
> Sudhanshu
>
>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod