[NETCONF-430] get-config and edit-config fail with schemaless mount points Created: 15/Jun/17 Updated: 15/Mar/19 Resolved: 28/Jun/17 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Gwenael Lambrouin | Assignee: | Gwenael Lambrouin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 8697 |
| Description |
|
ODL Boron release introduced schemaless netconf mount points [1] to deal with devices that do not offer YANG models. This feature can also be used as a workaround for devices whose YANG model cannot be parsed by ODL. I developed a proof-of-concept ODL application in order to figure out how to work with schemaless netconf mount points. Its code can be found on github [2], and it can be used to reproduce the problem. Getting or editing the configuration of a schemaless-mounted netconf device from the code of an ODL application results in a NullPointerException. Example while trying to read the configuration of a Juniper device: 2017-06-02 11:05:06,955 | ERROR | tp1288045576-189 | ContainerResponse | 232 - com.sun.jersey.jersey-server - 1.17.0 | The RuntimeException could not be mapped to a response, re-throwing to the HTTP container This is quite unexpected because we're working in schemaless mode. So ODL should not look for a schema, and there should not be an exception. The traceback shows that ODL uses a NetconfRpcStructureTransformer, while it should use a SchemalessRpcStructureTransformer. Looking for ODL behaviour at mount time with a debugger, we can see that the NetconfBaseOps object is created with the wrong transformer. As a matter of fact, in the NetconfBaseOps constructor, the "rpc instanceof SchemalessNetconfDeviceRpc" test fails. Investigation shows that rpc is a KeepAliveSalFacade.KeepAliveDomRpcService object, while rpc.deviceRpc is a SchemalessNetconfDeviceRpc object. I will submit a patch that fixes the issue. [1] https://git.opendaylight.org/gerrit/#/c/38300/ [2] https://github.com/b-com/pocnetconfschemaless |
| Comments |
| Comment by Gwenael Lambrouin [ 23/Jun/17 ] |
|
Patch submitted for review here: |
| Comment by Gwenael Lambrouin [ 28/Jun/17 ] |
|
Patch merged on:
|