cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
270
Views
0
Helpful
5
Replies
Highlighted
Cisco Employee

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

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
Cisco Employee

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

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
Cisco Employee

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

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

Highlighted
Cisco Employee

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

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.

Highlighted
Cisco Employee

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

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

Highlighted
Cisco Employee

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

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

Highlighted
Cisco Employee

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

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.