X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2FNetconfDevice.xtend;fp=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2FNetconfDevice.xtend;h=4ae84c7d310c4c4d7b54c7dffa403ec2f8fff5ce;hb=90fe8acf33840e84a50d6df1ed56b6f066879acf;hp=c9fb1fc0b895ffabcd609eed14424e7411856413;hpb=ac317ecb6d40d51ed026272b3b6b788e0e87ea9d;p=controller.git diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.xtend b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.xtend index c9fb1fc0b8..4ae84c7d31 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.xtend +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.xtend @@ -127,12 +127,8 @@ AutoCloseable { val listener = new NetconfDeviceListener(this); val task = startClientTask(dispatcher, listener) - if (mountInstance != null) { - commitHandlerReg = mountInstance.registerCommitHandler(ROOT_PATH, this) - } return processingExecutor.submit(task) as Future; - //commitHandlerReg = mountInstance.registerCommitHandler(path,this); } def Optional getSchemaContext() { @@ -162,11 +158,16 @@ AutoCloseable { deviceContextProvider.createContextFromCapabilities(initialCapabilities); if (mountInstance != null && schemaContext.isPresent) { mountInstance.schemaContext = schemaContext.get(); + val operations = schemaContext.get().operations; + for (rpc : operations) { + mountInstance.addRpcImplementation(rpc.QName, this); + } } updateDeviceState() if (mountInstance != null && confReaderReg == null && operReaderReg == null) { confReaderReg = mountInstance.registerConfigurationReader(ROOT_PATH, this); operReaderReg = mountInstance.registerOperationalReader(ROOT_PATH, this); + commitHandlerReg = mountInstance.registerCommitHandler(ROOT_PATH, this); } } catch (Exception e) { logger.error("Netconf client NOT started. ", e)