Netconf transactions synchronization GBP part 64/52964/4
authorMichal Cmarada <mcmarada@cisco.com>
Mon, 13 Mar 2017 13:32:54 +0000 (14:32 +0100)
committerMichal Cmarada <mcmarada@cisco.com>
Wed, 15 Mar 2017 09:58:26 +0000 (10:58 +0100)
adding mechanism to sync transactions between GBP and VBD
this is used as a workaround for bug https://bugs.opendaylight.org/show_bug.cgi?id=7918
In order for this workaround to work GBP uses Reentrant lock from VBD to synchronize transactions.
It is needed to use netconfSyncedWrite and netconfSyncedDelete from GbpNetconfTransaction
for all write and delete operations to netconf device.

Change-Id: I4f74c376a06adb5aec058710ccbb8ed069103483
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
renderers/vpp/pom.xml
renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/iface/InterfaceManager.java
renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/AccessListWrapper.java
renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/EgressAccessListWrapper.java
renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/IngressAccessListWrapper.java
renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransaction.java
renderers/vpp/src/test/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransactionTest.java

index 63f679dea7ff19634a3d138876e1e74cf525586e..815ceda351a1cbcf0324e79f5d265c0fa1a4cc39 100644 (file)
       <artifactId>vbd-api</artifactId>
       <version>1.1.0-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.honeycomb.vbd</groupId>
+      <artifactId>vbd-impl</artifactId>
+      <version>1.1.0-SNAPSHOT</version>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.model</groupId>
       <artifactId>opendaylight-l2-types</artifactId>
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <extensions>true</extensions>
         <configuration>
           <instructions>
             <Export-Package>
               org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.vpp_renderer.rev160425.*,
               org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.vpp_adapter.rev161201.*
             </Export-Package>
+            <Import-Package>
+              *
+            </Import-Package>
           </instructions>
         </configuration>
       </plugin>
