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 <[email protected]>

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

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

To : Sudhanshu Kumar Srivastav<[email protected]>, null<[email protected]>

CC : KARTHIKEYAN SUBRAMANIAM<[email protected]>, cpgs .<[email protected]>

 

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
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to