cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1197
Views
0
Helpful
5
Replies

How does the tailf:action extension differ from the yang rpc statement?

martmitc
Cisco Employee
Cisco Employee

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;

      }

    }

  }

1 Accepted Solution

Accepted Solutions

mmalysz
Cisco Employee
Cisco Employee

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.

View solution in original post

5 Replies 5

mmalysz
Cisco Employee
Cisco Employee

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.

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.

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

I was thinking more in the case of the northbound using NETCONF, as agree it doesn't really make much difference for RESTCONF.

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: