[CONTROLLER-114] RESTCONF Operations (RPC) Toaster invocation not working ? Created: 15/Jan/14 Updated: 25/Jul/23 Resolved: 25/Feb/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | David Bainbridge | Assignee: | Maros Marsalek |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Linux |
||
| Issue Links: |
|
||||||||
| External issue ID: | 311 | ||||||||
| Priority: | High | ||||||||
| Description |
|
I am attempting to understand the ODP RESTCONF interface and using the toaster sample to experiment. Based on the YANG file and the readings I can find, it looks like the following URL should invoke a "make-toast" operation: http://admin:admin@<host>:<port>/restconf/operations/toast:make-toast This URL gives and exception, I also tried "toaster:make-toast", but this also gives an exception. I am not entirely sure if this is an bug or pilot error, but just to have it checked out, I am submitting it as an error. |
| Comments |
| Comment by David Bainbridge [ 15/Jan/14 ] |
|
traced this through the code a bit, it looks like the module / rpc is found correctly in terms of the yang definition. it seems to run into issue as it gets to the RpcRouter instance and mapping it to an actual implementation, which is what you would expect based on the error message. |
| Comment by David Bainbridge [ 15/Jan/14 ] |
|
Issue seems to be that when we get to the implementation (RpcRouterImpl) the "implementations" member of this class is an empty list. So the next question is how and when is this list meant to be populated. |
| Comment by David Bainbridge [ 15/Jan/14 ] |
|
It looks like the RPC is registered against a broker instance of type org.opendaylight.controller.sal.binding.impl.BindingAwareBrokerImpl, but RESTCONF is attempting to look it up using a broker instance of org.opendaylight.controller.sal.dom.broker.BrokerImpl. |
| Comment by Tony Tkacik [ 20/Jan/14 ] |
|
Yes, but in the runtime BindingIndependentConnector is started, which does the translation between BindingAwareBroker (sal.binding.broker) and Binding Independent Broker (sal.dom.broker) |
| Comment by Tony Tkacik [ 19/Feb/14 ] |
|
Fix is submitted to code review: https://git.opendaylight.org/gerrit/#/c/5414/ |