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

From: Sudhanshu Kumar Srivastav <[email-masked]>
Date: Wed, 13 Sep 2017 07:30:34 +0000

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

---

From: Robert Wilton <[email-masked]>
Date: Wed, 13 Sep 2017 10:41:32 +0100

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.
>
> *Draft Details:*
> URL: 
> https://www.ietf.org/internet-drafts/draft-srivastav-netmod-formulae-00.txt
> Htmlized: 
> https://datatracker.ietf.org/doc/html/draft-srivastav-netmod-formulae-00
>
> Regards
>
> Sudhanshu
>
>
>
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

---

From: Sudhanshu Kumar Srivastav <[email-masked]>
Date: Fri, 15 Sep 2017 14:28:59 +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 <[email-masked]>

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

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

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

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

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;
}

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

Dear NETMOD Team,

Draft Details:

Regards

Sudhanshu

---

From: Sudhanshu Kumar Srivastav <[email-masked]>
Date: Fri, 29 Sep 2017 12:57:54 +0000

Hi Robert,

Please find response inline.

[srivastav]    There is slight difference in suggested idea and that is "Model the formula as schema, not as Data".

[srivastav]  formulas are getting statically included at server and not programmed dynamically.  The benefit of this is when formula changes, Just schema need to be changed and updated at server and no change in server is required.

[srivastav]  YANG metadata (RFC 7952) shall be used.

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.
[srivastav]  I don't foresee any inter-operability problem with YANG push technology. Kindly let me know if you foresee any problem.

[srivastav] Modeling formula as schema don't put this security implications, as formula is not getting programmed dynamically.

Kindly let me know how can I proceed further to this idea from conceptualization to  realization in IETF forum.

Regards

Sudhanshu

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

Sender : Sudhanshu Kumar Srivastav <[email-masked]> Chief Engineer/SRI-Bangalore-CU/Samsung Electronics

Date : 2017-09-15 19:58 (GMT+5:30)

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

To : null<[email-masked]>, null<[email-masked]>

CC : KARTHIKEYAN SUBRAMANIAM<[email-masked]>, cpgs .<[email-masked]>, Surendra Pal Sharma<[email-masked]>

Dear  Robert,

Regards

Sudhanshu

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

Hi Sudhanshu,

Thanks for posting this.

container formula {
leaf a {
type int32;
}

Thanks,
Rob

Dear NETMOD Team,

Draft Details:

Regards

Sudhanshu

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Fri, 29 Sep 2017 15:10:34 +0200

Dear Sudhanshu,

I share Robert's concerns. Hard coding expressions in a syntax tree
format in a schema is hardly readable and highly inflexible. Note that
there has been prior work like this in different contexts and one
thing you entirely ignore is that management data is not static;
counter leaf values have no meaning unless you compute a delta over a
time period etc.

You also seem to confuse basic concepts, i.e., protocols like NETCONF
do not parse schema definitions. So why would NETCONF need
enhancements? It should be a design goal to not require protocol
enhancements.

/js

On Fri, Sep 29, 2017 at 12:57:54PM +0000, Sudhanshu Kumar Srivastav wrote:
>    [srivastav]    There is slight difference in suggested idea and
>    that is "Model the formula as schema, not as Data".
> 
> 
> 
>    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.
> 
>    [srivastav]  formulas are getting statically included at server and not
>    programmed dynamically.  The benefit of this is when formula changes, Just
>    schema need to be changed and updated at server and no change in server is
>    required.
> 
> 
> 
>    dynamically), or perhaps they should make use of YANG metadata (RFC 7952)
>    instead so that the base underlying schema isn't changed.
> 
>    [srivastav]  I don't foresee any inter-operability problem with YANG push
>    technology. Kindly let me know if you foresee any problem.
> 
>    [srivastav] Modeling formula as schema don't put this security
>    implications, as formula is not getting programmed dynamically.
> 
> 
> 
> 
> 
>    Kindly let me know how can I proceed further to this idea from
>    conceptualization to  realization in IETF forum.
> 
> 
> 
>    Regards
> 
>    Sudhanshu
> 
> 
> 
>    Sender : Sudhanshu Kumar Srivastav <[email-masked]> Chief
>    Engineer/SRI-Bangalore-CU/Samsung Electronics
> 
>    CC : KARTHIKEYAN SUBRAMANIAM<[email-masked]>, cpgs
>    .<[email-masked]>, Surendra Pal Sharma<[email-masked]>
> 
> 
> 
>    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.
> 
>    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.
> 
>    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;
>        }
>    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.
> 
>    dynamically), or perhaps they should make use of YANG metadata (RFC 7952)
>    instead so that the base underlying schema isn't changed.
> 
>    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
> 
>      [1]https://www.ietf.org/internet-drafts/draft-srivastav-netmod-formulae-00.txt
>      Status:
>      [2]https://datatracker.ietf.org/doc/draft-srivastav-netmod-formulae/
>      Htmlized:
>      [3]https://tools.ietf.org/html/draft-srivastav-netmod-formulae-00
>      Htmlized:
>      [4]https://datatracker.ietf.org/doc/html/draft-srivastav-netmod-formulae-00
> 
> 
> 
>      Regards
> 
>      Sudhanshu
> 
>  [5][email-masked]
>  [6]https://www.ietf.org/mailman/listinfo/netmod
> 
> 
> 
> References
> 
>    Visible links
>    1. https://www.ietf.org/internet-drafts/draft-srivastav-netmod-formulae-00.txt
>    2. https://datatracker.ietf.org/doc/draft-srivastav-netmod-formulae/
>    3. https://tools.ietf.org/html/draft-srivastav-netmod-formulae-00
>    4. https://datatracker.ietf.org/doc/html/draft-srivastav-netmod-formulae-00
>    5. mailto:[email-masked]
>    6. https://www.ietf.org/mailman/listinfo/netmod

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>