index ad77da246c7e5e1280d936a2ca81b296afac1e8d..4a9417459cd64e50d20e59b2f8078261f94f4731 100644 (file)
@@ -145,7 +145,7 @@ public class InterfaceManager implements AutoCloseable {
 
     public ListenableFuture<Void> createInterfaceOnVpp(final ConfigCommand createIfaceWithoutBdCommand,
                                                        final DataBroker vppDataBroker) {
-        final boolean transactionState = GbpNetconfTransaction.write(vppDataBroker, createIfaceWithoutBdCommand,
+        final boolean transactionState = GbpNetconfTransaction.netconfSyncedWrite(vppDataBroker, createIfaceWithoutBdCommand,
                 GbpNetconfTransaction.RETRY_COUNT);
         if (transactionState) {
             LOG.trace("Creating Interface on VPP: {}", createIfaceWithoutBdCommand);
@@ -161,7 +161,7 @@ public class InterfaceManager implements AutoCloseable {
                                                                        final DataBroker vppDataBroker,
                                                                        final VppEndpoint vppEndpoint,
                                                                        final InstanceIdentifier<?> vppNodeIid) {
-        final boolean transactionState = GbpNetconfTransaction.write(vppDataBroker, createIfaceWithoutBdCommand,
+        final boolean transactionState = GbpNetconfTransaction.netconfSyncedWrite(vppDataBroker, createIfaceWithoutBdCommand,
                 GbpNetconfTransaction.RETRY_COUNT);
         if (transactionState) {
             LOG.debug("Create interface on VPP command was successful. VPP: {} Command: {}", vppNodeIid,
@@ -217,8 +217,8 @@ public class InterfaceManager implements AutoCloseable {
 
     private ListenableFuture<Void> deleteIfaceOnVpp(ConfigCommand deleteIfaceWithoutBdCommand,
             DataBroker vppDataBroker, VppEndpoint vppEndpoint, InstanceIdentifier<?> vppNodeIid) {
-        final boolean transactionState = GbpNetconfTransaction.deleteIfExists(vppDataBroker, deleteIfaceWithoutBdCommand,
-                GbpNetconfTransaction.RETRY_COUNT);
+        final boolean transactionState = GbpNetconfTransaction.netconfSyncedDelete(vppDataBroker,
+            deleteIfaceWithoutBdCommand, GbpNetconfTransaction.RETRY_COUNT);
         if (transactionState) {
             LOG.debug("Delete interface on VPP command was successful: VPP: {} Command: {}", vppNodeIid,
                     deleteIfaceWithoutBdCommand);
@@ -392,7 +392,7 @@ public class InterfaceManager implements AutoCloseable {
                 .setBridgedVirtualInterface(enableBvi)
                 .build()).build();
         LOG.debug("Adding bridge domain {} to interface {}", bridgeDomainName, interfacePath);
-        final boolean transactionState = GbpNetconfTransaction.write(mountpoint, l2Iid, l2,
+        final boolean transactionState = GbpNetconfTransaction.netconfSyncedWrite(mountpoint, l2Iid, l2,
                 GbpNetconfTransaction.RETRY_COUNT);
         if (transactionState) {
             LOG.debug("Adding bridge domain {} to interface {} successful", bridgeDomainName, interfacePath);
@@ -426,8 +426,8 @@ public class InterfaceManager implements AutoCloseable {
             .setBridgeDomain(bridgeDomainName)
             .setBridgedVirtualInterface(enableBvi)
             .build()).build();
-        final boolean transactionState = GbpNetconfTransaction.write(mountPoint, VppIidFactory.getL2ForInterfaceIid(ifaceKey),
-                l2, GbpNetconfTransaction.RETRY_COUNT);
+        final boolean transactionState = GbpNetconfTransaction.netconfSyncedWrite(mountPoint,
+            VppIidFactory.getL2ForInterfaceIid(ifaceKey), l2, GbpNetconfTransaction.RETRY_COUNT);
         if (transactionState) {
             LOG.debug("Adding bridge domain {} to interface {}", bridgeDomainName, VppIidFactory.getInterfaceIID(ifaceKey));
             return Futures.immediateFuture(null);
@@ -445,7 +445,7 @@ public class InterfaceManager implements AutoCloseable {
             LOG.warn("Interface already not in bridge domain {} ", ifaceKey);
             return Futures.immediateFuture(null);
         }
-        final boolean transactionState = GbpNetconfTransaction.deleteIfExists(mountPoint,
+        final boolean transactionState = GbpNetconfTransaction.netconfSyncedDelete(mountPoint,
                 VppIidFactory.getL2ForInterfaceIid(ifaceKey), GbpNetconfTransaction.RETRY_COUNT);
         if (transactionState) {
             LOG.debug("Removing bridge domain from interface {}", VppIidFactory.getInterfaceIID(ifaceKey));
@@ -523,7 +523,7 @@ public class InterfaceManager implements AutoCloseable {
                 interfaceIid.builder().augmentation(VppInterfaceAugmentation.class).child(L2.class).build();
         LOG.debug("Deleting bridge domain from interface {}", interfacePath);
         final boolean transactionState =
-                GbpNetconfTransaction.deleteIfExists(mountpoint, l2Iid, GbpNetconfTransaction.RETRY_COUNT);
+                GbpNetconfTransaction.netconfSyncedDelete(mountpoint, l2Iid, GbpNetconfTransaction.RETRY_COUNT);
         if (transactionState) {
             AccessListWrapper.removeAclsForInterface(mountpoint, interfaceIid.firstKeyOf(Interface.class));
             AccessListWrapper.removeAclRefFromIface(mountpoint, interfaceIid.firstKeyOf(Interface.class));
index 030198496fc4058d1d6763774def543657299d44..2d4ed89119c8b3430e5d4c5d6f6bdeabf23a1fda 100644 (file)
@@ -78,8 +78,8 @@ public abstract class AccessListWrapper {
     public void writeAcl(@Nonnull DataBroker mountPoint, @Nonnull InterfaceKey ifaceKey) {
         Acl builtAcl = this.buildVppAcl(ifaceKey);
         LOG.info("Writing access-list {}", builtAcl.getAclName());
-        boolean write = GbpNetconfTransaction.write(mountPoint, VppIidFactory.getVppAcl(resolveAclName(ifaceKey)),
-                builtAcl, GbpNetconfTransaction.RETRY_COUNT);
+        boolean write = GbpNetconfTransaction.netconfSyncedWrite(mountPoint,
+                VppIidFactory.getVppAcl(resolveAclName(ifaceKey)), builtAcl, GbpNetconfTransaction.RETRY_COUNT);
         if (!write) {
             LOG.error("Failed to write rule {}", builtAcl);
         }
@@ -88,14 +88,14 @@ public abstract class AccessListWrapper {
     public static void removeAclsForInterface(@Nonnull DataBroker mountPoint, @Nonnull InterfaceKey ifaceKey) {
         LOG.debug("Removing access-list {}", ifaceKey);
         for (ACE_DIRECTION dir : new ACE_DIRECTION[] {ACE_DIRECTION.INGRESS, ACE_DIRECTION.EGRESS}) {
-        GbpNetconfTransaction.deleteIfExists(mountPoint, VppIidFactory.getVppAcl(ifaceKey.getName() + dir),
-                GbpNetconfTransaction.RETRY_COUNT);
+            GbpNetconfTransaction.netconfSyncedDelete(mountPoint,
+                VppIidFactory.getVppAcl(ifaceKey.getName() + dir), GbpNetconfTransaction.RETRY_COUNT);
         }
     }
 
     public static void removeAclRefFromIface(@Nonnull DataBroker mountPoint, @Nonnull InterfaceKey ifaceKey) {
         LOG.debug("Removing access-lists from interface {}", ifaceKey.getName());
-        GbpNetconfTransaction.deleteIfExists(mountPoint, VppIidFactory.getInterfaceIetfAcl(ifaceKey),
+        GbpNetconfTransaction.netconfSyncedDelete(mountPoint, VppIidFactory.getInterfaceIetfAcl(ifaceKey),
                 GbpNetconfTransaction.RETRY_COUNT);
     }
 }
index 8a348db3bb097212dc2720ae9e49b0e4e8987616..b2209d351162a0f6e371c76ff87ee4f663566254 100644 (file)
@@ -39,7 +39,8 @@ public class EgressAccessListWrapper extends AccessListWrapper {
             .setType(VppAcl.class)
             .build();
         Egress egressAcl = new EgressBuilder().setVppAcls(ImmutableList.<VppAcls>of(vppAcl)).build();
-        GbpNetconfTransaction.write(mountPoint, egressRefIid, egressAcl, GbpNetconfTransaction.RETRY_COUNT);
+        GbpNetconfTransaction.netconfSyncedWrite(mountPoint, egressRefIid, egressAcl,
+            GbpNetconfTransaction.RETRY_COUNT);
     }
 
     private InstanceIdentifier<Egress> outboundIfaceAclRefIid(InstanceIdentifier<Interface> ifaceIid) {
index afdd1da61cceec617ff9ee46fd38a9922afd34ad..93e2e4ed5a983df9b28af3e6bd3d1ef7b4603518 100644 (file)
@@ -39,7 +39,8 @@ public class IngressAccessListWrapper extends AccessListWrapper {
             .setType(VppAcl.class)
             .build();
         Ingress egressAcl = new IngressBuilder().setVppAcls(ImmutableList.<VppAcls>of(vppAcl)).build();
-        GbpNetconfTransaction.write(mountPoint, ingressRefIid, egressAcl, GbpNetconfTransaction.RETRY_COUNT);
+        GbpNetconfTransaction.netconfSyncedWrite(mountPoint, ingressRefIid, egressAcl,
+            GbpNetconfTransaction.RETRY_COUNT);
     }
 
     private InstanceIdentifier<Ingress> outboundIfaceAclRefIid(InstanceIdentifier<Interface> ifaceIid) {
index 74905a4e02099a5c8249b7423005e59c2fc396a3..12f5b6acf3d7322e1563e4ad03015dbd53a13617 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.groupbasedpolicy.renderer.vpp.util;
 
+import javax.annotation.Nonnull;
+
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
@@ -15,6 +17,7 @@ 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.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.groupbasedpolicy.renderer.vpp.commands.ConfigCommand;
+import org.opendaylight.vbd.impl.transaction.VbdNetconfTransaction;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -30,6 +33,70 @@ public class GbpNetconfTransaction {
     public static final byte RETRY_COUNT = 3;
     private static final Logger LOG = LoggerFactory.getLogger(GbpNetconfTransaction.class);
 
+    /***
+     * Netconf wrapper for write and delete operation on a Netconf Device
+     * @param mountpoint    netconf device
+     * @param iid           path for Data to be written to
+     * @param data          data to be written
+     * @param retryCounter  retry counter, will repeat the operation for specified amount of times if transaction fails
+     * @param <T>           data type
+     * @return true if transaction is successful, false otherwise
+     */
+    public static <T extends DataObject> boolean netconfSyncedWrite(@Nonnull final DataBroker mountpoint,
+        @Nonnull final InstanceIdentifier<T> iid, @Nonnull final T data, byte retryCounter) {
+        VbdNetconfTransaction.REENTRANT_LOCK.lock();
+        boolean result = write(mountpoint, iid, data, retryCounter);
+        VbdNetconfTransaction.REENTRANT_LOCK.unlock();
+        return result;
+    }
+
+    /***
+     * Netconf wrapper method for synced requests for write operation on a Netconf Device
+     * @param mountpoint    netconf device
+     * @param command       config command that needs to be executed
+     * @param retryCounter  retry counter, will repeat the operation for specified amount of times if transaction fails
+     * @return true if transaction is successful, false otherwise
+     */
+    public static boolean netconfSyncedWrite(@Nonnull final DataBroker mountpoint, @Nonnull final ConfigCommand command,
+        byte retryCounter) {
+        VbdNetconfTransaction.REENTRANT_LOCK.lock();
+        boolean result = write(mountpoint, command, retryCounter);
+        VbdNetconfTransaction.REENTRANT_LOCK.unlock();
+        return result;
+    }
+
+    /***
+     * Netconf wrapper method for synced requests for delete operation on a Netconf Device
+     * @param mountpoint    netconf device
+     * @param iid           path for Data to be written to
+     * @param retryCounter  retry counter, will repeat the operation for specified amount of times if transaction fails
+     * @param <T>           data type
+     * @return true if transaction is successful, false otherwise
+     */
+    public static <T extends DataObject> boolean netconfSyncedDelete(@Nonnull final DataBroker mountpoint,
+        @Nonnull final InstanceIdentifier<T> iid, byte retryCounter) {
+        VbdNetconfTransaction.REENTRANT_LOCK.lock();
+        boolean result = deleteIfExists(mountpoint, iid, retryCounter);
+        VbdNetconfTransaction.REENTRANT_LOCK.unlock();
+        return result;
+    }
+
+    /***
+     * Netconf wrapper method for synced requests for delete operation on a Netconf Device
+     * @param mountpoint    netconf device
+     * @param command       config command that needs to be executed
+     * @param retryCounter  retry counter, will repeat the operation for specified amount of times if transaction fails
+     * @return true if transaction is successful, false otherwise
+     */
+    public static boolean netconfSyncedDelete(@Nonnull final DataBroker mountpoint,
+        @Nonnull final ConfigCommand command, byte retryCounter) {
+        VbdNetconfTransaction.REENTRANT_LOCK.lock();
+        boolean result = deleteIfExists(mountpoint, command, retryCounter);
+        VbdNetconfTransaction.REENTRANT_LOCK.unlock();
+        return result;
+    }
+
+
     /**
      * Use {@link ConfigCommand} to put data into netconf transaction and submit. Transaction is restarted if failed
      *
@@ -38,8 +105,7 @@ public class GbpNetconfTransaction {
      * @param retryCounter number of attempts
      * @return true if transaction is successful, false otherwise
      */
-    public static synchronized boolean write(final DataBroker mountpoint, final ConfigCommand command,
-                                             byte retryCounter) {
+    private static boolean write(final DataBroker mountpoint, final ConfigCommand command, byte retryCounter) {
         LOG.trace("Netconf WRITE transaction started. RetryCounter: {}", retryCounter);
         Preconditions.checkNotNull(mountpoint);
         final ReadWriteTransaction rwTx = mountpoint.newReadWriteTransaction();
@@ -71,7 +137,7 @@ public class GbpNetconfTransaction {
      * @param <T>          generic data type. Has to be child of {@link DataObject}
      * @return true if transaction is successful, false otherwise
      */
-    public static synchronized <T extends DataObject> boolean write(final DataBroker mountpoint,
+    private static <T extends DataObject> boolean write(final DataBroker mountpoint,
                                                                     final InstanceIdentifier<T> iid,
                                                                     final T data,
                                                                     byte retryCounter) {
@@ -141,7 +207,7 @@ public class GbpNetconfTransaction {
      * @param retryCounter number of attempts
      * @return true if transaction is successful, false otherwise
      */
-    public static synchronized boolean deleteIfExists(final DataBroker mountpoint, final ConfigCommand command,
+    private static boolean deleteIfExists(final DataBroker mountpoint, final ConfigCommand command,
                                               byte retryCounter) {
         Preconditions.checkNotNull(mountpoint);
         InstanceIdentifier<Interface> iid = VppIidFactory.getInterfaceIID(command.getInterfaceBuilder().getKey());
@@ -157,7 +223,7 @@ public class GbpNetconfTransaction {
      * @param <T>          generic data type. Has to be child of {@link DataObject}
      * @return true if transaction is successful, false otherwise
      */
-    public static synchronized <T extends DataObject> boolean deleteIfExists(final DataBroker mountpoint,
+    private static <T extends DataObject> boolean deleteIfExists(final DataBroker mountpoint,
                                                                      final InstanceIdentifier<T> iid,
                                                                      byte retryCounter) {
         LOG.trace("Netconf DELETE transaction started. Data will be read at first. RetryCounter: {}", retryCounter);
@@ -187,4 +253,4 @@ public class GbpNetconfTransaction {
             }
         }
     }
-}
\ No newline at end of file
+}
index 7fa27d596da4f639227fc80f98b950822039d608..7e9c503dc62a5333b2da8852a78a216f66d9fd50 100644 (file)
@@ -67,7 +67,7 @@ public class GbpNetconfTransactionTest {
     public void writeConfigCommandReattemptTest() {
         doThrow(new IllegalStateException()).when(command).execute(rwTx);
 
-        final boolean result = GbpNetconfTransaction.write(dataBroker, command, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedWrite(dataBroker, command, (byte) 5);
         verify(dataBroker, times(6)).newReadWriteTransaction();
         assertFalse(result);
     }
@@ -78,7 +78,7 @@ public class GbpNetconfTransactionTest {
         doNothing().when(command).execute(rwTx);
         when(future.get()).thenReturn(null);
 
-        final boolean result = GbpNetconfTransaction.write(dataBroker, command, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedWrite(dataBroker, command, (byte)5);
         verify(dataBroker, times(1)).newReadWriteTransaction();
         assertTrue(result);
     }
@@ -87,7 +87,7 @@ public class GbpNetconfTransactionTest {
     public void writeDataReattemptTest() {
         doThrow(new IllegalStateException()).when(rwTx).put(LogicalDatastoreType.CONFIGURATION, nodeIid, node, true);
 
-        final boolean result = GbpNetconfTransaction.write(dataBroker, nodeIid, node, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedWrite(dataBroker, nodeIid, node, (byte) 5);
         verify(dataBroker, times(6)).newReadWriteTransaction();
         assertFalse(result);
     }
@@ -98,7 +98,7 @@ public class GbpNetconfTransactionTest {
         doNothing().when(rwTx).put(LogicalDatastoreType.CONFIGURATION, nodeIid, node, true);
         when(future.get()).thenReturn(null);
 
-        final boolean result = GbpNetconfTransaction.write(dataBroker, nodeIid, node, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedWrite(dataBroker, nodeIid, node, (byte) 5);
         verify(dataBroker, times(1)).newReadWriteTransaction();
         assertTrue(result);
     }
@@ -133,7 +133,7 @@ public class GbpNetconfTransactionTest {
         when(futureInterface.get()).thenReturn(Optional.absent());
         doThrow(new IllegalStateException()).when(command).execute(rwTx);
 
-        final boolean result = GbpNetconfTransaction.deleteIfExists(dataBroker, command, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedDelete(dataBroker, command, (byte)5);
         verify(dataBroker, times(1)).newReadOnlyTransaction();
         assertTrue(result);
     }
@@ -147,7 +147,7 @@ public class GbpNetconfTransactionTest {
                 .setKey(new InterfaceKey(INTERFACE_KEY)).build()));
         doThrow(new IllegalStateException()).when(command).execute(rwTx);
 
-        final boolean result = GbpNetconfTransaction.deleteIfExists(dataBroker, command, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedDelete(dataBroker, command, (byte)5);
         verify(dataBroker, times(6)).newReadWriteTransaction();
         assertFalse(result);
     }
@@ -163,7 +163,7 @@ public class GbpNetconfTransactionTest {
         doNothing().when(command).execute(rwTx);
         when(future.get()).thenReturn(null);
 
-        final boolean result = GbpNetconfTransaction.deleteIfExists(dataBroker, command, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedDelete(dataBroker, command, (byte)5);
         verify(dataBroker, times(1)).newReadWriteTransaction();
         assertTrue(result);
     }
@@ -174,7 +174,7 @@ public class GbpNetconfTransactionTest {
         when(futureNode.get()).thenReturn(Optional.absent());
         doThrow(new IllegalStateException()).when(command).execute(rwTx);
 
-        final boolean result = GbpNetconfTransaction.deleteIfExists(dataBroker, nodeIid, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedDelete(dataBroker, nodeIid, (byte)5);
         verify(dataBroker, times(1)).newReadOnlyTransaction();
         assertTrue(result);
     }
@@ -186,7 +186,7 @@ public class GbpNetconfTransactionTest {
                 .setKey(new NodeKey(new NodeId(NODE_ID))).build()));
         doThrow(new IllegalStateException()).when(rwTx).delete(LogicalDatastoreType.CONFIGURATION, nodeIid);
 
-        final boolean result = GbpNetconfTransaction.deleteIfExists(dataBroker, nodeIid, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedDelete(dataBroker, nodeIid, (byte)5);
         verify(dataBroker, times(6)).newReadWriteTransaction();
         assertFalse(result);
     }
@@ -200,8 +200,8 @@ public class GbpNetconfTransactionTest {
         doNothing().when(rwTx).delete(LogicalDatastoreType.CONFIGURATION, nodeIid);
         when(future.get()).thenReturn(null);
 
-        final boolean result = GbpNetconfTransaction.deleteIfExists(dataBroker, nodeIid, (byte)5);
+        final boolean result = GbpNetconfTransaction.netconfSyncedDelete(dataBroker, nodeIid, (byte)5);
         verify(dataBroker, times(1)).newReadWriteTransaction();
         assertTrue(result);
     }
-}
\ No newline at end of file
+}