From 1f8ee0c2fe6c850664c103627f223ebc5b7cc310 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Sun, 2 Nov 2025 16:43:26 +0100 Subject: [PATCH 1/4] Migrate DataBroker accessors This migrates datastore interactions to use DataObjectIdentifier. Change-Id: Ib3303722a5e7a6cb01af3baebdbb8f685696aa77 Signed-off-by: Robert Varga --- .../HwvtepConnectionManager.java | 2 +- .../HwvtepDataChangeListener.java | 10 +-- .../HwvtepDisconnectCliCmd.java | 4 +- .../HwvtepOperGlobalListener.java | 16 ++--- .../HwvtepSouthboundProvider.java | 7 +- .../HwvtepSouthboundUtil.java | 6 +- .../transact/AbstractTransactCommand.java | 4 +- .../transact/PhysicalPortRemoveCommand.java | 2 +- .../transact/PhysicalPortUpdateCommand.java | 2 +- .../transact/TransactCommandAggregator.java | 20 +++--- .../md/AbstractTransactionCommand.java | 2 +- .../transactions/md/GlobalUpdateCommand.java | 2 +- .../md/HwvtepGlobalRemoveCommand.java | 4 +- .../md/HwvtepLogicalRouterRemoveCommand.java | 2 +- .../md/HwvtepLogicalRouterUpdateCommand.java | 2 +- .../md/HwvtepLogicalSwitchUpdateCommand.java | 2 +- .../md/HwvtepManagerRemoveCommand.java | 7 +- .../md/HwvtepManagerUpdateCommand.java | 5 +- .../md/HwvtepMcastMacsLocalUpdateCommand.java | 6 +- .../HwvtepMcastMacsRemoteUpdateCommand.java | 6 +- .../HwvtepPhysicalLocatorUpdateCommand.java | 4 +- .../md/HwvtepPhysicalPortUpdateCommand.java | 6 +- .../md/HwvtepPhysicalSwitchRemoveCommand.java | 4 +- .../md/HwvtepPhysicalSwitchUpdateCommand.java | 12 ++-- .../md/HwvtepTunnelRemoveCommand.java | 2 +- .../md/HwvtepTunnelUpdateCommand.java | 2 +- .../md/HwvtepUcastMacsLocalUpdateCommand.java | 2 +- .../HwvtepUcastMacsRemoteUpdateCommand.java | 2 +- .../DataChangeListenerTestBase.java | 17 +++-- .../southbound/OvsdbConnectionManager.java | 6 +- .../southbound/OvsdbOperGlobalListener.java | 3 +- .../ovsdb/southbound/SouthboundMapper.java | 5 +- .../ovsdb/southbound/SouthboundProvider.java | 2 +- .../ovsdb/southbound/SouthboundUtil.java | 4 +- .../transact/AutoAttachRemovedCommand.java | 2 +- .../transact/AutoAttachUpdateCommand.java | 3 +- .../ovsdb/transact/TransactUtils.java | 10 +-- .../BridgeConfigReconciliationTask.java | 5 +- .../md/OpenVSwitchUpdateCommand.java | 6 +- .../md/OvsdbAutoAttachRemovedCommand.java | 2 +- .../md/OvsdbAutoAttachUpdateCommand.java | 8 +-- .../md/OvsdbBridgeRemovedCommand.java | 13 ++-- .../md/OvsdbBridgeUpdateCommand.java | 71 +++++++++---------- .../md/OvsdbControllerRemovedCommand.java | 15 ++-- .../md/OvsdbControllerUpdateCommand.java | 7 +- .../md/OvsdbInitialPortUpdateCommand.java | 3 +- .../md/OvsdbManagersRemovedCommand.java | 2 +- .../md/OvsdbManagersUpdateCommand.java | 6 +- .../md/OvsdbNodeRemoveCommand.java | 4 +- .../md/OvsdbPortRemoveCommand.java | 8 +-- .../md/OvsdbPortUpdateCommand.java | 15 ++-- .../md/OvsdbQosRemovedCommand.java | 2 +- .../md/OvsdbQosUpdateCommand.java | 8 +-- .../md/OvsdbQueueRemovedCommand.java | 2 +- .../md/OvsdbQueueUpdateCommand.java | 7 +- .../OvsdbConnectionManagerTest.java | 7 +- .../OvsdbDataTreeChangeListenerTest.java | 2 +- .../southbound/SouthboundMapperTest.java | 6 +- .../southbound/SouthboundProviderTest.java | 12 ++-- .../ovsdb/southbound/SouthboundUtilTest.java | 2 +- .../BridgeConfigReconciliationTaskTest.java | 3 +- .../md/OpenVSwitchUpdateCommandTest.java | 12 ++-- .../md/OvsdbAutoAttachRemovedCommandTest.java | 5 +- .../md/OvsdbAutoAttachUpdateCommandTest.java | 11 +-- .../md/OvsdbBridgeUpdateCommandTest.java | 22 +++--- .../md/OvsdbControllerUpdateCommandTest.java | 5 +- .../md/OvsdbManagersRemovedCommandTest.java | 5 +- .../md/OvsdbManagersUpdateCommandTest.java | 5 +- .../md/OvsdbNodeRemoveCommandTest.java | 6 +- .../md/OvsdbPortRemoveCommandTest.java | 10 +-- .../md/OvsdbPortUpdateCommandTest.java | 9 +-- .../ovsdb/utils/mdsal/utils/MdsalUtils.java | 32 ++++----- .../utils/mdsal/utils/MdsalUtilsAsync.java | 14 ++-- .../utils/NotifyingDataChangeListener.java | 5 +- .../mdsal/utils/MdsalUtilsAsyncTest.java | 2 +- .../utils/mdsal/utils/MdsalUtilsTest.java | 24 ++++--- 76 files changed, 287 insertions(+), 293 deletions(-) diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java index 010850052..eca87386d 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java @@ -566,7 +566,7 @@ public class HwvtepConnectionManager implements OvsdbConnectionListener, AutoClo case ON_DISCONNECT: { ReadTransaction tx = db.newReadOnlyTransaction(); FluentFuture> readNodeFuture = - tx.read(LogicalDatastoreType.CONFIGURATION, iid); + tx.read(LogicalDatastoreType.CONFIGURATION, iid.toIdentifier()); readNodeFuture.addCallback(new FutureCallback>() { @Override diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java index efc396a42..b131601a6 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java @@ -54,9 +54,9 @@ public final class HwvtepDataChangeListener implements DataTreeChangeListener { ReadWriteTransaction tx = db.newReadWriteTransaction(); - tx.delete(LogicalDatastoreType.CONFIGURATION, change.getRootPath().path()); + tx.delete(LogicalDatastoreType.CONFIGURATION, change.path()); try { tx.commit().get(); } catch (ExecutionException | InterruptedException e) { - LOG.error("Failed to delete the node {}", change.getRootPath().path()); + LOG.error("Failed to delete the node {}", change.path()); } }).start(); try { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDisconnectCliCmd.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDisconnectCliCmd.java index 9281e8a3e..4d8e722f3 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDisconnectCliCmd.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDisconnectCliCmd.java @@ -25,7 +25,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; @Service @Command(scope = "hwvtep", name = "disconnect", description = "Disconnect a node") @@ -44,7 +44,7 @@ public class HwvtepDisconnectCliCmd implements Action { final var nodeKey = new NodeKey(new NodeId(new Uri(nodeid + "/disconnect"))); ReadWriteTransaction tx = dataBroker.newReadWriteTransaction(); - tx.put(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.builder(NetworkTopology.class) + tx.put(LogicalDatastoreType.CONFIGURATION, DataObjectIdentifier.builder(NetworkTopology.class) .child(Topology.class, new TopologyKey(HWVTEP_TOPOLOGY_ID)) .child(Node.class, nodeKey) .build(), diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperGlobalListener.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperGlobalListener.java index 9560406c1..6e0da572c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperGlobalListener.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperGlobalListener.java @@ -216,15 +216,15 @@ public final class HwvtepOperGlobalListener implements DataTreeChangeListener mod) { - if (mod.getModificationType() == ModificationType.WRITE && mod.getDataBefore() == null) { - return mod.getDataAfter(); + if (mod.modificationType() == ModificationType.WRITE && mod.dataBefore() == null) { + return mod.dataAfter(); } return null; } private static Node getRemoved(final DataObjectModification mod) { - if (mod.getModificationType() == ModificationType.DELETE) { - return mod.getDataBefore(); + if (mod.modificationType() == ModificationType.DELETE) { + return mod.dataBefore(); } return null; } @@ -237,13 +237,13 @@ public final class HwvtepOperGlobalListener implements DataTreeChangeListener mod) { Node node = null; - switch (mod.getModificationType()) { + switch (mod.modificationType()) { case SUBTREE_MODIFIED: - node = mod.getDataAfter(); + node = mod.dataAfter(); break; case WRITE: - if (mod.getDataBefore() != null) { - node = mod.getDataAfter(); + if (mod.dataBefore() != null) { + node = mod.dataAfter(); } break; default: diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java index 57e80829e..adb92d8bc 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java @@ -39,6 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -147,9 +148,9 @@ public final class HwvtepSouthboundProvider } private void initializeHwvtepTopology(final LogicalDatastoreType type) { - InstanceIdentifier path = InstanceIdentifier - .create(NetworkTopology.class) - .child(Topology.class, new TopologyKey(HwvtepSouthboundConstants.HWVTEP_TOPOLOGY_ID)); + var path = DataObjectIdentifier.builder(NetworkTopology.class) + .child(Topology.class, new TopologyKey(HwvtepSouthboundConstants.HWVTEP_TOPOLOGY_ID)) + .build(); ReadWriteTransaction transaction = dataBroker.newReadWriteTransaction(); FluentFuture hwvtepTp = transaction.exists(type, path); try { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java index 9e8cd32b5..0d8ef52fd 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java @@ -97,7 +97,7 @@ public final class HwvtepSouthboundUtil { } } try (ReadTransaction transaction = db.newReadOnlyTransaction()) { - return transaction.read(logicalDatastoreType, connectionIid).get(); + return transaction.read(logicalDatastoreType, connectionIid.toIdentifier()).get(); } catch (InterruptedException | ExecutionException e) { LOG.error("Read failed from datastore for Node : {}",connectionIid,e); throw new IllegalStateException(e); @@ -116,7 +116,7 @@ public final class HwvtepSouthboundUtil { } } try { - return transaction.read(logicalDatastoreType, connectionIid).get(); + return transaction.read(logicalDatastoreType, connectionIid.toIdentifier()).get(); } catch (InterruptedException | ExecutionException e) { LOG.error("Read failed from datastore for Node : {}",connectionIid,e); throw new IllegalStateException(e); @@ -140,7 +140,7 @@ public final class HwvtepSouthboundUtil { } } try { - return transaction.read(logicalDatastoreType, connectionIid).get(); + return transaction.read(logicalDatastoreType, connectionIid.toIdentifier()).get(); } catch (InterruptedException | ExecutionException e) { LOG.error("Read failed from datastore for Node : {}",connectionIid,e); throw new IllegalStateException(e); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/AbstractTransactCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/AbstractTransactCommand.java index 36ed707a5..523c60444 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/AbstractTransactCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/AbstractTransactCommand.java @@ -333,14 +333,14 @@ public abstract class AbstractTransactCommand, I ext Node removed = TransactUtils.getRemoved(mod); Node updated = TransactUtils.getUpdated(mod); - Node before = mod.getDataBefore(); + Node before = mod.dataBefore(); return diffOf(removed, before, updated, true); } List getUpdated(final DataTreeModification change) { DataObjectModification mod = change.getRootNode(); Node updated = TransactUtils.getUpdated(mod); - Node before = mod.getDataBefore(); + Node before = mod.dataBefore(); return diffOf(updated, before, false); } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortRemoveCommand.java index 8037c085a..6d3d8c954 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortRemoveCommand.java @@ -101,7 +101,7 @@ public class PhysicalPortRemoveCommand extends AbstractTransactCommand { //If the node which physical ports belong to is updated, and physical ports may //be created or updated or deleted, we need to get deleted ones. Node updated = TransactUtils.getUpdated(mod); - Node before = mod.getDataBefore(); + Node before = mod.dataBefore(); if (updated != null && before != null) { List portListUpdated = new ArrayList<>(); for (TerminationPoint tp : updated.nonnullTerminationPoint().values()) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortUpdateCommand.java index 11a4b3322..8b58c3627 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalPortUpdateCommand.java @@ -316,7 +316,7 @@ public class PhysicalPortUpdateCommand final InstanceIdentifier key = change.getRootPath().getRootIdentifier(); final DataObjectModification mod = change.getRootNode(); Node updated = TransactUtils.getUpdated(mod); - Node before = mod.getDataBefore(); + Node before = mod.dataBefore(); if (updated != null && before != null) { List portListUpdated = new ArrayList<>(); List portListBefore = new ArrayList<>(); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommandAggregator.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommandAggregator.java index ee8e01ed2..bb6a2a686 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommandAggregator.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommandAggregator.java @@ -117,36 +117,36 @@ public class TransactCommandAggregator implements TransactCommand { final Map>, List>> updatedData, final Map>, List>> deletedData) { - extractDataChanged(mod.getModifiedChildren(), updatedData, deletedData); + extractDataChanged(mod.modifiedChildren(), updatedData, deletedData); DataObjectModification aug = mod.getModifiedAugmentation( HwvtepGlobalAugmentation.class); if (aug != null) { - extractDataChanged(aug.getModifiedChildren(), updatedData, deletedData); + extractDataChanged(aug.modifiedChildren(), updatedData, deletedData); } DataObjectModification psAug = mod.getModifiedAugmentation( PhysicalSwitchAugmentation.class); if (psAug != null) { - extractDataChanged(psAug.getModifiedChildren(), updatedData, deletedData); + extractDataChanged(psAug.modifiedChildren(), updatedData, deletedData); } } private static void extractDataChanged( - final Collection> children, + final Collection> children, final Map>, List>> updatedData, final Map>, List>> deletedData) { if (children == null) { return; } - for (DataObjectModification child : children) { - Class> childClass = (Class>) child.getDataType(); - switch (child.getModificationType()) { + for (DataObjectModification child : children) { + Class> childClass = (Class>) child.dataType(); + switch (child.modificationType()) { case WRITE: case SUBTREE_MODIFIED: - DataObject dataAfter = child.getDataAfter(); + DataObject dataAfter = child.dataAfter(); if (!(dataAfter instanceof EntryObject identifiable)) { continue; } - DataObject before = child.getDataBefore(); + DataObject before = child.dataBefore(); if (Objects.equals(dataAfter, before)) { /* in cluster reboot scenarios, @@ -158,7 +158,7 @@ public class TransactCommandAggregator implements TransactCommand { addToUpdatedData(updatedData, childClass, identifiable); break; case DELETE: - DataObject dataBefore = child.getDataBefore(); + DataObject dataBefore = child.dataBefore(); if (!(dataBefore instanceof EntryObject identifiable)) { continue; } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/AbstractTransactionCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/AbstractTransactionCommand.java index 0f46a9afd..e80c9aac7 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/AbstractTransactionCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/AbstractTransactionCommand.java @@ -76,7 +76,7 @@ public abstract class AbstractTransactionCommand implement public void addToDeleteTx(ReadWriteTransaction tx, Class> cls, InstanceIdentifier iid, UUID uuid) { if (deviceInfo.isAvailableInOperDs(cls, iid)) { - tx.delete(LogicalDatastoreType.OPERATIONAL, iid); + tx.delete(LogicalDatastoreType.OPERATIONAL, iid.toIdentifier()); } deletedKeys.add(Pair.of(cls, iid)); clearDeviceOpUUID(cls, iid, uuid); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/GlobalUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/GlobalUpdateCommand.java index 15ded0964..05737239e 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/GlobalUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/GlobalUpdateCommand.java @@ -62,7 +62,7 @@ public final class GlobalUpdateCommand extends AbstractTransactionCommand { nodeBuilder.setNodeId(getNodeId(hwvtepGlobal)); HwvtepGlobalAugmentation hwvtepGlobalAugmentation = hwvtepGlobalBuilder.build(); nodeBuilder.addAugmentation(hwvtepGlobalAugmentation); - transaction.merge(LogicalDatastoreType.OPERATIONAL, nodePath, nodeBuilder.build()); + transaction.merge(LogicalDatastoreType.OPERATIONAL, nodePath.toIdentifier(), nodeBuilder.build()); getOvsdbConnectionInstance().setHwvtepGlobalAugmentation(hwvtepGlobalAugmentation); addToDeviceUpdate(TransactionType.ADD, hwvtepGlobal); LOG.info("DEVICE - {} {}", TransactionType.ADD, hwvtepGlobal); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepGlobalRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepGlobalRemoveCommand.java index 6458ca5b4..59bc859f0 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepGlobalRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepGlobalRemoveCommand.java @@ -47,7 +47,7 @@ public class HwvtepGlobalRemoveCommand extends AbstractTransactionCommand { @Override public void execute(ReadWriteTransaction transaction) { FluentFuture> hwvtepGlobalFuture = transaction.read( - LogicalDatastoreType.OPERATIONAL, nodeInstanceIdentifier); + LogicalDatastoreType.OPERATIONAL, nodeInstanceIdentifier.toIdentifier()); try { Optional hwvtepGlobalOptional = hwvtepGlobalFuture.get(); if (hwvtepGlobalOptional.isPresent()) { @@ -68,7 +68,7 @@ public class HwvtepGlobalRemoveCommand extends AbstractTransactionCommand { } else { LOG.warn("{} had no HwvtepGlobalAugmentation", hwvtepNode.getNodeId().getValue()); } - transaction.delete(LogicalDatastoreType.OPERATIONAL, nodeInstanceIdentifier); + transaction.delete(LogicalDatastoreType.OPERATIONAL, nodeInstanceIdentifier.toIdentifier()); } else { LOG.debug("Other southbound plugin instances in cluster are connected to the device," + " not deleting OvsdbNode form data store."); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterRemoveCommand.java index f6fb8af89..f9791ed74 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterRemoveCommand.java @@ -43,7 +43,7 @@ public class HwvtepLogicalRouterRemoveCommand extends AbstractTransactionCommand InstanceIdentifier routerIid = getOvsdbConnectionInstance().getInstanceIdentifier() .augmentation(HwvtepGlobalAugmentation.class) .child(LogicalRouters.class, new LogicalRoutersKey(routerNode)); - transaction.delete(LogicalDatastoreType.OPERATIONAL, routerIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, routerIid.toIdentifier()); getOvsdbConnectionInstance().getDeviceInfo().clearDeviceOperData(LogicalRouters.class, routerIid); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java index 7254ba50e..600a8e9c8 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java @@ -79,7 +79,7 @@ public final class HwvtepLogicalRouterUpdateCommand extends AbstractTransactionC Optional connection = HwvtepSouthboundUtil.readNode(transaction, connectionIId); if (connection.isPresent()) { Node connectionNode = buildConnectionNode(router); - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode); + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), connectionNode); InstanceIdentifier routerIid = getOvsdbConnectionInstance().getInstanceIdentifier() .augmentation(HwvtepGlobalAugmentation.class) .child(LogicalRouters.class, new LogicalRoutersKey(new HwvtepNodeName(router.getName()))); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java index 3f0e8fee3..18bbb4471 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java @@ -59,7 +59,7 @@ public final class HwvtepLogicalSwitchUpdateCommand extends AbstractTransactionC Optional connection = HwvtepSouthboundUtil.readNode(transaction, connectionIId); if (connection.isPresent()) { Node connectionNode = buildConnectionNode(logicalSwitch); - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode); + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), connectionNode); InstanceIdentifier switchIid = getOvsdbConnectionInstance().getInstanceIdentifier() .augmentation(HwvtepGlobalAugmentation.class) .child(LogicalSwitches.class, new LogicalSwitchesKey(new HwvtepNodeName(logicalSwitch.getName()))); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerRemoveCommand.java index f0915fd0c..e0928a428 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerRemoveCommand.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md; import java.util.Collection; @@ -26,11 +25,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class HwvtepManagerRemoveCommand extends AbstractTransactionCommand { - private static final Logger LOG = LoggerFactory.getLogger(HwvtepManagerRemoveCommand.class); - public HwvtepManagerRemoveCommand(HwvtepConnectionInstance key, TableUpdates updates, - DatabaseSchema dbSchema) { + public HwvtepManagerRemoveCommand(HwvtepConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); } @@ -43,7 +40,7 @@ public class HwvtepManagerRemoveCommand extends AbstractTransactionCommand { .augmentation(HwvtepGlobalAugmentation.class) .child(Managers.class, new ManagersKey(new Uri(manager.getTargetColumn().getData()))); // TODO Delete any references - transaction.delete(LogicalDatastoreType.OPERATIONAL, managerIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, managerIid.toIdentifier()); addToDeviceUpdate(TransactionType.DELETE, manager); LOG.info("DEVICE - {} {}", TransactionType.DELETE, manager); } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerUpdateCommand.java index ef8c52a95..9b28155ca 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerUpdateCommand.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md; import java.util.Map; @@ -60,7 +59,7 @@ public final class HwvtepManagerUpdateCommand extends AbstractTransactionCommand if (connection.isPresent()) { LOG.debug("Connection {} is present", connection.orElseThrow()); Node connectionNode = buildConnectionNode(manager); - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode); + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), connectionNode); addToDeviceUpdate(TransactionType.ADD, manager); LOG.info("DEVICE - {} {}", TransactionType.ADD, manager); // TODO: Delete entries that are no longer needed @@ -99,5 +98,3 @@ public final class HwvtepManagerUpdateCommand extends AbstractTransactionCommand // TODO Deletion of other config } } - - diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java index 29d0f2df3..9f29b2016 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java @@ -65,7 +65,7 @@ public final class HwvtepMcastMacsLocalUpdateCommand extends AbstractTransaction final InstanceIdentifier connectionIId = getOvsdbConnectionInstance().getInstanceIdentifier(); // Ensure the node exists - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), new NodeBuilder().setNodeId(getOvsdbConnectionInstance().getNodeId()).build()); final LocalMcastMacs mac = buildLocalMcastMacs(macLocal); @@ -73,11 +73,11 @@ public final class HwvtepMcastMacsLocalUpdateCommand extends AbstractTransaction .child(LocalMcastMacs.class, mac.key()); // Merge update, relying on automatic lifecycle... - transaction.merge(LogicalDatastoreType.OPERATIONAL, macIid, mac); + transaction.merge(LogicalDatastoreType.OPERATIONAL, macIid.toIdentifier(), mac); if (mac.getLocatorSet() == null) { // ... but delete locator set if it is empty // FIXME: can we use .put() of instead of merge/delete? - transaction.delete(LogicalDatastoreType.OPERATIONAL, macIid.child(LocatorSet.class)); + transaction.delete(LogicalDatastoreType.OPERATIONAL, macIid.child(LocatorSet.class).toIdentifier()); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java index b96095178..9552596b6 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java @@ -65,7 +65,7 @@ public final class HwvtepMcastMacsRemoteUpdateCommand extends AbstractTransactio final InstanceIdentifier connectionIId = getOvsdbConnectionInstance().getInstanceIdentifier(); // Ensure the node exists - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), new NodeBuilder().setNodeId(getOvsdbConnectionInstance().getNodeId()).build()); // Prepare the update in internal structures @@ -75,11 +75,11 @@ public final class HwvtepMcastMacsRemoteUpdateCommand extends AbstractTransactio addToUpdateTx(RemoteMcastMacs.class, macIid, macRemote.getUuid(), macRemote); // Merge update, relying on automatic lifecycle... - transaction.merge(LogicalDatastoreType.OPERATIONAL, macIid, mac); + transaction.merge(LogicalDatastoreType.OPERATIONAL, macIid.toIdentifier(), mac); if (mac.getLocatorSet() == null) { // ... but delete locator set if it is empty // FIXME: can we use .put() of instead of merge/delete? - transaction.delete(LogicalDatastoreType.OPERATIONAL, macIid.child(LocatorSet.class)); + transaction.delete(LogicalDatastoreType.OPERATIONAL, macIid.child(LocatorSet.class).toIdentifier()); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java index 88b6c58ed..9aa23d2eb 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java @@ -71,10 +71,10 @@ public final class HwvtepPhysicalLocatorUpdateCommand extends AbstractTransactio tpBuilder.addAugmentation(tpAugmentationBuilder.build()); if (oldPLocRows.containsKey(locUpdate.getKey())) { transaction.merge(LogicalDatastoreType.OPERATIONAL, - tpPath, tpBuilder.build()); + tpPath.toIdentifier(), tpBuilder.build()); } else { transaction.put(LogicalDatastoreType.OPERATIONAL, - tpPath, tpBuilder.build()); + tpPath.toIdentifier(), tpBuilder.build()); } addToUpdateTx(TerminationPoint.class, tpPath, locator.getUuid(), locator); } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java index 0f302ee02..d4f359a8a 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java @@ -137,9 +137,9 @@ public final class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCo setPortFaultStatus(tpAugmentationBuilder, portUpdate); tpBuilder.addAugmentation(tpAugmentationBuilder.build()); if (oldPPRows.containsKey(portUpdateEntry.getKey())) { - transaction.merge(LogicalDatastoreType.OPERATIONAL, tpPath, tpBuilder.build()); + transaction.merge(LogicalDatastoreType.OPERATIONAL, tpPath.toIdentifier(), tpBuilder.build()); } else { - transaction.put(LogicalDatastoreType.OPERATIONAL, tpPath, tpBuilder.build()); + transaction.put(LogicalDatastoreType.OPERATIONAL, tpPath.toIdentifier(), tpBuilder.build()); } NodeId psNodeId = tpPath.firstKeyOf(Node.class).getNodeId(); if (getDeviceInfo().getDeviceOperData(TerminationPoint.class, tpPath) == null) { @@ -212,7 +212,7 @@ public final class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCo private static void deleteEntries(final ReadWriteTransaction transaction, final List> entryIids) { for (InstanceIdentifier entryIid : entryIids) { - transaction.delete(LogicalDatastoreType.OPERATIONAL, entryIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, entryIid.toIdentifier()); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchRemoveCommand.java index b7365f31c..b8668f658 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchRemoveCommand.java @@ -47,8 +47,8 @@ public class HwvtepPhysicalSwitchRemoveCommand extends AbstractTransactionComman .augmentation(HwvtepGlobalAugmentation.class) .child(Switches.class, new SwitchesKey(new HwvtepPhysicalSwitchRef(nodeIid.toIdentifier()))); // TODO handle removal of reference to managed switch from model - transaction.delete(LogicalDatastoreType.OPERATIONAL, nodeIid); - transaction.delete(LogicalDatastoreType.OPERATIONAL, switchIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, nodeIid.toIdentifier()); + transaction.delete(LogicalDatastoreType.OPERATIONAL, switchIid.toIdentifier()); getDeviceInfo().clearDeviceOperData(Node.class, switchIid); addToDeviceUpdate(TransactionType.DELETE, phySwitch); LOG.info("DEVICE - {} {}", TransactionType.DELETE, phySwitch); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java index c2d1c8be5..7c98b39e9 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java @@ -93,12 +93,12 @@ public final class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransaction // Update the connection node to let it know it manages this // Physical Switch Node connectionNode = buildConnectionNode(phySwitch); - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode); + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), connectionNode); // Update the Physical Switch with whatever data we are getting InstanceIdentifier psIid = getInstanceIdentifier(phySwitch); Node psNode = buildPhysicalSwitchNode(connection.orElseThrow(), phySwitch); - transaction.merge(LogicalDatastoreType.OPERATIONAL, psIid, psNode); + transaction.merge(LogicalDatastoreType.OPERATIONAL, psIid.toIdentifier(), psNode); addToDeviceUpdate(TransactionType.ADD, phySwitch); LOG.info("DEVICE - {} {}", TransactionType.ADD, phySwitch); @@ -135,14 +135,14 @@ public final class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransaction InstanceIdentifier psIid = getInstanceIdentifier(newPSwitch); for (String tunnelIp : removedTunnelIps) { InstanceIdentifier tunnelIpsInstanceIdentifier = getTunnelIpIid(tunnelIp, psIid); - transaction.delete(LogicalDatastoreType.OPERATIONAL, tunnelIpsInstanceIdentifier); + transaction.delete(LogicalDatastoreType.OPERATIONAL, tunnelIpsInstanceIdentifier.toIdentifier()); } for (String tunnelIp : addedTunnelIps) { IpAddress ip = TransactUtils.parseIpAddress(tunnelIp); InstanceIdentifier tunnelIpsInstanceIdentifier = getTunnelIpIid(tunnelIp, psIid); TunnelIps tunnelIps = new TunnelIpsBuilder().withKey(new TunnelIpsKey(ip)).setTunnelIpsKey(ip).build(); - transaction.mergeParentStructurePut(LogicalDatastoreType.OPERATIONAL, tunnelIpsInstanceIdentifier, - tunnelIps); + transaction.mergeParentStructurePut(LogicalDatastoreType.OPERATIONAL, + tunnelIpsInstanceIdentifier.toIdentifier(), tunnelIps); } } @@ -233,7 +233,7 @@ public final class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransaction private static void deleteEntries(ReadWriteTransaction transaction, List> entryIids) { for (InstanceIdentifier entryIid : entryIids) { - transaction.delete(LogicalDatastoreType.OPERATIONAL, entryIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, entryIid.toIdentifier()); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelRemoveCommand.java index 6b9c3c0f3..cab04d88c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelRemoveCommand.java @@ -48,7 +48,7 @@ public final class HwvtepTunnelRemoveCommand extends AbstractTransactionCommand try { InstanceIdentifier tunnelIid = getInstanceIdentifier(getOvsdbConnectionInstance(), tunnel); if (tunnelIid != null) { - transaction.delete(LogicalDatastoreType.OPERATIONAL, tunnelIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, tunnelIid.toIdentifier()); LOG.trace("Deleting tunnel {}", tunnelIid); } getOvsdbConnectionInstance().getDeviceInfo().removePhysicalSwitchForTunnel(tunnel.getUuid()); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java index ef27e3fbd..e42bb0c31 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java @@ -95,7 +95,7 @@ public final class HwvtepTunnelUpdateCommand extends AbstractTransactionCommand setBfdStatus(builder, tunnel); Tunnels updatedTunnel = builder.build(); LOG.trace("Built with the intent to store tunnel data {}", updatedTunnel); - transaction.merge(LogicalDatastoreType.OPERATIONAL, tunnelIid, updatedTunnel); + transaction.merge(LogicalDatastoreType.OPERATIONAL, tunnelIid.toIdentifier(), updatedTunnel); // TODO: Deletion of Tunnel BFD config and params } else { LOG.warn("Insuficient information. Unable to update tunnel {}", tunnel.getUuid()); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java index be5adee02..aa37691c4 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java @@ -64,7 +64,7 @@ public final class HwvtepUcastMacsLocalUpdateCommand extends AbstractTransaction LOG.info("DEVICE - {} LocalUcastMacs for Node {} - {}", TransactionType.ADD, connectionIId.firstKeyOf(Node.class).getNodeId().getValue(), ucml); Node connectionNode = buildConnectionNode(ucml); - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode); + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), connectionNode); } private Node buildConnectionNode(final Collection ucml) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java index f5c656ffb..b33b9a9fe 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java @@ -58,7 +58,7 @@ public final class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactio private void updateUcastMacsRemote(ReadWriteTransaction transaction, Collection ucastMacsRemote) { final InstanceIdentifier connectionIId = getOvsdbConnectionInstance().getInstanceIdentifier(); Node connectionNode = buildConnectionNode(ucastMacsRemote); - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode); + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), connectionNode); } private Node buildConnectionNode(final Collection macRemotes) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DataChangeListenerTestBase.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DataChangeListenerTestBase.java index 280fa320c..e3c83cebe 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DataChangeListenerTestBase.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DataChangeListenerTestBase.java @@ -195,13 +195,13 @@ public class DataChangeListenerTestBase extends AbstractDataBrokerTest { void addNode(final LogicalDatastoreType logicalDatastoreType) throws Exception { NodeBuilder nodeBuilder = prepareNode(nodeIid).addAugmentation(new HwvtepGlobalAugmentationBuilder().build()); WriteTransaction transaction = getDataBroker().newWriteOnlyTransaction(); - transaction.mergeParentStructurePut(logicalDatastoreType, nodeIid, nodeBuilder.build()); + transaction.mergeParentStructurePut(logicalDatastoreType, nodeIid.toIdentifier(), nodeBuilder.build()); transaction.commit(); } void deleteNode(final LogicalDatastoreType logicalDatastoreType) { ReadWriteTransaction tx = getDataBroker().newReadWriteTransaction(); - tx.delete(logicalDatastoreType, nodeIid); + tx.delete(logicalDatastoreType, nodeIid.toIdentifier()); tx.commit(); } @@ -228,7 +228,7 @@ public class DataChangeListenerTestBase extends AbstractDataBrokerTest { void deleteData(final LogicalDatastoreType datastoreType, final InstanceIdentifier... iids) { WriteTransaction transaction = getDataBroker().newWriteOnlyTransaction(); for (InstanceIdentifier id : iids) { - transaction.delete(datastoreType, id); + transaction.delete(datastoreType, id.toIdentifier()); } transaction.commit(); } @@ -239,7 +239,8 @@ public class DataChangeListenerTestBase extends AbstractDataBrokerTest { if (LogicalSwitches.class == dataObject) { for (LogicalSwitchesKey key : TestBuilders.logicalSwitches(data).keySet()) { tx.delete(logicalDatastoreType, - nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(LogicalSwitches.class, key)); + nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(LogicalSwitches.class, key) + .toIdentifier()); } } if (TerminationPoint.class == dataObject) { @@ -250,13 +251,15 @@ public class DataChangeListenerTestBase extends AbstractDataBrokerTest { if (RemoteUcastMacs.class == dataObject) { for (RemoteUcastMacsKey key : TestBuilders.remoteUcastMacs(nodeIid, data).keySet()) { tx.delete(logicalDatastoreType, - nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteUcastMacs.class, key)); + nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteUcastMacs.class, key) + .toIdentifier()); } } if (RemoteMcastMacs.class == dataObject) { for (RemoteMcastMacsKey key : TestBuilders.remoteMcastMacs(nodeIid, data).keySet()) { tx.delete(logicalDatastoreType, - nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteMcastMacs.class, key)); + nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteMcastMacs.class, key) + .toIdentifier()); } } tx.commit(); @@ -270,7 +273,7 @@ public class DataChangeListenerTestBase extends AbstractDataBrokerTest { final NodeBuilder nodeBuilder) { Node node = nodeBuilder.build(); WriteTransaction transaction = getDataBroker().newWriteOnlyTransaction(); - transaction.mergeParentStructureMerge(datastoreType, id, node); + transaction.mergeParentStructureMerge(datastoreType, id.toIdentifier(), node); transaction.commit(); return node; } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java index 323ca5eb0..bc9d5ab67 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java @@ -363,7 +363,7 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos try { ReadTransaction transaction = db.newReadOnlyTransaction(); FluentFuture> nodeFuture = transaction.read( - LogicalDatastoreType.OPERATIONAL, nodePath); + LogicalDatastoreType.OPERATIONAL, nodePath.toIdentifier()); transaction.close(); Optional optional = nodeFuture.get(); if (optional.isPresent()) { @@ -515,7 +515,7 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos LOG.debug("{} had no managed nodes", ovsdbNode.getNodeId().getValue()); } } - transaction.delete(LogicalDatastoreType.OPERATIONAL, nodeIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, nodeIid.toIdentifier()); } }); @@ -631,7 +631,7 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos case ON_DISCONNECT: { FluentFuture readNodeFuture; try (ReadTransaction tx = db.newReadOnlyTransaction()) { - readNodeFuture = tx.exists(LogicalDatastoreType.CONFIGURATION, iid); + readNodeFuture = tx.exists(LogicalDatastoreType.CONFIGURATION, iid.toIdentifier()); } readNodeFuture.addCallback(new FutureCallback() { @Override diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbOperGlobalListener.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbOperGlobalListener.java index f95eab7c7..eccab3371 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbOperGlobalListener.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbOperGlobalListener.java @@ -88,7 +88,8 @@ public final class OvsdbOperGlobalListener implements DataTreeChangeListener tx.put(LogicalDatastoreType.OPERATIONAL, key, removedNode)); + txInvoker.invoke( + tx -> tx.put(LogicalDatastoreType.OPERATIONAL, key.toIdentifier(), removedNode)); } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java index 0f5e2e03e..61db14c9a 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java @@ -95,6 +95,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey; import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint32; @@ -174,7 +175,7 @@ public final class SouthboundMapper { } @SuppressWarnings("unchecked") - public static InstanceIdentifier createInstanceIdentifier( + public static DataObjectIdentifier createInstanceIdentifier( final InstanceIdentifierCodec instanceIdentifierCodec, final OvsdbConnectionInstance client, final Bridge bridge) { InstanceIdentifier iid; @@ -186,7 +187,7 @@ public final class SouthboundMapper { } else { iid = createInstanceIdentifier(client, bridge.getName()); } - return iid; + return iid.toIdentifier(); } @SuppressWarnings("unchecked") diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java index f5a9b2a0c..1f0bdd822 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java @@ -211,7 +211,7 @@ public class SouthboundProvider implements DataTreeChangeListener, Aut FluentFuture ovsdbTp = transaction.exists(type, path); try { if (!ovsdbTp.get().booleanValue()) { - transaction.mergeParentStructurePut(type, path, + transaction.mergeParentStructurePut(type, path.toIdentifier(), new TopologyBuilder().setTopologyId(SouthboundConstants.OVSDB_TOPOLOGY_ID).build()); transaction.commit(); } else { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundUtil.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundUtil.java index 730940efe..2b0737fdc 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundUtil.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundUtil.java @@ -101,7 +101,7 @@ public final class SouthboundUtil { if (cachedNode != null) { node = Optional.of((D)cachedNode); } else { - node = transaction.read(LogicalDatastoreType.OPERATIONAL, connectionIid).get(); + node = transaction.read(LogicalDatastoreType.OPERATIONAL, connectionIid.toIdentifier()).get(); } } catch (InterruptedException | ExecutionException e) { LOG.warn("Read Operational/DS for Node failed! {}", connectionIid, e); @@ -118,7 +118,7 @@ public final class SouthboundUtil { if (cachedNode != null) { node = Optional.of((D)cachedNode); } else { - node = transaction.read(LogicalDatastoreType.OPERATIONAL, connectionIid).get(); + node = transaction.read(LogicalDatastoreType.OPERATIONAL, connectionIid.toIdentifier()).get(); } } catch (InterruptedException | ExecutionException e) { LOG.warn("Read Operational/DS for Node failed! {}", connectionIid, e); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachRemovedCommand.java index d16cc636c..5f7fb0722 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachRemovedCommand.java @@ -152,7 +152,7 @@ public class AutoAttachRemovedCommand extends AbstractTransactCommand { final var brIid = doi.toLegacy().firstIdentifierOf(Node.class) .augmentation(OvsdbBridgeAugmentation.class); final Optional optionalBridge = - transaction.read(LogicalDatastoreType.OPERATIONAL, brIid).get(); + transaction.read(LogicalDatastoreType.OPERATIONAL, brIid.toIdentifier()).get(); OvsdbBridgeAugmentation bridge = optionalBridge.orElseThrow(); if (bridge != null && bridge.getAutoAttach() != null && bridge.getAutoAttach().equals(aaUuid)) { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachUpdateCommand.java index cd57ae568..937ec43c1 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachUpdateCommand.java @@ -172,7 +172,8 @@ public class AutoAttachUpdateCommand extends AbstractTransactCommand { .augmentation(OvsdbBridgeAugmentation.class); try (ReadTransaction transaction = state.dataBroker().newReadOnlyTransaction()) { - final var bridgeOptional = transaction.read(LogicalDatastoreType.OPERATIONAL, bridgeIid).get(); + final var bridgeOptional = transaction.read(LogicalDatastoreType.OPERATIONAL, bridgeIid.toIdentifier()) + .get(); if (bridgeOptional.isPresent()) { return bridgeOptional.orElseThrow(); } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtils.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtils.java index 95b3239da..478e4ef4b 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtils.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtils.java @@ -308,11 +308,11 @@ public class TransactUtils { final Collection> paths, final Class clazz, final Predicate> filter) { Map, DataObjectModification> result = new HashMap<>(); - Queue> remainingChanges = new LinkedList<>(changes); - Queue> remainingPaths = new LinkedList<>(paths); + Queue> remainingChanges = new LinkedList<>(changes); + Queue> remainingPaths = new LinkedList<>(paths); while (!remainingChanges.isEmpty()) { - DataObjectModification change = remainingChanges.remove(); - InstanceIdentifier path = remainingPaths.remove(); + DataObjectModification change = remainingChanges.remove(); + InstanceIdentifier path = remainingPaths.remove(); // Is the change relevant? if (clazz.isAssignableFrom(change.dataType())) { @SuppressWarnings("unchecked") @@ -322,7 +322,7 @@ public class TransactUtils { } } // Add any children to the queue - for (DataObjectModification child : change.modifiedChildren()) { + for (DataObjectModification child : change.modifiedChildren()) { remainingChanges.add(child); remainingPaths.add(extendPath(path, child)); } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTask.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTask.java index 26f8634ec..312b5aaf8 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTask.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTask.java @@ -115,7 +115,8 @@ public class BridgeConfigReconciliationTask extends ReconciliationTask { // TODO: this query is not efficient. It retrieves all the Nodes in the datastore, loop over them and // look for the bridges of specific device. It is mre efficient if MDSAL allows query nodes using // wildcard on node id (ie: ovsdb://uuid//bridge/*) r attributes - readTopologyFuture = tx.read(LogicalDatastoreType.CONFIGURATION, topologyInstanceIdentifier); + readTopologyFuture = tx.read(LogicalDatastoreType.CONFIGURATION, + topologyInstanceIdentifier.toIdentifier()); } readTopologyFuture.addCallback(new FutureCallback<>() { @Override @@ -153,7 +154,7 @@ public class BridgeConfigReconciliationTask extends ReconciliationTask { try (ReadTransaction tx = reconciliationManager.getDb().newReadOnlyTransaction()) { InstanceIdentifier nodeInstanceIdentifier = SouthboundMapper.createInstanceIdentifier(new NodeId(bridgeNodeIid)); - readNodeFuture = tx.read(LogicalDatastoreType.CONFIGURATION, nodeInstanceIdentifier); + readNodeFuture = tx.read(LogicalDatastoreType.CONFIGURATION, nodeInstanceIdentifier.toIdentifier()); } readNodeFuture.addCallback(new FutureCallback>() { @Override diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommand.java index 5aebfdac9..8aed5498d 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommand.java @@ -91,7 +91,7 @@ public class OpenVSwitchUpdateCommand extends AbstractTransactionCommand { setOtherConfig(transaction, ovsdbNodeBuilder, oldEntry, openVSwitch); ovsdbNodeBuilder.setConnectionInfo(getConnectionInfo()); - transaction.merge(LogicalDatastoreType.OPERATIONAL, nodePath, new NodeBuilder() + transaction.merge(LogicalDatastoreType.OPERATIONAL, nodePath.toIdentifier(), new NodeBuilder() .setNodeId(getNodeId(openVSwitch)) .addAugmentation(ovsdbNodeBuilder.build()) .build()); @@ -130,7 +130,7 @@ public class OpenVSwitchUpdateCommand extends AbstractTransactionCommand { KeyedInstanceIdentifier externalIid = nodeAugmentataionIid .child(OpenvswitchOtherConfigs.class, new OpenvswitchOtherConfigsKey(otherConfigKey)); - transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIid.toIdentifier()); } } @@ -179,7 +179,7 @@ public class OpenVSwitchUpdateCommand extends AbstractTransactionCommand { KeyedInstanceIdentifier externalIid = nodeAugmentataionIid .child(OpenvswitchExternalIds.class, new OpenvswitchExternalIdsKey(externalIdKey)); - transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIid.toIdentifier()); } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java index ad86bc6a3..186f80f19 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java @@ -59,7 +59,7 @@ public class OvsdbAutoAttachRemovedCommand extends AbstractTransactionCommand { final InstanceIdentifier iid = ovsdbNodeIid .augmentation(OvsdbNodeAugmentation.class) .child(Autoattach.class, autoAttachKey); - transaction.delete(LogicalDatastoreType.OPERATIONAL, iid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, iid.toIdentifier()); LOG.debug("AutoAttach table {} for Ovsdb Node {} is deleted", autoAttachUuid, ovsdbNode.orElseThrow().getNodeId()); } else { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java index 30d7158ea..0def01795 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java @@ -89,7 +89,7 @@ public class OvsdbAutoAttachUpdateCommand extends AbstractTransactionCommand { // .getExternalIdsColumn().getData() // .get(SouthboundConstants.AUTOATTACH_ID_EXTERNAL_ID_KEY)))); final Optional optionalAutoattach = - transaction.read(LogicalDatastoreType.OPERATIONAL, currentIid).get(); + transaction.read(LogicalDatastoreType.OPERATIONAL, currentIid.toIdentifier()).get(); if (optionalAutoattach.isPresent()) { currentAutoattach = optionalAutoattach.orElseThrow(); } @@ -129,14 +129,12 @@ public class OvsdbAutoAttachUpdateCommand extends AbstractTransactionCommand { final InstanceIdentifier iid = nodeIId .augmentation(OvsdbNodeAugmentation.class) .child(Autoattach.class, autoAttachEntry.key()); - transaction.put(LogicalDatastoreType.OPERATIONAL, - iid, autoAttachEntry); + transaction.put(LogicalDatastoreType.OPERATIONAL, iid.toIdentifier(), autoAttachEntry); } } } - private static void setMappings(AutoattachBuilder autoAttachBuilder, - AutoAttach autoAttach) { + private static void setMappings(AutoattachBuilder autoAttachBuilder, AutoAttach autoAttach) { final Map mappings = new LinkedHashMap<>(); for (final Entry entry : autoAttach.getMappingsColumn().getData().entrySet()) { final Long mappingsKey = entry.getKey(); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeRemovedCommand.java index 18bdbbad5..f9956e3ef 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeRemovedCommand.java @@ -21,8 +21,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbNodeAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ManagedNodeEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ManagedNodeEntryKey; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class OvsdbBridgeRemovedCommand extends AbstractTransactionCommand { private final InstanceIdentifierCodec instanceIdentifierCodec; @@ -38,15 +36,14 @@ public class OvsdbBridgeRemovedCommand extends AbstractTransactionCommand { Collection removedRows = TyperUtils.extractRowsRemoved(Bridge.class, getUpdates(), getDbSchema()).values(); for (Bridge bridge : removedRows) { - InstanceIdentifier bridgeIid = - SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, getOvsdbConnectionInstance(), - bridge); - InstanceIdentifier mnIid = getOvsdbConnectionInstance().getInstanceIdentifier() + final var bridgeIid = SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, + getOvsdbConnectionInstance(), bridge); + final var mnIid = getOvsdbConnectionInstance().getInstanceIdentifier() .augmentation(OvsdbNodeAugmentation.class) - .child(ManagedNodeEntry.class, new ManagedNodeEntryKey(new OvsdbBridgeRef(bridgeIid.toIdentifier()))); + .child(ManagedNodeEntry.class, new ManagedNodeEntryKey(new OvsdbBridgeRef(bridgeIid))); // TODO handle removal of reference to managed node from model transaction.delete(LogicalDatastoreType.OPERATIONAL, bridgeIid); - transaction.delete(LogicalDatastoreType.OPERATIONAL, mnIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, mnIid.toIdentifier()); } } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java index 616f9c957..244f8e748 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java @@ -64,8 +64,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; @@ -76,7 +76,7 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { private final InstanceIdentifierCodec instanceIdentifierCodec; private final Map updatedBridgeRows; private final Map oldBridgeRows; - private final List> updatedBridges = new ArrayList<>(); + private final List> updatedBridges = new ArrayList<>(); private final Map updatedBridgeNodes; @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") @@ -108,14 +108,13 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { } @VisibleForTesting - void updateBridge(ReadWriteTransaction transaction, - Bridge bridge, InstanceIdentifier connectionIId) { + void updateBridge(ReadWriteTransaction transaction, Bridge bridge, InstanceIdentifier connectionIId) { // Update the connection node to let it know it manages this bridge Node connectionNode = buildConnectionNode(bridge); - transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode); + transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId.toIdentifier(), connectionNode); // Update the bridge node with whatever data we are getting - InstanceIdentifier bridgeIid = getInstanceIdentifier(bridge); + final var bridgeIid = getInstanceIdentifier(bridge); Node bridgeNode = buildBridgeNode(bridge); transaction.merge(LogicalDatastoreType.OPERATIONAL, bridgeIid, bridgeNode); updatedBridges.add(bridgeIid); @@ -126,15 +125,14 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { } @VisibleForTesting - void deleteEntries(ReadWriteTransaction transaction, - List> entryIids) { - for (InstanceIdentifier entryIid : entryIids) { - transaction.delete(LogicalDatastoreType.OPERATIONAL, entryIid); + void deleteEntries(ReadWriteTransaction transaction, List> entryIids) { + for (var entryIid : entryIids) { + transaction.delete(LogicalDatastoreType.OPERATIONAL, entryIid.toIdentifier()); } } private List> bridgeOtherConfigsToRemove( - InstanceIdentifier bridgeIid, Bridge bridge) { + DataObjectIdentifier bridgeIid, Bridge bridge) { requireNonNull(bridgeIid); requireNonNull(bridge); List> result = new ArrayList<>(); @@ -146,11 +144,10 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { oldBridge.getOtherConfigColumn().getData().entrySet()) { if (bridge.getOtherConfigColumn() == null || !bridge.getOtherConfigColumn().getData().containsKey(otherConfig.getKey())) { - InstanceIdentifier iid = bridgeIid - .augmentation(OvsdbBridgeAugmentation.class) - .child(BridgeOtherConfigs.class, - new BridgeOtherConfigsKey(otherConfig.getKey())); - result.add(iid); + result.add(bridgeIid.toBuilder() + .augmentation(OvsdbBridgeAugmentation.class) + .child(BridgeOtherConfigs.class, new BridgeOtherConfigsKey(otherConfig.getKey())) + .build().toLegacy()); } } } @@ -158,7 +155,7 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { } private List> externalIdsToRemove( - InstanceIdentifier bridgeIid, Bridge bridge) { + DataObjectIdentifier bridgeIid, Bridge bridge) { requireNonNull(bridgeIid); requireNonNull(bridge); List> result = new ArrayList<>(); @@ -170,11 +167,11 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { oldBridge.getExternalIdsColumn().getData().entrySet()) { if (bridge.getExternalIdsColumn() == null || !bridge.getExternalIdsColumn().getData().containsKey(externalId.getKey())) { - InstanceIdentifier iid = bridgeIid - .augmentation(OvsdbBridgeAugmentation.class) - .child(BridgeExternalIds.class, - new BridgeExternalIdsKey(externalId.getKey())); - result.add(iid); + result.add(bridgeIid.toBuilder() + .augmentation(OvsdbBridgeAugmentation.class) + .child(BridgeExternalIds.class, new BridgeExternalIdsKey(externalId.getKey())) + .build() + .toLegacy()); } } } @@ -182,7 +179,7 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { } private List> protocolEntriesToRemove( - InstanceIdentifier bridgeIid, Bridge bridge) { + DataObjectIdentifier bridgeIid, Bridge bridge) { requireNonNull(bridgeIid); requireNonNull(bridge); List> result = new ArrayList<>(); @@ -194,10 +191,11 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { if (bridge.getProtocolsColumn() == null || !bridge.getProtocolsColumn().getData() .contains(protocol)) { OvsdbBridgeProtocolBase proto = SouthboundConstants.OVSDB_PROTOCOL_MAP.inverse().get(protocol); - InstanceIdentifier iid = bridgeIid - .augmentation(OvsdbBridgeAugmentation.class) - .child(ProtocolEntry.class, new ProtocolEntryKey(proto)); - result.add(iid); + result.add(bridgeIid.toBuilder() + .augmentation(OvsdbBridgeAugmentation.class) + .child(ProtocolEntry.class, new ProtocolEntryKey(proto)) + .build() + .toLegacy()); } } } @@ -214,11 +212,10 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { connectionNode.setNodeId(getOvsdbConnectionInstance().getNodeId()); OvsdbNodeAugmentationBuilder ovsdbConnectionAugmentationBuilder = new OvsdbNodeAugmentationBuilder(); - InstanceIdentifier bridgeIid = - SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, getOvsdbConnectionInstance(), - bridge); + final var bridgeIid = SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, + getOvsdbConnectionInstance(), bridge); ManagedNodeEntry managedBridge = new ManagedNodeEntryBuilder().setBridgeRef( - new OvsdbBridgeRef(bridgeIid.toIdentifier())).build(); + new OvsdbBridgeRef(bridgeIid)).build(); ovsdbConnectionAugmentationBuilder.setManagedNodeEntry(BindingMap.of(managedBridge)); connectionNode.addAugmentation(ovsdbConnectionAugmentationBuilder.build()); @@ -404,26 +401,24 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { return new IpAddress(new Ipv6Address(ipAddress)); } - private InstanceIdentifier getInstanceIdentifier(Bridge bridge) { - return SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, getOvsdbConnectionInstance(), - bridge); + private DataObjectIdentifier getInstanceIdentifier(Bridge bridge) { + return SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, getOvsdbConnectionInstance(), bridge); } private NodeId getNodeId(Bridge bridge) { - NodeKey nodeKey = getInstanceIdentifier(bridge).firstKeyOf(Node.class); - return nodeKey.getNodeId(); + return getInstanceIdentifier(bridge).getFirstKeyOf(Node.class).getNodeId(); } @Override public void onSuccess() { - for (InstanceIdentifier updatedBridge : updatedBridges) { + for (var updatedBridge : updatedBridges) { LOG.debug("Updated bridge {} in operational datastore", updatedBridge); } } @Override public void onFailure(Throwable throwable) { - for (InstanceIdentifier updatedBridge : updatedBridges) { + for (var updatedBridge : updatedBridges) { LOG.error("Failed to update bridge {} in operational datastore", updatedBridge); } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerRemovedCommand.java index f8daa1e1b..32759cc40 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerRemovedCommand.java @@ -44,24 +44,22 @@ public class OvsdbControllerRemovedCommand extends AbstractTransactionCommand { this.instanceIdentifierCodec = instanceIdentifierCodec; updatedBridgeRows = TyperUtils.extractRowsUpdated(Bridge.class, getUpdates(), getDbSchema()); oldBridgeRows = TyperUtils.extractRowsOld(Bridge.class, getUpdates(), getDbSchema()); - removedControllerRows = TyperUtils.extractRowsRemoved(Controller.class, - getUpdates(), getDbSchema()); + removedControllerRows = TyperUtils.extractRowsRemoved(Controller.class, getUpdates(), getDbSchema()); } @Override public void execute(ReadWriteTransaction transaction) { for (Bridge bridge : updatedBridgeRows.values()) { - InstanceIdentifier bridgeIid = - SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, getOvsdbConnectionInstance(), - bridge); - deleteControllers(transaction, controllerEntriesToRemove(bridgeIid,bridge)); + final var bridgeIid = SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, + getOvsdbConnectionInstance(), bridge).toLegacy(); + deleteControllers(transaction, controllerEntriesToRemove(bridgeIid, bridge)); } } private static void deleteControllers(ReadWriteTransaction transaction, List> controllerEntryIids) { - for (InstanceIdentifier controllerEntryIid: controllerEntryIids) { - transaction.delete(LogicalDatastoreType.OPERATIONAL, controllerEntryIid); + for (var controllerEntryIid: controllerEntryIids) { + transaction.delete(LogicalDatastoreType.OPERATIONAL, controllerEntryIid.toIdentifier()); } } @@ -89,5 +87,4 @@ public class OvsdbControllerRemovedCommand extends AbstractTransactionCommand { } return result; } - } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java index 0a0c60cd5..87ffeedea 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java @@ -91,8 +91,8 @@ public class OvsdbControllerUpdateCommand extends AbstractTransactionCommand { for (ControllerEntry controllerEntry : controllerEntries) { transaction.merge(LogicalDatastoreType.OPERATIONAL, - getControllerEntryIid(controllerEntry, bridgeEntry.getValue().getNameColumn().getData()), - controllerEntry); + getControllerEntryIid(controllerEntry, bridgeEntry.getValue().getNameColumn().getData()) + .toIdentifier(), controllerEntry); } } } @@ -123,8 +123,7 @@ public class OvsdbControllerUpdateCommand extends AbstractTransactionCommand { InstanceIdentifier iid = bridgeIid .augmentation(OvsdbBridgeAugmentation.class) .child(ControllerEntry.class, controllerEntry.key()); - transaction.merge(LogicalDatastoreType.OPERATIONAL, - iid, controllerEntry); + transaction.merge(LogicalDatastoreType.OPERATIONAL, iid.toIdentifier(), controllerEntry); } } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbInitialPortUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbInitialPortUpdateCommand.java index 419dc5e6c..06ff5ec93 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbInitialPortUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbInitialPortUpdateCommand.java @@ -84,7 +84,8 @@ public class OvsdbInitialPortUpdateCommand extends OvsdbPortUpdateCommand { Node bridgeNodeWithTerminationPoints = new NodeBuilder(bridgeNode) .setTerminationPoint(BindingMap.ordered(terminationPoints)) .build(); - transaction.merge(LogicalDatastoreType.OPERATIONAL, bridgeIid, bridgeNodeWithTerminationPoints); + transaction.merge(LogicalDatastoreType.OPERATIONAL, bridgeIid.toIdentifier(), + bridgeNodeWithTerminationPoints); } terminationPoints.forEach(terminationPoint -> { terminationPointList.append(terminationPoint.key().getTpId().getValue() + ","); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommand.java index 25b9f1af5..8fe6044c1 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommand.java @@ -59,7 +59,7 @@ public class OvsdbManagersRemovedCommand extends AbstractTransactionCommand { void deleteManagers(ReadWriteTransaction transaction, List> managerEntryIids) { for (var managerEntryIid : managerEntryIids) { - transaction.delete(LogicalDatastoreType.OPERATIONAL, managerEntryIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, managerEntryIid.toIdentifier()); } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java index cf01ccd00..742a668ab 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java @@ -87,8 +87,7 @@ public class OvsdbManagersUpdateCommand extends AbstractTransactionCommand { ovsdbNodeEntry.getValue(), managerEntries); for (ManagerEntry managerEntry : managerEntries) { transaction.merge(LogicalDatastoreType.OPERATIONAL, - getManagerEntryIid(managerEntry), - managerEntry); + getManagerEntryIid(managerEntry).toIdentifier(), managerEntry); } } } @@ -120,8 +119,7 @@ public class OvsdbManagersUpdateCommand extends AbstractTransactionCommand { InstanceIdentifier iid = connectionIId .augmentation(OvsdbNodeAugmentation.class) .child(ManagerEntry.class, managerEntry.key()); - transaction.merge(LogicalDatastoreType.OPERATIONAL, - iid, managerEntry); + transaction.merge(LogicalDatastoreType.OPERATIONAL, iid.toIdentifier(), managerEntry); } } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommand.java index d3d3f06eb..44b53d4bb 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommand.java @@ -40,7 +40,7 @@ public class OvsdbNodeRemoveCommand extends AbstractTransactionCommand { @Override public void execute(ReadWriteTransaction transaction) { FluentFuture> ovsdbNodeFuture = transaction.read( - LogicalDatastoreType.OPERATIONAL, getOvsdbConnectionInstance().getInstanceIdentifier()); + LogicalDatastoreType.OPERATIONAL, getOvsdbConnectionInstance().getInstanceIdentifier().toIdentifier()); Optional ovsdbNodeOptional; try { ovsdbNodeOptional = ovsdbNodeFuture.get(); @@ -64,7 +64,7 @@ public class OvsdbNodeRemoveCommand extends AbstractTransactionCommand { } LOG.debug("Deleting node {} from oper", getOvsdbConnectionInstance().getInstanceIdentifier()); transaction.delete(LogicalDatastoreType.OPERATIONAL, - getOvsdbConnectionInstance().getInstanceIdentifier()); + getOvsdbConnectionInstance().getInstanceIdentifier().toIdentifier()); } else { LOG.debug("Other southbound plugin instances in cluster are connected to the device," + " not deleting OvsdbNode from operational data store."); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortRemoveCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortRemoveCommand.java index 916afcbaf..a7cfefb9c 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortRemoveCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortRemoveCommand.java @@ -23,7 +23,6 @@ import org.opendaylight.ovsdb.southbound.SouthboundMapper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,9 +76,10 @@ public class OvsdbPortRemoveCommand extends AbstractTransactionCommand { LOG.warn("Bridge not found for port {}", port); continue; } - final InstanceIdentifier nodePath = SouthboundMapper.createInstanceIdentifier( - instanceIdentifierCodec, getOvsdbConnectionInstance(), bridgeData) - .child(TerminationPoint.class, new TerminationPointKey(new TpId(portName))); + final var nodePath = SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, + getOvsdbConnectionInstance(), bridgeData).toBuilder() + .child(TerminationPoint.class, new TerminationPointKey(new TpId(portName))) + .build(); transaction.delete(LogicalDatastoreType.OPERATIONAL, nodePath); // Remove from OvsdbConnection Instance cache getOvsdbConnectionInstance().removePort(portUuid); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommand.java index 7f5e6c449..bb3710f80 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommand.java @@ -207,9 +207,9 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand { protected void updateToDataStore(ReadWriteTransaction transaction, TerminationPointBuilder tpBuilder, InstanceIdentifier tpPath, boolean merge) { if (merge) { - transaction.merge(LogicalDatastoreType.OPERATIONAL, tpPath, tpBuilder.build()); + transaction.merge(LogicalDatastoreType.OPERATIONAL, tpPath.toIdentifier(), tpBuilder.build()); } else { - transaction.put(LogicalDatastoreType.OPERATIONAL, tpPath, tpBuilder.build()); + transaction.put(LogicalDatastoreType.OPERATIONAL, tpPath.toIdentifier(), tpBuilder.build()); } } @@ -252,11 +252,10 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand { if (bridgeUpdatedRows != null) { for (Entry entry : this.bridgeUpdatedRows.entrySet()) { UUID bridgeUuid = entry.getKey(); - if (this.bridgeUpdatedRows.get(bridgeUuid).getPortsColumn().getData() - .contains(portUuid)) { - InstanceIdentifier iid = SouthboundMapper.createInstanceIdentifier( - instanceIdentifierCodec, getOvsdbConnectionInstance(), - this.bridgeUpdatedRows.get(bridgeUuid)); + if (this.bridgeUpdatedRows.get(bridgeUuid).getPortsColumn().getData().contains(portUuid)) { + final var iid = SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, + getOvsdbConnectionInstance(), this.bridgeUpdatedRows.get(bridgeUuid)) + .toLegacy(); getOvsdbConnectionInstance().updatePort(portUuid, iid); return Optional.of(iid); } @@ -419,7 +418,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand { InstanceIdentifier oldPortQosIid = tpPath .augmentation(OvsdbTerminationPointAugmentation.class) .child(QosEntry.class, SouthboundConstants.PORT_QOS_LIST_KEY); - transaction.delete(LogicalDatastoreType.OPERATIONAL, oldPortQosIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, oldPortQosIid.toIdentifier()); } } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java index a5851eba3..3d5982058 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java @@ -88,7 +88,7 @@ public class OvsdbQosRemovedCommand extends AbstractTransactionCommand { private static void deleteQos(ReadWriteTransaction transaction, List> qosEntryIids) { for (InstanceIdentifier qosEntryIid: qosEntryIids) { - transaction.delete(LogicalDatastoreType.OPERATIONAL, qosEntryIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, qosEntryIid.toIdentifier()); } } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java index 3cec5af75..e144430c2 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java @@ -113,7 +113,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand { InstanceIdentifier iid = nodeIId .augmentation(OvsdbNodeAugmentation.class) .child(QosEntries.class, qosEntry.key()); - transaction.merge(LogicalDatastoreType.OPERATIONAL, iid, qosEntry); + transaction.merge(LogicalDatastoreType.OPERATIONAL, iid.toIdentifier(), qosEntry); } } } @@ -208,7 +208,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand { KeyedInstanceIdentifier otherIId = qosIId .child(QosOtherConfig.class, new QosOtherConfigKey(otherConfigKey)); - transaction.delete(LogicalDatastoreType.OPERATIONAL, otherIId); + transaction.delete(LogicalDatastoreType.OPERATIONAL, otherIId.toIdentifier()); } } @@ -257,7 +257,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand { KeyedInstanceIdentifier externalIId = qosIId .child(QosExternalIds.class, new QosExternalIdsKey(extIdKey)); - transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIId); + transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIId.toIdentifier()); } } @@ -305,7 +305,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand { for (Long queueListKey : queueListKeys) { KeyedInstanceIdentifier otherIId = qosIId.child(QueueList.class, new QueueListKey(Uint32.valueOf(queueListKey))); - transaction.delete(LogicalDatastoreType.OPERATIONAL, otherIId); + transaction.delete(LogicalDatastoreType.OPERATIONAL, otherIId.toIdentifier()); } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java index b53800b04..b28ce4366 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java @@ -87,7 +87,7 @@ public class OvsdbQueueRemovedCommand extends AbstractTransactionCommand { private static void deleteQueue(ReadWriteTransaction transaction, List> queueIids) { for (InstanceIdentifier queueIid: queueIids) { - transaction.delete(LogicalDatastoreType.OPERATIONAL, queueIid); + transaction.delete(LogicalDatastoreType.OPERATIONAL, queueIid.toIdentifier()); } } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java index 712bba331..8bd82faf6 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java @@ -102,8 +102,7 @@ public class OvsdbQueueUpdateCommand extends AbstractTransactionCommand { InstanceIdentifier iid = nodeIId .augmentation(OvsdbNodeAugmentation.class) .child(Queues.class, queues.key()); - transaction.merge(LogicalDatastoreType.OPERATIONAL, - iid, queues); + transaction.merge(LogicalDatastoreType.OPERATIONAL, iid.toIdentifier(), queues); } } } @@ -161,7 +160,7 @@ public class OvsdbQueueUpdateCommand extends AbstractTransactionCommand { KeyedInstanceIdentifier otherIId = queueIId .child(QueuesOtherConfig.class, new QueuesOtherConfigKey(otherConfigKey)); - transaction.delete(LogicalDatastoreType.OPERATIONAL, otherIId); + transaction.delete(LogicalDatastoreType.OPERATIONAL, otherIId.toIdentifier()); } } @@ -209,7 +208,7 @@ public class OvsdbQueueUpdateCommand extends AbstractTransactionCommand { KeyedInstanceIdentifier externalIId = queueIId .child(QueuesExternalIds.class, new QueuesExternalIdsKey(extIdKey)); - transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIId); + transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIId.toIdentifier()); } } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManagerTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManagerTest.java index 71a7e5a2c..33d14118a 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManagerTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManagerTest.java @@ -57,6 +57,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.Uint16; import org.powermock.api.mockito.PowerMockito; @@ -133,7 +134,7 @@ public class OvsdbConnectionManagerTest { ReadTransaction tx = mock(ReadTransaction.class); when(db.newReadOnlyTransaction()).thenReturn(tx); - when(tx.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class))) + when(tx.read(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class))) .thenReturn(mock(FluentFuture.class)); when(client.getInstanceIdentifier()).thenReturn(InstanceIdentifier.create(NetworkTopology.class) .child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)) @@ -197,9 +198,9 @@ public class OvsdbConnectionManagerTest { InstanceIdentifier.class, OvsdbNodeAugmentation.class)); ReadTransaction tx = mock(ReadTransaction.class); when(db.newReadOnlyTransaction()).thenReturn(tx); - when(tx.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class))) + when(tx.read(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class))) .thenReturn(mock(FluentFuture.class)); - when(tx.exists(any(LogicalDatastoreType.class), any(InstanceIdentifier.class))) + when(tx.exists(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class))) .thenReturn(mock(FluentFuture.class)); when(ovsdbConnectionInstance.getInstanceIdentifier()).thenReturn( InstanceIdentifier.create(NetworkTopology.class) diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListenerTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListenerTest.java index 4671edc43..7fd9ea6f8 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListenerTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListenerTest.java @@ -73,7 +73,7 @@ public class OvsdbDataTreeChangeListenerTest extends AbstractConcurrentDataBroke .build(); final InstanceIdentifier iid = SouthboundUtils.createInstanceIdentifier(connectionInfo); WriteTransaction transaction = dataBroker.newReadWriteTransaction(); - transaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, + transaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid.toIdentifier(), SouthboundUtils.createNode(connectionInfo)); transaction.commit().get(); diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java index 96dea172a..26f9f3f39 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java @@ -103,10 +103,10 @@ public class SouthboundMapperTest { when(bridge.getExternalIdsColumn()).thenReturn(null); when(client.getNodeKey()).thenReturn(new NodeKey(new NodeId("uri"))); when(bridge.getName()).thenReturn("bridgeName"); - InstanceIdentifier returnedIid = SouthboundMapper.createInstanceIdentifier(iidc, client, bridge); - assertEquals("Incorrect identifier type", Node.class, returnedIid.getTargetType()); + final var returnedIid = SouthboundMapper.createInstanceIdentifier(iidc, client, bridge); + assertEquals("Incorrect identifier type", Node.class, returnedIid.lastStep().type()); assertEquals("Incorrect node key", new NodeId(new Uri("uri/bridge/bridgeName")), - returnedIid.firstKeyOf(Node.class).getNodeId()); + returnedIid.getFirstKeyOf(Node.class).getNodeId()); } @SuppressWarnings("unchecked") diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundProviderTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundProviderTest.java index cd15ee720..d290e1b6d 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundProviderTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundProviderTest.java @@ -137,9 +137,9 @@ public class SouthboundProviderTest extends AbstractConcurrentDataBrokerTest { // At this point the OVSDB topology must not be present in either tree assertFalse(getDataBroker().newReadOnlyTransaction().read(LogicalDatastoreType.CONFIGURATION, - topologyIid).get().isPresent()); + topologyIid.toIdentifier()).get().isPresent()); assertFalse(getDataBroker().newReadOnlyTransaction().read(LogicalDatastoreType.OPERATIONAL, - topologyIid).get().isPresent()); + topologyIid.toIdentifier()).get().isPresent()); // Become owner southboundProvider.handleOwnershipChange(EntityOwnershipStateChange.from(false, true, true)); @@ -153,18 +153,18 @@ public class SouthboundProviderTest extends AbstractConcurrentDataBrokerTest { // Now the OVSDB topology must be present in both trees assertTrue(getDataBroker().newReadOnlyTransaction().read(LogicalDatastoreType.CONFIGURATION, - topologyIid).get().isPresent()); + topologyIid.toIdentifier()).get().isPresent()); assertTrue(getDataBroker().newReadOnlyTransaction().read(LogicalDatastoreType.OPERATIONAL, - topologyIid).get().isPresent()); + topologyIid.toIdentifier()).get().isPresent()); // Verify idempotency southboundProvider.handleOwnershipChange(EntityOwnershipStateChange.from(false, true, true)); // The OVSDB topology must be present in both trees assertTrue(getDataBroker().newReadOnlyTransaction().read(LogicalDatastoreType.CONFIGURATION, - topologyIid).get().isPresent()); + topologyIid.toIdentifier()).get().isPresent()); assertTrue(getDataBroker().newReadOnlyTransaction().read(LogicalDatastoreType.OPERATIONAL, - topologyIid).get().isPresent()); + topologyIid.toIdentifier()).get().isPresent()); } } } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundUtilTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundUtilTest.java index 1f72f54d2..0eb7afc18 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundUtilTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundUtilTest.java @@ -106,7 +106,7 @@ public class SouthboundUtilTest { .child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)) .child(Node.class, new NodeKey(new NodeId("testNode"))); FluentFuture> value = FluentFutures.immediateFluentFuture(node); - when(transaction.read(LogicalDatastoreType.OPERATIONAL, connectionIid)).thenReturn(value); + when(transaction.read(LogicalDatastoreType.OPERATIONAL, connectionIid.toIdentifier())).thenReturn(value); assertEquals("Incorrect Optional object received", node, SouthboundUtil.readNode(transaction, connectionIid)); } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTaskTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTaskTest.java index 856c2b9e1..dc7c2bb9c 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTaskTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/BridgeConfigReconciliationTaskTest.java @@ -50,6 +50,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.util.concurrent.FluentFutures; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -79,7 +80,7 @@ public class BridgeConfigReconciliationTaskTest { when(reconciliationManager.getBridgesReconciliationInclusionList()).thenReturn(List.of(BR_INT)); ReadTransaction tx = mock(ReadTransaction.class); when(db.newReadOnlyTransaction()).thenReturn(tx); - when(tx.read(any(LogicalDatastoreType.class),any(InstanceIdentifier.class))) + when(tx.read(any(LogicalDatastoreType.class),any(DataObjectIdentifier.class))) .thenReturn(FluentFutures.immediateFluentFuture(Optional.of(brIntNode))); when(topology.getNode()).thenReturn(Map.of(brIntNode.key(), brIntNode)); diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommandTest.java index 6fd4b5fd7..a0c41fef6 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OpenVSwitchUpdateCommandTest.java @@ -59,8 +59,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.powermock.api.mockito.PowerMockito; import org.powermock.api.support.membermodification.MemberMatcher; import org.powermock.api.support.membermodification.MemberModifier; @@ -144,7 +144,7 @@ public class OpenVSwitchUpdateCommandTest { when(nodeBuilder.addAugmentation(any(OvsdbNodeAugmentation.class))).thenReturn(nodeBuilder); when(nodeBuilder.build()).thenReturn(mock(Node.class)); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); - doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(Node.class)); openVSwitchUpdateCommand.execute(transaction); @@ -188,13 +188,13 @@ public class OpenVSwitchUpdateCommandTest { @Test public void testRemoveOldConfigs() throws Exception { ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); - doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(KeyedInstanceIdentifier.class)); + doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); doReturn(new NodeId("foo")).when(openVSwitchUpdateCommand).getNodeId(any()); OpenVSwitch ovs = mock(OpenVSwitch.class); Whitebox.invokeMethod(openVSwitchUpdateCommand, "removeOldConfigs", transaction, ImmutableMap.of("OpenvswitchOtherConfigsKey", "OpenvswitchOtherConfigsValue"), ovs); - verify(transaction).delete(any(LogicalDatastoreType.class), any(KeyedInstanceIdentifier.class)); + verify(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); } @Test @@ -239,14 +239,14 @@ public class OpenVSwitchUpdateCommandTest { @Test public void testRemoveExternalIds() throws Exception { ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); - doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(KeyedInstanceIdentifier.class)); + doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); //suppress getNodeId() OpenVSwitch ovs = mock(OpenVSwitch.class); doReturn(mock(NodeId.class)).when(openVSwitchUpdateCommand).getNodeId(any()); Whitebox.invokeMethod(openVSwitchUpdateCommand, "removeExternalIds", transaction, ImmutableMap.of("OpenvswitchExternalIdKey", "OpenvswitchExternalIdValue"), ovs); - verify(transaction).delete(any(LogicalDatastoreType.class), any(KeyedInstanceIdentifier.class)); + verify(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); } @Test diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommandTest.java index dc812575c..b187794a0 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommandTest.java @@ -41,6 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.powermock.api.mockito.PowerMockito; import org.powermock.api.support.membermodification.MemberModifier; @@ -99,12 +100,12 @@ public class OvsdbAutoAttachRemovedCommandTest { when(aaEntry.key()).thenReturn(aaKey); when(ovsdbNodeAugmentation.getAutoattach()).thenReturn(Map.of(aaKey, aaEntry)); - doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); } @Test public void testExecute() { ovsdbAutoAttachRemovedCommand.execute(transaction); - verify(transaction).delete(eq(LogicalDatastoreType.OPERATIONAL), eq(aaIid)); + verify(transaction).delete(eq(LogicalDatastoreType.OPERATIONAL), eq(aaIid.toIdentifier())); } } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommandTest.java index c3aa71003..1b82d718b 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommandTest.java @@ -41,6 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.powermock.api.mockito.PowerMockito; import org.powermock.api.support.membermodification.MemberModifier; @@ -57,8 +58,8 @@ public class OvsdbAutoAttachUpdateCommandTest { private static final String CONNECTED_NODE_ID = "10.0.0.2"; // private static final Map AUTOATTACH_EXTERNAL_IDS = // ImmutableMap.of("opendaylight-autoattach-id", "autoattach://798f35d8-f40a-449a-94d3-c860f5547f9a"); - private Map updatedAutoAttachRows = new HashMap<>(); - private Map oldAutoAttachRows = new HashMap<>(); + private final Map updatedAutoAttachRows = new HashMap<>(); + private final Map oldAutoAttachRows = new HashMap<>(); private OvsdbAutoAttachUpdateCommand ovsdbAutoAttachUpdateCommand; private ReadWriteTransaction transaction; private InstanceIdentifier aaIid; @@ -96,9 +97,9 @@ public class OvsdbAutoAttachUpdateCommandTest { InstanceIdentifier connectionIid = aaIid.firstIdentifierOf(Node.class); when(ovsdbConnectionInstance.getInstanceIdentifier()).thenReturn(connectionIid); transaction = mock(ReadWriteTransaction.class); - doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(Autoattach.class)); - doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); PowerMockito.mockStatic(SouthboundUtil.class); Node node = mock(Node.class); @@ -116,6 +117,6 @@ public class OvsdbAutoAttachUpdateCommandTest { @Test public void testExecute() { ovsdbAutoAttachUpdateCommand.execute(transaction); - verify(transaction).put(eq(LogicalDatastoreType.OPERATIONAL), eq(aaIid), any(Autoattach.class)); + verify(transaction).put(eq(LogicalDatastoreType.OPERATIONAL), eq(aaIid.toIdentifier()), any(Autoattach.class)); } } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommandTest.java index b86852800..23beb4118 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommandTest.java @@ -150,7 +150,7 @@ public class OvsdbBridgeUpdateCommandTest { MemberModifier .suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "buildConnectionNode", Bridge.class)); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); - doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(Node.class)); // suppress calls to private methods @@ -160,11 +160,11 @@ public class OvsdbBridgeUpdateCommandTest { MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "deleteEntries", ReadWriteTransaction.class, List.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "protocolEntriesToRemove", - InstanceIdentifier.class, Bridge.class)); + DataObjectIdentifier.class, Bridge.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "externalIdsToRemove", - InstanceIdentifier.class, Bridge.class)); + DataObjectIdentifier.class, Bridge.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "bridgeOtherConfigsToRemove", - InstanceIdentifier.class, Bridge.class)); + DataObjectIdentifier.class, Bridge.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "getNodeId", Bridge.class)); @@ -179,9 +179,9 @@ public class OvsdbBridgeUpdateCommandTest { @Test public void testDeleteEntries() throws Exception { ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); - doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); ovsdbBridgeUpdateCommand.deleteEntries(transaction, List.of(InstanceIdentifier.create(NetworkTopology.class))); - verify(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + verify(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); } @SuppressWarnings("unchecked") @@ -202,9 +202,10 @@ public class OvsdbBridgeUpdateCommandTest { //test bridgeOtherConfigsToRemove() when(oldBridge.getOtherConfigColumn()).thenReturn(column); when(bridge.getOtherConfigColumn()).thenReturn(column); - InstanceIdentifier bridgeIid = InstanceIdentifier.create(NetworkTopology.class) + final var bridgeIid = DataObjectIdentifier.builder(NetworkTopology.class) .child(Topology.class, new TopologyKey(new TopologyId("testTopo"))) - .child(Node.class, new NodeKey(new NodeId("testNode"))); + .child(Node.class, new NodeKey(new NodeId("testNode"))) + .build(); List> resultBridgeOtherConfigs = Whitebox .invokeMethod(ovsdbBridgeUpdateCommand, "bridgeOtherConfigsToRemove", bridgeIid, bridge); assertEquals(ArrayList.class, resultBridgeOtherConfigs.getClass()); @@ -243,9 +244,10 @@ public class OvsdbBridgeUpdateCommandTest { when(connectionNode.setNodeId(any(NodeId.class))).thenReturn(connectionNode); PowerMockito.mockStatic(SouthboundMapper.class); - InstanceIdentifier bridgeIid = InstanceIdentifier.create(NetworkTopology.class) + final var bridgeIid = DataObjectIdentifier.builder(NetworkTopology.class) .child(Topology.class, new TopologyKey(new TopologyId("testTopo"))) - .child(Node.class, new NodeKey(new NodeId("testNode"))); + .child(Node.class, new NodeKey(new NodeId("testNode"))) + .build(); when(SouthboundMapper.createInstanceIdentifier(any(InstanceIdentifierCodec.class), any(OvsdbConnectionInstance.class), any(Bridge.class))) .thenReturn(bridgeIid); diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommandTest.java index c6548ced5..2ffe7031b 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommandTest.java @@ -52,6 +52,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.powermock.api.mockito.PowerMockito; @@ -134,11 +135,11 @@ public class OvsdbControllerUpdateCommandTest { .augmentation(OvsdbBridgeAugmentation.class) .child(ControllerEntry.class, new ControllerEntryKey(new Uri("testEntry")))) .when(ovsdbControllerUpdateCommand).getControllerEntryIid(any(ControllerEntry.class), any(String.class)); - doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(ControllerEntry.class)); Whitebox.invokeMethod(ovsdbControllerUpdateCommand, "updateController", transaction, updatedControllerRows, updatedBridgeRows); - verify(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + verify(transaction).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(ControllerEntry.class)); verify(bridge).getNameColumn(); } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommandTest.java index 9c4568c16..c12c603f3 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommandTest.java @@ -44,6 +44,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ManagerEntryKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.powermock.api.mockito.PowerMockito; import org.powermock.api.support.membermodification.MemberModifier; @@ -109,9 +110,9 @@ public class OvsdbManagersRemovedCommandTest { managerEntryIids.add(SouthboundMapper.createInstanceIdentifier(new NodeId("test")) .augmentation(OvsdbNodeAugmentation.class) .child(ManagerEntry.class, new ManagerEntryKey(new Uri("testUri")))); - doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); ovsdbManagersRemovedCommand.deleteManagers(transaction, managerEntryIids); - verify(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + verify(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); } @Test diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommandTest.java index bf859760e..6fa4f3837 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommandTest.java @@ -49,6 +49,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.powermock.api.mockito.PowerMockito; @@ -128,11 +129,11 @@ public class OvsdbManagersUpdateCommandTest { .child(Node.class, new NodeKey(new NodeId("testNode"))).augmentation(OvsdbNodeAugmentation.class) .child(ManagerEntry.class, new ManagerEntryKey(new Uri("testUri")))) .when(ovsdbManagersUpdateCommand, "getManagerEntryIid", any(ManagerEntry.class)); - doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(ManagerEntry.class)); Whitebox.invokeMethod(ovsdbManagersUpdateCommand, "updateManagers", transaction, updatedManagerRows, updatedOpenVSwitchRows); - verify(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + verify(transaction).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(ManagerEntry.class)); } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommandTest.java index 0d61a2849..5e12727de 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbNodeRemoveCommandTest.java @@ -84,7 +84,7 @@ public class OvsdbNodeRemoveCommandTest { InstanceIdentifier.create(NetworkTopology.class) .child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)) .child(Node.class, new NodeKey(new NodeId("testConnection")))); - when(transaction.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class))) + when(transaction.read(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class))) .thenReturn(ovsdbNodeFuture); Node ovsdbNode = mock(Node.class); @@ -104,13 +104,11 @@ public class OvsdbNodeRemoveCommandTest { when(ovsdbNodeAugmentation.getManagedNodeEntry()).thenReturn(Map.of(managedNode.key(), managedNode)); - doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); ovsdbNodeRemoveCommand.execute(transaction); verify(ovsdbNodeAugmentation).getManagedNodeEntry(); - verify(transaction, times(1)).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); - verify(transaction, times(1)).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); + verify(transaction, times(2)).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); } @Test diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortRemoveCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortRemoveCommandTest.java index 14c9788b1..3013826b3 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortRemoveCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortRemoveCommandTest.java @@ -44,6 +44,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.powermock.api.mockito.PowerMockito; import org.powermock.api.support.membermodification.MemberModifier; @@ -112,9 +113,10 @@ public class OvsdbPortRemoveCommandTest { when(uuidColumn.getData()).thenReturn(uuid); when(port.getName()).thenReturn(PORT_NAME); - InstanceIdentifier nodeIID = InstanceIdentifier.create(NetworkTopology.class) + final var nodeIID = DataObjectIdentifier.builder(NetworkTopology.class) .child(Topology.class, new TopologyKey(new TopologyId("testTopo"))) - .child(Node.class, new NodeKey(new NodeId("testNode2"))); + .child(Node.class, new NodeKey(new NodeId("testNode2"))) + .build(); doReturn(mock(OvsdbConnectionInstance.class)).when(ovsdbPortRemoveCommand).getOvsdbConnectionInstance(); PowerMockito.mockStatic(SouthboundMapper.class); @@ -124,9 +126,9 @@ public class OvsdbPortRemoveCommandTest { MemberModifier.suppress(MemberModifier.methodsDeclaredIn(InstanceIdentifier.class)); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); - doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); ovsdbPortRemoveCommand.execute(transaction); - verify(transaction).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + verify(transaction).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); } } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommandTest.java index 532af292c..441e8e2a3 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbPortUpdateCommandTest.java @@ -72,6 +72,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint32; @@ -217,9 +218,9 @@ public class OvsdbPortUpdateCommandTest { portOldRows.put(uuid, port); MemberModifier.field(OvsdbPortUpdateCommand.class, "portOldRows").set(ovsdbPortUpdateCommand, portOldRows); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); - doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(TerminationPoint.class)); - doNothing().when(transaction).put(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + doNothing().when(transaction).put(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(TerminationPoint.class)); Column interfaceColumn = mock(Column.class); @@ -235,7 +236,7 @@ public class OvsdbPortUpdateCommandTest { Whitebox.invokeMethod(ovsdbPortUpdateCommand, "updateTerminationPoints", transaction, node); verify(ovsdbPortUpdateCommand).getInstanceIdentifier(any(InstanceIdentifier.class), any(Port.class)); - verify(transaction, times(2)).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), + verify(transaction, times(2)).merge(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class), any(TerminationPoint.class)); } @@ -305,7 +306,7 @@ public class OvsdbPortUpdateCommandTest { .child(Node.class, new NodeKey(new NodeId("testNode"))); Optional node = Optional.of(mock(Node.class)); FluentFuture> fluentFuture = mock(FluentFuture.class); - when(transaction.read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class))) + when(transaction.read(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class))) .thenReturn(fluentFuture); when(fluentFuture.get()).thenReturn(node); assertEquals(node, Whitebox.invokeMethod(ovsdbPortUpdateCommand, "readNode", transaction, nodePath)); diff --git a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtils.java b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtils.java index 4b21e50b4..182c0de8b 100644 --- a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtils.java +++ b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtils.java @@ -16,6 +16,7 @@ import org.opendaylight.mdsal.binding.api.WriteTransaction; import org.opendaylight.mdsal.common.api.CommitInfo; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,8 +33,8 @@ public class MdsalUtils { * * @param dataBroker the {@link DataBroker} */ - public MdsalUtils(DataBroker dataBroker) { - this.databroker = dataBroker; + public MdsalUtils(final DataBroker dataBroker) { + databroker = dataBroker; } /** @@ -48,7 +49,7 @@ public class MdsalUtils { final LogicalDatastoreType store, final InstanceIdentifier path) { boolean result = false; final WriteTransaction transaction = databroker.newWriteOnlyTransaction(); - transaction.delete(store, path); + transaction.delete(store, path.toIdentifier()); FluentFuture future = transaction.commit(); try { future.get(); @@ -68,10 +69,10 @@ public class MdsalUtils { * @return the result of the request */ public boolean merge( - final LogicalDatastoreType logicalDatastoreType, final InstanceIdentifier path, D data) { + final LogicalDatastoreType logicalDatastoreType, final InstanceIdentifier path, final D data) { boolean result = false; final WriteTransaction transaction = databroker.newWriteOnlyTransaction(); - transaction.mergeParentStructureMerge(logicalDatastoreType, path, data); + transaction.mergeParentStructureMerge(logicalDatastoreType, path.toIdentifier(), data); FluentFuture future = transaction.commit(); try { future.get(); @@ -91,10 +92,10 @@ public class MdsalUtils { * @return the result of the request */ public boolean put( - final LogicalDatastoreType logicalDatastoreType, final InstanceIdentifier path, D data) { + final LogicalDatastoreType logicalDatastoreType, final InstanceIdentifier path, final D data) { boolean result = false; final WriteTransaction transaction = databroker.newWriteOnlyTransaction(); - transaction.mergeParentStructurePut(logicalDatastoreType, path, data); + transaction.mergeParentStructurePut(logicalDatastoreType, path.toIdentifier(), data); FluentFuture future = transaction.commit(); try { future.get(); @@ -113,14 +114,12 @@ public class MdsalUtils { * @param the data object type * @return the result as the data object requested */ - public D read( - final LogicalDatastoreType store, final InstanceIdentifier path) { + public D read(final LogicalDatastoreType store, final InstanceIdentifier path) { Optional optionalDataObject = readOptional(store, path); if (optionalDataObject.isPresent()) { return optionalDataObject.orElseThrow(); } - LOG.debug("{}: Failed to read {}", - Thread.currentThread().getStackTrace()[1], path); + LOG.debug("{}: Failed to read {}", Thread.currentThread().getStackTrace()[1], path); return null; } @@ -130,7 +129,7 @@ public class MdsalUtils { ReadTransaction transaction = databroker.newReadOnlyTransaction(); do { try { - Optional result = transaction.read(store, (InstanceIdentifier)path).get(); + Optional result = transaction.read(store, (DataObjectIdentifier) path.toIdentifier()).get(); transaction.close(); return result; } catch (InterruptedException | ExecutionException e) { @@ -151,15 +150,14 @@ public class MdsalUtils { } - public boolean exists( - final LogicalDatastoreType store, final InstanceIdentifier path) { + public boolean exists(final LogicalDatastoreType store, final InstanceIdentifier path) { int trialNo = 0; ReadTransaction transaction = databroker.newReadOnlyTransaction(); do { try { FluentFuture result = transaction.exists(store, path); transaction.close(); - return result.get().booleanValue(); + return result.get(); } catch (InterruptedException | ExecutionException e) { if (trialNo == 0) { logReadFailureError(path, " mdsal Read failed exception retrying the read after sleep"); @@ -177,9 +175,7 @@ public class MdsalUtils { return false; } - private void logReadFailureError( - InstanceIdentifier path, String cause) { + private static void logReadFailureError(final InstanceIdentifier path, final String cause) { LOG.error("{}: Failed to read {} Cause : {}", Thread.currentThread().getStackTrace()[2], path, cause); - } } diff --git a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsync.java b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsync.java index 2afe27bff..ae3dff661 100644 --- a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsync.java +++ b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsync.java @@ -32,7 +32,7 @@ public class MdsalUtilsAsync { * @param dataBroker the {@link DataBroker} */ public MdsalUtilsAsync(final DataBroker dataBroker) { - this.databroker = dataBroker; + databroker = dataBroker; } /** @@ -49,7 +49,7 @@ public class MdsalUtilsAsync { final LogicalDatastoreType store, final InstanceIdentifier path) { final WriteTransaction transaction = databroker.newWriteOnlyTransaction(); - transaction.delete(store, path); + transaction.delete(store, path.toIdentifier()); return transaction.commit(); } @@ -87,7 +87,7 @@ public class MdsalUtilsAsync { final InstanceIdentifier path, final D data) { final WriteTransaction transaction = databroker.newWriteOnlyTransaction(); - transaction.mergeParentStructurePut(logicalDatastoreType, path, data); + transaction.mergeParentStructurePut(logicalDatastoreType, path.toIdentifier(), data); return transaction.commit(); } @@ -133,9 +133,9 @@ public class MdsalUtilsAsync { final boolean withParent) { final WriteTransaction transaction = databroker.newWriteOnlyTransaction(); if (withParent) { - transaction.mergeParentStructureMerge(logicalDatastoreType, path, data); + transaction.mergeParentStructureMerge(logicalDatastoreType, path.toIdentifier(), data); } else { - transaction.merge(logicalDatastoreType, path, data); + transaction.merge(logicalDatastoreType, path.toIdentifier(), data); } return transaction.commit(); } @@ -181,8 +181,8 @@ public class MdsalUtilsAsync { final LogicalDatastoreType store, final InstanceIdentifier path) { final ReadTransaction transaction = databroker.newReadOnlyTransaction(); - final FluentFuture> future = transaction.read(store, path); - final FutureCallback> closeTransactionCallback = new FutureCallback>() { + final FluentFuture> future = transaction.read(store, path.toIdentifier()); + final FutureCallback> closeTransactionCallback = new FutureCallback<>() { @Override public void onSuccess(final Optional result) { transaction.close(); diff --git a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java index 56d88e656..8a58935ad 100644 --- a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java +++ b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java @@ -14,10 +14,10 @@ import java.util.concurrent.ConcurrentHashMap; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.DataObjectModification; import org.opendaylight.mdsal.binding.api.DataTreeChangeListener; -import org.opendaylight.mdsal.binding.api.DataTreeIdentifier; import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectReference; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; @@ -160,8 +160,7 @@ public final class NotifyingDataChangeListener implements AutoCloseable, DataTre @SuppressWarnings({ "rawtypes", "unchecked" }) public void registerDataChangeListener(DataBroker dataBroker) { - listenerRegistration = dataBroker.registerDataTreeChangeListener(DataTreeIdentifier.of(type, - (InstanceIdentifier)iid), this); + listenerRegistration = dataBroker.registerTreeChangeListener(type, (DataObjectReference)iid, this); } public void waitForCreation() throws InterruptedException { diff --git a/utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsyncTest.java b/utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsyncTest.java index 480cadbe7..611d0f879 100644 --- a/utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsyncTest.java +++ b/utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsyncTest.java @@ -185,7 +185,7 @@ public class MdsalUtilsAsyncTest extends AbstractDataBrokerTest { private Node readDS() { try { final Optional result = databroker.newReadOnlyTransaction().read( - LogicalDatastoreType.CONFIGURATION, TEST_IID).get(); + LogicalDatastoreType.CONFIGURATION, TEST_IID.toIdentifier()).get(); if (result.isPresent()) { return result.orElseThrow(); } diff --git a/utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsTest.java b/utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsTest.java index 33c8fddb7..9afc66663 100644 --- a/utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsTest.java +++ b/utils/mdsal-utils/src/test/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsTest.java @@ -27,7 +27,9 @@ import org.opendaylight.mdsal.binding.api.ReadTransaction; import org.opendaylight.mdsal.binding.api.WriteTransaction; import org.opendaylight.mdsal.common.api.CommitInfo; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.util.concurrent.FluentFutures; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -48,9 +50,10 @@ public class MdsalUtilsTest { when(databroker.newWriteOnlyTransaction()).thenReturn(writeTransaction); doReturn(CommitInfo.emptyFluentFuture()).when(writeTransaction).commit(); - boolean result = mdsalUtils.delete(LogicalDatastoreType.CONFIGURATION, mock(InstanceIdentifier.class)); + boolean result = mdsalUtils.delete(LogicalDatastoreType.CONFIGURATION, + InstanceIdentifier.create(NetworkTopology.class)); - verify(writeTransaction, times(1)).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + verify(writeTransaction, times(1)).delete(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); verify(writeTransaction, times(1)).commit(); assertTrue("Error, the delete transaction failed", result); @@ -63,10 +66,10 @@ public class MdsalUtilsTest { doReturn(CommitInfo.emptyFluentFuture()).when(writeTransaction).commit(); boolean result = mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION, - mock(InstanceIdentifier.class), mock(DataObject.class)); + InstanceIdentifier.create(NetworkTopology.class), mock(NetworkTopology.class)); verify(writeTransaction, times(1)).mergeParentStructureMerge(any(LogicalDatastoreType.class), - any(InstanceIdentifier.class), any(DataObject.class)); + any(DataObjectIdentifier.class), any(DataObject.class)); verify(writeTransaction, times(1)).commit(); assertTrue("Error, the merge transaction failed", result); @@ -79,10 +82,10 @@ public class MdsalUtilsTest { doReturn(CommitInfo.emptyFluentFuture()).when(writeTransaction).commit(); boolean result = mdsalUtils.put(LogicalDatastoreType.CONFIGURATION, - mock(InstanceIdentifier.class), mock(DataObject.class)); + InstanceIdentifier.create(NetworkTopology.class), mock(NetworkTopology.class)); verify(writeTransaction, times(1)).mergeParentStructurePut(any(LogicalDatastoreType.class), - any(InstanceIdentifier.class), any(DataObject.class)); + any(DataObjectIdentifier.class), any(DataObject.class)); verify(writeTransaction, times(1)).commit(); assertTrue("Error, the put transaction failed", result); @@ -92,12 +95,13 @@ public class MdsalUtilsTest { public void testRead() { ReadTransaction readTransaction = mock(ReadTransaction.class); doReturn(readTransaction).when(databroker).newReadOnlyTransaction(); - DataObject obj = mock(DataObject.class); + NetworkTopology obj = mock(NetworkTopology.class); doReturn(FluentFutures.immediateFluentFuture(Optional.of(obj))).when(readTransaction).read( - any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); - DataObject result = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, mock(InstanceIdentifier.class)); + any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); + NetworkTopology result = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, + InstanceIdentifier.create(NetworkTopology.class)); - verify(readTransaction, times(1)).read(any(LogicalDatastoreType.class), any(InstanceIdentifier.class)); + verify(readTransaction, times(1)).read(any(LogicalDatastoreType.class), any(DataObjectIdentifier.class)); verify(readTransaction, times(1)).close(); assertEquals("Error, the read transaction failed", obj, result); -- 2.34.1 From 21a638dcc61a93b005e2849704de90836c46cc1a Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 4 Nov 2025 14:50:11 +0100 Subject: [PATCH 2/4] Migrate users of registerDataTreeChangeListener() Use registerTreeChangeListener() instead. Change-Id: I268f6ab8695453b82b719aaf570a97460ff858fc Signed-off-by: Robert Varga --- .../org/opendaylight/ovsdb/southbound/it/SouthboundIT.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java b/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java index 25c22deeb..676892a47 100644 --- a/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java +++ b/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java @@ -294,7 +294,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { } public void registerDataChangeListener() { - dataBroker.registerDataTreeChangeListener(DataTreeIdentifier.of(type, (InstanceIdentifier)iid), this); + dataBroker.registerTreeChangeListener(type, (InstanceIdentifier)iid, this); } public void waitForCreation(final long timeout) throws InterruptedException { @@ -455,9 +455,9 @@ public class SouthboundIT extends AbstractMdsalTestBase { assertTrue("Did not find " + SouthboundUtils.OVSDB_TOPOLOGY_ID.getValue(), getOvsdbTopology()); final ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber); final InstanceIdentifier iid = SouthboundUtils.createInstanceIdentifier(connectionInfo); - dataBroker.registerDataTreeChangeListener(DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, + dataBroker.registerTreeChangeListener(DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, (InstanceIdentifier)iid), CONFIGURATION_LISTENER); - dataBroker.registerDataTreeChangeListener(DataTreeIdentifier.of(LogicalDatastoreType.OPERATIONAL, + dataBroker.registerTreeChangeListener(DataTreeIdentifier.of(LogicalDatastoreType.OPERATIONAL, (InstanceIdentifier)iid), OPERATIONAL_LISTENER); ovsdbNode = connectOvsdbNode(connectionInfo); -- 2.34.1 From 071fbf6d8c864254d4c0c4b24579a6818619c19c Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 8 Oct 2025 13:44:52 +0200 Subject: [PATCH 3/4] WIP: Bump upstreams Adopt: - odlparent-14.1.4 - infrautils-7.1.8 - yangtools-14.0.18 - ietf-1.0.1 - mdsal-15.0.1 - controller-12.0.1 - aaa-0.22.1 - netconf-10.0.0 Change-Id: Id13f0420226eb7ef5829b2e5c05bfaaa3897f611 Signed-off-by: Robert Varga --- commons/binding-parent/pom.xml | 6 +- commons/it/pom.xml | 4 +- commons/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-api/pom.xml | 12 +-- .../hwvtepsouthbound-artifacts/pom.xml | 2 +- .../features/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-api/pom.xml | 4 +- .../src/main/feature/feature.xml | 4 +- .../odl-ovsdb-hwvtepsouthbound-rest/pom.xml | 4 +- .../src/main/feature/feature.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-test/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-ui/pom.xml | 4 +- .../src/main/feature/feature.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound/pom.xml | 2 +- .../hwvtepsouthbound-features/pom.xml | 2 +- .../DataObjectModificationImpl.java | 85 +++---------------- .../DataTreeModificationImpl.java | 2 +- .../HwvtepOperationalDataChangeListener.java | 8 +- .../TransactionInvokerImplTest.java | 24 +++--- .../it/HwvtepSouthboundIT.java | 2 +- .../hwvtepsouthbound-karaf/pom.xml | 2 +- hwvtepsouthbound/pom.xml | 2 +- library/artifacts/pom.xml | 2 +- library/features/features/pom.xml | 2 +- library/features/odl-ovsdb-library/pom.xml | 4 +- .../src/main/feature/feature.xml | 2 +- library/features/pom.xml | 2 +- library/karaf/pom.xml | 2 +- library/pom.xml | 2 +- pom.xml | 2 +- schemas/pom.xml | 2 +- southbound/pom.xml | 2 +- southbound/southbound-api/pom.xml | 12 +-- southbound/southbound-artifacts/pom.xml | 2 +- .../southbound-features/features/pom.xml | 2 +- .../odl-ovsdb-southbound-api/pom.xml | 4 +- .../src/main/feature/feature.xml | 4 +- .../odl-ovsdb-southbound-impl-rest/pom.xml | 4 +- .../src/main/feature/feature.xml | 2 +- .../odl-ovsdb-southbound-impl-ui/pom.xml | 4 +- .../src/main/feature/feature.xml | 2 +- .../odl-ovsdb-southbound-impl/pom.xml | 4 +- .../odl-ovsdb-southbound-test/pom.xml | 2 +- southbound/southbound-features/pom.xml | 2 +- southbound/southbound-karaf/pom.xml | 2 +- utils/hwvtepsouthbound-utils/pom.xml | 2 +- utils/odl-ovsdb-utils/pom.xml | 4 +- .../src/main/feature/feature.xml | 2 +- utils/ovsdb-it-utils/pom.xml | 2 +- utils/pom.xml | 2 +- utils/southbound-utils/pom.xml | 2 +- 51 files changed, 101 insertions(+), 160 deletions(-) diff --git a/commons/binding-parent/pom.xml b/commons/binding-parent/pom.xml index dd7de44f9..abf5f9d7a 100644 --- a/commons/binding-parent/pom.xml +++ b/commons/binding-parent/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.mdsal binding-parent - 14.0.18 + 15.0.1 @@ -25,14 +25,14 @@ org.opendaylight.aaa aaa-artifacts - 0.21.2 + 0.22.1 pom import org.opendaylight.infrautils infrautils-artifacts - 7.1.7 + 7.1.8 pom import diff --git a/commons/it/pom.xml b/commons/it/pom.xml index ceb066a2a..7b5150824 100644 --- a/commons/it/pom.xml +++ b/commons/it/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller mdsal-it-parent - 11.0.2 + 12.0.1 @@ -70,7 +70,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 14.0.18 + 15.0.1 pom import diff --git a/commons/pom.xml b/commons/pom.xml index 34aca8ab6..1c758b642 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml index bb448e222..64a9b0046 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml @@ -25,17 +25,17 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - org.opendaylight.mdsal.model - ietf-topology - - - org.opendaylight.mdsal.binding.model.ietf + org.opendaylight.ietf.model rfc6991-ietf-inet-types - org.opendaylight.mdsal.binding.model.ietf + org.opendaylight.ietf.model rfc6991-ietf-yang-types + + org.opendaylight.mdsal.model + ietf-topology + org.opendaylight.mdsal.model opendaylight-l2-types diff --git a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml index 25f0582fd..6f9a2bfaf 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml index 426563d22..00629642b 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 14.1.3 + 14.1.4 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml index 71a779a41..19f3e4eca 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -22,7 +22,7 @@ org.opendaylight.mdsal mdsal-artifacts - 14.0.18 + 15.0.1 pom import diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/src/main/feature/feature.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/src/main/feature/feature.xml index ed7cf2026..687d2af8c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/src/main/feature/feature.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/src/main/feature/feature.xml @@ -8,7 +8,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal - odl-mdsal-model-odl-l2-types + odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal + odl-mdsal-model-odl-l2-types diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml index 0d9d6671d..4997be6f4 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 9.0.1 + 10.0.0 import pom diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/src/main/feature/feature.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/src/main/feature/feature.xml index 0ecf83ba1..05d496535 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/src/main/feature/feature.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/src/main/feature/feature.xml @@ -8,6 +8,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-restconf + odl-restconf diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml index 69d059fc0..a5f9a4320 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml index ea6497757..b66c91df4 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 9.0.1 + 10.0.0 import pom diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/src/main/feature/feature.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/src/main/feature/feature.xml index b3efb75a8..d943c9f16 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/src/main/feature/feature.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/src/main/feature/feature.xml @@ -8,6 +8,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-restconf-openapi + odl-restconf-openapi diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml index 02d816eb8..3db2691e8 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml index 6c6e8edf4..fa81156a0 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 org.opendaylight.ovsdb diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/DataObjectModificationImpl.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/DataObjectModificationImpl.java index 7570b1764..e286b7faa 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/DataObjectModificationImpl.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/DataObjectModificationImpl.java @@ -7,33 +7,28 @@ */ package org.opendaylight.ovsdb.hwvtepsouthbound.reconciliation.configuration; +import com.google.common.base.MoreObjects.ToStringHelper; import java.util.ArrayList; import java.util.Collection; +import org.eclipse.jdt.annotation.Nullable; import org.opendaylight.mdsal.binding.api.DataObjectModification; -import org.opendaylight.yangtools.binding.Augmentation; -import org.opendaylight.yangtools.binding.ChildOf; -import org.opendaylight.yangtools.binding.ChoiceIn; +import org.opendaylight.mdsal.binding.api.DataObjectWritten; import org.opendaylight.yangtools.binding.DataObject; -import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.binding.ExactDataObjectStep; -import org.opendaylight.yangtools.binding.Key; -import org.opendaylight.yangtools.binding.KeyStep; -import org.opendaylight.yangtools.binding.NodeStep; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -public class DataObjectModificationImpl implements DataObjectModification { +public class DataObjectModificationImpl extends DataObjectWritten { private final Collection> childNodesCache = new ArrayList<>(); InstanceIdentifier nodeId; T newNode; T oldNode; - public DataObjectModificationImpl(InstanceIdentifier nodeId, T newData, T oldData) { + public DataObjectModificationImpl(final InstanceIdentifier nodeId, final T newData, final T oldData) { this.nodeId = nodeId; - this.newNode = newData; - this.oldNode = oldData; + newNode = newData; + oldNode = oldData; } - @Override public T dataBefore() { return oldNode; @@ -44,20 +39,14 @@ public class DataObjectModificationImpl implements DataObj return newNode; } - @Override - public Class dataType() { - return (Class) newNode.getClass(); - } - @Override public ExactDataObjectStep step() { - return (ExactDataObjectStep) nodeId.getPathArguments().iterator().next(); + return (ExactDataObjectStep) nodeId.lastStep(); } @Override - public ModificationType modificationType() { - return ModificationType.WRITE; - + public @Nullable DataObjectModification modifiedChild(final ExactDataObjectStep step) { + return null; } @Override @@ -66,57 +55,7 @@ public class DataObjectModificationImpl implements DataObj } @Override - public & DataObject, C extends ChildOf> - Collection> getModifiedChildren(Class caseType, Class childType) { - return null; - } - - @Override - public > Collection> getModifiedChildren( - Class childType) { - return null; - } - - @Override - public DataObjectModification getModifiedChild(final ExactDataObjectStep childArgument) { - return null; - } - - @Override - @SuppressWarnings("unchecked") - public & ChildOf, K extends Key> DataObjectModification - getModifiedChildListItem(final Class listItem, final K listKey) { - return (DataObjectModification) getModifiedChild(new KeyStep<>(listItem, listKey)); - } - - @Override - public & DataObject, C extends EntryObject & ChildOf, - K extends Key> DataObjectModification getModifiedChildListItem(Class caseType, - Class listItem, K listKey) { - return null; - } - - @Override - @SuppressWarnings("unchecked") - public > DataObjectModification getModifiedChildContainer(final Class arg) { - return (DataObjectModification) getModifiedChild(new NodeStep<>(arg)); - } - - @Override - public & DataObject, C extends ChildOf> DataObjectModification - getModifiedChildContainer(Class caseType, Class child) { - return null; - } - - @Override - @SuppressWarnings("unchecked") - public & DataObject> DataObjectModification getModifiedAugmentation( - final Class augmentation) { - return (DataObjectModification) getModifiedChild(new NodeStep<>(augmentation)); - } - - @Override - public String toString() { - return getClass().getSimpleName() + "{identifier = " + nodeId + "}"; + protected ToStringHelper addToStringAttributes(final ToStringHelper helper) { + return helper.add("identifier", nodeId); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/DataTreeModificationImpl.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/DataTreeModificationImpl.java index f3c51ca00..4f46835d0 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/DataTreeModificationImpl.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/DataTreeModificationImpl.java @@ -19,7 +19,7 @@ public class DataTreeModificationImpl implements DataTreeM T newNode; T oldNode; - public DataTreeModificationImpl(InstanceIdentifier nodeId, T newNode, T oldNode) { + public DataTreeModificationImpl(final InstanceIdentifier nodeId, final T newNode, final T oldNode) { this.nodeId = nodeId; this.newNode = newNode; this.oldNode = oldNode; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperationalDataChangeListener.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperationalDataChangeListener.java index 4a2761dcc..4611090fb 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperationalDataChangeListener.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperationalDataChangeListener.java @@ -57,20 +57,20 @@ public class HwvtepOperationalDataChangeListener implements DataTreeChangeListen for (DataTreeModification change : changes) { final InstanceIdentifier key = change.getRootPath().path(); final DataObjectModification mod = change.getRootNode(); - for (DataObjectModification child : mod.modifiedChildren()) { + for (DataObjectModification child : mod.modifiedChildren()) { updateDeviceOpData(key, child); } DataObjectModification aug = mod.getModifiedAugmentation(HwvtepGlobalAugmentation.class); if (aug != null) { - for (DataObjectModification child : aug.modifiedChildren()) { + for (DataObjectModification child : aug.modifiedChildren()) { updateDeviceOpData(key, child); } } } } - private void updateDeviceOpData(InstanceIdentifier key, DataObjectModification mod) { + private void updateDeviceOpData(InstanceIdentifier key, DataObjectModification mod) { Class> childClass = (Class>) mod.dataType(); InstanceIdentifier instanceIdentifier = getKey(key, mod, mod.dataAfter()); switch (mod.modificationType()) { @@ -89,7 +89,7 @@ public class HwvtepOperationalDataChangeListener implements DataTreeChangeListen } private static InstanceIdentifier getKey(InstanceIdentifier key, - DataObjectModification child, DataObject data) { + DataObjectModification child, DataObject data) { Class childClass = child.dataType(); InstanceIdentifier instanceIdentifier = null; if (LogicalSwitches.class == childClass) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TransactionInvokerImplTest.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TransactionInvokerImplTest.java index f83f4e440..7e287bdf4 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TransactionInvokerImplTest.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TransactionInvokerImplTest.java @@ -34,6 +34,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,9 +64,9 @@ public class TransactionInvokerImplTest extends AbstractConcurrentDataBrokerTest throw new NullPointerException("Failed to execute command"); }; - private InstanceIdentifier nodeIid1; - private InstanceIdentifier nodeIid2; - private InstanceIdentifier nodeIid3; + private DataObjectIdentifier nodeIid1; + private DataObjectIdentifier nodeIid2; + private DataObjectIdentifier nodeIid3; private DataBroker dataBroker; private TransactionInvokerImpl invoker; @@ -86,7 +87,7 @@ public class TransactionInvokerImplTest extends AbstractConcurrentDataBrokerTest deleteNode(nodeIid3); } - private void deleteNode(final InstanceIdentifier iid) { + private void deleteNode(final DataObjectIdentifier iid) { ReadWriteTransaction tx = dataBroker.newReadWriteTransaction(); tx.delete(LogicalDatastoreType.CONFIGURATION, iid); tx.commit(); @@ -105,9 +106,9 @@ public class TransactionInvokerImplTest extends AbstractConcurrentDataBrokerTest sleepingPillStartedLatch.await(5, TimeUnit.SECONDS); //Now add the commands which will be picked up in one lot - invoker.invoke(new AddNodeCmd(nodeIid1, ft1)); + invoker.invoke(new AddNodeCmd(nodeIid1.toLegacy(), ft1)); invoker.invoke(nullPointerPill); - invoker.invoke(new AddNodeCmd(nodeIid2, ft2)); + invoker.invoke(new AddNodeCmd(nodeIid2.toLegacy(), ft2)); sleepingPillEndLatch.countDown(); @@ -119,16 +120,16 @@ public class TransactionInvokerImplTest extends AbstractConcurrentDataBrokerTest nullPointerPillStart.await(5, TimeUnit.SECONDS); //make sure that any commands which are submitted after the previous failure run smoothly - invoker.invoke(new AddNodeCmd(nodeIid3, ft3)); + invoker.invoke(new AddNodeCmd(nodeIid3.toLegacy(), ft3)); ft3.get(5, TimeUnit.SECONDS); } - private static InstanceIdentifier createInstanceIdentifier(final String nodeIdString) { + private static DataObjectIdentifier createInstanceIdentifier(final String nodeIdString) { NodeId nodeId = new NodeId(new Uri(nodeIdString)); NodeKey nodeKey = new NodeKey(nodeId); TopologyKey topoKey = new TopologyKey(HwvtepSouthboundConstants.HWVTEP_TOPOLOGY_ID); - return InstanceIdentifier.builder(NetworkTopology.class) + return DataObjectIdentifier.builder(NetworkTopology.class) .child(Topology.class, topoKey) .child(Node.class, nodeKey) .build(); @@ -147,7 +148,8 @@ public class TransactionInvokerImplTest extends AbstractConcurrentDataBrokerTest NodeBuilder nodeBuilder = new NodeBuilder(); nodeBuilder.setNodeId(iid.firstKeyOf(Node.class).getNodeId()); nodeBuilder.addAugmentation(new HwvtepGlobalAugmentationBuilder().build()); - transaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, nodeBuilder.build()); + transaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid.toIdentifier(), + nodeBuilder.build()); } } @@ -161,7 +163,7 @@ public class TransactionInvokerImplTest extends AbstractConcurrentDataBrokerTest @Override public void execute(final ReadWriteTransaction transaction) { - transaction.delete(LogicalDatastoreType.CONFIGURATION, iid); + transaction.delete(LogicalDatastoreType.CONFIGURATION, iid.toIdentifier()); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-it/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/it/HwvtepSouthboundIT.java b/hwvtepsouthbound/hwvtepsouthbound-it/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/it/HwvtepSouthboundIT.java index a30964859..bd8fe856a 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-it/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/it/HwvtepSouthboundIT.java +++ b/hwvtepsouthbound/hwvtepsouthbound-it/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/it/HwvtepSouthboundIT.java @@ -278,7 +278,7 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase { final InstanceIdentifier iid = HwvtepSouthboundUtils.createInstanceIdentifier(connectionInfo); final DataTreeIdentifier treeId = DataTreeIdentifier.of(LogicalDatastoreType.OPERATIONAL, iid); - dataBroker.registerDataTreeChangeListener(treeId, OPERATIONAL_LISTENER); + dataBroker.registerTreeChangeListener(treeId, OPERATIONAL_LISTENER); hwvtepNode = connectHwvtepNode(connectionInfo); // Let's count the test methods (we need to use this instead of @AfterClass on teardown() since the latter is diff --git a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml index 4bf06b5d3..a3a363642 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 14.1.3 + 14.1.4 4.0.0 diff --git a/hwvtepsouthbound/pom.xml b/hwvtepsouthbound/pom.xml index fee019496..d7899676f 100644 --- a/hwvtepsouthbound/pom.xml +++ b/hwvtepsouthbound/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/library/artifacts/pom.xml b/library/artifacts/pom.xml index 64e07e28c..96515bf03 100644 --- a/library/artifacts/pom.xml +++ b/library/artifacts/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/library/features/features/pom.xml b/library/features/features/pom.xml index 20d932c07..9fe5127b3 100644 --- a/library/features/features/pom.xml +++ b/library/features/features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 14.1.3 + 14.1.4 diff --git a/library/features/odl-ovsdb-library/pom.xml b/library/features/odl-ovsdb-library/pom.xml index 1027f9a8b..9a3b1e1ae 100644 --- a/library/features/odl-ovsdb-library/pom.xml +++ b/library/features/odl-ovsdb-library/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -41,7 +41,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.aaa odl-aaa-cert - 0.21.2 + 0.22.1 xml features diff --git a/library/features/odl-ovsdb-library/src/main/feature/feature.xml b/library/features/odl-ovsdb-library/src/main/feature/feature.xml index 279cd23da..deaa99d7b 100644 --- a/library/features/odl-ovsdb-library/src/main/feature/feature.xml +++ b/library/features/odl-ovsdb-library/src/main/feature/feature.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html odl-jackson-2 odl-netty-4 - odl-aaa-cert + odl-aaa-cert mvn:org.opendaylight.ovsdb/library/${project.version}/cfg/config diff --git a/library/features/pom.xml b/library/features/pom.xml index c973cbd4c..7233338b7 100644 --- a/library/features/pom.xml +++ b/library/features/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 org.opendaylight.ovsdb diff --git a/library/karaf/pom.xml b/library/karaf/pom.xml index 03c0b083d..82a76ce88 100644 --- a/library/karaf/pom.xml +++ b/library/karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 14.1.3 + 14.1.4 4.0.0 diff --git a/library/pom.xml b/library/pom.xml index 65d6b9447..5b14f6dcc 100644 --- a/library/pom.xml +++ b/library/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/pom.xml b/pom.xml index 2046edd1e..6657f4c89 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/schemas/pom.xml b/schemas/pom.xml index a7adddaed..02bc91411 100644 --- a/schemas/pom.xml +++ b/schemas/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/southbound/pom.xml b/southbound/pom.xml index 96bbc80bd..8f6d000fb 100644 --- a/southbound/pom.xml +++ b/southbound/pom.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/southbound/southbound-api/pom.xml b/southbound/southbound-api/pom.xml index 1858bb419..1dee9d461 100644 --- a/southbound/southbound-api/pom.xml +++ b/southbound/southbound-api/pom.xml @@ -29,17 +29,17 @@ and is available at http://www.eclipse.org/legal/epl-v10.html guava - org.opendaylight.mdsal.model - ietf-topology - - - org.opendaylight.mdsal.binding.model.ietf + org.opendaylight.ietf.model rfc6991-ietf-inet-types - org.opendaylight.mdsal.binding.model.ietf + org.opendaylight.ietf.model rfc6991-ietf-yang-types + + org.opendaylight.mdsal.model + ietf-topology + org.opendaylight.mdsal.model opendaylight-l2-types diff --git a/southbound/southbound-artifacts/pom.xml b/southbound/southbound-artifacts/pom.xml index de7846880..9f5a27ebe 100644 --- a/southbound/southbound-artifacts/pom.xml +++ b/southbound/southbound-artifacts/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/southbound/southbound-features/features/pom.xml b/southbound/southbound-features/features/pom.xml index ed1fa02aa..e04111aeb 100644 --- a/southbound/southbound-features/features/pom.xml +++ b/southbound/southbound-features/features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 14.1.3 + 14.1.4 diff --git a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml index 80ef48e2b..efb0b859d 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 14.0.18 + 15.0.1 pom import diff --git a/southbound/southbound-features/odl-ovsdb-southbound-api/src/main/feature/feature.xml b/southbound/southbound-features/odl-ovsdb-southbound-api/src/main/feature/feature.xml index d97782f19..216cc0c7a 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-api/src/main/feature/feature.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-api/src/main/feature/feature.xml @@ -8,7 +8,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal - odl-mdsal-model-odl-l2-types + odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal + odl-mdsal-model-odl-l2-types diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml index 65e1f06de..4d9e246c1 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 9.0.1 + 10.0.0 import pom diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/src/main/feature/feature.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/src/main/feature/feature.xml index 33f56634d..281f8fd8b 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/src/main/feature/feature.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/src/main/feature/feature.xml @@ -8,6 +8,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-restconf + odl-restconf diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml index dc7292d0c..cd2f98ef8 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 9.0.1 + 10.0.0 import pom diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/src/main/feature/feature.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/src/main/feature/feature.xml index fedb1a629..5e99a264c 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/src/main/feature/feature.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/src/main/feature/feature.xml @@ -8,6 +8,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-restconf-openapi + odl-restconf-openapi diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml index b6592466b..c2858c4ac 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.infrautils infrautils-artifacts - 7.1.7 + 7.1.8 pom import diff --git a/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml index 72a7efe0d..7f672aa58 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 diff --git a/southbound/southbound-features/pom.xml b/southbound/southbound-features/pom.xml index e3e87b128..d5e8e7017 100644 --- a/southbound/southbound-features/pom.xml +++ b/southbound/southbound-features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/southbound/southbound-karaf/pom.xml b/southbound/southbound-karaf/pom.xml index 13c258d30..b81395806 100644 --- a/southbound/southbound-karaf/pom.xml +++ b/southbound/southbound-karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 14.1.3 + 14.1.4 4.0.0 diff --git a/utils/hwvtepsouthbound-utils/pom.xml b/utils/hwvtepsouthbound-utils/pom.xml index 09c0955af..70f30bda5 100644 --- a/utils/hwvtepsouthbound-utils/pom.xml +++ b/utils/hwvtepsouthbound-utils/pom.xml @@ -36,7 +36,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html ${project.version} - org.opendaylight.mdsal.binding.model.ietf + org.opendaylight.ietf.model rfc6991-ietf-inet-types diff --git a/utils/odl-ovsdb-utils/pom.xml b/utils/odl-ovsdb-utils/pom.xml index dd14da4b6..87e4d8e26 100644 --- a/utils/odl-ovsdb-utils/pom.xml +++ b/utils/odl-ovsdb-utils/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 14.1.3 + 14.1.4 @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller controller-artifacts - 11.0.2 + 12.0.1 pom import diff --git a/utils/odl-ovsdb-utils/src/main/feature/feature.xml b/utils/odl-ovsdb-utils/src/main/feature/feature.xml index e9717304a..87fed150e 100644 --- a/utils/odl-ovsdb-utils/src/main/feature/feature.xml +++ b/utils/odl-ovsdb-utils/src/main/feature/feature.xml @@ -8,6 +8,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-mdsal-broker + odl-mdsal-broker diff --git a/utils/ovsdb-it-utils/pom.xml b/utils/ovsdb-it-utils/pom.xml index 3ce5cb4af..73bcdb03e 100644 --- a/utils/ovsdb-it-utils/pom.xml +++ b/utils/ovsdb-it-utils/pom.xml @@ -39,7 +39,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html ${project.version} - org.opendaylight.mdsal.binding.model.ietf + org.opendaylight.ietf.model rfc6991-ietf-inet-types diff --git a/utils/pom.xml b/utils/pom.xml index 775a7eb8d..edca82d23 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 14.1.3 + 14.1.4 diff --git a/utils/southbound-utils/pom.xml b/utils/southbound-utils/pom.xml index f830938d0..3d0595142 100644 --- a/utils/southbound-utils/pom.xml +++ b/utils/southbound-utils/pom.xml @@ -41,7 +41,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html ${project.version} - org.opendaylight.mdsal.binding.model.ietf + org.opendaylight.ietf.model rfc6991-ietf-inet-types -- 2.34.1 From c917eb0e37ce31b93cbd8c860afa8aed7633185f Mon Sep 17 00:00:00 2001 From: jenkins-releng Date: Sat, 8 Nov 2025 19:22:52 +0000 Subject: [PATCH 4/4] Release Validate --- commons/binding-parent/pom.xml | 2 +- commons/it/pom.xml | 2 +- commons/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-api/pom.xml | 4 ++-- hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-api/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-rest/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-test/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-ui/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-features/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-it/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml | 2 +- hwvtepsouthbound/pom.xml | 2 +- library/artifacts/pom.xml | 2 +- library/features/features/pom.xml | 2 +- library/features/odl-ovsdb-library/pom.xml | 2 +- library/features/pom.xml | 2 +- library/impl/pom.xml | 4 ++-- library/it/pom.xml | 6 +++--- library/karaf/pom.xml | 2 +- library/pom.xml | 2 +- pom.xml | 2 +- schemas/hardwarevtep/pom.xml | 4 ++-- schemas/openvswitch/pom.xml | 4 ++-- schemas/pom.xml | 2 +- southbound/pom.xml | 2 +- southbound/southbound-api/pom.xml | 4 ++-- southbound/southbound-artifacts/pom.xml | 2 +- southbound/southbound-features/features/pom.xml | 2 +- .../southbound-features/odl-ovsdb-southbound-api/pom.xml | 2 +- .../odl-ovsdb-southbound-impl-rest/pom.xml | 2 +- .../odl-ovsdb-southbound-impl-ui/pom.xml | 2 +- .../southbound-features/odl-ovsdb-southbound-impl/pom.xml | 2 +- .../southbound-features/odl-ovsdb-southbound-test/pom.xml | 2 +- southbound/southbound-features/pom.xml | 2 +- southbound/southbound-impl/pom.xml | 2 +- southbound/southbound-it/pom.xml | 2 +- southbound/southbound-karaf/pom.xml | 2 +- utils/config/pom.xml | 4 ++-- utils/hwvtepsouthbound-utils/pom.xml | 4 ++-- utils/mdsal-utils/pom.xml | 4 ++-- utils/odl-ovsdb-utils/pom.xml | 2 +- utils/ovsdb-it-utils/pom.xml | 2 +- utils/pom.xml | 2 +- utils/servicehelper/pom.xml | 4 ++-- utils/southbound-utils/pom.xml | 4 ++-- utils/yang-utils/pom.xml | 2 +- 50 files changed, 62 insertions(+), 62 deletions(-) diff --git a/commons/binding-parent/pom.xml b/commons/binding-parent/pom.xml index abf5f9d7a..fc284d868 100644 --- a/commons/binding-parent/pom.xml +++ b/commons/binding-parent/pom.xml @@ -17,7 +17,7 @@ org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/commons/it/pom.xml b/commons/it/pom.xml index 7b5150824..ce08cc229 100644 --- a/commons/it/pom.xml +++ b/commons/it/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb it - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/commons/pom.xml b/commons/pom.xml index 1c758b642..cc89a89bf 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb parents - 1.21.0-SNAPSHOT + 1.21.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml index 64a9b0046..1b7240727 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml @@ -10,14 +10,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent 4.0.0 org.opendaylight.ovsdb hwvtepsouthbound-api - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml index 6f9a2bfaf..8c551b107 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml @@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb hwvtepsouthbound-artifacts - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml index 00629642b..de2318450 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb hwvtepsouthbound-features - 1.21.0-SNAPSHOT + 1.21.0 feature diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml index 19f3e4eca..841d7e6d1 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.ovsdb odl-ovsdb-hwvtepsouthbound-api - 1.21.0-SNAPSHOT + 1.21.0 feature diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml index 4997be6f4..b63d0883a 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb odl-ovsdb-hwvtepsouthbound-rest - 1.21.0-SNAPSHOT + 1.21.0 feature diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml index 37459cc24..3c9b1fbbd 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent diff --git a/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml index 73caeb8eb..3f106b319 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb it - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/it diff --git a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml index a3a363642..34c400200 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml @@ -15,7 +15,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL 4.0.0 org.opendaylight.ovsdb hwvtepsouthbound-karaf - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/hwvtepsouthbound/pom.xml b/hwvtepsouthbound/pom.xml index d7899676f..f9261970b 100644 --- a/hwvtepsouthbound/pom.xml +++ b/hwvtepsouthbound/pom.xml @@ -17,7 +17,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.ovsdb hwvtepsouthbound-aggregator - 1.21.0-SNAPSHOT + 1.21.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/library/artifacts/pom.xml b/library/artifacts/pom.xml index 96515bf03..b589a3e43 100644 --- a/library/artifacts/pom.xml +++ b/library/artifacts/pom.xml @@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb library-artifacts - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/library/features/features/pom.xml b/library/features/features/pom.xml index 9fe5127b3..59ef79f79 100644 --- a/library/features/features/pom.xml +++ b/library/features/features/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb library-features - 1.21.0-SNAPSHOT + 1.21.0 feature diff --git a/library/features/odl-ovsdb-library/pom.xml b/library/features/odl-ovsdb-library/pom.xml index 9a3b1e1ae..fe46c99be 100644 --- a/library/features/odl-ovsdb-library/pom.xml +++ b/library/features/odl-ovsdb-library/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb odl-ovsdb-library - 1.21.0-SNAPSHOT + 1.21.0 feature ODL :: ovsdb :: ${project.artifactId} diff --git a/library/impl/pom.xml b/library/impl/pom.xml index 49998cbd5..0fe91f0ab 100644 --- a/library/impl/pom.xml +++ b/library/impl/pom.xml @@ -12,14 +12,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent 4.0.0 org.opendaylight.ovsdb library - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/library/it/pom.xml b/library/it/pom.xml index d56d180ef..c9338da76 100644 --- a/library/it/pom.xml +++ b/library/it/pom.xml @@ -11,14 +11,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb it - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/it 4.0.0 org.opendaylight.ovsdb library-it - 1.21.0-SNAPSHOT + 1.21.0 jar @@ -27,7 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb library-karaf - 1.21.0-SNAPSHOT + 1.21.0 zip diff --git a/library/karaf/pom.xml b/library/karaf/pom.xml index 82a76ce88..0e48541d1 100644 --- a/library/karaf/pom.xml +++ b/library/karaf/pom.xml @@ -15,7 +15,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL 4.0.0 org.opendaylight.ovsdb library-karaf - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/library/pom.xml b/library/pom.xml index 5b14f6dcc..25d3b24a1 100644 --- a/library/pom.xml +++ b/library/pom.xml @@ -17,7 +17,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb library-aggregator - 1.21.0-SNAPSHOT + 1.21.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 6657f4c89..e1ea54222 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb - 1.21.0-SNAPSHOT + 1.21.0 ${project.artifactId} pom diff --git a/schemas/hardwarevtep/pom.xml b/schemas/hardwarevtep/pom.xml index 99f2ce62a..2a1f78cdb 100644 --- a/schemas/hardwarevtep/pom.xml +++ b/schemas/hardwarevtep/pom.xml @@ -12,13 +12,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent org.opendaylight.ovsdb schema.hardwarevtep - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/schemas/openvswitch/pom.xml b/schemas/openvswitch/pom.xml index 88317e50d..0eafaad9d 100644 --- a/schemas/openvswitch/pom.xml +++ b/schemas/openvswitch/pom.xml @@ -12,13 +12,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent org.opendaylight.ovsdb schema.openvswitch - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/schemas/pom.xml b/schemas/pom.xml index 02bc91411..87c6887a4 100644 --- a/schemas/pom.xml +++ b/schemas/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb schemas - 1.21.0-SNAPSHOT + 1.21.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/southbound/pom.xml b/southbound/pom.xml index 8f6d000fb..2a479c4dc 100644 --- a/southbound/pom.xml +++ b/southbound/pom.xml @@ -16,7 +16,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.ovsdb southbound-aggregator - 1.21.0-SNAPSHOT + 1.21.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/southbound/southbound-api/pom.xml b/southbound/southbound-api/pom.xml index 1dee9d461..f008bfce5 100644 --- a/southbound/southbound-api/pom.xml +++ b/southbound/southbound-api/pom.xml @@ -10,14 +10,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent 4.0.0 org.opendaylight.ovsdb southbound-api - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/southbound/southbound-artifacts/pom.xml b/southbound/southbound-artifacts/pom.xml index 9f5a27ebe..4ade9acdd 100644 --- a/southbound/southbound-artifacts/pom.xml +++ b/southbound/southbound-artifacts/pom.xml @@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb southbound-artifacts - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/southbound/southbound-features/features/pom.xml b/southbound/southbound-features/features/pom.xml index e04111aeb..99a88f621 100644 --- a/southbound/southbound-features/features/pom.xml +++ b/southbound/southbound-features/features/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb southbound-features - 1.21.0-SNAPSHOT + 1.21.0 feature diff --git a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml index efb0b859d..6591cb9fe 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb odl-ovsdb-southbound-api - 1.21.0-SNAPSHOT + 1.21.0 feature diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml index 4d9e246c1..5ba887c38 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb odl-ovsdb-southbound-impl-rest - 1.21.0-SNAPSHOT + 1.21.0 feature ODL :: ovsdb :: ${project.artifactId} diff --git a/southbound/southbound-impl/pom.xml b/southbound/southbound-impl/pom.xml index 445789ec4..0a3b110f7 100644 --- a/southbound/southbound-impl/pom.xml +++ b/southbound/southbound-impl/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent diff --git a/southbound/southbound-it/pom.xml b/southbound/southbound-it/pom.xml index fd146668b..31f2319ea 100644 --- a/southbound/southbound-it/pom.xml +++ b/southbound/southbound-it/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb it - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/it 4.0.0 diff --git a/southbound/southbound-karaf/pom.xml b/southbound/southbound-karaf/pom.xml index b81395806..ad71da835 100644 --- a/southbound/southbound-karaf/pom.xml +++ b/southbound/southbound-karaf/pom.xml @@ -15,7 +15,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL 4.0.0 org.opendaylight.ovsdb southbound-karaf - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/utils/config/pom.xml b/utils/config/pom.xml index be6174cd5..852ae6f1a 100644 --- a/utils/config/pom.xml +++ b/utils/config/pom.xml @@ -12,13 +12,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.config - 1.21.0-SNAPSHOT + 1.21.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/utils/hwvtepsouthbound-utils/pom.xml b/utils/hwvtepsouthbound-utils/pom.xml index 70f30bda5..7b8fcd795 100644 --- a/utils/hwvtepsouthbound-utils/pom.xml +++ b/utils/hwvtepsouthbound-utils/pom.xml @@ -11,13 +11,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.hwvtepsouthbound-utils - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/utils/mdsal-utils/pom.xml b/utils/mdsal-utils/pom.xml index b4644b9ba..8c87746a8 100644 --- a/utils/mdsal-utils/pom.xml +++ b/utils/mdsal-utils/pom.xml @@ -11,13 +11,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.mdsal-utils - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/utils/odl-ovsdb-utils/pom.xml b/utils/odl-ovsdb-utils/pom.xml index 87e4d8e26..551c08745 100644 --- a/utils/odl-ovsdb-utils/pom.xml +++ b/utils/odl-ovsdb-utils/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb odl-ovsdb-utils - 1.21.0-SNAPSHOT + 1.21.0 feature diff --git a/utils/ovsdb-it-utils/pom.xml b/utils/ovsdb-it-utils/pom.xml index 73bcdb03e..328fd0152 100644 --- a/utils/ovsdb-it-utils/pom.xml +++ b/utils/ovsdb-it-utils/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent diff --git a/utils/pom.xml b/utils/pom.xml index edca82d23..3d2b243ce 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb utils - 1.21.0-SNAPSHOT + 1.21.0 pom diff --git a/utils/servicehelper/pom.xml b/utils/servicehelper/pom.xml index 1cd1b45b9..cc5a3f95f 100644 --- a/utils/servicehelper/pom.xml +++ b/utils/servicehelper/pom.xml @@ -12,13 +12,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.servicehelper - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/utils/southbound-utils/pom.xml b/utils/southbound-utils/pom.xml index 3d0595142..ceade963e 100644 --- a/utils/southbound-utils/pom.xml +++ b/utils/southbound-utils/pom.xml @@ -11,13 +11,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.southbound-utils - 1.21.0-SNAPSHOT + 1.21.0 bundle diff --git a/utils/yang-utils/pom.xml b/utils/yang-utils/pom.xml index 7de0da12f..14a56e546 100644 --- a/utils/yang-utils/pom.xml +++ b/utils/yang-utils/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb ovsdb-binding-parent - 1.21.0-SNAPSHOT + 1.21.0 ../../commons/binding-parent -- 2.34.1