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

Sudhanshu Kumar Srivastav <sk.srivastav@samsung.com> Fri, 15 September 2017 14:29 UTC

Return-Path: <sk.srivastav@samsung.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 CE5A9133343 for <netmod@ietfa.amsl.com>; Fri, 15 Sep 2017 07:29:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.196
X-Spam-Level:
X-Spam-Status: No, score=-6.196 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 B_vh_uDmWwnR for <netmod@ietfa.amsl.com>; Fri, 15 Sep 2017 07:29:03 -0700 (PDT)
Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8237C12421A for <netmod@ietf.org>; Fri, 15 Sep 2017 07:29:03 -0700 (PDT)
Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20170915142900epoutp01029a9339c2a3d8cc61e38830512aed85~kj04U1lMs0861308613epoutp015 for <netmod@ietf.org>; Fri, 15 Sep 2017 14:29:00 +0000 (GMT)
Received: from epsmges5p2new.samsung.com (unknown [182.195.42.74]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20170915142900epcas5p457e07281b289c633c28ccba2cce51808~kj03wtNsV1992119921epcas5p4z; Fri, 15 Sep 2017 14:29:00 +0000 (GMT)
X-AuditID: b6c32a4a-f79896d000000f29-8c-59bbe3ac4494
Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id E7.3F.03881.CA3EBB95; Fri, 15 Sep 2017 23:29:00 +0900 (KST)
Mime-Version: 1.0
Reply-To: sk.srivastav@samsung.com
Sender: Sudhanshu Kumar Srivastav <sk.srivastav@samsung.com>
From: Sudhanshu Kumar Srivastav <sk.srivastav@samsung.com>
To: Robert Wilton <rwilton@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>
CC: KARTHIKEYAN SUBRAMANIAM <karthikeyan.s@samsung.com>, "cpgs ." <cpgs@samsung.com>, Surendra Pal Sharma <s.p.sharma@samsung.com>
X-Priority: 3
X-Content-Kind-Code: NORMAL
In-Reply-To: <c3199b8d-b90a-e1e7-2930-6ed47d823286@cisco.com>
X-Drm-Type: N,general
X-EPLocale: en_US.EUC-KR
X-EPWebmail-Msg-Type: personal
X-Msg-Generator: Mail
X-Msg-Type: PERSONAL
X-Reply-Demand: N
X-Sender: Samsung ElectronicsSRI-Bangalore-CUChief Engineer
X-Sender-IP: 107.110.12.116
X-Local-Sender: Sudhanshu Kumar SrivastavSRI-Bangalore-CU삼성전자Chief Engineer
X-Global-Sender: Sudhanshu Kumar SrivastavSRI-Bangalore-CUSamsung ElectronicsChief Engineer
X-Sender-Code: C10C10ID01ID010915
Message-ID: <20170915142859epcms5p526b9d21b55ddd8f0eb13edfec62efcff@epcms5p5>
Date: Fri, 15 Sep 2017 14:28:59 +0000
X-CMS-MailID: 20170915142859epcms5p526b9d21b55ddd8f0eb13edfec62efcff
Content-Type: multipart/related; boundary="=_NamoWEC-i81mnnsa33"
X-CPGSPASS: Y
X-MTR: 20170915142859epcms5p526b9d21b55ddd8f0eb13edfec62efcff
CMS-TYPE: 105P
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBKsWRmVeSWpSXmKPExsWy7bCmhu6ax7sjDT7+EbZ4eUjTYsGkH8wW 8y82slqcONfHbPHz/w52B1aPKb83snosWfKTyaNvyyrGAOYoLpuU1JzMstQifbsEroz/326w FDy9wFzx9uExtgbGG0eYuxg5OSQETCSaz65ngbDFJC7cW8/WxcjFISSwm1Hixbnt7F2MHBy8 AoISf3cIg9QIC9hI3OyfDFYvJKAk0biilwUmfuj7MVYQm03ASuJJ/3kwW0TAS2L1mTssIDOZ BVoYJbZ9usoGsYxXYkb7U6jF0hLbl29lBNnFKWArsfFvMkRYVOLm6rfsELaExOqFz6Fa5SSm fV3DDFPz/th8RghbRKL13lmouKDEg5+7oeK5Eh3725lhVv39d4QR5B4JgW5GiVdXbkE5Uxgl 9p98ArXBXOJyfy9YN6+Ar8T66U/AulkEVCX6p02Hmuoi8f70XSYQm1nAQeLG573sMI81bPwN DjgJoGdePBCCKOGT6P39hAmiRE3i7J0HbBMYVWYhgncWkkEQtqLElO6HULaGROucuVC2jcTs 68dYMNWoSvw6sIR1ASP7KkbJ1ILi3PTUYtMCo7zUcr3ixNzi0rx0veT83E2M4DSl5bWDcdk5 n0OMAhyMSjy8Ghd3RwqxJpYVV+YeYlQBmvVow+oLjFIsefl5qUoivLvvA6V5UxIrq1KL8uOL SnNSiw8xSnOwKInzHttZGikkkJ5YkpqdmlqQWgSTZeLglGpgXBStpyXt0qbxsHz7ycfL8m7t Dzyt+7N7mcxng9cTnrzIqDkuUuvKvmjLUialTWKJKpH1aaK7S+9JXmSPXrvommf/2frZ63l+ N+2+88R26poTt6r0vqT3ROV+cVx5Z57GjEfLfC5NZDSONnjyY6bNmp0s19qOqTZVMPXsDpI9 9Et3u6Bv1sX77UosxRmJhlrMRcWJALnjSoZbAwAA
X-CMS-RootMailID: 20170913073034epcms5p3ba5e2a0c180d8cd9f4464d8e5921d106
X-RootMTR: 20170913073034epcms5p3ba5e2a0c180d8cd9f4464d8e5921d106
References: <c3199b8d-b90a-e1e7-2930-6ed47d823286@cisco.com> <20170913073034epcms5p3ba5e2a0c180d8cd9f4464d8e5921d106@epcms5p3> <CGME20170913073034epcms5p3ba5e2a0c180d8cd9f4464d8e5921d106@epcms5p5>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/A2wJB5TAar3w4Um55w7pCemb-kM>
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: Fri, 15 Sep 2017 14:29:07 -0000

Dear  Robert,

 

   Thanks a lot for your feedback. It gave me other key areas to be considered which can be impacted due to the suggested idea.

 

   With respect to first feedback, I think there is slight difference in suggested idea and that is "Model the formula as schema, not as Data".  So it's getting statically included at server and not programmed dynamically.

   As I think "Modeling formula" as Data may have security implications. 

 

   I am going through the feedbacks provided in details, I will check and come back to this.

 

Regards

Sudhanshu

 

--------- Original Message ---------

Sender : Robert Wilton <rwilton@cisco.com>

Date : 2017-09-13 15:11 (GMT+5:30)

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

To : Sudhanshu Kumar Srivastav<sk.srivastav@samsung.com>, null<netmod@ietf.org>

CC : KARTHIKEYAN SUBRAMANIAM<karthikeyan.s@samsung.com>, cpgs .<cpgs@samsung.com>

 

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" rel="nofollow">https://www.ietf.org/internet-drafts/draft-srivastav-netmod-formulae-00.txt
Status:        
https://datatracker.ietf.org/doc/draft-srivastav-netmod-formulae/" rel="nofollow">https://datatracker.ietf.org/doc/draft-srivastav-netmod-formulae/
Htmlized:      
https://tools.ietf.org/html/draft-srivastav-netmod-formulae-00" rel="nofollow">https://tools.ietf.org/html/draft-srivastav-netmod-formulae-00
Htmlized:      
https://datatracker.ietf.org/doc/html/draft-srivastav-netmod-formulae-00" rel="nofollow">https://datatracker.ietf.org/doc/html/draft-srivastav-netmod-formulae-00

 

Regards

Sudhanshu

http://ext.samsung.net/mail/ext/v1/external/status/update?userid=sk.srivastav&do=bWFpbElEPTIwMTcwOTEzMDczMDM0ZXBjbXM1cDNiYTVlMmEwYzE4MGQ4Y2Q5ZjQ0NjRkOGU1OTIxZDEwNiZyZWNpcGllbnRBZGRyZXNzPW5ldG1vZEBpZXRmLm9yZw__" width="0" height="0">

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod" rel="nofollow">https://www.ietf.org/mailman/listinfo/netmod

http://ext.samsung.net/mail/ext/v1/external/status/update?userid=sk.srivastav&do=bWFpbElEPTIwMTcwOTE1MTQyODU5ZXBjbXM1cDUyNmI5ZDIxYjU1ZGRkOGYwZWIxM2VkZmVjNjJlZmNmZiZyZWNpcGllbnRBZGRyZXNzPW5ldG1vZEBpZXRmLm9yZw__" border="0" width="0" height="0">