I am working in a project which I try to use tailf. JNC package. I try to create action request and I can see JNC has the API : NetconfSession.action().
When I dig into the function and I can see there is an encoding function : encode_action().
This is the encoding required by tailf:action custom extension. The old standard YANG 1.0 (RFC 6020) defined only rpc for custom RPCs, and they could be used only on the top level; ConfD introduced the extension to allow custom RPCs to be defined anywhere in the data model. The requirements of tailf:action and action are almost identical, one notable difference is the XML encoding, but ConfD obviously accepts the standard as well as the custom variant.
Thank you for explanation. OK, this explain why this encoder also works for “action”.
Since this a custom RPCs in Confd extension, is that possible later version Confd won’t accept the custom variant any more ?
The custom tailf:action is going to stay for long and the corresponding encoding too, that’s for sure. The question is if developers do not decide to require that the encoding matches the actual data model, so if you are using 1.1 models with the standard action, you might lose ability to invoke actions with JNC (or maybe not, I really do not know). On the other hand: JNC is open source, and as far as I can tell, it should not be difficult to add a method NetconfSession.rfc_action or something along these lines. I’m pretty sure such contribution would be more than welcome by the maintainer.