NetconfDevice has now has capability to support of rpc implementation which adds support for ODL to send rpcs towards netconf server.
Added fix for commit handler registration. Now the commit handler is registered only and only when mount instance is availible.
Change-Id: I11eced0fda40b3c0cd66fd6477c4df45304d3e18
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
val listener = new NetconfDeviceListener(this);
val task = startClientTask(dispatcher, listener)
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<Void>;
return processingExecutor.submit(task) as Future<Void>;
- //commitHandlerReg = mountInstance.registerCommitHandler(path,this);
}
def Optional<SchemaContext> getSchemaContext() {
}
def Optional<SchemaContext> getSchemaContext() {
deviceContextProvider.createContextFromCapabilities(initialCapabilities);
if (mountInstance != null && schemaContext.isPresent) {
mountInstance.schemaContext = schemaContext.get();
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);
}
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)
}
} catch (Exception e) {
logger.error("Netconf client NOT started. ", e)