Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
5175
Description
I have two netconf devices, having the same foo.yang schema but with different revision date.
device 1 has 2015-10-21
device 2 has 2015-11-07
foo.yang defines RPCs, one of them is download-image. Its definition is exactly the same in both revisions.
Both devices are correctly connected and there schema correctly mounted, present in the cache folder.
Calling the RPC on the mounted device failed because of unknown RPC.
Although I can clearly see the RPC listed under "available rpcs".
I believe RESTCONF implementation picked latest revision date for the given namespace.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Server Error</title>
</head>
<body>
<h2>HTTP ERROR 500</h2>
<p>Problem accessing /restconf/operations/network-topology:network-topology/topology/topology-netconf/node/netconf18475580502416/yang-ext:mount/foo:download-image. Reason:
<pre> Server Error</pre>
</p>
<h3>Caused by:</h3>
<pre>java.lang.NullPointerException: Unknown rpc (urn:foo:params:xml:ns:yang:foo?revision=2015-11-07)download-image, available rpcs: [(http://tail-f.com/ns/netconf/transactions/1.0?revision=1969-12-31)start-transaction, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)delete-config, (urn:foo:params:xml:ns:yang:foo?revision=2015-10-21)download-image-status, *(urn:foo:params:xml:ns:yang:foo?revision=2015-10-21)download-image*, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)cancel-commit, (http://tail-f.com/ns/netconf/transactions/1.0?revision=1969-12-31)abort-transaction, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)unlock, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)validate, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)kill-session, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)copy-config, (urn:ietf:params:xml:ns:netconf:notification:1.0?revision=2008-07-14)create-subscription, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)discard-changes, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get, (http://tail-f.com/ns/netconf/query?revision=2014-11-13)reset-query, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)edit-config, (http://tail-f.com/ns/netconf/query?revision=2014-11-13)stop-query, (urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?revision=2010-10-04)get-schema, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)close-session, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)lock, (http://tail-f.com/ns/netconf/query?revision=2014-11-13)fetch-query-result, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)commit, (http://tail-f.com/ns/netconf/transactions/1.0?revision=1969-12-31)prepare-transaction, (http://tail-f.com/ns/netconf/query?revision=2014-11-13)start-query, (http://tail-f.com/ns/netconf/transactions/1.0?revision=1969-12-31)commit-transaction]
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:250)
at org.opendaylight.controller.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:211)
at org.opendaylight.controller.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:71)
at org.opendaylight.controller.sal.connect.netconf.sal.NetconfDeviceRpc.invokeRpc(NetconfDeviceRpc.java:62)
at org.opendaylight.controller.sal.connect.netconf.sal.KeepaliveSalFacade$KeepaliveDOMRpcService.invokeRpc(KeepaliveSalFacade.java:249)
at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc(RestconfImpl.java:444)
at org.opendaylight.controller.sal.restconf.impl.StatisticsRestconfServiceWrapper.invokeRpc(StatisticsRestconfServiceWrapper.java:81)
at org.opendaylight.controller.sal.rest.impl.RestconfCompositeWrapper.invokeRpc(RestconfCompositeWrapper.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[...]
at java.lang.Thread.run(Thread.java:745)