netmod-wg / yang-next

Feature requests for future versions of YANG
6 stars 0 forks source link

Introduce XPath function datastore() #58

Open llhotka opened 6 years ago

llhotka commented 6 years ago

The expression datastore(name) would select the root node of datastore name, where name is the name of a datastore.

YANG rules for accessible trees are sometimes too limiting. For example, it is occassionaly useful to be able to refer to state data in XPath expressions on configuration nodes.

YANG rules could then also be simplified: the default tree will always be the "local" tree, and nodes in other datastores can be referenced explicitly via datastore(name).

mbj4668 commented 6 years ago

I can see how this can be useful in retrieval filters etc. But is the proposal that a must expression on a config node can refer to operational nodes?

llhotka commented 6 years ago

Yes, this could be one case. For example, one can check that certain hardware is present or that an IP address is set on an interface, even if it happened via DHCP.

kwatsen commented 5 years ago

Andy: big change Martin: there is a reason why we don't want refs to opstate Martin: is this a solution to Issue #41 ? Robert: would be nice to be able to check hardware capabilities from config...

kwatsen commented 3 months ago

Use case: be able to ref to system capabilties (e.g., num VPNs supported)

Use case good. Solution not good.

Close this issue, open another, more specific issue.