From 5884cff8a540212e613cdf4d634bcde3210a982f Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Mon, 13 Mar 2017 14:32:54 +0100 Subject: [PATCH] Netconf transactions synchronization GBP part 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 --- renderers/vpp/pom.xml | 9 ++- .../renderer/vpp/iface/InterfaceManager.java | 18 ++--- .../vpp/policy/acl/AccessListWrapper.java | 10 +-- .../policy/acl/EgressAccessListWrapper.java | 3 +- .../policy/acl/IngressAccessListWrapper.java | 3 +- .../vpp/util/GbpNetconfTransaction.java | 78 +++++++++++++++++-- .../vpp/util/GbpNetconfTransactionTest.java | 22 +++--- 7 files changed, 109 insertions(+), 34 deletions(-) diff --git a/renderers/vpp/pom.xml b/renderers/vpp/pom.xml index 63f679dea..815ceda35 100644 --- a/renderers/vpp/pom.xml +++ b/renderers/vpp/pom.xml @@ -59,6 +59,11 @@ vbd-api 1.1.0-SNAPSHOT + + org.opendaylight.honeycomb.vbd + vbd-impl + 1.1.0-SNAPSHOT + org.opendaylight.mdsal.model opendaylight-l2-types @@ -111,13 +116,15 @@ org.apache.felix maven-bundle-plugin - true org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.vpp_renderer.rev160425.*, org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.vpp_adapter.rev161201.* + + * + diff --git a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/iface/InterfaceManager.java b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/iface/InterfaceManager.java index ad77da246..4a9417459 100644 --- a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/iface/InterfaceManager.java +++ b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/iface/InterfaceManager.java @@ -145,7 +145,7 @@ public class InterfaceManager implements AutoCloseable { public ListenableFuture 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 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)); diff --git a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/AccessListWrapper.java b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/AccessListWrapper.java index 030198496..2d4ed8911 100644 --- a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/AccessListWrapper.java +++ b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/AccessListWrapper.java @@ -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); } } diff --git a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/EgressAccessListWrapper.java b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/EgressAccessListWrapper.java index 8a348db3b..b2209d351 100644 --- a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/EgressAccessListWrapper.java +++ b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/EgressAccessListWrapper.java @@ -39,7 +39,8 @@ public class EgressAccessListWrapper extends AccessListWrapper { .setType(VppAcl.class) .build(); Egress egressAcl = new EgressBuilder().setVppAcls(ImmutableList.of(vppAcl)).build(); - GbpNetconfTransaction.write(mountPoint, egressRefIid, egressAcl, GbpNetconfTransaction.RETRY_COUNT); + GbpNetconfTransaction.netconfSyncedWrite(mountPoint, egressRefIid, egressAcl, + GbpNetconfTransaction.RETRY_COUNT); } private InstanceIdentifier outboundIfaceAclRefIid(InstanceIdentifier ifaceIid) { diff --git a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/IngressAccessListWrapper.java b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/IngressAccessListWrapper.java index afdd1da61..93e2e4ed5 100644 --- a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/IngressAccessListWrapper.java +++ b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/acl/IngressAccessListWrapper.java @@ -39,7 +39,8 @@ public class IngressAccessListWrapper extends AccessListWrapper { .setType(VppAcl.class) .build(); Ingress egressAcl = new IngressBuilder().setVppAcls(ImmutableList.of(vppAcl)).build(); - GbpNetconfTransaction.write(mountPoint, ingressRefIid, egressAcl, GbpNetconfTransaction.RETRY_COUNT); + GbpNetconfTransaction.netconfSyncedWrite(mountPoint, ingressRefIid, egressAcl, + GbpNetconfTransaction.RETRY_COUNT); } private InstanceIdentifier outboundIfaceAclRefIid(InstanceIdentifier ifaceIid) { diff --git a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransaction.java b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransaction.java index 74905a4e0..12f5b6acf 100644 --- a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransaction.java +++ b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransaction.java @@ -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 data type + * @return true if transaction is successful, false otherwise + */ + public static boolean netconfSyncedWrite(@Nonnull final DataBroker mountpoint, + @Nonnull final InstanceIdentifier 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 data type + * @return true if transaction is successful, false otherwise + */ + public static boolean netconfSyncedDelete(@Nonnull final DataBroker mountpoint, + @Nonnull final InstanceIdentifier 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 generic data type. Has to be child of {@link DataObject} * @return true if transaction is successful, false otherwise */ - public static synchronized boolean write(final DataBroker mountpoint, + private static boolean write(final DataBroker mountpoint, final InstanceIdentifier 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 iid = VppIidFactory.getInterfaceIID(command.getInterfaceBuilder().getKey()); @@ -157,7 +223,7 @@ public class GbpNetconfTransaction { * @param generic data type. Has to be child of {@link DataObject} * @return true if transaction is successful, false otherwise */ - public static synchronized boolean deleteIfExists(final DataBroker mountpoint, + private static boolean deleteIfExists(final DataBroker mountpoint, final InstanceIdentifier 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 +} diff --git a/renderers/vpp/src/test/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransactionTest.java b/renderers/vpp/src/test/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransactionTest.java index 7fa27d596..7e9c503dc 100644 --- a/renderers/vpp/src/test/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransactionTest.java +++ b/renderers/vpp/src/test/java/org/opendaylight/groupbasedpolicy/renderer/vpp/util/GbpNetconfTransactionTest.java @@ -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 +} -- 2.36.6