01-22-2018 08:57 AM - edited 03-01-2019 04:05 AM
As per the title, trying to understand is these are equivalent
rpc doSomething {
input {
leaf action {
type string;
}
}
output {
leaf dummy {
type string;
}
}
}
and
tailf:action doSomething {
input {
leaf action {
type string;
}
}
output {
leaf dummy {
type string;
}
}
}
Solved! Go to Solution.
01-22-2018 01:27 PM
The difference is that rpc is defined at the top level in the data model. That is how YANG RFC defines it. Now tailf:action is an extension that allows you to put rpc into any level in the data model.
01-22-2018 01:27 PM
The difference is that rpc is defined at the top level in the data model. That is how YANG RFC defines it. Now tailf:action is an extension that allows you to put rpc into any level in the data model.
01-22-2018 11:44 PM
Thanks for the clarification, so any northbound system interacting with a device using the tailf:action would also need to support this behaviour, as it is not just something internal to the device implementation.
01-23-2018 04:59 AM
Well for the NB system it is matter of just providing a right context. For example in case of RESTCONF the only difference will be the URL. In both cases it will a POST method and the URL will differ - it will be simply a path to the action point
01-23-2018 05:25 AM
I was thinking more in the case of the northbound using NETCONF, as agree it doesn't really make much difference for RESTCONF.
01-25-2018 01:01 AM
Yes, the agent would need to know what tailf:action is in order to use it. Note that in YANG 1.1 a new keyword "action" has been defined (without the tailf: prefix) as an alternative to rpc, and works the same as tailf:action. Now that all major toolchains support YANG 1.1, there is no reason to use YANG 1.0 for any new work.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide