Add logging in tx facade along with the RemoteDeviceId 09/47409/1
authorAlexis de Talhouët <adetalhouet@inocybe.com>
Fri, 21 Oct 2016 21:22:53 +0000 (17:22 -0400)
committerTomas Cere <tcere@cisco.com>
Mon, 24 Oct 2016 07:58:10 +0000 (09:58 +0200)
Change-Id: I0e30376d65ff734ff3dc34809554b961a013a15b
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/NetconfDOMDataBroker.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/SlaveSalFacade.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/tx/NetconfMasterDOMTransaction.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/tx/NetconfProxyDOMTransaction.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/tx/NetconfReadOnlyTransaction.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/tx/NetconfWriteOnlyTransaction.java
netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/tx/ReadOnlyTransactionTest.java
netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/tx/WriteOnlyTransactionTest.java

index 99ddc7fa30b7549f63cef6284c156f99eb405cf3..4fadb08ee41725ff58a582989982665928f63dff 100644 (file)
@@ -44,18 +44,18 @@ public class NetconfDOMDataBroker implements DOMDataBroker {
 
     @Override
     public DOMDataReadOnlyTransaction newReadOnlyTransaction() {
-        return new NetconfReadOnlyTransaction(actorSystem, masterDataBroker);
+        return new NetconfReadOnlyTransaction(id, actorSystem, masterDataBroker);
     }
 
     @Override
     public DOMDataReadWriteTransaction newReadWriteTransaction() {
-        return new ReadWriteTx(new NetconfReadOnlyTransaction(actorSystem, masterDataBroker),
-                new NetconfWriteOnlyTransaction(actorSystem, masterDataBroker));
+        return new ReadWriteTx(new NetconfReadOnlyTransaction(id, actorSystem, masterDataBroker),
+                new NetconfWriteOnlyTransaction(id, actorSystem, masterDataBroker));
     }
 
     @Override
     public DOMDataWriteTransaction newWriteOnlyTransaction() {
-        return new NetconfWriteOnlyTransaction(actorSystem, masterDataBroker);
+        return new NetconfWriteOnlyTransaction(id, actorSystem, masterDataBroker);
     }
 
     @Override
index 772020bcaa69a7a09fae5a4528af486d7a2772cf..877436d6cc1d637a525249e775e56f6fa4f3c5d7 100644 (file)
@@ -50,7 +50,7 @@ public class SlaveSalFacade {
         final NetconfDeviceNotificationService notificationService = new NetconfDeviceNotificationService();
 
         final NetconfDOMTransaction proxyDOMTransactions =
-                new NetconfProxyDOMTransaction(actorSystem, masterActorRef);
+                new NetconfProxyDOMTransaction(id, actorSystem, masterActorRef);
 
         final NetconfDOMDataBroker netconfDeviceDataBroker =
                 new NetconfDOMDataBroker(actorSystem, id, proxyDOMTransactions);
index 602eb755032c78b046c7dbbdea573eb711d650a9..33680f2dfc2701212e17ae068b54a82f04528d74 100644 (file)
@@ -28,27 +28,30 @@ import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessag
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.concurrent.Future;
 import scala.concurrent.impl.Promise.DefaultPromise;
 
 public class NetconfMasterDOMTransaction implements NetconfDOMTransaction {
 
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfMasterDOMTransaction.class);
+
+    private final RemoteDeviceId id;
     private final DOMDataBroker delegateBroker;
 
     private DOMDataReadOnlyTransaction readTx;
     private DOMDataWriteTransaction writeTx;
 
     public NetconfMasterDOMTransaction(final RemoteDeviceId id,
-                                       final SchemaContext schemaContext, final DOMRpcService rpc,
+                                       final SchemaContext schemaContext,
+                                       final DOMRpcService rpc,
                                        final NetconfSessionPreferences netconfSessionPreferences) {
-
-        delegateBroker = new NetconfDeviceDataBroker(id, schemaContext, rpc, netconfSessionPreferences);
-
-        // only ever need 1 readTx since it doesnt need to be closed
-        readTx = delegateBroker.newReadOnlyTransaction();
+        this(id, new NetconfDeviceDataBroker(id, schemaContext, rpc, netconfSessionPreferences));
     }
 
-    public NetconfMasterDOMTransaction(final DOMDataBroker delegateBroker) {
+    public NetconfMasterDOMTransaction(final RemoteDeviceId id, final DOMDataBroker delegateBroker) {
+        this.id = id;
         this.delegateBroker = delegateBroker;
 
         // only ever need 1 readTx since it doesnt need to be closed
@@ -58,6 +61,8 @@ public class NetconfMasterDOMTransaction implements NetconfDOMTransaction {
     @Override
     public Future<Optional<NormalizedNodeMessage>> read(final LogicalDatastoreType store,
                                                         final YangInstanceIdentifier path) {
+        LOG.trace("{}: Read[{}] {} via NETCONF: {}", id, readTx.getIdentifier(), store, path);
+
         final CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> readFuture = readTx.read(store, path);
 
         final DefaultPromise<Optional<NormalizedNodeMessage>> promise = new DefaultPromise<>();
@@ -81,6 +86,8 @@ public class NetconfMasterDOMTransaction implements NetconfDOMTransaction {
 
     @Override
     public Future<Boolean> exists(final LogicalDatastoreType store, final YangInstanceIdentifier path) {
+        LOG.trace("{}: Exists[{}] {} via NETCONF: {}", id, readTx.getIdentifier(), store, path);
+
         final CheckedFuture<Boolean, ReadFailedException> existsFuture = readTx.exists(store, path);
 
         final DefaultPromise<Boolean> promise = new DefaultPromise<>();
@@ -103,6 +110,10 @@ public class NetconfMasterDOMTransaction implements NetconfDOMTransaction {
         if (writeTx == null) {
             writeTx = delegateBroker.newWriteOnlyTransaction();
         }
+
+        LOG.trace("{}: Write[{}] {} via NETCONF: {} with payload {}", id, writeTx.getIdentifier(), store,
+                data.getIdentifier(), data.getNode());
+
         writeTx.put(store, data.getIdentifier(), data.getNode());
     }
 
@@ -111,6 +122,10 @@ public class NetconfMasterDOMTransaction implements NetconfDOMTransaction {
         if (writeTx == null) {
             writeTx = delegateBroker.newWriteOnlyTransaction();
         }
+
+        LOG.trace("{}: Merge[{}] {} via NETCONF: {} with payload {}", id, writeTx.getIdentifier(),store,
+                data.getIdentifier(), data.getNode());
+
         writeTx.merge(store, data.getIdentifier(), data.getNode());
     }
 
@@ -119,16 +134,23 @@ public class NetconfMasterDOMTransaction implements NetconfDOMTransaction {
         if (writeTx == null) {
             writeTx = delegateBroker.newWriteOnlyTransaction();
         }
+
+        LOG.trace("{}: Delete[{}} {} via NETCONF: {}", id, writeTx.getIdentifier(), store, path);
+
         writeTx.delete(store, path);
     }
 
     @Override
     public boolean cancel() {
+        LOG.trace("{}: Cancel[{}} via NETCONF", id, writeTx.getIdentifier());
+
         return writeTx.cancel();
     }
 
     @Override
     public Future<Void> submit() {
+        LOG.trace("{}: Submit[{}} via NETCONF", id, writeTx.getIdentifier());
+
         final CheckedFuture<Void, TransactionCommitFailedException> submitFuture = writeTx.submit();
         final DefaultPromise<Void> promise = new DefaultPromise<>();
         Futures.addCallback(submitFuture, new FutureCallback<Void>() {
index 7ed16e7247933b0781b1e6f01828da47a2b8ca4b..e79f83adf67b24064f026b1a1dec2a0f841651a8 100644 (file)
@@ -14,7 +14,11 @@ import akka.dispatch.OnComplete;
 import akka.pattern.Patterns;
 import com.google.common.base.Optional;
 import org.opendaylight.controller.config.util.xml.DocumentedException;
+import org.opendaylight.controller.config.util.xml.DocumentedException.ErrorSeverity;
+import org.opendaylight.controller.config.util.xml.DocumentedException.ErrorTag;
+import org.opendaylight.controller.config.util.xml.DocumentedException.ErrorType;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
 import org.opendaylight.netconf.topology.singleton.api.NetconfDOMTransaction;
 import org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologyUtils;
 import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
@@ -39,10 +43,14 @@ public class NetconfProxyDOMTransaction implements NetconfDOMTransaction {
 
     private static final Logger LOG = LoggerFactory.getLogger(NetconfProxyDOMTransaction.class);
 
+    private final RemoteDeviceId id;
     private final ActorSystem actorSystem;
     private final ActorRef masterContextRef;
 
-    public NetconfProxyDOMTransaction(final ActorSystem actorSystem, final ActorRef masterContextRef) {
+    public NetconfProxyDOMTransaction(final RemoteDeviceId id,
+                                      final ActorSystem actorSystem,
+                                      final ActorRef masterContextRef) {
+        this.id = id;
         this.actorSystem = actorSystem;
         this.masterContextRef = masterContextRef;
     }
@@ -54,15 +62,17 @@ public class NetconfProxyDOMTransaction implements NetconfDOMTransaction {
         final Future<Object> readScalaFuture =
                 Patterns.ask(masterContextRef, new ReadRequest(store, path), NetconfTopologyUtils.TIMEOUT);
 
+        LOG.trace("{}: Read {} via NETCONF: {}", id, store, path);
+
         final DefaultPromise<Optional<NormalizedNodeMessage>> promise = new DefaultPromise<>();
 
         readScalaFuture.onComplete(new OnComplete<Object>() {
             @Override
             public void onComplete(final Throwable failure, final Object success) throws Throwable {
                 if (failure != null) { // ask timeout
-                    Exception exception = new DocumentedException("Master is down. Please try again.",
-                            DocumentedException.ErrorType.application, DocumentedException.ErrorTag.operation_failed,
-                            DocumentedException.ErrorSeverity.warning);
+                    Exception exception = new DocumentedException(id + ":Master is down. Please try again.",
+                            ErrorType.application, ErrorTag.operation_failed,
+                            ErrorSeverity.warning);
                     promise.failure(exception);
                     return;
                 }
@@ -87,14 +97,16 @@ public class NetconfProxyDOMTransaction implements NetconfDOMTransaction {
         final Future<Object> existsScalaFuture =
                 Patterns.ask(masterContextRef, new ExistsRequest(store, path), NetconfTopologyUtils.TIMEOUT);
 
+        LOG.trace("{}: Exists {} via NETCONF: {}", id, store, path);
+
         final DefaultPromise<Boolean> promise = new DefaultPromise<>();
         existsScalaFuture.onComplete(new OnComplete<Object>() {
             @Override
             public void onComplete(final Throwable failure, final Object success) throws Throwable {
                 if (failure != null) { // ask timeout
-                    Exception exception = new DocumentedException("Master is down. Please try again.",
-                            DocumentedException.ErrorType.application, DocumentedException.ErrorTag.operation_failed,
-                            DocumentedException.ErrorSeverity.warning);
+                    Exception exception = new DocumentedException(id + ":Master is down. Please try again.",
+                            ErrorType.application, ErrorTag.operation_failed,
+                            ErrorSeverity.warning);
                     promise.failure(exception);
                     return;
                 }
@@ -110,17 +122,23 @@ public class NetconfProxyDOMTransaction implements NetconfDOMTransaction {
 
     @Override
     public void put(final LogicalDatastoreType store, final NormalizedNodeMessage data) {
+        LOG.trace("{}: Write {} via NETCONF: {} with payload {}", id, store, data.getIdentifier(), data.getNode());
+
         masterContextRef.tell(new PutRequest(store, data), ActorRef.noSender());
 
     }
 
     @Override
     public void merge(final LogicalDatastoreType store, final NormalizedNodeMessage data) {
+        LOG.trace("{}: Merge {} via NETCONF: {} with payload {}", id, store, data.getIdentifier(), data.getNode());
+
         masterContextRef.tell(new MergeRequest(store, data), ActorRef.noSender());
     }
 
     @Override
     public void delete(final LogicalDatastoreType store, final YangInstanceIdentifier path) {
+        LOG.trace("{}: Delete {} via NETCONF: {}", id, store, path);
+
         masterContextRef.tell(new DeleteRequest(store, path), ActorRef.noSender());
     }
 
@@ -128,6 +146,9 @@ public class NetconfProxyDOMTransaction implements NetconfDOMTransaction {
     public boolean cancel() {
         final Future<Object> cancelScalaFuture =
                 Patterns.ask(masterContextRef, new CancelRequest(), NetconfTopologyUtils.TIMEOUT);
+
+        LOG.trace("{}: Cancel {} via NETCONF", id);
+
         try {
             // here must be Await because AsyncWriteTransaction do not return future
             return (boolean) Await.result(cancelScalaFuture, NetconfTopologyUtils.TIMEOUT.duration());
@@ -141,15 +162,17 @@ public class NetconfProxyDOMTransaction implements NetconfDOMTransaction {
         final Future<Object> submitScalaFuture =
                 Patterns.ask(masterContextRef, new SubmitRequest(), NetconfTopologyUtils.TIMEOUT);
 
+        LOG.trace("{}: Submit {} via NETCONF", id);
+
         final DefaultPromise<Void> promise = new DefaultPromise<>();
 
         submitScalaFuture.onComplete(new OnComplete<Object>() {
             @Override
             public void onComplete(final Throwable failure, final Object success) throws Throwable {
                 if (failure != null) { // ask timeout
-                    Exception exception = new DocumentedException("Master is down. Please try again.",
-                            DocumentedException.ErrorType.application, DocumentedException.ErrorTag.operation_failed,
-                            DocumentedException.ErrorSeverity.warning);
+                    Exception exception = new DocumentedException(id + ":Master is down. Please try again.",
+                            ErrorType.application, ErrorTag.operation_failed,
+                            ErrorSeverity.warning);
                     promise.failure(exception);
                     return;
                 }
@@ -157,7 +180,7 @@ public class NetconfProxyDOMTransaction implements NetconfDOMTransaction {
                     promise.failure((Throwable) success);
                 } else {
                     if (success instanceof SubmitFailedReply) {
-                        LOG.error("Transaction was not submitted.");
+                        LOG.error("{}: Transaction was not submitted because already closed.", id);
                     }
                     promise.success(null);
                 }
index 3af25c62b9da599d5aed57466f5af23a78c55dd2..9b386c0a477c80809d7ced1027fa5ea8c01150e6 100644 (file)
@@ -19,18 +19,27 @@ import javax.annotation.Nullable;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
+import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
 import org.opendaylight.netconf.topology.singleton.api.NetconfDOMTransaction;
 import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.concurrent.Future;
 
 public class NetconfReadOnlyTransaction implements DOMDataReadOnlyTransaction {
 
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfReadOnlyTransaction.class);
+
+    private final RemoteDeviceId id;
     private final NetconfDOMTransaction delegate;
     private final ActorSystem actorSystem;
 
-    public NetconfReadOnlyTransaction(final ActorSystem actorSystem, final NetconfDOMTransaction delegate) {
+    public NetconfReadOnlyTransaction(final RemoteDeviceId id,
+                                      final ActorSystem actorSystem,
+                                      final NetconfDOMTransaction delegate) {
+        this.id = id;
         this.delegate = delegate;
         this.actorSystem = actorSystem;
     }
@@ -43,6 +52,9 @@ public class NetconfReadOnlyTransaction implements DOMDataReadOnlyTransaction {
     @Override
     public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(final LogicalDatastoreType store,
                                                                                    final YangInstanceIdentifier path) {
+
+        LOG.trace("{}: Read {} via NETCONF: {}", id, store, path);
+
         final Future<Optional<NormalizedNodeMessage>> future = delegate.read(store, path);
         final SettableFuture<Optional<NormalizedNode<?, ?>>> settableFuture = SettableFuture.create();
         final CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> checkedFuture;
@@ -82,6 +94,9 @@ public class NetconfReadOnlyTransaction implements DOMDataReadOnlyTransaction {
     @Override
     public CheckedFuture<Boolean, ReadFailedException> exists(final LogicalDatastoreType store,
                                                               final YangInstanceIdentifier path) {
+
+        LOG.trace("{}: Exists {} via NETCONF: {}", id, store, path);
+
         final Future<Boolean> existsFuture = delegate.exists(store, path);
         final SettableFuture<Boolean> settableFuture = SettableFuture.create();
         final CheckedFuture<Boolean, ReadFailedException> checkedFuture;
index bef72a256b7f0cba591feabb06c543e99d321210..f938748cbfacda14e00829ae3f484e52a036b7c4 100644 (file)
@@ -20,20 +20,29 @@ import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
+import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
 import org.opendaylight.netconf.topology.singleton.api.NetconfDOMTransaction;
 import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import scala.concurrent.Future;
 
 public class NetconfWriteOnlyTransaction implements DOMDataWriteTransaction {
 
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfWriteOnlyTransaction.class);
+
+    private final RemoteDeviceId id;
     private final NetconfDOMTransaction delegate;
     private final ActorSystem actorSystem;
 
-    public NetconfWriteOnlyTransaction(final ActorSystem actorSystem, final NetconfDOMTransaction delegate) {
+    public NetconfWriteOnlyTransaction(final RemoteDeviceId id,
+                                       final ActorSystem actorSystem,
+                                       final NetconfDOMTransaction delegate) {
+        this.id = id;
         this.delegate = delegate;
         this.actorSystem = actorSystem;
     }
@@ -41,27 +50,37 @@ public class NetconfWriteOnlyTransaction implements DOMDataWriteTransaction {
     @Override
     public void put(final LogicalDatastoreType store, final YangInstanceIdentifier path,
                     final NormalizedNode<?,?> data) {
+        LOG.trace("{}: Write {} via NETCONF: {} with payload {}", id, store, path, data);
+
         delegate.put(store, new NormalizedNodeMessage(path, data));
     }
 
     @Override
     public void merge(final LogicalDatastoreType store, final YangInstanceIdentifier path,
                       final NormalizedNode<?,?> data) {
+        LOG.trace("{}: Merge {} via NETCONF: {} with payload {}", id, store, path, data);
+
         delegate.merge(store, new NormalizedNodeMessage(path, data));
     }
 
     @Override
     public boolean cancel() {
+        LOG.trace("{}: Cancel", id);
+
         return delegate.cancel();
     }
 
     @Override
     public void delete(final LogicalDatastoreType store, final YangInstanceIdentifier path) {
+        LOG.trace("{}: Delete {} via NETCONF: {}", id, store, path);
+
         delegate.delete(store, path);
     }
 
     @Override
     public CheckedFuture<Void, TransactionCommitFailedException> submit() {
+        LOG.trace("{}: Submit", id);
+
         final Future<Void> submit = delegate.submit();
         final SettableFuture<Void> settFuture = SettableFuture.create();
         final CheckedFuture<Void, TransactionCommitFailedException> checkedFuture;
@@ -87,6 +106,8 @@ public class NetconfWriteOnlyTransaction implements DOMDataWriteTransaction {
 
     @Override
     public ListenableFuture<RpcResult<TransactionStatus>> commit() {
+        LOG.trace("{}: Commit", id);
+
         final Future<Void> commit = delegate.submit();
         final SettableFuture<RpcResult<TransactionStatus>> settFuture = SettableFuture.create();
         commit.onComplete(new OnComplete<Void>() {
index 661c51149f64e34b90b3ffd259b7a066af0caaee..c491ee6fe4a41023e18e018bbaedac602cbbdbd9 100644 (file)
@@ -99,7 +99,7 @@ public class ReadOnlyTransactionTest {
         doReturn(readTx).when(delegateDataBroker).newReadOnlyTransaction();
 
         final NetconfDOMTransaction masterDOMTransactions =
-                new NetconfMasterDOMTransaction(delegateDataBroker);
+                new NetconfMasterDOMTransaction(remoteDeviceId, delegateDataBroker);
 
         masterDataBroker =
                 new NetconfDOMDataBroker(system, remoteDeviceId, masterDOMTransactions);
@@ -107,7 +107,7 @@ public class ReadOnlyTransactionTest {
         // Create slave data broker for testing proxy
 
         final NetconfDOMTransaction proxyDOMTransactions =
-                new NetconfProxyDOMTransaction(system, masterRef);
+                new NetconfProxyDOMTransaction(remoteDeviceId, system, masterRef);
 
         slaveDataBroker = new NetconfDOMDataBroker(system, remoteDeviceId, proxyDOMTransactions);
 
index 97b0cec90a2c3784b374b91b91fb09aac7a61ac3..c9fa38f4bd6ba06410079732fbcabb0a879fa637 100644 (file)
@@ -41,6 +41,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
@@ -106,7 +107,7 @@ public class WriteOnlyTransactionTest {
         doReturn(readTx).when(delegateDataBroker).newReadOnlyTransaction();
 
         final NetconfDOMTransaction masterDOMTransactions =
-                new NetconfMasterDOMTransaction(delegateDataBroker);
+                new NetconfMasterDOMTransaction(remoteDeviceId, delegateDataBroker);
 
         masterDataBroker =
                 new NetconfDOMDataBroker(system, remoteDeviceId, masterDOMTransactions);
@@ -114,7 +115,7 @@ public class WriteOnlyTransactionTest {
         // Create slave data broker for testing proxy
 
         final NetconfDOMTransaction proxyDOMTransactions =
-                new NetconfProxyDOMTransaction(system, masterRef);
+                new NetconfProxyDOMTransaction(remoteDeviceId, system, masterRef);
 
         slaveDataBroker = new NetconfDOMDataBroker(system, remoteDeviceId, proxyDOMTransactions);