henkbirkholz / draft-wwx-netmod-event-yang

Other
0 stars 1 forks source link

Provide an ECA usage example to represent condition expression with XPATH function and XPATH expression #9

Open billwuqin opened 4 years ago

billwuqin commented 4 years ago

How to we represent condition expression with XPATH function and XPATH expression, we need to provide one concrete example.

billwuqin commented 4 years ago

Forward Igor's response: Igor said: " We want to use XPath expression to specify an arbitrary logical/mathematical expression, similar to what is possible in any high level programming language (e.g. "C") except that, unlike in "C" , the elements of the Condition expression are referred not by their respective names, rather, by the XPaths pointing to referred data store states.This also applies to Policy Variables, since they are states of the data store governed by the ECA model.

Xufeng, could you provide two simple examples: "

billwuqin commented 4 years ago

Forward Xufeng Liu's response: " Xufeng, could you provide two simple examples: a) a condition that only includes data store states and constants, for example:

TE metric of Link L in Topology T greater than 100 [Xufeng]: "/nw:networks/nw:network[network-id='T']/nt:link[link-id='L']/tet:te/tet:te-link-attributes/tet:te-delay-metric > 100"

b) a condition that also includes a Policy Variable, for example:

Allocated bandwidth of Link L in Topology T greater than 75% of what is stored in Policy Variable B [Xufeng]: "/nw:networks/nw:network[network-id='T']/nt:link[link-id='L']/tet:te/tet:te-link-attributes/tet:max-resv-link-bandwidth > (ietf-eca:policy-variables/policy-variable[name='B']/policy-value) * 0.75"

"

billwuqin commented 4 years ago

Good, have incorporated this example in the appendix of ECA model draft.