Why would it not make sense? Is your question about the datastores proposal?
Usually an action will refer to some object that is defined as configuration
and/or state, and may depend on the particular properties of that object.
Here is a YANG fragment showing one possible application:
list ospf-instance {
config true;
leaf id {type string;}
leaf supports-graceful-restart {type boolean;}
}
rpc ospf-graceful-restart {
input {
leaf instance-id {type leafref {path "/ospf-instance/id";}}
must
"/ospf-instance[id=current()/instance-id]/supports-graceful-restart = 'true'" {
error-message "Instance does not support graceful restart";
}
}
}
As another application, a "mute transmitter" command might only apply to
digital radio interfaces.
Alex
________________________________________
From: netmod <[email protected]> on behalf of Kent Watsen
<[email protected]>
Sent: Wednesday, 2 August 2017 3:37 a.m.
To: [email protected]
Subject: [netmod] accessible tree for rpcs?
RFC 7950, S6.4.1. (XPath Context) says:
o If the XPath expression is defined in a substatement to an "input"
statement in an "rpc" or "action" statement, the accessible tree
is the RPC or action operation instance, all state data in the
server, and the running configuration datastore. The root node
has top-level data nodes in all modules as children.
Additionally, for an RPC, the root node also has the node
representing the RPC operation being defined as a child. The node
representing the operation being defined has the operation's input
parameters as children.
o If the XPath expression is defined in a substatement to an
"output" statement in an "rpc" or "action" statement, the
accessible tree is the RPC or action operation instance, all state
data in the server, and the running configuration datastore. The
root node has top-level data nodes in all modules as children.
Additionally, for an RPC, the root node also has the node
representing the RPC operation being defined as a child. The node
representing the operation being defined has the operation's
output parameters as children.
Does it make sense for input/output to access "all state data in the
server, and the running configuration datastore"? How would this be
used?
Kent // contributor
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod