public NetconfDevice(String name) {
this.name = name;
this.logger = LoggerFactory.getLogger(NetconfDevice.class + "#" + name);
public NetconfDevice(String name) {
this.name = name;
this.logger = LoggerFactory.getLogger(NetconfDevice.class + "#" + name);
// This has to be called from separate thread, not from netty thread calling onSessionUp in DeviceListener.
// Reason: delegate.getSchema blocks thread when waiting for response
// however, if the netty thread is blocked, no incoming message can be processed
// This has to be called from separate thread, not from netty thread calling onSessionUp in DeviceListener.
// Reason: delegate.getSchema blocks thread when waiting for response
// however, if the netty thread is blocked, no incoming message can be processed
remoteSourceProvider = schemaSourceProvider.createInstanceFor(delegate);
deviceContextProvider = new NetconfDeviceSchemaContextProvider(NetconfDevice.this, remoteSourceProvider);
deviceContextProvider.createContextFromCapabilities(capabilities);
remoteSourceProvider = schemaSourceProvider.createInstanceFor(delegate);
deviceContextProvider = new NetconfDeviceSchemaContextProvider(NetconfDevice.this, remoteSourceProvider);
deviceContextProvider.createContextFromCapabilities(capabilities);
logger.debug("Client capabilities {}", capabilities);
for (QName capability : capabilities) {
logger.debug("Client capabilities {}", capabilities);
for (QName capability : capabilities) {
- return listener.sendRequest(toRpcMessage(rpc, input, getSchemaContext()));
+ return listener.sendRequest(toRpcMessage(rpc, input, getSchemaContext()), rpc);
public DataCommitTransaction<InstanceIdentifier, CompositeNode> requestCommit(
DataModification<InstanceIdentifier, CompositeNode> modification) {
NetconfDeviceTwoPhaseCommitTransaction twoPhaseCommit = new NetconfDeviceTwoPhaseCommitTransaction(this,
public DataCommitTransaction<InstanceIdentifier, CompositeNode> requestCommit(
DataModification<InstanceIdentifier, CompositeNode> modification) {
NetconfDeviceTwoPhaseCommitTransaction twoPhaseCommit = new NetconfDeviceTwoPhaseCommitTransaction(this,