From 6d140c743b8aecda38149ab1a78d0f3bffdfff9d Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 30 Jul 2024 19:09:01 +0200 Subject: [PATCH 1/2] WIP: Bump upstreams for 2024.09 Scandium Adopt: - odlparent-14.0.2 - infrautils-7.0.2 - yangtools-14.0.2 - mdsal-14.0.1 - controller-10.0.1 - aaa-0.20.0 - netconf-8.0.0-SNAPSHOT This also migrates use of KeyAware to EntryObject, as that is more precise intent. // FIXME: 7 errors, 1 failure Change-Id: If63249920574aebe41c9a3066a0b1100c8f4dc30 Signed-off-by: Robert Varga --- commons/binding-parent/pom.xml | 6 +- commons/it/pom.xml | 4 +- commons/pom.xml | 2 +- .../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 +- .../hwvtepsouthbound-impl/pom.xml | 8 +- .../hwvtepsouthbound/HwvtepDeviceInfo.java | 75 +++++++++++-------- .../HwvtepSouthboundMapper.java | 4 +- .../HwvtepSouthboundProvider.java | 2 +- .../HwvtepSouthboundUtil.java | 34 ++++----- .../hwvtepsouthbound/HwvtepTableReader.java | 21 +++--- .../InstanceIdentifierCodec.java | 8 +- .../cli/HwvtepCacheDisplayCmd.java | 25 ++++--- .../reconciliation/ReconciliationTask.java | 2 +- .../DataObjectModificationImpl.java | 22 +++--- .../DataTreeModificationImpl.java | 16 ++-- .../GlobalConfigOperationalChangeGetter.java | 19 +++-- .../ConnectionReconciliationTask.java | 2 +- .../transact/AbstractTransactCommand.java | 71 ++++++++++-------- .../transact/DependentJob.java | 19 +++-- .../transact/EmptyDependencyGetter.java | 6 +- .../transact/HwvtepOperationalState.java | 45 +++++------ .../transact/LogicalRouterUpdateCommand.java | 5 +- .../transact/McastMacsLocalRemoveCommand.java | 3 +- .../transact/McastMacsLocalUpdateCommand.java | 3 +- .../McastMacsRemoteUpdateCommand.java | 9 ++- .../transact/MdsalUpdate.java | 4 +- .../transact/PhysicalPortUpdateCommand.java | 6 +- .../transact/PhysicalSwitchUpdateCommand.java | 5 +- .../transact/TransactCommand.java | 4 +- .../transact/TransactCommandAggregator.java | 45 ++++++----- .../transact/TransactUtils.java | 3 +- .../transact/UcastMacsLocalRemoveCommand.java | 3 +- .../transact/UcastMacsLocalUpdateCommand.java | 5 +- .../UcastMacsRemoteRemoveCommand.java | 3 +- .../UcastMacsRemoteUpdateCommand.java | 11 +-- .../transact/UnMetDependencyGetter.java | 34 ++++----- .../md/AbstractTransactionCommand.java | 14 ++-- .../md/HwvtepGlobalRemoveCommand.java | 5 +- .../md/HwvtepLogicalRouterUpdateCommand.java | 6 +- .../md/HwvtepLogicalSwitchUpdateCommand.java | 2 +- .../md/HwvtepMacEntriesRemoveCommand.java | 2 +- .../md/HwvtepManagerUpdateCommand.java | 2 +- .../md/HwvtepMcastMacsLocalUpdateCommand.java | 4 +- .../HwvtepMcastMacsRemoteUpdateCommand.java | 4 +- .../md/HwvtepPhysicalPortUpdateCommand.java | 14 ++-- .../md/HwvtepPhysicalSwitchRemoveCommand.java | 2 +- .../md/HwvtepPhysicalSwitchUpdateCommand.java | 10 ++- .../md/HwvtepTunnelUpdateCommand.java | 6 +- .../md/HwvtepUcastMacsLocalUpdateCommand.java | 6 +- .../HwvtepUcastMacsRemoteUpdateCommand.java | 6 +- .../DataChangeListenerTestBase.java | 2 +- .../HwvtepDataChangeListenerTest.java | 2 +- .../HwvtepOperationalDataChangeListener.java | 8 +- .../ovsdb/hwvtepsouthbound/TestBuilders.java | 6 +- .../transact/DependencyQueueTest.java | 4 +- .../transact/UnMetDependencyGetterTest.java | 4 +- .../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 | 6 +- 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-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 +- .../src/main/feature/feature.xml | 6 +- .../odl-ovsdb-southbound-test/pom.xml | 2 +- southbound/southbound-features/pom.xml | 2 +- southbound/southbound-impl/pom.xml | 8 +- .../southbound/InstanceIdentifierCodec.java | 8 +- .../southbound/OvsdbConnectionManager.java | 5 +- .../OvsdbDataTreeChangeListener.java | 4 +- .../ovsdb/southbound/SouthboundMapper.java | 2 +- .../ovsdb/southbound/SouthboundProvider.java | 2 +- .../ovsdb/southbound/SouthboundUtil.java | 7 +- .../transact/AutoAttachRemovedCommand.java | 13 +++- .../ovsdb/transact/DataChangeEvent.java | 2 +- .../DataChangesManagedByOvsdbNodeEvent.java | 18 +++-- .../ovsdb/transact/QosUpdateCommand.java | 9 ++- .../TerminationPointUpdateCommand.java | 13 +++- .../ovsdb/transact/TransactUtils.java | 12 +-- .../reconciliation/ReconciliationTask.java | 2 +- .../BridgeConfigReconciliationTask.java | 5 +- ...minationPointConfigReconciliationTask.java | 2 +- .../md/OpenVSwitchUpdateCommand.java | 2 +- .../md/OvsdbBridgeRemovedCommand.java | 6 +- .../md/OvsdbBridgeUpdateCommand.java | 10 +-- .../md/OvsdbControllerUpdateCommand.java | 6 +- .../md/OvsdbInitialPortUpdateCommand.java | 2 +- .../md/OvsdbNodeRemoveCommand.java | 5 +- .../md/OvsdbPortUpdateCommand.java | 17 +++-- .../md/OvsdbQosUpdateCommand.java | 4 +- .../md/OvsdbQueueUpdateCommand.java | 2 +- .../InstanceIdentifierCodecTest.java | 2 +- .../southbound/SouthboundMapperTest.java | 7 +- .../southbound/SouthboundProviderTest.java | 2 +- .../ovsdb/southbound/SouthboundUtilTest.java | 10 +-- ...ataChangesManagedByOvsdbNodeEventTest.java | 2 +- .../TerminationPointCreateCommandTest.java | 2 +- .../ovsdb/transact/TransactUtilsTest.java | 2 +- .../BridgeConfigReconciliationTaskTest.java | 6 +- .../md/OvsdbBridgeUpdateCommandTest.java | 11 ++- .../md/OvsdbControllerUpdateCommandTest.java | 8 +- .../md/OvsdbNodeRemoveCommandTest.java | 6 +- .../md/OvsdbPortUpdateCommandTest.java | 2 +- .../ovsdb/southbound/it/SouthboundIT.java | 42 ++++++----- southbound/southbound-karaf/pom.xml | 2 +- .../ovsdb/utils/mdsal/utils/MdsalObject.java | 3 +- .../ovsdb/utils/mdsal/utils/MdsalUtils.java | 2 +- .../utils/mdsal/utils/MdsalUtilsAsync.java | 5 +- .../utils/NotifyingDataChangeListener.java | 2 +- .../utils/mdsal/utils/TransactionHistory.java | 3 +- .../mdsal/utils/MdsalUtilsAsyncTest.java | 2 +- .../utils/mdsal/utils/MdsalUtilsTest.java | 2 +- utils/odl-ovsdb-utils/pom.xml | 4 +- .../src/main/feature/feature.xml | 2 +- utils/pom.xml | 2 +- .../southbound/utils/SouthboundUtils.java | 25 ++++--- utils/yang-utils/pom.xml | 6 +- .../ovsdb/utils/yang/YangUtils.java | 8 +- 143 files changed, 586 insertions(+), 493 deletions(-) diff --git a/commons/binding-parent/pom.xml b/commons/binding-parent/pom.xml index 81ad31b38..9d3c6ab22 100644 --- a/commons/binding-parent/pom.xml +++ b/commons/binding-parent/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.mdsal binding-parent - 13.0.1 + 14.0.1 @@ -25,14 +25,14 @@ org.opendaylight.aaa aaa-artifacts - 0.19.3 + 0.20.0 pom import org.opendaylight.infrautils infrautils-artifacts - 6.0.6 + 7.0.2 pom import diff --git a/commons/it/pom.xml b/commons/it/pom.xml index 5b88c51a3..206402570 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 - 9.0.2 + 10.0.1 @@ -70,7 +70,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 13.0.1 + 14.0.1 pom import diff --git a/commons/pom.xml b/commons/pom.xml index cefc5d9d4..992a54fef 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 - 13.0.11 + 14.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml index bfa90c062..8705fff79 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 - 13.0.11 + 14.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml index 6d6db3c71..09de4666a 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 - 13.0.11 + 14.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml index 548f0137c..3fc7ee5cd 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 - 13.0.11 + 14.0.2 @@ -22,7 +22,7 @@ org.opendaylight.mdsal mdsal-artifacts - 13.0.1 + 14.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 5e5f36ebb..ed7cf2026 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 f04bc08e8..f1397c740 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 - 13.0.11 + 14.0.2 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 7.0.4 + 8.0.0-SNAPSHOT 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 21078f61b..035aa966d 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 65d1012e2..213f8b648 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 - 13.0.11 + 14.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml index d8eed6a0d..aaa6ae6b2 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 - 13.0.11 + 14.0.2 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 7.0.4 + 8.0.0-SNAPSHOT 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 12df0c9e8..899944eea 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 9a6e65969..6d1ed8fe3 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 - 13.0.11 + 14.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml index 2be2710bc..01ad5182d 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 - 13.0.11 + 14.0.2 org.opendaylight.ovsdb diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml index 91bc02c14..c94031386 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml @@ -24,6 +24,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html ODL :: ovsdb :: ${project.artifactId} + + org.opendaylight.yangtools + binding-data-codec-api + org.opendaylight.yangtools yang-data-util @@ -36,10 +40,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-dom-api - - org.opendaylight.mdsal - mdsal-binding-dom-codec-api - org.opendaylight.mdsal mdsal-eos-binding-api diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDeviceInfo.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDeviceInfo.java index 8b4d691f8..06eb291bf 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDeviceInfo.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDeviceInfo.java @@ -29,8 +29,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; +import org.opendaylight.yangtools.binding.BindingInstanceIdentifier; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,20 +58,20 @@ public class HwvtepDeviceInfo { private static final Logger LOG = LoggerFactory.getLogger(HwvtepDeviceInfo.class); - private Map, Map> availableInOperDs = + private Map>, Map> availableInOperDs = new ConcurrentHashMap<>(); - public void markAvailableInOperDs(Class cls, InstanceIdentifier key) { + public void markAvailableInOperDs(Class> cls, InstanceIdentifier key) { availableInOperDs.putIfAbsent(cls, new ConcurrentHashMap<>()); availableInOperDs.get(cls).put(key, Boolean.TRUE); } - public Boolean isAvailableInOperDs(Class cls, InstanceIdentifier key) { + public Boolean isAvailableInOperDs(Class> cls, InstanceIdentifier key) { availableInOperDs.putIfAbsent(cls, new ConcurrentHashMap<>()); return availableInOperDs.get(cls).getOrDefault(key, Boolean.FALSE); } - public Boolean clearOperDsAvailability(Class cls, InstanceIdentifier key) { + public Boolean clearOperDsAvailability(Class> cls, InstanceIdentifier key) { availableInOperDs.putIfAbsent(cls, new ConcurrentHashMap<>()); return availableInOperDs.get(cls).remove(key); } @@ -139,14 +141,14 @@ public class HwvtepDeviceInfo { logicalSwitchVsMcasts = new ConcurrentHashMap<>(); private final Map physicalSwitches = new ConcurrentHashMap<>(); private final Map mapTunnelToPhysicalSwitch = new ConcurrentHashMap<>(); - private final Map, Map> opKeyVsData = + private final Map>, Map> opKeyVsData = new ConcurrentHashMap<>(); - private final Map, Map> uuidVsData = new ConcurrentHashMap<>(); + private final Map>, Map> uuidVsData = new ConcurrentHashMap<>(); private final HwvtepConnectionInstance connectionInstance; private final DependencyQueue dependencyQueue; private Map iidInQueueCount = new ConcurrentHashMap<>(); - private Map, Map> configKeyVsData = + private Map>, Map> configKeyVsData = new ConcurrentHashMap<>(); private TransactionHistory controllerTxHistory = null; private TransactionHistory deviceUpdateHistory = null; @@ -226,33 +228,33 @@ public class HwvtepDeviceInfo { return mapTunnelToPhysicalSwitch; } - public boolean isKeyInTransit(Class cls, InstanceIdentifier key) { + public boolean isKeyInTransit(Class> cls, InstanceIdentifier key) { DeviceData deviceData = HwvtepSouthboundUtil.getData(opKeyVsData, cls, key); return deviceData != null && DeviceDataStatus.IN_TRANSIT == deviceData.status; } - public boolean isConfigDataAvailable(Class cls, InstanceIdentifier key) { + public boolean isConfigDataAvailable(Class> cls, InstanceIdentifier key) { return HwvtepSouthboundUtil.getData(configKeyVsData, cls, key) != null; } - public void updateConfigData(Class cls, InstanceIdentifier key, Object data) { + public void updateConfigData(Class> cls, InstanceIdentifier key, Object data) { HwvtepSouthboundUtil.updateData(configKeyVsData, cls, key, new DeviceData(key, null, data, DeviceDataStatus.AVAILABLE)); } - public DeviceData getConfigData(Class cls, InstanceIdentifier key) { + public DeviceData getConfigData(Class> cls, InstanceIdentifier key) { return HwvtepSouthboundUtil.getData(configKeyVsData, cls, key); } - public Map, Map> getConfigData() { + public Map>, Map> getConfigData() { return Collections.unmodifiableMap(configKeyVsData); } - public void clearConfigData(Class cls, InstanceIdentifier key) { + public void clearConfigData(Class> cls, InstanceIdentifier key) { HwvtepSouthboundUtil.clearData(configKeyVsData, cls, key); } - public void markKeyAsInTransit(Class cls, InstanceIdentifier key) { + public void markKeyAsInTransit(Class> cls, InstanceIdentifier key) { LOG.debug("Marking device data as intransit {}", key); DeviceData deviceData = getDeviceOperData(cls, key); UUID uuid = null; @@ -266,7 +268,7 @@ public class HwvtepDeviceInfo { new DeviceData(key, uuid, data, DeviceDataStatus.IN_TRANSIT)); } - public void updateDeviceOperData(Class cls, InstanceIdentifier key, + public void updateDeviceOperData(Class> cls, InstanceIdentifier key, UUID uuid, Object data) { LOG.debug("Updating device data {}", key); DeviceData deviceData = new DeviceData(key, uuid, data, DeviceDataStatus.AVAILABLE); @@ -274,7 +276,7 @@ public class HwvtepDeviceInfo { HwvtepSouthboundUtil.updateData(uuidVsData, cls, uuid, deviceData); } - public void clearDeviceOperData(Class cls, InstanceIdentifier key) { + public void clearDeviceOperData(Class> cls, InstanceIdentifier key) { DeviceData deviceData = HwvtepSouthboundUtil.getData(opKeyVsData, cls, key); if (deviceData != null && deviceData.uuid != null) { HwvtepSouthboundUtil.clearData(uuidVsData, cls, deviceData.uuid); @@ -282,7 +284,7 @@ public class HwvtepDeviceInfo { HwvtepSouthboundUtil.clearData(opKeyVsData, cls, key); } - public void clearDeviceOperData(Class cls) { + public void clearDeviceOperData(Class> cls) { Map iids = opKeyVsData.get(cls); if (iids != null && !iids.isEmpty()) { Iterator> it = iids.entrySet().iterator(); @@ -296,7 +298,7 @@ public class HwvtepDeviceInfo { } } - public void clearDeviceOperUUID(Class cls, InstanceIdentifier key, UUID uuid) { + public void clearDeviceOperUUID(Class> cls, InstanceIdentifier key, UUID uuid) { LOG.debug("Clearing device data {}", key); if (uuidVsData.containsKey(cls) && uuidVsData.get(cls).containsKey(uuid)) { LOG.debug("Remove {} {} from device data.", connectionInstance.getNodeId().getValue(), cls.getSimpleName()); @@ -305,19 +307,19 @@ public class HwvtepDeviceInfo { HwvtepSouthboundUtil.clearData(opKeyVsData, cls, key); } - public DeviceData getDeviceOperData(Class cls, UUID uuid) { + public DeviceData getDeviceOperData(Class> cls, UUID uuid) { return HwvtepSouthboundUtil.getData(uuidVsData, cls, uuid); } - public DeviceData getDeviceOperData(Class cls, InstanceIdentifier key) { + public DeviceData getDeviceOperData(Class> cls, InstanceIdentifier key) { return HwvtepSouthboundUtil.getData(opKeyVsData, cls, key); } - public Map getDeviceOperData(Class cls) { + public Map getDeviceOperData(Class> cls) { return opKeyVsData.get(cls); } - public InstanceIdentifier getDeviceOperKey(final Class cls, final UUID uuid) { + public InstanceIdentifier getDeviceOperKey(final Class> cls, final UUID uuid) { DeviceData deviceData = HwvtepSouthboundUtil.getData(uuidVsData, cls, uuid); if (deviceData != null) { return deviceData.getKey(); @@ -325,7 +327,7 @@ public class HwvtepDeviceInfo { return null; } - public UUID getUUID(Class cls, InstanceIdentifier key) { + public UUID getUUID(Class> cls, InstanceIdentifier key) { DeviceData data = HwvtepSouthboundUtil.getData(opKeyVsData, cls, key); if (data != null) { return data.uuid; @@ -333,7 +335,7 @@ public class HwvtepDeviceInfo { return null; } - public void addJobToQueue(DependentJob job) { + public > void addJobToQueue(DependentJob job) { dependencyQueue.addToQueue(job); } @@ -349,7 +351,7 @@ public class HwvtepDeviceInfo { dependencyQueue.submit(() -> connectionInstance.transact(transactCommand)); } - public void clearInTransit(Class cls, InstanceIdentifier key) { + public void clearInTransit(Class> cls, InstanceIdentifier key) { DeviceData deviceData = getDeviceOperData(cls, key); if (deviceData != null && deviceData.isInTransitState()) { if (deviceData.getData() != null) { @@ -361,7 +363,13 @@ public class HwvtepDeviceInfo { } } - public void incRefCount(InstanceIdentifier reference, InstanceIdentifier tep) { + public void incRefCount(InstanceIdentifier reference, BindingInstanceIdentifier tep) { + if (tep instanceof DataObjectIdentifier doi) { + incRefCount(reference, doi.toLegacy()); + } + } + + public void incRefCount(InstanceIdentifier reference, InstanceIdentifier tep) { if (reference == null || tep == null) { return; } @@ -377,6 +385,12 @@ public class HwvtepDeviceInfo { return tepIdReferences.get(tep); } + public void decRefCount(InstanceIdentifier reference, BindingInstanceIdentifier tep) { + if (tep instanceof DataObjectIdentifier doi) { + decRefCount(reference, doi.toLegacy()); + } + } + public void decRefCount(InstanceIdentifier reference, InstanceIdentifier tep) { if (reference == null || tep == null || !tepIdReferences.containsKey(tep)) { return; @@ -449,7 +463,7 @@ public class HwvtepDeviceInfo { return connectionInstance; } - public void setConfigKeyVsData(Map, Map>, Map> configKeyVsData) { this.configKeyVsData = configKeyVsData; } @@ -470,11 +484,11 @@ public class HwvtepDeviceInfo { deviceUpdateHistory.addToHistory(transactionType, object); } - public Map, Map> getOperData() { + public Map>, Map> getOperData() { return Collections.unmodifiableMap(opKeyVsData); } - public Map, Map> getUuidData() { + public Map>, Map> getUuidData() { return Collections.unmodifiableMap(uuidVsData); } @@ -490,5 +504,4 @@ public class HwvtepDeviceInfo { public boolean isKeyInDependencyQueue(InstanceIdentifier iid) { return iidInQueueCount.containsKey(iid); } - } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundMapper.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundMapper.java index d5ee74860..10b8b99a0 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundMapper.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundMapper.java @@ -128,8 +128,8 @@ public final class HwvtepSouthboundMapper { final InstanceIdentifier localTpIid, final InstanceIdentifier remoteTpIid) { - TunnelsKey tunnelsKey = new TunnelsKey(new HwvtepPhysicalLocatorRef(localTpIid), - new HwvtepPhysicalLocatorRef(remoteTpIid)); + TunnelsKey tunnelsKey = new TunnelsKey(new HwvtepPhysicalLocatorRef(localTpIid.toIdentifier()), + new HwvtepPhysicalLocatorRef(remoteTpIid.toIdentifier())); InstanceIdentifier tunnelInstanceId = nodeIid.builder().augmentation(PhysicalSwitchAugmentation.class) .child(Tunnels.class, tunnelsKey).build(); return tunnelInstanceId; 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 1ce0fcc08..57e80829e 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 @@ -21,7 +21,6 @@ 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.binding.api.ReadWriteTransaction; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.mdsal.eos.binding.api.Entity; @@ -40,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.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.osgi.service.component.annotations.Activate; 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 ee1fb11b8..9e8cd32b5 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 @@ -33,9 +33,10 @@ 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; 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.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.opendaylight.yangtools.yang.data.impl.codec.DeserializationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -76,16 +77,15 @@ public final class HwvtepSouthboundUtil { // FIXME: this should be an instance method public static InstanceIdentifier deserializeInstanceIdentifier(String iidString) { - InstanceIdentifier result = null; try { - result = instanceIdentifierCodec.bindingDeserializer(iidString); + return instanceIdentifierCodec.bindingDeserializer(iidString); } catch (DeserializationException e) { LOG.warn("Unable to deserialize iidString", e); + return null; } - return result; } - public static Optional readNode( + public static Optional readNode( DataBroker db, LogicalDatastoreType logicalDatastoreType, final InstanceIdentifier connectionIid) { if (logicalDatastoreType == LogicalDatastoreType.OPERATIONAL) { @@ -104,7 +104,7 @@ public final class HwvtepSouthboundUtil { } } - public static Optional readNode( + public static Optional readNode( ReadTransaction transaction, LogicalDatastoreType logicalDatastoreType, final InstanceIdentifier connectionIid) { if (logicalDatastoreType == LogicalDatastoreType.OPERATIONAL) { @@ -123,7 +123,7 @@ public final class HwvtepSouthboundUtil { } } - public static Optional readNode( + public static Optional readNode( ReadWriteTransaction transaction, final InstanceIdentifier connectionIid) { return readNode(transaction, LogicalDatastoreType.OPERATIONAL, connectionIid); } @@ -169,7 +169,7 @@ public final class HwvtepSouthboundUtil { @SuppressWarnings("unchecked") // Note: erasure makes this safe in combination with the typecheck // below - InstanceIdentifier path = (InstanceIdentifier) ref.getValue(); + InstanceIdentifier path = ((DataObjectIdentifier) ref.getValue()).toLegacy(); Optional optional = new MdsalUtils(db).readOptional(LogicalDatastoreType.OPERATIONAL, path); if (optional != null && optional.isPresent()) { @@ -206,8 +206,8 @@ public final class HwvtepSouthboundUtil { LOG.debug(SCHEMA_VERSION_MISMATCH, column, table, "hw_vtep", ex.getMessage()); } - public static void updateData(Map, Map> map, - Class cls, K key, D data) { + public static void updateData(Map>, Map> map, + Class> cls, K key, D data) { LOG.debug("Updating data {} {} {}", cls, key, data); if (key == null) { return; @@ -218,8 +218,8 @@ public final class HwvtepSouthboundUtil { map.get(cls).put(key, data); } - public static D getData(Map, Map> map, - Class cls, K key) { + public static D getData(Map>, Map> map, + Class> cls, K key) { if (key == null) { return null; } @@ -229,8 +229,8 @@ public final class HwvtepSouthboundUtil { return null; } - public static boolean containsKey(Map, Map> map, - Class cls, K key) { + public static boolean containsKey(Map>, Map> map, + Class> cls, K key) { if (key == null) { return false; } @@ -240,8 +240,8 @@ public final class HwvtepSouthboundUtil { return false; } - public static void clearData(Map, Map> map, - Class cls, K key) { + public static void clearData(Map>, Map> map, + Class> cls, K key) { LOG.debug("Clearing data {} {}", cls, key); if (key == null) { return; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepTableReader.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepTableReader.java index df7a650e3..8cfe755a0 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepTableReader.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepTableReader.java @@ -62,9 +62,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.port.attributes.VlanBindings; 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.node.TerminationPoint; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -98,7 +99,7 @@ public class HwvtepTableReader { TerminationPoint.class, PhysicalLocator.class, VlanBindings.class, PhysicalPort.class); - private final ImmutableMap>, WhereClauseGetter> whereClauseGetters; + private final ImmutableMap>, WhereClauseGetter> whereClauseGetters; private final ImmutableClassToInstanceMap> tables; private final HwvtepConnectionInstance connectionInstance; @@ -113,7 +114,7 @@ public class HwvtepTableReader { } final Builder> tableBuilder = ImmutableClassToInstanceMap.>builder(); - final ImmutableMap.Builder>, WhereClauseGetter> whereBuilder = + final ImmutableMap.Builder>, WhereClauseGetter> whereBuilder = ImmutableMap.builderWithExpectedSize(4); if (dbSchema != null) { @@ -162,8 +163,8 @@ public class HwvtepTableReader { @Override public List apply(final InstanceIdentifier iid) { RemoteMcastMacsKey key = iid.firstKeyOf(RemoteMcastMacs.class); - InstanceIdentifier lsIid = (InstanceIdentifier) key.getLogicalSwitchRef() - .getValue(); + InstanceIdentifier lsIid = + ((DataObjectIdentifier) key.getLogicalSwitchRef().getValue()).toLegacy(); UUID lsUUID = getLsUuid(lsIid); if (lsUUID == null) { LOG.warn("Could not find uuid for ls key {}", getNodeKeyStr(lsIid)); @@ -206,8 +207,8 @@ public class HwvtepTableReader { @Override public List apply(final InstanceIdentifier iid) { RemoteUcastMacsKey key = iid.firstKeyOf(RemoteUcastMacs.class); - InstanceIdentifier lsIid = (InstanceIdentifier) key.getLogicalSwitchRef() - .getValue(); + InstanceIdentifier lsIid = + ((DataObjectIdentifier) key.getLogicalSwitchRef().getValue()).toLegacy(); UUID lsUUID = connectionInstance.getDeviceInfo().getUUID(LogicalSwitches.class, lsIid); if (lsUUID == null) { LOG.error("Could not find uuid for ls key {}", lsIid); @@ -252,7 +253,7 @@ public class HwvtepTableReader { } @SuppressWarnings("checkstyle:IllegalCatch") - public Optional getHwvtepTableEntryUUID(final Class cls, + public Optional getHwvtepTableEntryUUID(final Class> cls, final InstanceIdentifier iid, final UUID existingUUID) { final TypedDatabaseSchema dbSchema; @@ -316,7 +317,7 @@ public class HwvtepTableReader { } @SuppressWarnings("checkstyle:IllegalCatch") - public List getHwvtepTableEntries(final Class cls) { + public List getHwvtepTableEntries(final Class> cls) { final TypedDatabaseSchema dbSchema; try { dbSchema = connectionInstance.getSchema(HwvtepSchemaConstants.HARDWARE_VTEP).get(); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java index 2a98135b7..4f1b52734 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java @@ -8,8 +8,8 @@ package org.opendaylight.ovsdb.hwvtepsouthbound; import java.util.Optional; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.dom.api.DOMSchemaService; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.XMLNamespace; @@ -77,11 +77,11 @@ public final class InstanceIdentifierCodec extends AbstractStringInstanceIdentif } public InstanceIdentifier bindingDeserializer(final String iidString) throws DeserializationException { - YangInstanceIdentifier normalizedYangIid = deserialize(iidString); - return bindingNormalizedNodeSerializer.fromYangInstanceIdentifier(normalizedYangIid); + return bindingDeserializer(deserialize(iidString)); } public InstanceIdentifier bindingDeserializer(final YangInstanceIdentifier yangIID) { - return bindingNormalizedNodeSerializer.fromYangInstanceIdentifier(yangIID); + final var ref = bindingNormalizedNodeSerializer.fromYangInstanceIdentifier(yangIID); + return ref != null ? ref.toLegacy() : null; } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/cli/HwvtepCacheDisplayCmd.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/cli/HwvtepCacheDisplayCmd.java index 289c3905c..984fefc34 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/cli/HwvtepCacheDisplayCmd.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/cli/HwvtepCacheDisplayCmd.java @@ -19,6 +19,7 @@ import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepSouthboundProviderInfo; import org.opendaylight.ovsdb.lib.notation.UUID; import org.opendaylight.ovsdb.schema.hardwarevtep.PhysicalPort; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepLogicalSwitchRef; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs; @@ -30,8 +31,9 @@ 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.NodeKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; @Service @Command(scope = "hwvtep", name = "cache", description = "Disply hwvtep cache") @@ -112,9 +114,9 @@ public class HwvtepCacheDisplayCmd implements Action { } - private static void printEntry(PrintStream console, Map.Entry, + private static void printEntry(PrintStream console, Map.Entry>, Map> entry) { - Class cls = entry.getKey(); + Class> cls = entry.getKey(); Map map = entry.getValue(); String clsName = cls.getSimpleName(); console.println(clsName + " - "); @@ -156,8 +158,8 @@ public class HwvtepCacheDisplayCmd implements Action { private static void printRemoteMcasts(PrintStream console, HwvtepDeviceInfo.DeviceData deviceData) { InstanceIdentifier remoteMcastMacsIid = deviceData.getKey(); String macAddress = remoteMcastMacsIid.firstKeyOf(RemoteMcastMacs.class).getMacEntryKey().getValue(); - String logicalSwitchRef = remoteMcastMacsIid.firstKeyOf(RemoteMcastMacs.class).getLogicalSwitchRef().getValue() - .firstKeyOf(LogicalSwitches.class).getHwvtepNodeName().getValue(); + String logicalSwitchRef = + getLogicalSwitchRef(remoteMcastMacsIid.firstKeyOf(RemoteMcastMacs.class).getLogicalSwitchRef()); StringBuilder macEntryDetails = new StringBuilder(macAddress).append(" LogicalSwitchRef ") .append(logicalSwitchRef); console.print(macEntryDetails); @@ -166,13 +168,18 @@ public class HwvtepCacheDisplayCmd implements Action { private static void printRemoteUcasts(PrintStream console, HwvtepDeviceInfo.DeviceData deviceData) { InstanceIdentifier remoteUcastMacsIid = deviceData.getKey(); String macAddress = remoteUcastMacsIid.firstKeyOf(RemoteUcastMacs.class).getMacEntryKey().getValue(); - String logicalSwitchRef = remoteUcastMacsIid.firstKeyOf(RemoteUcastMacs.class).getLogicalSwitchRef().getValue() - .firstKeyOf(LogicalSwitches.class).getHwvtepNodeName().getValue(); + String logicalSwitchRef = + getLogicalSwitchRef(remoteUcastMacsIid.firstKeyOf(RemoteUcastMacs.class).getLogicalSwitchRef()); StringBuilder macEntryDetails = new StringBuilder(macAddress).append(" LogicalSwitchRef ") .append(logicalSwitchRef); console.print(macEntryDetails); } + private static String getLogicalSwitchRef(HwvtepLogicalSwitchRef hwvtepLogicalSwitchRef) { + return ((DataObjectIdentifier) hwvtepLogicalSwitchRef.getValue()) + .toLegacy().firstKeyOf(LogicalSwitches.class).getHwvtepNodeName().getValue(); + } + private static void printTerminationPoint(PrintStream console, HwvtepDeviceInfo.DeviceData deviceData) { InstanceIdentifier terminationPointIid = deviceData.getKey(); console.print(terminationPointIid.firstKeyOf(TerminationPoint.class).getTpId().getValue()); @@ -200,9 +207,9 @@ public class HwvtepCacheDisplayCmd implements Action { console.println(deviceData.getUuid()); } - private static void printEntryUUID(PrintStream console, Map.Entry, Map>, Map> entry) { - Class cls = entry.getKey(); + Class> cls = entry.getKey(); Map map = entry.getValue(); String clsName = cls.getSimpleName(); console.println(clsName + " - "); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/ReconciliationTask.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/ReconciliationTask.java index c4a6ff9b9..b366e775a 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/ReconciliationTask.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/ReconciliationTask.java @@ -11,7 +11,7 @@ import static java.util.Objects.requireNonNull; import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepConnectionManager; import org.opendaylight.ovsdb.hwvtepsouthbound.reconciliation.connection.ConnectionReconciliationTask; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** 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 4f5d35b2c..7570b1764 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 @@ -10,16 +10,16 @@ package org.opendaylight.ovsdb.hwvtepsouthbound.reconciliation.configuration; import java.util.ArrayList; import java.util.Collection; import org.opendaylight.mdsal.binding.api.DataObjectModification; -import org.opendaylight.yangtools.yang.binding.Augmentation; -import org.opendaylight.yangtools.yang.binding.ChildOf; -import org.opendaylight.yangtools.yang.binding.ChoiceIn; -import org.opendaylight.yangtools.yang.binding.DataObject; -import org.opendaylight.yangtools.yang.binding.ExactDataObjectStep; +import org.opendaylight.yangtools.binding.Augmentation; +import org.opendaylight.yangtools.binding.ChildOf; +import org.opendaylight.yangtools.binding.ChoiceIn; +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; -import org.opendaylight.yangtools.yang.binding.Key; -import org.opendaylight.yangtools.yang.binding.KeyAware; -import org.opendaylight.yangtools.yang.binding.KeyStep; -import org.opendaylight.yangtools.yang.binding.NodeStep; public class DataObjectModificationImpl implements DataObjectModification { private final Collection> childNodesCache = new ArrayList<>(); @@ -84,13 +84,13 @@ public class DataObjectModificationImpl implements DataObj @Override @SuppressWarnings("unchecked") - public & ChildOf, K extends Key> DataObjectModification + 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 KeyAware & ChildOf, + public & DataObject, C extends EntryObject & ChildOf, K extends Key> DataObjectModification getModifiedChildListItem(Class caseType, Class listItem, K listKey) { return null; 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 d844abfb8..f3c51ca00 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 @@ -8,14 +8,13 @@ package org.opendaylight.ovsdb.hwvtepsouthbound.reconciliation.configuration; import org.opendaylight.mdsal.binding.api.DataObjectModification; -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.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -public class DataTreeModificationImpl implements DataTreeModification { - +public class DataTreeModificationImpl implements DataTreeModification { InstanceIdentifier nodeId; T newNode; T oldNode; @@ -27,8 +26,13 @@ public class DataTreeModificationImpl implements DataTreeM } @Override - public DataTreeIdentifier getRootPath() { - return DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, nodeId); + public LogicalDatastoreType datastore() { + return LogicalDatastoreType.CONFIGURATION; + } + + @Override + public DataObjectIdentifier path() { + return nodeId.toIdentifier(); } @Override diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/GlobalConfigOperationalChangeGetter.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/GlobalConfigOperationalChangeGetter.java index 339fe18c6..ff4a5473b 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/GlobalConfigOperationalChangeGetter.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/GlobalConfigOperationalChangeGetter.java @@ -14,6 +14,7 @@ import java.util.Set; import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentationBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepLogicalSwitchRef; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacs; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacsKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs; @@ -22,8 +23,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey; 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.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; public final class GlobalConfigOperationalChangeGetter { @@ -69,9 +71,7 @@ public final class GlobalConfigOperationalChangeGetter { return null; } return localUcastMacs.values().stream() - .filter(mac -> removedSwitchNames.contains( - mac.getLogicalSwitchRef().getValue().firstKeyOf( - LogicalSwitches.class).getHwvtepNodeName().getValue())) + .filter(mac -> removedSwitchNames.contains(extractHwvtepNodeName(mac.getLogicalSwitchRef()))) .collect(BindingMap.toOrderedMap()); } @@ -86,13 +86,16 @@ public final class GlobalConfigOperationalChangeGetter { return null; } return localMcastMacs.values().stream() - .filter(mac -> removedSwitchNames.contains( - mac.getLogicalSwitchRef().getValue().firstKeyOf( - LogicalSwitches.class).getHwvtepNodeName().getValue())) + .filter(mac -> removedSwitchNames.contains(extractHwvtepNodeName(mac.getLogicalSwitchRef()))) .collect(BindingMap.toOrderedMap()); } - static Set getLogicalSwitchesToBeRemoved(final Node configNode, final Node opNode) { + private static String extractHwvtepNodeName(HwvtepLogicalSwitchRef hwvtepLogicalSwitchRef) { + return ((DataObjectIdentifier) hwvtepLogicalSwitchRef.getValue()).toLegacy() + .firstKeyOf(LogicalSwitches.class).getHwvtepNodeName().getValue(); + } + + static Set getLogicalSwitchesToBeRemoved(final Node configNode, final Node opNode) { Map cfgLogicalSwitches = null; Map opLogicalSwitches = null; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/connection/ConnectionReconciliationTask.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/connection/ConnectionReconciliationTask.java index 1d4cb55d8..367c236e5 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/connection/ConnectionReconciliationTask.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/connection/ConnectionReconciliationTask.java @@ -16,7 +16,7 @@ import org.opendaylight.ovsdb.hwvtepsouthbound.reconciliation.ReconciliationTask import org.opendaylight.ovsdb.lib.OvsdbClient; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation; 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.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 83aa920d6..36ed707a5 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 @@ -37,15 +37,17 @@ import org.opendaylight.ovsdb.utils.mdsal.utils.TransactionType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches; 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.node.TerminationPoint; -import org.opendaylight.yangtools.yang.binding.Augmentation; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.Augmentation; +import org.opendaylight.yangtools.binding.BindingInstanceIdentifier; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.EntryObject; +import org.opendaylight.yangtools.binding.Key; +import org.opendaylight.yangtools.binding.PropertyIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.Key; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public abstract class AbstractTransactCommand & DataObject, I extends Key, +public abstract class AbstractTransactCommand, I extends Key, A extends Augmentation> implements TransactCommand { private static final Logger LOG = LoggerFactory.getLogger(AbstractTransactCommand.class); @@ -61,7 +63,7 @@ public abstract class AbstractTransactCommand & DataObject public AbstractTransactCommand(final HwvtepOperationalState state, final Collection> changes) { - this.hwvtepOperationalState = state; + hwvtepOperationalState = state; this.changes = changes; } @@ -81,15 +83,15 @@ public abstract class AbstractTransactCommand & DataObject return getOperationalState().getConnectionInstance().ops(); } - void updateCurrentTxDeleteData(final Class cls, final InstanceIdentifier key, + void updateCurrentTxDeleteData(final Class> cls, final InstanceIdentifier key, final T data) { hwvtepOperationalState.updateCurrentTxDeleteData(cls, key); markKeyAsInTransit(cls, key); addToUpdates(key, data); } - void updateCurrentTxData(final Class cls, final InstanceIdentifier key, final UUID uuid, - final T data) { + void updateCurrentTxData(final Class> cls, final InstanceIdentifier key, + final UUID uuid, final T data) { hwvtepOperationalState.updateCurrentTxData(cls, key, uuid); markKeyAsInTransit(cls, key); addToUpdates(key, data); @@ -99,8 +101,8 @@ public abstract class AbstractTransactCommand & DataObject T oldData = null; Type type = getClass().getGenericSuperclass(); Type classType = ((ParameterizedType) type).getActualTypeArguments()[0]; - if (getConfigData((Class) classType, key) != null) { - oldData = (T) getConfigData((Class) classType, key).getData(); + if (getConfigData((Class>) classType, key) != null) { + oldData = (T) getConfigData((Class>) classType, key).getData(); } updates.add(new MdsalUpdate<>(key, data, oldData)); } @@ -118,7 +120,7 @@ public abstract class AbstractTransactCommand & DataObject Map confingDependencies = Collections.emptyMap(); if (isDeleteCmd()) { - if (deviceInfo.isKeyInTransit((Class) classType, key)) { + if (deviceInfo.isKeyInTransit((Class>) classType, key)) { inTransitDependencies = new HashMap<>(); inTransitDependencies.put(classType, Lists.newArrayList(key)); } @@ -129,7 +131,7 @@ public abstract class AbstractTransactCommand & DataObject confingDependencies.remove(TerminationPoint.class); //If this key itself is in transit wait for the response of this key itself - if (deviceInfo.isKeyInTransit((Class) classType, key) + if (deviceInfo.isKeyInTransit((Class>) classType, key) || deviceInfo.isKeyInDependencyQueue(key)) { inTransitDependencies.put(classType, Lists.newArrayList(key)); } @@ -139,9 +141,9 @@ public abstract class AbstractTransactCommand & DataObject && HwvtepSouthboundUtil.isEmptyMap(inTransitDependencies)) { doDeviceTransaction(transaction, nodeIid, data, key, extraData); if (isDeleteCmd()) { - getDeviceInfo().clearConfigData((Class) classType, key); + getDeviceInfo().clearConfigData((Class>) classType, key); } else { - getDeviceInfo().updateConfigData((Class) classType, key, data); + getDeviceInfo().updateConfigData((Class>) classType, key, data); } } @@ -155,7 +157,7 @@ public abstract class AbstractTransactCommand & DataObject final TransactionBuilder transactionBuilder) { clone.hwvtepOperationalState = operationalState; HwvtepDeviceInfo.DeviceData deviceData = - getDeviceInfo().getConfigData((Class)getClassType(), key); + getDeviceInfo().getConfigData((Class>)getClassType(), key); T latest = data; if (deviceData != null && deviceData.getData() != null) { latest = (T) deviceData.getData(); @@ -192,7 +194,7 @@ public abstract class AbstractTransactCommand & DataObject final TransactionBuilder transactionBuilder) { clone.hwvtepOperationalState = operationalState; HwvtepDeviceInfo.DeviceData deviceData = getDeviceInfo() - .getConfigData((Class)getClassType(), key); + .getConfigData((Class>)getClassType(), key); T latest = data; if (deviceData != null && deviceData.getData() != null) { latest = (T) deviceData.getData(); @@ -267,7 +269,7 @@ public abstract class AbstractTransactCommand & DataObject if (!Objects.equals(hwvtepOperationalState.getConnectionInstance().getInstanceIdentifier(), key)) { continue; } - Class classType = (Class) getClassType(); + Class> classType = (Class>) getClassType(); List removed; if (getOperationalState().isInReconciliation()) { removed = getRemoved(change); @@ -291,7 +293,7 @@ public abstract class AbstractTransactCommand & DataObject if (!Objects.equals(hwvtepOperationalState.getConnectionInstance().getInstanceIdentifier(), key)) { continue; } - Class classType = (Class) getClassType(); + Class> classType = (Class>) getClassType(); List updated = null; if (getOperationalState().isInReconciliation()) { updated = getUpdated(change); @@ -366,8 +368,8 @@ public abstract class AbstractTransactCommand & DataObject return HwvtepSouthboundUtil.isEmpty(list1) ? Collections.emptyList() : list1; } - Map map1 = list1.stream().collect(Collectors.toMap(KeyAware::key, ele -> ele)); - Map map2 = list2.stream().collect(Collectors.toMap(KeyAware::key, ele -> ele)); + Map map1 = list1.stream().collect(Collectors.toMap(EntryObject::key, ele -> ele)); + Map map2 = list2.stream().collect(Collectors.toMap(EntryObject::key, ele -> ele)); map1.entrySet().forEach(entry1 -> { T val2 = map2.remove(entry1.getKey()); if (compareKeyOnly) { @@ -444,7 +446,7 @@ public abstract class AbstractTransactCommand & DataObject getOperationalState().getDeviceInfo().addToControllerTx(transactionType, element); } - public HwvtepDeviceInfo.DeviceData fetchDeviceData(final Class cls, + public HwvtepDeviceInfo.DeviceData fetchDeviceData(final Class> cls, final InstanceIdentifier key) { HwvtepDeviceInfo.DeviceData deviceData = getDeviceOpData(cls, key); if (deviceData == null) { @@ -462,30 +464,30 @@ public abstract class AbstractTransactCommand & DataObject return deviceData; } - public void addJobToQueue(final DependentJob job) { + public > void addJobToQueue(final DependentJob job) { hwvtepOperationalState.getDeviceInfo().putKeyInDependencyQueue(job.getKey()); hwvtepOperationalState.getDeviceInfo().addJobToQueue(job); } - public void markKeyAsInTransit(final Class cls, final InstanceIdentifier key) { + public void markKeyAsInTransit(final Class> cls, final InstanceIdentifier key) { hwvtepOperationalState.getDeviceInfo().markKeyAsInTransit(cls, key); } - public HwvtepDeviceInfo.DeviceData getDeviceOpData(final Class cls, + public HwvtepDeviceInfo.DeviceData getDeviceOpData(final Class> cls, final InstanceIdentifier key) { return getOperationalState().getDeviceInfo().getDeviceOperData(cls, key); } - public void clearConfigData(final Class cls, final InstanceIdentifier key) { + public void clearConfigData(final Class> cls, final InstanceIdentifier key) { hwvtepOperationalState.getDeviceInfo().clearConfigData(cls, key); } - public HwvtepDeviceInfo.DeviceData getConfigData(final Class cls, + public HwvtepDeviceInfo.DeviceData getConfigData(final Class> cls, final InstanceIdentifier key) { return hwvtepOperationalState.getDeviceInfo().getConfigData(cls, key); } - public void updateConfigData(final Class cls, final InstanceIdentifier key, + public void updateConfigData(final Class> cls, final InstanceIdentifier key, final Object data) { hwvtepOperationalState.getDeviceInfo().updateConfigData(cls, key, data); } @@ -522,8 +524,15 @@ public abstract class AbstractTransactCommand & DataObject return iid.toString(); } - protected String getLsKeyStr(final InstanceIdentifier iid) { - return ((InstanceIdentifier)iid).firstKeyOf(LogicalSwitches.class) - .getHwvtepNodeName().getValue(); + protected String getLsKeyStr(final InstanceIdentifier iid) { + return iid.toLegacy().firstKeyOf(LogicalSwitches.class).getHwvtepNodeName() .getValue(); + } + + protected String getLsKeyStr(final BindingInstanceIdentifier iid) { + final var doi = switch (iid) { + case DataObjectIdentifier oi -> oi; + case PropertyIdentifier pi -> pi.container(); + }; + return getLsKeyStr(doi.toLegacy()); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependentJob.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependentJob.java index c541a743c..b18070314 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependentJob.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependentJob.java @@ -17,21 +17,20 @@ import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepDeviceInfo; import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepSouthboundConstants; import org.opendaylight.ovsdb.lib.operations.TransactionBuilder; import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public abstract class DependentJob { - +public abstract class DependentJob> { private static final Logger LOG = LoggerFactory.getLogger(DependentJob.class); - private static final Predicate DATA_INTRANSIT - = (controllerData) -> controllerData != null && controllerData.isInTransitState(); + private static final Predicate DATA_INTRANSIT = + controllerData -> controllerData != null && controllerData.isInTransitState(); - private static final Predicate DATA_INTRANSIT_EXPIRED - = (controllerData) -> controllerData != null && controllerData.isInTransitState() + private static final Predicate DATA_INTRANSIT_EXPIRED = + controllerData -> controllerData != null && controllerData.isInTransitState() && controllerData.isIntransitTimeExpired(); //expecting the device to create the data @@ -132,7 +131,7 @@ public abstract class DependentJob { public void onSuccess() { } - public abstract static class ConfigWaitingJob extends DependentJob { + public abstract static class ConfigWaitingJob> extends DependentJob { public ConfigWaitingJob(InstanceIdentifier key, T data, Map, List> dependencies) { @@ -149,7 +148,7 @@ public abstract class DependentJob { } } - public abstract static class OpWaitingJob extends DependentJob { + public abstract static class OpWaitingJob> extends DependentJob { public OpWaitingJob(InstanceIdentifier key, T data, Map, List> dependencies, diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/EmptyDependencyGetter.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/EmptyDependencyGetter.java index 84884eb0a..b09c476e3 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/EmptyDependencyGetter.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/EmptyDependencyGetter.java @@ -9,8 +9,8 @@ package org.opendaylight.ovsdb.hwvtepsouthbound.transact; import java.util.Collections; import java.util.List; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; public final class EmptyDependencyGetter extends UnMetDependencyGetter { @@ -20,12 +20,12 @@ public final class EmptyDependencyGetter extends UnMetDependencyGetter { } @Override - public List> getLogicalSwitchDependencies(KeyAware data) { + public List> getLogicalSwitchDependencies(EntryObject data) { return Collections.emptyList(); } @Override - public List> getTerminationPointDependencies(KeyAware data) { + public List> getTerminationPointDependencies(EntryObject data) { return Collections.emptyList(); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/HwvtepOperationalState.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/HwvtepOperationalState.java index aa7401b1c..22a2cd15b 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/HwvtepOperationalState.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/HwvtepOperationalState.java @@ -54,8 +54,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw 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.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.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -69,9 +70,9 @@ public class HwvtepOperationalState { HashMap, UUID> inflightLocators = new HashMap<>(); private final HwvtepDeviceInfo deviceInfo; private final HwvtepConnectionInstance connectionInstance; - private final Map, Map> currentTxUUIDs = + private final Map>, Map> currentTxUUIDs = new ConcurrentHashMap<>(); - private final Map, Map> currentTxDeletedKeys = + private final Map>, Map> currentTxDeletedKeys = new ConcurrentHashMap<>(); /* stores the modified and deleted data for each child type of each node id @@ -80,8 +81,8 @@ public class HwvtepOperationalState { child type is the child of hwvtep Global augmentation */ private Map, - Pair, List>, - Map, List>>> modifiedData = new HashMap<>(); + Pair>, List>>, + Map>, List>>>> modifiedData = new HashMap<>(); private boolean inReconciliation = false; private final DataBroker db; private final Collection> changes; @@ -119,8 +120,8 @@ public class HwvtepOperationalState { HwvtepGlobalAugmentation globalAugmentation = globalOperNode.augmentation(HwvtepGlobalAugmentation.class); if (globalAugmentation != null) { if (!HwvtepSouthboundUtil.isEmptyMap(globalAugmentation.getSwitches())) { - operationalNodes.put((InstanceIdentifier) - globalAugmentation.getSwitches().values().iterator().next().getSwitchRef().getValue(), psNode); + operationalNodes.put(((DataObjectIdentifier) globalAugmentation.getSwitches().values().iterator() + .next().getSwitchRef().getValue()).toLegacy(), psNode); } } } @@ -153,7 +154,7 @@ public class HwvtepOperationalState { for (Switches pswitch : hgAugmentation.nonnullSwitches().values()) { @SuppressWarnings("unchecked") InstanceIdentifier psNodeIid = - (InstanceIdentifier) pswitch.getSwitchRef().getValue(); + ((DataObjectIdentifier) pswitch.getSwitchRef().getValue()).toLegacy(); Optional psNode = new MdsalUtils(db).readOptional(LogicalDatastoreType.OPERATIONAL, psNodeIid); if (psNode.isPresent()) { @@ -164,7 +165,7 @@ public class HwvtepOperationalState { if (psAugmentation != null) { @SuppressWarnings("unchecked") InstanceIdentifier hgNodeIid = - (InstanceIdentifier) psAugmentation.getManagedBy().getValue(); + ((DataObjectIdentifier) psAugmentation.getManagedBy().getValue()).toLegacy(); Optional hgNode = new MdsalUtils(db).readOptional( LogicalDatastoreType.OPERATIONAL, hgNodeIid); if (hgNode.isPresent()) { @@ -307,33 +308,33 @@ public class HwvtepOperationalState { return deviceInfo; } - public void updateCurrentTxData(final Class cls, final InstanceIdentifier key, + public void updateCurrentTxData(final Class> cls, final InstanceIdentifier key, final UUID uuid) { HwvtepSouthboundUtil.updateData(currentTxUUIDs, cls, key, uuid); } - public void updateCurrentTxDeleteData(final Class cls, final InstanceIdentifier key) { + public void updateCurrentTxDeleteData(final Class> cls, final InstanceIdentifier key) { HwvtepSouthboundUtil.updateData(currentTxDeletedKeys, cls, key, Boolean.TRUE); } - public UUID getUUIDFromCurrentTx(final Class cls, final InstanceIdentifier key) { + public UUID getUUIDFromCurrentTx(final Class> cls, final InstanceIdentifier key) { return HwvtepSouthboundUtil.getData(currentTxUUIDs, cls, key); } - public boolean isKeyPartOfCurrentTx(final Class cls, final InstanceIdentifier key) { + public boolean isKeyPartOfCurrentTx(final Class> cls, final InstanceIdentifier key) { return HwvtepSouthboundUtil.containsKey(currentTxUUIDs, cls, key); } - public Set getDeletedKeysInCurrentTx(final Class cls) { + public Set getDeletedKeysInCurrentTx(final Class> cls) { if (currentTxDeletedKeys.containsKey(cls)) { return currentTxDeletedKeys.get(cls).keySet(); } return Collections.emptySet(); } - public List getUpdatedData(final InstanceIdentifier key, - final Class cls) { - List result = null; + public List> getUpdatedData(final InstanceIdentifier key, + final Class> cls) { + List> result = null; if (modifiedData.get(key) != null && modifiedData.get(key).getLeft() != null) { result = modifiedData.get(key).getLeft().get(cls); } @@ -343,9 +344,9 @@ public class HwvtepOperationalState { return result; } - public List getDeletedData(final InstanceIdentifier key, - final Class cls) { - List result = null; + public List> getDeletedData(final InstanceIdentifier key, + final Class> cls) { + List> result = null; if (modifiedData.get(key) != null && modifiedData.get(key).getRight() != null) { result = modifiedData.get(key).getRight().get(cls); } @@ -356,8 +357,8 @@ public class HwvtepOperationalState { } public void setModifiedData(final Map, - Pair, List>, - Map, List>>> modifiedData) { + Pair>, List>>, + Map>, List>>>> modifiedData) { this.modifiedData = modifiedData; } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterUpdateCommand.java index 3240cebb8..bb6df6a9c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterUpdateCommand.java @@ -29,6 +29,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.logical.router.attributes.StaticRoutes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.logical.router.attributes.SwitchBindings; 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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -119,7 +120,7 @@ public class LogicalRouterUpdateCommand for (SwitchBindings switchBinding : switchBindings) { @SuppressWarnings("unchecked") InstanceIdentifier lswitchIid = - (InstanceIdentifier)switchBinding.getLogicalSwitchRef().getValue(); + ((DataObjectIdentifier) switchBinding.getLogicalSwitchRef().getValue()).toLegacy(); Optional operationalSwitchOptional = getOperationalState().getLogicalSwitches(lswitchIid); if (operationalSwitchOptional.isPresent()) { @@ -141,7 +142,7 @@ public class LogicalRouterUpdateCommand for (AclBindings aclBinding : aclBindings.values()) { @SuppressWarnings("unchecked") InstanceIdentifier aclIid = - (InstanceIdentifier)aclBinding.getAclRef().getValue(); + ((DataObjectIdentifier) aclBinding.getAclRef().getValue()).toLegacy(); Optional operationalAclOptional = getOperationalState().getAcls(aclIid); if (operationalAclOptional.isPresent()) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalRemoveCommand.java index 30abe59ee..713ee025e 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalRemoveCommand.java @@ -20,6 +20,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacs; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacsKey; 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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -104,7 +105,7 @@ public class McastMacsLocalRemoveCommand @Override public List> getLogicalSwitchDependencies(final LocalMcastMacs data) { - return List.of(data.getLogicalSwitchRef().getValue()); + return List.of(((DataObjectIdentifier) data.getLogicalSwitchRef().getValue()).toLegacy()); } @Override diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalUpdateCommand.java index c6a80d43d..522d3848b 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsLocalUpdateCommand.java @@ -23,6 +23,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalMcastMacsKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches; 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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -85,7 +86,7 @@ public class McastMacsLocalUpdateCommand if (inputMac.getLogicalSwitchRef() != null) { @SuppressWarnings("unchecked") InstanceIdentifier lswitchIid = - (InstanceIdentifier) inputMac.getLogicalSwitchRef().getValue(); + ((DataObjectIdentifier) inputMac.getLogicalSwitchRef().getValue()).toLegacy(); Optional operationalSwitchOptional = getOperationalState().getLogicalSwitches(lswitchIid); if (operationalSwitchOptional.isPresent()) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsRemoteUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsRemoteUpdateCommand.java index 0ce24d612..d52b41c85 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsRemoteUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/McastMacsRemoteUpdateCommand.java @@ -33,6 +33,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacsKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.locator.set.attributes.LocatorSet; 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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -132,7 +133,7 @@ public class McastMacsRemoteUpdateCommand if (inputMac.getLogicalSwitchRef() != null) { @SuppressWarnings("unchecked") InstanceIdentifier lswitchIid = - (InstanceIdentifier) inputMac.getLogicalSwitchRef().getValue(); + ((DataObjectIdentifier) inputMac.getLogicalSwitchRef().getValue()).toLegacy(); UUID logicalSwitchUUID = TransactUtils.getLogicalSwitchUUID(transaction, getOperationalState(), lswitchIid); if (logicalSwitchUUID != null) { mcastMacsRemote.setLogicalSwitch(logicalSwitchUUID); @@ -202,7 +203,7 @@ public class McastMacsRemoteUpdateCommand if (data == null) { return Collections.emptyList(); } - return Lists.newArrayList(data.getLogicalSwitchRef().getValue()); + return Lists.newArrayList(((DataObjectIdentifier) data.getLogicalSwitchRef().getValue()).toLegacy()); } @Override @@ -212,7 +213,7 @@ public class McastMacsRemoteUpdateCommand } List> locators = new ArrayList<>(); for (LocatorSet locator: data.getLocatorSet()) { - locators.add(locator.getLocatorRef().getValue()); + locators.add(((DataObjectIdentifier) locator.getLocatorRef().getValue()).toLegacy()); } return locators; } @@ -244,7 +245,7 @@ public class McastMacsRemoteUpdateCommand RemoteMcastMacs mac = (RemoteMcastMacs) mdsalUpdate.getNewData(); InstanceIdentifier macIid = mdsalUpdate.getKey(); getDeviceInfo().updateRemoteMcast( - (InstanceIdentifier) mac.getLogicalSwitchRef().getValue(), macIid, mac); + ((DataObjectIdentifier) mac.getLogicalSwitchRef().getValue()).toLegacy(), macIid, mac); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/MdsalUpdate.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/MdsalUpdate.java index 19841eed8..25554b5b6 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/MdsalUpdate.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/MdsalUpdate.java @@ -7,10 +7,10 @@ */ package org.opendaylight.ovsdb.hwvtepsouthbound.transact; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; -public class MdsalUpdate { +public class MdsalUpdate> { private InstanceIdentifier key; private T newData; 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 b903917c0..11a4b3322 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 @@ -31,6 +31,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw 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.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.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -185,7 +186,7 @@ public class PhysicalPortUpdateCommand for (VlanBindings vlanBinding : portAugmentation.nonnullVlanBindings().values()) { @SuppressWarnings("unchecked") InstanceIdentifier lswitchIid = - (InstanceIdentifier) vlanBinding.getLogicalSwitchRef().getValue(); + ((DataObjectIdentifier) vlanBinding.getLogicalSwitchRef().getValue()).toLegacy(); Map inTransitDependencies = DEPENDENCY_GETTER.getInTransitDependencies( getOperationalState(), vlanBinding); @@ -273,7 +274,8 @@ public class PhysicalPortUpdateCommand if (data == null) { return Collections.emptyList(); } - return Collections.singletonList(data.getLogicalSwitchRef().getValue()); + return Collections.singletonList( + ((DataObjectIdentifier) data.getLogicalSwitchRef().getValue()).toLegacy()); } @Override diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java index 74887ae8f..d3f43d44c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java @@ -45,6 +45,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.tunnel.attributes.BfdRemoteConfigsKey; 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.node.TerminationPoint; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -192,9 +193,9 @@ public final class PhysicalSwitchUpdateCommand extends AbstractTransactCommand { Tunnel newTunnel = transaction.getTypedRowWrapper(Tunnel.class); UUID localUUID = getLocatorUUID(transaction, - (InstanceIdentifier) tunnel.getLocalLocatorRef().getValue()); + ((DataObjectIdentifier) tunnel.getLocalLocatorRef().getValue()).toLegacy()); UUID remoteUUID = getLocatorUUID(transaction, - (InstanceIdentifier) tunnel.getRemoteLocatorRef().getValue()); + ((DataObjectIdentifier) tunnel.getRemoteLocatorRef().getValue()).toLegacy()); if (localUUID != null && remoteUUID != null) { // local and remote must exist newTunnel.setLocal(localUUID); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommand.java index d9358167e..fe4ab90f2 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommand.java @@ -9,10 +9,10 @@ package org.opendaylight.ovsdb.hwvtepsouthbound.transact; import org.opendaylight.ovsdb.lib.operations.TransactionBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; -public interface TransactCommand { +public interface TransactCommand> { void execute(TransactionBuilder transaction); 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 7191bba0b..ee8e01ed2 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 @@ -23,9 +23,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs; 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.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,8 +41,8 @@ public class TransactCommandAggregator implements TransactCommand { child type is the child of hwvtep Global augmentation */ private final Map, - Pair, List>, - Map, List>>> modifiedData = new HashMap<>(); + Pair>, List>>, + Map>, List>>>> modifiedData = new HashMap<>(); public TransactCommandAggregator(HwvtepOperationalState state, Collection> changes) { @@ -76,13 +76,13 @@ public class TransactCommandAggregator implements TransactCommand { } @Override - public void onConfigUpdate(TransactionBuilder transaction, InstanceIdentifier nodeIid, KeyAware data, + public void onConfigUpdate(TransactionBuilder transaction, InstanceIdentifier nodeIid, EntryObject data, InstanceIdentifier key, Object... extraData) { } @Override - public void doDeviceTransaction(TransactionBuilder transaction, InstanceIdentifier nodeIid, KeyAware data, + public void doDeviceTransaction(TransactionBuilder transaction, InstanceIdentifier nodeIid, EntryObject data, InstanceIdentifier key, Object... extraData) { } @@ -92,8 +92,8 @@ public class TransactCommandAggregator implements TransactCommand { for (DataTreeModification change : changes) { final InstanceIdentifier key = change.getRootPath().getRootIdentifier(); final DataObjectModification mod = change.getRootNode(); - final Map, List> updatedData = new HashMap<>(); - final Map, List> deletedData = new HashMap<>(); + final Map>, List>> updatedData = new HashMap<>(); + final Map>, List>> deletedData = new HashMap<>(); extractDataChanged(key, mod, updatedData, deletedData); modifiedData.put(key, Pair.of(updatedData, deletedData)); operationalState.setModifiedData(modifiedData); @@ -106,16 +106,16 @@ public class TransactCommandAggregator implements TransactCommand { } } - private static boolean isMacOnlyUpdate(final Map, List> updatedData, - final Map, List> deletedData) { + private static boolean isMacOnlyUpdate( + final Map>, List>> updatedData, + final Map>, List>> deletedData) { return updatedData.containsKey(RemoteUcastMacs.class) && updatedData.size() == 1 || deletedData.containsKey(RemoteUcastMacs.class) && deletedData.size() == 1; } - private static void extractDataChanged(final InstanceIdentifier key, - final DataObjectModification mod, - final Map, List> updatedData, - final Map, List> deletedData) { + private static void extractDataChanged(final InstanceIdentifier key, final DataObjectModification mod, + final Map>, List>> updatedData, + final Map>, List>> deletedData) { extractDataChanged(mod.getModifiedChildren(), updatedData, deletedData); DataObjectModification aug = mod.getModifiedAugmentation( @@ -132,18 +132,18 @@ public class TransactCommandAggregator implements TransactCommand { private static void extractDataChanged( final Collection> children, - final Map, List> updatedData, - final Map, List> deletedData) { + final Map>, List>> updatedData, + final Map>, List>> deletedData) { if (children == null) { return; } for (DataObjectModification child : children) { - Class childClass = (Class) child.getDataType(); + Class> childClass = (Class>) child.getDataType(); switch (child.getModificationType()) { case WRITE: case SUBTREE_MODIFIED: DataObject dataAfter = child.getDataAfter(); - if (!(dataAfter instanceof KeyAware)) { + if (!(dataAfter instanceof EntryObject identifiable)) { continue; } DataObject before = child.getDataBefore(); @@ -155,15 +155,14 @@ public class TransactCommandAggregator implements TransactCommand { */ continue; } - KeyAware identifiable = (KeyAware) dataAfter; addToUpdatedData(updatedData, childClass, identifiable); break; case DELETE: DataObject dataBefore = child.getDataBefore(); - if (!(dataBefore instanceof KeyAware)) { + if (!(dataBefore instanceof EntryObject identifiable)) { continue; } - addToUpdatedData(deletedData, childClass, (KeyAware)dataBefore); + addToUpdatedData(deletedData, childClass, identifiable); break; default: break; @@ -171,8 +170,8 @@ public class TransactCommandAggregator implements TransactCommand { } } - private static void addToUpdatedData(Map, List> updatedData, - Class childClass, KeyAware identifiable) { + private static void addToUpdatedData(Map>, List>> updatedData, + Class> childClass, EntryObject identifiable) { updatedData.computeIfAbsent(childClass, (cls) -> new ArrayList<>()); updatedData.get(childClass).add(identifiable); } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactUtils.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactUtils.java index bc6550afe..dde84c071 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactUtils.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactUtils.java @@ -39,6 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.locator.set.attributes.LocatorSet; 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.node.TerminationPoint; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -129,7 +130,7 @@ public final class TransactUtils { for (LocatorSet locator: locatorList) { @SuppressWarnings("unchecked") InstanceIdentifier iid = - (InstanceIdentifier) locator.getLocatorRef().getValue(); + ((DataObjectIdentifier) locator.getLocatorRef().getValue()).toLegacy(); UUID locatorUuid = createPhysicalLocator(transaction, hwvtepOperationalState, iid); if (locatorUuid != null) { locators.add(locatorUuid); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalRemoveCommand.java index 30bae44c2..fd1557f2f 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalRemoveCommand.java @@ -20,6 +20,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsKey; 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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -99,7 +100,7 @@ public class UcastMacsLocalRemoveCommand @Override public List> getLogicalSwitchDependencies(final LocalUcastMacs data) { - return List.of(data.getLogicalSwitchRef().getValue()); + return List.of(((DataObjectIdentifier) data.getLogicalSwitchRef().getValue()).toLegacy()); } @Override diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalUpdateCommand.java index 967c1af15..fb98ca57c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsLocalUpdateCommand.java @@ -26,6 +26,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches; 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.node.TerminationPoint; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -88,7 +89,7 @@ public class UcastMacsLocalUpdateCommand if (inputMac.getLogicalSwitchRef() != null) { @SuppressWarnings("unchecked") InstanceIdentifier lswitchIid = - (InstanceIdentifier) inputMac.getLogicalSwitchRef().getValue(); + ((DataObjectIdentifier) inputMac.getLogicalSwitchRef().getValue()).toLegacy(); Optional operationalSwitchOptional = getOperationalState().getLogicalSwitches(lswitchIid); if (operationalSwitchOptional.isPresent()) { @@ -110,7 +111,7 @@ public class UcastMacsLocalUpdateCommand UUID locatorUuid = null; @SuppressWarnings("unchecked") InstanceIdentifier iid = - (InstanceIdentifier) inputMac.getLocatorRef().getValue(); + ((DataObjectIdentifier) inputMac.getLocatorRef().getValue()).toLegacy(); //try to find locator in operational DS Optional operationalLocatorOptional = getOperationalState().getPhysicalLocatorAugmentation(iid); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteRemoveCommand.java index b5ac30713..817d2626b 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteRemoveCommand.java @@ -25,6 +25,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacsKey; 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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -144,7 +145,7 @@ public class UcastMacsRemoteRemoveCommand RemoteUcastMacs mac = (RemoteUcastMacs) mdsalUpdate.getNewData(); InstanceIdentifier macIid = mdsalUpdate.getKey(); getDeviceInfo().removeRemoteUcast( - (InstanceIdentifier) mac.getLogicalSwitchRef().getValue(), macIid); + ((DataObjectIdentifier) mac.getLogicalSwitchRef().getValue()).toLegacy(), macIid); } getDeviceInfo().onOperDataAvailable(); } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java index 1973807f8..f2713d094 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java @@ -27,6 +27,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacsKey; 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.node.TerminationPoint; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -136,7 +137,7 @@ public class UcastMacsRemoteUpdateCommand if (inputMac.getLogicalSwitchRef() != null) { @SuppressWarnings("unchecked") InstanceIdentifier lswitchIid = - (InstanceIdentifier) inputMac.getLogicalSwitchRef().getValue(); + ((DataObjectIdentifier) inputMac.getLogicalSwitchRef().getValue()).toLegacy(); UUID logicalSwitchUUID = TransactUtils.getLogicalSwitchUUID(transaction, getOperationalState(), lswitchIid); if (logicalSwitchUUID != null) { ucastMacsRemote.setLogicalSwitch(TransactUtils.getLogicalSwitchUUID(transaction, getOperationalState(), @@ -151,7 +152,7 @@ public class UcastMacsRemoteUpdateCommand if (inputMac.getLocatorRef() != null) { @SuppressWarnings("unchecked") InstanceIdentifier iid = - (InstanceIdentifier) inputMac.getLocatorRef().getValue(); + ((DataObjectIdentifier) inputMac.getLocatorRef().getValue()).toLegacy(); UUID locatorUuid = TransactUtils.createPhysicalLocator(transaction, getOperationalState(), iid); ucastMacsRemote.setLocator(locatorUuid); return locatorUuid; @@ -183,7 +184,7 @@ public class UcastMacsRemoteUpdateCommand if (data == null) { return Collections.emptyList(); } - return Lists.newArrayList(data.getLogicalSwitchRef().getValue()); + return Lists.newArrayList(((DataObjectIdentifier) data.getLogicalSwitchRef().getValue()).toLegacy()); } @Override @@ -191,7 +192,7 @@ public class UcastMacsRemoteUpdateCommand if (data == null) { return Collections.emptyList(); } - return Lists.newArrayList(data.getLocatorRef().getValue()); + return Lists.newArrayList(((DataObjectIdentifier) data.getLocatorRef().getValue()).toLegacy()); } } @@ -207,7 +208,7 @@ public class UcastMacsRemoteUpdateCommand RemoteUcastMacs mac = (RemoteUcastMacs) mdsalUpdate.getNewData(); InstanceIdentifier macIid = mdsalUpdate.getKey(); getDeviceInfo().updateRemoteUcast( - (InstanceIdentifier) mac.getLogicalSwitchRef().getValue(), macIid, mac); + ((DataObjectIdentifier) mac.getLogicalSwitchRef().getValue()).toLegacy(), macIid, mac); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UnMetDependencyGetter.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UnMetDependencyGetter.java index d6e5f8263..4c646b073 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UnMetDependencyGetter.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UnMetDependencyGetter.java @@ -19,14 +19,14 @@ import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepDeviceInfo; import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepSouthboundUtil; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; /** * Utility class to retrieve the unmet dependencies (config/operational) of the given object. */ -public abstract class UnMetDependencyGetter { +public abstract class UnMetDependencyGetter> { private final ConfigDependencyGetter configDependencyGetter = new ConfigDependencyGetter(); private final InTransitDependencyGetter inTransitDependencyGetter = new InTransitDependencyGetter(); @@ -39,7 +39,7 @@ public abstract class UnMetDependencyGetter { * @param data The data object * @return The depenencies */ - public Map, List> getInTransitDependencies( + public Map>, List> getInTransitDependencies( HwvtepOperationalState opState, T data) { return inTransitDependencyGetter.retrieveUnMetDependencies(opState, opState.getDeviceInfo(), data); } @@ -52,23 +52,23 @@ public abstract class UnMetDependencyGetter { * @param data The data object * @return the depenencies */ - public Map, List> getUnMetConfigDependencies( + public Map>, List> getUnMetConfigDependencies( HwvtepOperationalState opState, T data) { return configDependencyGetter.retrieveUnMetDependencies(opState, opState.getDeviceInfo(), data); } abstract class DependencyGetter { - Map, List> retrieveUnMetDependencies( + Map>, List> retrieveUnMetDependencies( HwvtepOperationalState opState, HwvtepDeviceInfo deviceInfo, T data) { - Map, List> result = new HashMap<>(); - Map, List>> allKeys = new HashMap<>(); + Map>, List> result = new HashMap<>(); + Map>, List>> allKeys = new HashMap<>(); allKeys.put(LogicalSwitches.class, getLogicalSwitchDependencies(data)); allKeys.put(TerminationPoint.class, getTerminationPointDependencies(data)); - for (Entry, List>> entry : allKeys.entrySet()) { - Class cls = entry.getKey(); + for (Entry>, List>> entry : allKeys.entrySet()) { + Class> cls = entry.getKey(); List> keysToCheck = entry.getValue(); for (InstanceIdentifier key : keysToCheck) { if (!isDependencyMet(opState, deviceInfo, cls, key)) { @@ -79,9 +79,9 @@ public abstract class UnMetDependencyGetter { return result; } - Map, List> addToResultMap( - Map, List> result, - Class cls, InstanceIdentifier key) { + Map>, List> addToResultMap( + Map>, List> result, + Class> cls, InstanceIdentifier key) { if (null == result) { result = new HashMap<>(); } @@ -93,18 +93,18 @@ public abstract class UnMetDependencyGetter { } abstract boolean isDependencyMet(HwvtepOperationalState opState, HwvtepDeviceInfo deviceInfo, - Class cls, InstanceIdentifier key); + Class> cls, InstanceIdentifier key); } class ConfigDependencyGetter extends DependencyGetter { @Override boolean isDependencyMet(HwvtepOperationalState opState, HwvtepDeviceInfo deviceInfo, - Class cls, InstanceIdentifier key) { + Class> cls, InstanceIdentifier key) { return deviceInfo.isConfigDataAvailable(cls, key) || isConfigDataAvailable(opState, cls, key); } boolean isConfigDataAvailable(HwvtepOperationalState opState, - Class cls, + Class> cls, InstanceIdentifier key) { DataBroker db = opState.getConnectionInstance().getDataBroker(); Optional data = HwvtepSouthboundUtil.readNode(db, LogicalDatastoreType.CONFIGURATION, key); @@ -119,7 +119,7 @@ public abstract class UnMetDependencyGetter { class InTransitDependencyGetter extends DependencyGetter { @Override boolean isDependencyMet(HwvtepOperationalState opState, HwvtepDeviceInfo deviceInfo, - Class cls, InstanceIdentifier key) { + Class> cls, InstanceIdentifier key) { return opState.isKeyPartOfCurrentTx(cls, key) || !deviceInfo.isKeyInTransit(cls, key); } } 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 ef433a09b..0f46a9afd 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 @@ -19,9 +19,9 @@ import org.opendaylight.ovsdb.lib.notation.UUID; import org.opendaylight.ovsdb.lib.schema.DatabaseSchema; import org.opendaylight.ovsdb.utils.mdsal.utils.TransactionType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.ConnectionInfo; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -31,8 +31,8 @@ public abstract class AbstractTransactionCommand implement private final TableUpdates updates; private final DatabaseSchema dbSchema; protected final HwvtepConnectionInstance key; - protected Set, InstanceIdentifier>> addedKeys = new HashSet<>(); - protected Set, InstanceIdentifier>> deletedKeys = new HashSet<>(); + protected Set>, InstanceIdentifier>> addedKeys = new HashSet<>(); + protected Set>, InstanceIdentifier>> deletedKeys = new HashSet<>(); protected HwvtepDeviceInfo deviceInfo; @@ -69,11 +69,11 @@ public abstract class AbstractTransactionCommand implement deviceInfo.addToDeviceUpdate(transactionType, element); } - public void clearDeviceOpUUID(Class cls, InstanceIdentifier iid, UUID uuid) { + public void clearDeviceOpUUID(Class> cls, InstanceIdentifier iid, UUID uuid) { deviceInfo.clearDeviceOperUUID(cls, iid, uuid); } - public void addToDeleteTx(ReadWriteTransaction tx, Class cls, InstanceIdentifier iid, + public void addToDeleteTx(ReadWriteTransaction tx, Class> cls, InstanceIdentifier iid, UUID uuid) { if (deviceInfo.isAvailableInOperDs(cls, iid)) { tx.delete(LogicalDatastoreType.OPERATIONAL, iid); @@ -82,7 +82,7 @@ public abstract class AbstractTransactionCommand implement clearDeviceOpUUID(cls, iid, uuid); } - public void addToUpdateTx(Class cls, InstanceIdentifier iid, UUID uuid, + public void addToUpdateTx(Class> cls, InstanceIdentifier iid, UUID uuid, Object southboundData) { addedKeys.add(Pair.of(cls, iid)); deviceInfo.updateDeviceOperData(cls, iid, uuid, southboundData); 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 27d8e8a6b..6458ca5b4 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 @@ -23,6 +23,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.Switches; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.SwitchesKey; 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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,8 +59,8 @@ public class HwvtepGlobalRemoveCommand extends AbstractTransactionCommand { if (switches != null) { for (Switches hwSwitch : switches.values()) { LOG.debug("Deleting hwvtep switch {}", hwSwitch); - transaction.delete( - LogicalDatastoreType.OPERATIONAL, hwSwitch.getSwitchRef().getValue()); + transaction.delete(LogicalDatastoreType.OPERATIONAL, + (DataObjectIdentifier) hwSwitch.getSwitchRef().getValue()); } } else { LOG.debug("{} had no switches", hwvtepNode.getNodeId().getValue()); 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 2653419bd..7254ba50e 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 @@ -49,8 +49,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.logical.router.attributes.SwitchBindingsBuilder; 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.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -139,7 +139,7 @@ public final class HwvtepLogicalRouterUpdateCommand extends AbstractTransactionC if (acl != null) { InstanceIdentifier aclIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), acl); - aclBindingBuiler.setAclRef(new HwvtepAclRef(aclIid)); + aclBindingBuiler.setAclRef(new HwvtepAclRef(aclIid.toIdentifier())); aclBindingBuiler.setRouterInterface(new IpPrefix(new Ipv4Prefix(entry.getKey()))); bindings.add(aclBindingBuiler.build()); } @@ -165,7 +165,7 @@ public final class HwvtepLogicalRouterUpdateCommand extends AbstractTransactionC switchBindingBuiler.setDestinationAddress(new IpPrefix(new Ipv4Prefix(entry.getKey()))); InstanceIdentifier switchIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), logicalSwitch); - switchBindingBuiler.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid)); + switchBindingBuiler.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid.toIdentifier())); bindings.add(switchBindingBuiler.build()); } } 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 b3a56ac36..3f0e8fee3 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 @@ -31,8 +31,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey; 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.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMacEntriesRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMacEntriesRemoveCommand.java index 65831b774..d4c465108 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMacEntriesRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMacEntriesRemoveCommand.java @@ -136,7 +136,7 @@ public class HwvtepMacEntriesRemoveCommand extends AbstractTransactionCommand { if (logicalSwitch != null) { InstanceIdentifier switchIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), logicalSwitch); - return new HwvtepLogicalSwitchRef(switchIid); + return new HwvtepLogicalSwitchRef(switchIid.toIdentifier()); } LOG.debug("Failed to get LogicalSwitch {}", switchUUID); LOG.trace("Available LogicalSwitches: {}", 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 c91d2edac..ef8c52a95 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 @@ -30,8 +30,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.managers.ManagerOtherConfigsKey; 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.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 c9e99065e..29d0f2df3 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 @@ -103,7 +103,7 @@ public final class HwvtepMcastMacsLocalUpdateCommand extends AbstractTransaction if (logicalSwitch != null) { InstanceIdentifier switchIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), logicalSwitch); - macLocalBuilder.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid)); + macLocalBuilder.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid.toIdentifier())); } } } @@ -130,7 +130,7 @@ public final class HwvtepMcastMacsLocalUpdateCommand extends AbstractTransaction InstanceIdentifier tpIid = HwvtepSouthboundMapper.createInstanceIdentifier( getOvsdbConnectionInstance().getInstanceIdentifier(), locator); plsList.add(new LocatorSetBuilder() - .setLocatorRef(new HwvtepPhysicalLocatorRef(tpIid)).build()); + .setLocatorRef(new HwvtepPhysicalLocatorRef(tpIid.toIdentifier())).build()); } macLocalBuilder.setLocatorSet(plsList); } 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 f0508cc42..b96095178 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 @@ -105,7 +105,7 @@ public final class HwvtepMcastMacsRemoteUpdateCommand extends AbstractTransactio if (logicalSwitch != null) { InstanceIdentifier switchIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), logicalSwitch); - macRemoteBuilder.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid)); + macRemoteBuilder.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid.toIdentifier())); } } } @@ -132,7 +132,7 @@ public final class HwvtepMcastMacsRemoteUpdateCommand extends AbstractTransactio InstanceIdentifier tpIid = HwvtepSouthboundMapper.createInstanceIdentifier( getOvsdbConnectionInstance().getInstanceIdentifier(), locator); plsList.add(new LocatorSetBuilder() - .setLocatorRef(new HwvtepPhysicalLocatorRef(tpIid)).build()); + .setLocatorRef(new HwvtepPhysicalLocatorRef(tpIid.toIdentifier())).build()); } macRemoteBuilder.setLocatorSet(plsList); } 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 0f359814c..0f302ee02 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 @@ -59,16 +59,17 @@ 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.yang.binding.DataObject; +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.opendaylight.yangtools.yang.binding.util.BindingMap; import org.opendaylight.yangtools.yang.common.Uint16; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public final class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand { - private static final Logger LOG = LoggerFactory.getLogger(HwvtepPhysicalPortUpdateCommand.class); + private final Map updatedPPRows; private final Map oldPPRows; private final Map switchUpdatedRows; @@ -276,7 +277,7 @@ public final class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCo if (logicalSwitch != null) { InstanceIdentifier switchIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), logicalSwitch); - return new HwvtepLogicalSwitchRef(switchIid); + return new HwvtepLogicalSwitchRef(switchIid.toIdentifier()); } LOG.debug("Failed to get LogicalSwitch {}", switchUUID); LOG.trace("Available LogicalSwitches: {}", @@ -302,11 +303,12 @@ public final class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCo for (Switches managedNodeEntry : switchNodes.values()) { @SuppressWarnings("unchecked") Node switchNode = HwvtepSouthboundUtil.readNode(transaction, - (InstanceIdentifier) managedNodeEntry.getSwitchRef().getValue()).orElseThrow(); + ((DataObjectIdentifier) managedNodeEntry.getSwitchRef().getValue()).toLegacy()).orElseThrow(); TerminationPointKey tpKey = new TerminationPointKey(new TpId(tpName)); TerminationPoint terminationPoint = switchNode.nonnullTerminationPoint().get(tpKey); if (terminationPoint != null) { - return Optional.of((InstanceIdentifier) managedNodeEntry.getSwitchRef().getValue()); + return Optional.of( + ((DataObjectIdentifier) managedNodeEntry.getSwitchRef().getValue()).toLegacy()); } } } else { 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 ee616d1eb..b7365f31c 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 @@ -45,7 +45,7 @@ public class HwvtepPhysicalSwitchRemoveCommand extends AbstractTransactionComman getOvsdbConnectionInstance(), phySwitch); InstanceIdentifier switchIid = getOvsdbConnectionInstance().getInstanceIdentifier() .augmentation(HwvtepGlobalAugmentation.class) - .child(Switches.class, new SwitchesKey(new HwvtepPhysicalSwitchRef(nodeIid))); + .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); 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 0478beb68..c2d1c8be5 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 @@ -52,9 +52,9 @@ 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.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -176,7 +176,7 @@ public final class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransaction private void setManagedBy(PhysicalSwitchAugmentationBuilder psAugmentationBuilder) { InstanceIdentifier connectionNodePath = getOvsdbConnectionInstance().getInstanceIdentifier(); - psAugmentationBuilder.setManagedBy(new HwvtepGlobalRef(connectionNodePath)); + psAugmentationBuilder.setManagedBy(new HwvtepGlobalRef(connectionNodePath.toIdentifier())); } private static void setPhysicalSwitchId(PhysicalSwitchAugmentationBuilder psAugmentationBuilder, @@ -209,7 +209,9 @@ public final class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransaction InstanceIdentifier switchIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), phySwitch); - Switches physicalSwitch = new SwitchesBuilder().setSwitchRef(new HwvtepPhysicalSwitchRef(switchIid)).build(); + Switches physicalSwitch = new SwitchesBuilder() + .setSwitchRef(new HwvtepPhysicalSwitchRef(switchIid.toIdentifier())) + .build(); connectionNode.addAugmentation(new HwvtepGlobalAugmentationBuilder() .setSwitches(Map.of(physicalSwitch.key(), physicalSwitch)) 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 45bd770d2..ef27e3fbd 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 @@ -33,8 +33,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.tunnel.attributes.BfdStatusBuilder; 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.node.TerminationPoint; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -85,9 +85,9 @@ public final class HwvtepTunnelUpdateCommand extends AbstractTransactionCommand if (connection.isPresent() && tunnelIid != null) { TunnelsBuilder builder = new TunnelsBuilder(); builder.setLocalLocatorRef(new HwvtepPhysicalLocatorRef(getPhysicalLocatorRefFromUUID( - getOvsdbConnectionInstance().getInstanceIdentifier(), localData))); + getOvsdbConnectionInstance().getInstanceIdentifier().toLegacy(), localData).toIdentifier())); builder.setRemoteLocatorRef(new HwvtepPhysicalLocatorRef(getPhysicalLocatorRefFromUUID( - getOvsdbConnectionInstance().getInstanceIdentifier(), remoteData))); + getOvsdbConnectionInstance().getInstanceIdentifier().toLegacy(), remoteData).toIdentifier())); builder.setTunnelUuid(new Uuid(tunnel.getUuid().toString())); setBfdLocalConfigs(builder, tunnel); setBfdRemoteConfigs(builder, tunnel); 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 f0c7478d1..be5adee02 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 @@ -34,8 +34,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw 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.node.TerminationPoint; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -94,7 +94,7 @@ public final class HwvtepUcastMacsLocalUpdateCommand extends AbstractTransaction InstanceIdentifier nodeIid = getOvsdbConnectionInstance().getInstanceIdentifier(); InstanceIdentifier plIid = HwvtepSouthboundMapper.createInstanceIdentifier(nodeIid, physicalLocator); - ucmlBuilder.setLocatorRef(new HwvtepPhysicalLocatorRef(plIid)); + ucmlBuilder.setLocatorRef(new HwvtepPhysicalLocatorRef(plIid.toIdentifier())); } } if (ucml.getLogicalSwitchColumn() != null && ucml.getLogicalSwitchColumn().getData() != null) { @@ -103,7 +103,7 @@ public final class HwvtepUcastMacsLocalUpdateCommand extends AbstractTransaction if (logicalSwitch != null) { InstanceIdentifier switchIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), logicalSwitch); - ucmlBuilder.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid)); + ucmlBuilder.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid.toIdentifier())); } } LocalUcastMacs ucastMacsLocal = ucmlBuilder.build(); 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 c41afaa27..f5c656ffb 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 @@ -33,8 +33,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw 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.node.TerminationPoint; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; public final class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactionCommand { @@ -88,7 +88,7 @@ public final class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactio InstanceIdentifier nodeIid = getOvsdbConnectionInstance().getInstanceIdentifier(); InstanceIdentifier plIid = HwvtepSouthboundMapper.createInstanceIdentifier(nodeIid, physicalLocator); - rumBuilder.setLocatorRef(new HwvtepPhysicalLocatorRef(plIid)); + rumBuilder.setLocatorRef(new HwvtepPhysicalLocatorRef(plIid.toIdentifier())); } } if (macRemote.getLogicalSwitchColumn() != null @@ -98,7 +98,7 @@ public final class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactio if (logicalSwitch != null) { InstanceIdentifier switchIid = HwvtepSouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance(), logicalSwitch); - rumBuilder.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid)); + rumBuilder.setLogicalSwitchRef(new HwvtepLogicalSwitchRef(switchIid.toIdentifier())); } } RemoteUcastMacs remoteUcastMacs = rumBuilder.build(); 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 7472fdfd0..280fa320c 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 @@ -66,7 +66,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.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListenerTest.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListenerTest.java index e65280111..048f1ba00 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListenerTest.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListenerTest.java @@ -36,7 +36,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.locator.set.attributes.LocatorSet; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 33e765cc0..4a2761dcc 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 @@ -24,11 +24,11 @@ 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.node.TerminationPoint; +import org.opendaylight.yangtools.binding.ChildOf; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.concepts.Registration; -import org.opendaylight.yangtools.yang.binding.ChildOf; -import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; public class HwvtepOperationalDataChangeListener implements DataTreeChangeListener, AutoCloseable { private final Registration registration; @@ -71,7 +71,7 @@ public class HwvtepOperationalDataChangeListener implements DataTreeChangeListen } private void updateDeviceOpData(InstanceIdentifier key, DataObjectModification mod) { - Class childClass = (Class) mod.dataType(); + Class> childClass = (Class>) mod.dataType(); InstanceIdentifier instanceIdentifier = getKey(key, mod, mod.dataAfter()); switch (mod.modificationType()) { case WRITE: diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TestBuilders.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TestBuilders.java index 5886ef7f7..ff7f9135b 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TestBuilders.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TestBuilders.java @@ -36,8 +36,8 @@ 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.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; public final class TestBuilders { @@ -75,7 +75,7 @@ public final class TestBuilders { String logicalSwitchName) { InstanceIdentifier switchIid = nodeIid.augmentation(HwvtepGlobalAugmentation.class) .child(LogicalSwitches.class, new LogicalSwitchesKey(new HwvtepNodeName(logicalSwitchName))); - return new HwvtepLogicalSwitchRef(switchIid); + return new HwvtepLogicalSwitchRef(switchIid.toIdentifier()); } public static RemoteUcastMacs buildRemoteUcastMacs(InstanceIdentifier nodeIid, String vmMac, @@ -138,7 +138,7 @@ public final class TestBuilders { public static HwvtepPhysicalLocatorRef buildLocatorRef(InstanceIdentifier nodeIid,String tepIp) { InstanceIdentifier tepId = buildTpId(nodeIid, tepIp); - return new HwvtepPhysicalLocatorRef(tepId); + return new HwvtepPhysicalLocatorRef(tepId.toIdentifier()); } public static Uuid getUUid(String key) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependencyQueueTest.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependencyQueueTest.java index 49602158e..806dac17d 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependencyQueueTest.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/DependencyQueueTest.java @@ -27,8 +27,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacsKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; @RunWith(MockitoJUnitRunner.Silent.class) public class DependencyQueueTest extends DataChangeListenerTestBase { @@ -43,7 +43,7 @@ public class DependencyQueueTest extends DataChangeListenerTestBase { RemoteMcastMacs mac; InstanceIdentifier macIid; InstanceIdentifier lsIid; - Map, List> unMetDependencies; + Map>, List> unMetDependencies; void setupForTest() throws Exception { mcastMacDataValidator = McastMacsRemoteUpdateCommand.MCAST_MAC_DATA_VALIDATOR; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UnMetDependencyGetterTest.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UnMetDependencyGetterTest.java index b6b475e6e..0ea695f79 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UnMetDependencyGetterTest.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UnMetDependencyGetterTest.java @@ -24,8 +24,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hw import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitchesKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; +import org.opendaylight.yangtools.binding.EntryObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyAware; @RunWith(MockitoJUnitRunner.Silent.class) public class UnMetDependencyGetterTest extends DataChangeListenerTestBase { @@ -34,7 +34,7 @@ public class UnMetDependencyGetterTest extends DataChangeListenerTestBase { HwvtepOperationalState opState; RemoteMcastMacs mac; InstanceIdentifier lsIid; - Map, List> unMetDependencies; + Map>, List> unMetDependencies; void setupForTest() { mcastMacDataValidator = McastMacsRemoteUpdateCommand.MCAST_MAC_DATA_VALIDATOR; 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 12de98e3e..a30964859 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 @@ -423,7 +423,7 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase { } if (setManagedBy) { InstanceIdentifier nodePath = HwvtepSouthboundUtils.createInstanceIdentifier(connectionInfo); - psAugBuilder.setManagedBy(new HwvtepGlobalRef(nodePath)); + psAugBuilder.setManagedBy(new HwvtepGlobalRef(nodePath.toIdentifier())); } psAugBuilder.setManagementIps(managementIps); psAugBuilder.setTunnelIps(tunnelIps); diff --git a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml index 0b62ed060..c96a4595f 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 - 13.0.11 + 14.0.2 4.0.0 diff --git a/hwvtepsouthbound/pom.xml b/hwvtepsouthbound/pom.xml index 1409433d3..12c19f4b5 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 - 13.0.11 + 14.0.2 diff --git a/library/artifacts/pom.xml b/library/artifacts/pom.xml index 265a86277..c654e1158 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 - 13.0.11 + 14.0.2 diff --git a/library/features/features/pom.xml b/library/features/features/pom.xml index af9a810a9..1dd804a54 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 - 13.0.11 + 14.0.2 diff --git a/library/features/odl-ovsdb-library/pom.xml b/library/features/odl-ovsdb-library/pom.xml index fd145e786..a7534640b 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 - 13.0.11 + 14.0.2 @@ -41,7 +41,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.aaa odl-aaa-cert - 0.19.3 + 0.20.0 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 a093b83e5..279cd23da 100644 --- a/library/features/odl-ovsdb-library/src/main/feature/feature.xml +++ b/library/features/odl-ovsdb-library/src/main/feature/feature.xml @@ -8,9 +8,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-jackson-2 - odl-netty-4 - odl-aaa-cert + odl-jackson-2 + odl-netty-4 + 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 d3bd51b0c..9e0cd597b 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 - 13.0.11 + 14.0.2 org.opendaylight.ovsdb diff --git a/library/karaf/pom.xml b/library/karaf/pom.xml index 773c79310..b56c88b0e 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 - 13.0.11 + 14.0.2 4.0.0 diff --git a/library/pom.xml b/library/pom.xml index 8a3b6533b..0ea825461 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 - 13.0.11 + 14.0.2 diff --git a/pom.xml b/pom.xml index 792d64795..889a6c774 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 - 13.0.11 + 14.0.2 diff --git a/schemas/pom.xml b/schemas/pom.xml index 1ef50b9b3..41bfa899b 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 - 13.0.11 + 14.0.2 diff --git a/southbound/pom.xml b/southbound/pom.xml index 89cb69d32..73b0e4560 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 - 13.0.11 + 14.0.2 diff --git a/southbound/southbound-artifacts/pom.xml b/southbound/southbound-artifacts/pom.xml index c7c054129..67110daaa 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 - 13.0.11 + 14.0.2 diff --git a/southbound/southbound-features/features/pom.xml b/southbound/southbound-features/features/pom.xml index 7af66361a..a495de2f4 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 - 13.0.11 + 14.0.2 diff --git a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml index 0ccfc5a9d..52258d22f 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 - 13.0.11 + 14.0.2 @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 13.0.1 + 14.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 ee246de31..d97782f19 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 10c5f257e..d1ba82d83 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 - 13.0.11 + 14.0.2 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 7.0.4 + 8.0.0-SNAPSHOT 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 cacd6d2c4..6b85699da 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 deb486bdf..86193332a 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 - 13.0.11 + 14.0.2 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 7.0.4 + 8.0.0-SNAPSHOT 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 c7aac8d3b..3cd248a4f 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 203b250b2..af5c5eee4 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 - 13.0.11 + 14.0.2 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.infrautils infrautils-artifacts - 6.0.6 + 7.0.2 pom import diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml index 34df3df98..9c6171ce8 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml @@ -8,9 +8,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-jackson-2 - odl-infrautils-diagstatus - odl-infrautils-ready + odl-jackson-2 + odl-infrautils-diagstatus + odl-infrautils-ready mvn:org.opendaylight.ovsdb/southbound-impl/${project.version}/cfg/config diff --git a/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml index 0a54019a7..04dbb1b39 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 - 13.0.11 + 14.0.2 diff --git a/southbound/southbound-features/pom.xml b/southbound/southbound-features/pom.xml index 6fb369204..7950d3f75 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 - 13.0.11 + 14.0.2 diff --git a/southbound/southbound-impl/pom.xml b/southbound/southbound-impl/pom.xml index 5a958d04b..494da27e3 100644 --- a/southbound/southbound-impl/pom.xml +++ b/southbound/southbound-impl/pom.xml @@ -29,6 +29,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html + + org.opendaylight.yangtools + binding-data-codec-api + org.opendaylight.yangtools yang-data-util @@ -45,10 +49,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-dom-api - - org.opendaylight.mdsal - mdsal-binding-dom-codec-api - org.opendaylight.mdsal mdsal-eos-binding-api diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java index 7398b7781..6d6b9d69d 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java @@ -8,8 +8,8 @@ package org.opendaylight.ovsdb.southbound; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.dom.api.DOMSchemaService; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.XMLNamespace; @@ -75,12 +75,12 @@ public class InstanceIdentifierCodec extends AbstractStringInstanceIdentifierCod } public InstanceIdentifier bindingDeserializer(final String iidString) throws DeserializationException { - YangInstanceIdentifier normalizedYangIid = deserialize(iidString); - return bindingNormalizedNodeSerializer.fromYangInstanceIdentifier(normalizedYangIid); + return bindingDeserializer(deserialize(iidString)); } public InstanceIdentifier bindingDeserializer(final YangInstanceIdentifier yangIID) { - return bindingNormalizedNodeSerializer.fromYangInstanceIdentifier(yangIID); + final var ref = bindingNormalizedNodeSerializer.fromYangInstanceIdentifier(yangIID); + return ref != null ? ref.toLegacy() : null; } public InstanceIdentifier bindingDeserializerOrNull(final String iidString) { 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 266fdc865..323ca5eb0 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 @@ -58,6 +58,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.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.binding.DataObjectIdentifier; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; @@ -507,8 +508,8 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos Map entries = nodeAugmentation.getManagedNodeEntry(); if (entries != null) { for (ManagedNodeEntry managedNode : entries.values()) { - transaction.delete( - LogicalDatastoreType.OPERATIONAL, managedNode.getBridgeRef().getValue()); + transaction.delete(LogicalDatastoreType.OPERATIONAL, + (DataObjectIdentifier) managedNode.getBridgeRef().getValue()); } } else { LOG.debug("{} had no managed nodes", ovsdbNode.getNodeId().getValue()); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java index b93fde241..a71faea4c 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java @@ -33,6 +33,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; 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.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; @@ -252,7 +253,8 @@ public final class OvsdbDataTreeChangeListener implements DataTreeChangeListener if (bridgeAugmentation != null) { OvsdbNodeRef managedBy = bridgeAugmentation.getManagedBy(); if (managedBy != null) { - client = cm.getConnectionInstance((InstanceIdentifier) managedBy.getValue()); + client = cm.getConnectionInstance( + ((DataObjectIdentifier) managedBy.getValue()).toLegacy()); } } } 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 0e2c978c1..0f5e2e03e 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 @@ -94,7 +94,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.NodeKey; 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.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint32; 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 f0cb1a006..f5a9b2a0c 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 @@ -29,7 +29,6 @@ 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.binding.api.ReadWriteTransaction; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.mdsal.eos.binding.api.Entity; @@ -45,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.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.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.osgi.service.component.annotations.Activate; 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 abf676207..730940efe 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 @@ -31,7 +31,8 @@ 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.port._interface.attributes.PortExternalIds; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.PortExternalIdsBuilder; 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.DataObject; +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; @@ -54,11 +55,11 @@ public final class SouthboundUtil { try { OvsdbNodeRef ref = mn.getManagedBy(); if (ref != null && ref.getValue() != null) { - FluentFuture> nf; + final FluentFuture> nf; try (ReadTransaction transaction = db.newReadOnlyTransaction()) { @SuppressWarnings("unchecked") // Note: erasure makes this safe in combination with the typecheck below - InstanceIdentifier path = (InstanceIdentifier) ref.getValue(); + final var path = ((DataObjectIdentifier) ref.getValue()); nf = transaction.read(LogicalDatastoreType.OPERATIONAL, path); } 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 8c92101a5..d16cc636c 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 @@ -26,12 +26,13 @@ import org.opendaylight.ovsdb.southbound.InstanceIdentifierCodec; import org.opendaylight.ovsdb.southbound.SouthboundUtil; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeRef; 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.Autoattach; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.AutoattachKey; 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.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.PropertyIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -143,9 +144,13 @@ public class AutoAttachRemovedCommand extends AbstractTransactCommand { final var managedNodes = nodeOptional.orElseThrow() .augmentation(OvsdbNodeAugmentation.class).getManagedNodeEntry(); for (final ManagedNodeEntry managedNode : managedNodes.values()) { - final OvsdbBridgeRef ovsdbBridgeRef = managedNode.getBridgeRef(); - final InstanceIdentifier brIid = ovsdbBridgeRef.getValue() - .firstIdentifierOf(Node.class).augmentation(OvsdbBridgeAugmentation.class); + final var doi = switch (managedNode.getBridgeRef().getValue()) { + case DataObjectIdentifier oi -> oi; + case PropertyIdentifier pi -> pi.container(); + }; + + final var brIid = doi.toLegacy().firstIdentifierOf(Node.class) + .augmentation(OvsdbBridgeAugmentation.class); final Optional optionalBridge = transaction.read(LogicalDatastoreType.OPERATIONAL, brIid).get(); OvsdbBridgeAugmentation bridge = optionalBridge.orElseThrow(); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangeEvent.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangeEvent.java index 2faffc740..f8a0b2d6e 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangeEvent.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangeEvent.java @@ -9,7 +9,7 @@ package org.opendaylight.ovsdb.southbound.ovsdb.transact; import java.util.Map; import java.util.Set; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public interface DataChangeEvent { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEvent.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEvent.java index fdb84acc4..8b5347201 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEvent.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEvent.java @@ -20,7 +20,8 @@ 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.OvsdbTerminationPointAugmentation; 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.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class DataChangesManagedByOvsdbNodeEvent implements DataChangeEvent { @@ -123,8 +124,11 @@ public class DataChangesManagedByOvsdbNodeEvent implements DataChangeEvent { Optional bridgeNode = SouthboundUtil.readNode(db.newReadWriteTransaction(),nodeEntryIid); if (bridgeNode.isPresent() && bridgeNode.orElseThrow() instanceof Node node) { OvsdbBridgeAugmentation bridge = node.augmentation(OvsdbBridgeAugmentation.class); - if (bridge != null && bridge.getManagedBy() != null) { - return bridge.getManagedBy().getValue(); + if (bridge != null) { + final var managedBy = bridge.getManagedBy(); + if (managedBy != null && managedBy.getValue() instanceof DataObjectIdentifier doi) { + return doi.toLegacy(); + } } } return null; @@ -144,8 +148,12 @@ public class DataChangesManagedByOvsdbNodeEvent implements DataChangeEvent { if (dataObject != null && dataObject instanceof Node) { Node node = (Node)dataObject; OvsdbBridgeAugmentation bridge = node.augmentation(OvsdbBridgeAugmentation.class); - if (bridge != null && bridge.getManagedBy() != null && bridge.getManagedBy().getValue().equals(this.iid)) { - return bridge.getManagedBy().getValue(); + if (bridge != null) { + final var managedBy = bridge.getManagedBy(); + if (managedBy != null && managedBy.getValue() instanceof DataObjectIdentifier doi + && iid.equals(doi.toLegacy())) { + return iid; + } } } return null; diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java index a9b4bda13..3eda53bf8 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java @@ -35,6 +35,8 @@ 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.qos.entries.QueueList; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.qos.entries.QueueListKey; 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.PropertyIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -134,7 +136,12 @@ public class QosUpdateCommand extends AbstractTransactCommand { } private static String getQueueUuid(final OvsdbQueueRef queueRef, final OvsdbNodeAugmentation operNode) { - QueuesKey queueKey = queueRef.getValue().firstKeyOf(Queues.class); + final var doi = switch (queueRef.getValue()) { + case DataObjectIdentifier oi -> oi; + case PropertyIdentifier pi -> pi.container(); + }; + + QueuesKey queueKey = doi.toLegacy().firstKeyOf(Queues.class); Map queues = operNode.getQueues(); if (queues != null) { Queues queue = queues.get(queueKey); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java index 1404ffcf0..87043b0f7 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java @@ -37,7 +37,6 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types. import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation; 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.OvsdbPortInterfaceAttributes.VlanMode; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbQosRef; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.QosEntries; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.QosEntriesKey; @@ -55,6 +54,8 @@ 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.port._interface.attributes.PortOtherConfigsKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.Trunks; 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.PropertyIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint32; @@ -172,8 +173,12 @@ public class TerminationPointUpdateCommand extends AbstractTransactCommand { // First check if QosEntry is present and use that final var tpQosEntry = terminationPoint.getQosEntry(); if (tpQosEntry != null && !tpQosEntry.isEmpty()) { - OvsdbQosRef qosRef = tpQosEntry.values().iterator().next().getQosRef(); - Uri qosId = qosRef.getValue().firstKeyOf(QosEntries.class).getQosId(); + final var doi = switch (tpQosEntry.values().iterator().next().getQosRef().getValue()) { + case DataObjectIdentifier oi -> oi; + case PropertyIdentifier pi -> pi.container(); + }; + + Uri qosId = doi.toLegacy().firstKeyOf(QosEntries.class).getQosId(); OvsdbNodeAugmentation operNode = getOperNode(state, operBridge); if (operNode != null) { Map entries = operNode.getQosEntries(); @@ -196,7 +201,7 @@ public class TerminationPointUpdateCommand extends AbstractTransactCommand { private static OvsdbNodeAugmentation getOperNode(final BridgeOperationalState state, final OvsdbBridgeAugmentation operBridge) { @SuppressWarnings("unchecked") - InstanceIdentifier iidNode = (InstanceIdentifier)operBridge.getManagedBy().getValue(); + final var iidNode = ((DataObjectIdentifier) operBridge.getManagedBy().getValue()).toLegacy(); OvsdbNodeAugmentation operNode = null; try (ReadTransaction transaction = state.dataBroker().newReadOnlyTransaction()) { Optional nodeOptional = SouthboundUtil.readNode(transaction, iidNode); 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 bcae24f22..28e9dfc40 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 @@ -40,12 +40,12 @@ import org.opendaylight.ovsdb.southbound.InstanceIdentifierCodec; import org.opendaylight.ovsdb.southbound.SouthboundConstants; import org.opendaylight.ovsdb.southbound.SouthboundMapper; 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.ChildOf; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.ChildOf; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.EntryObject; +import org.opendaylight.yangtools.binding.Key; +import org.opendaylight.yangtools.binding.KeyStep; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.Key; -import org.opendaylight.yangtools.yang.binding.KeyAware; -import org.opendaylight.yangtools.yang.binding.KeyStep; // This class needs to be mocked @SuppressWarnings("checkstyle:FinalClass") @@ -338,7 +338,7 @@ public class TransactUtils { * @param child The child modification to include. * @return The extended path. */ - private static & ChildOf, K extends Key, T extends DataObject> + private static & ChildOf, K extends Key, T extends DataObject> InstanceIdentifier extendPath( final InstanceIdentifier path, final DataObjectModification child) { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationTask.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationTask.java index 4f8db8469..fc4e66e98 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationTask.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationTask.java @@ -11,7 +11,7 @@ import static java.util.Objects.requireNonNull; import org.opendaylight.ovsdb.southbound.OvsdbConnectionManager; import org.opendaylight.ovsdb.southbound.reconciliation.connection.ConnectionReconciliationTask; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** 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 1fe801467..26f8634ec 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 @@ -41,7 +41,8 @@ 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; 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.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.slf4j.Logger; @@ -182,7 +183,7 @@ public class BridgeConfigReconciliationTask extends ReconciliationTask { InstanceIdentifier ndIid = (InstanceIdentifier) nodeIid; OvsdbBridgeAugmentation bridge = node.augmentation(OvsdbBridgeAugmentation.class); if (bridge != null && bridge.getManagedBy() != null - && bridge.getManagedBy().getValue().equals(ndIid)) { + && ((DataObjectIdentifier) bridge.getManagedBy().getValue()).toLegacy().equals(ndIid)) { brChanges.putAll(extractBridgeConfigurationChanges(node, bridge)); tpChanges.add(node); } else if (node.key().getNodeId().getValue().startsWith( diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/TerminationPointConfigReconciliationTask.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/TerminationPointConfigReconciliationTask.java index 6596065e6..6e6d575c8 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/TerminationPointConfigReconciliationTask.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/configuration/TerminationPointConfigReconciliationTask.java @@ -29,7 +29,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.port._interface.attributes.PortExternalIds; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.PortExternalIdsKey; 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.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 6c1174a62..5aebfdac9 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 @@ -49,9 +49,9 @@ 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.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 33403619b..05bf5cb2b 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 @@ -25,7 +25,6 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class OvsdbBridgeRemovedCommand extends AbstractTransactionCommand { - private final InstanceIdentifierCodec instanceIdentifierCodec; public OvsdbBridgeRemovedCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key, @@ -43,12 +42,11 @@ public class OvsdbBridgeRemovedCommand extends AbstractTransactionCommand { SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, getOvsdbConnectionInstance(), bridge); InstanceIdentifier mnIid = getOvsdbConnectionInstance().getInstanceIdentifier() - .augmentation(OvsdbNodeAugmentation.class) - .child(ManagedNodeEntry.class, new ManagedNodeEntryKey(new OvsdbBridgeRef(bridgeIid))); + .augmentation(OvsdbNodeAugmentation.class) + .child(ManagedNodeEntry.class, new ManagedNodeEntryKey(new OvsdbBridgeRef(bridgeIid.toIdentifier()))); // TODO handle removal of reference to managed node from model transaction.delete(LogicalDatastoreType.OPERATIONAL, bridgeIid); transaction.delete(LogicalDatastoreType.OPERATIONAL, mnIid); } } - } 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 5c6ef0d18..e4553a74c 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 @@ -65,9 +65,9 @@ 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.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -218,7 +218,7 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { SouthboundMapper.createInstanceIdentifier(instanceIdentifierCodec, getOvsdbConnectionInstance(), bridge); ManagedNodeEntry managedBridge = new ManagedNodeEntryBuilder().setBridgeRef( - new OvsdbBridgeRef(bridgeIid)).build(); + new OvsdbBridgeRef(bridgeIid.toIdentifier())).build(); ovsdbConnectionAugmentationBuilder.setManagedNodeEntry(BindingMap.of(managedBridge)); connectionNode.addAugmentation(ovsdbConnectionAugmentationBuilder.build()); @@ -269,7 +269,7 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { private void setManagedBy(OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder) { InstanceIdentifier connectionNodePath = getOvsdbConnectionInstance().getInstanceIdentifier(); - ovsdbBridgeAugmentationBuilder.setManagedBy(new OvsdbNodeRef(connectionNodePath)); + ovsdbBridgeAugmentationBuilder.setManagedBy(new OvsdbNodeRef(connectionNodePath.toIdentifier())); } private static void setDataPathType(OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder, Bridge bridge) { @@ -382,7 +382,7 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { if (bridgeControllerIpAddress.getIpv4Address().getValue() .equals(networkInterfaceAddress.getHostAddress())) { ovsdbBridgeAugmentationBuilder.setBridgeOpenflowNodeRef( - getOvsdbConnectionInstance().getInstanceIdentifier()); + getOvsdbConnectionInstance().getInstanceIdentifier().toIdentifier()); break networkInterfacesLoop; } } 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 dcc1f7575..b0e91133b 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 @@ -37,6 +37,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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -149,8 +150,9 @@ public class OvsdbControllerUpdateCommand extends AbstractTransactionCommand { final Map managedNodeEntries = ovsdbNodeAugmentation.getManagedNodeEntry(); for (ManagedNodeEntry managedNodeEntry : managedNodeEntries.values()) { - final InstanceIdentifier bridgeIid = - (InstanceIdentifier) managedNodeEntry.getBridgeRef().getValue(); + @SuppressWarnings("unchecked") + final var bridgeIid = ((DataObjectIdentifier) managedNodeEntry.getBridgeRef().getValue()) + .toLegacy(); final Optional bridgeNode = SouthboundUtil.readNode(transaction, bridgeIid); if (bridgeNode.isPresent()) { bridgeNodes.put(bridgeIid, bridgeNode.orElseThrow()); 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 40512ec51..419dc5e6c 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 @@ -24,8 +24,8 @@ 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.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.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 7d5362f05..d3d3f06eb 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 @@ -24,6 +24,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.ManagerEntry; 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.network.topology.topology.Node; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,8 +53,8 @@ public class OvsdbNodeRemoveCommand extends AbstractTransactionCommand { ovsdbNodeAugmentation.getManagedNodeEntry(); if (entries != null) { for (ManagedNodeEntry managedNode : entries.values()) { - transaction.delete( - LogicalDatastoreType.OPERATIONAL, managedNode.getBridgeRef().getValue()); + transaction.delete(LogicalDatastoreType.OPERATIONAL, + (DataObjectIdentifier) managedNode.getBridgeRef().getValue()); } } else { LOG.debug("{} had no managed nodes", ovsdbNode.getNodeId().getValue()); 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 4e2028a75..7f5e6c449 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 @@ -89,8 +89,9 @@ 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.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint32; import org.slf4j.Logger; @@ -276,15 +277,15 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand { TpId tpId = new TpId(tpName); for (ManagedNodeEntry managedNodeEntry : managedNodes.values()) { - Optional optManagedNode = SouthboundUtil.readNode(transaction, - (InstanceIdentifier)managedNodeEntry.getBridgeRef().getValue()); + final var bridgeIid = ((DataObjectIdentifier) managedNodeEntry.getBridgeRef().getValue()).toLegacy(); + + Optional optManagedNode = SouthboundUtil.readNode(transaction, bridgeIid); if (optManagedNode.isPresent()) { - Node managedNode = optManagedNode.orElseThrow(); - Map tpEntrys = managedNode.getTerminationPoint(); + final var tpEntrys = optManagedNode.orElseThrow().getTerminationPoint(); if (tpEntrys != null) { - TerminationPoint tpEntry = tpEntrys.get(new TerminationPointKey(tpId)); + final var tpEntry = tpEntrys.get(new TerminationPointKey(tpId)); if (tpEntry != null) { - return Optional.of((InstanceIdentifier) managedNodeEntry.getBridgeRef().getValue()); + return Optional.of(bridgeIid); } } } @@ -429,7 +430,7 @@ public class OvsdbPortUpdateCommand extends AbstractTransactionCommand { ovsdbTerminationPointBuilder.setQosEntry( Map.of(SouthboundConstants.PORT_QOS_LIST_KEY, new QosEntryBuilder() .withKey(SouthboundConstants.PORT_QOS_LIST_KEY) - .setQosRef(new OvsdbQosRef(qosIid)) + .setQosRef(new OvsdbQosRef(qosIid.toIdentifier())) .build())); } } 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 0cafa8e7a..ae7eed49c 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 @@ -46,9 +46,9 @@ 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.qos.entries.QueueListBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.qos.entries.QueueListKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.opendaylight.yangtools.yang.common.Uint32; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -320,7 +320,7 @@ public class OvsdbQosUpdateCommand extends AbstractTransactionCommand { newQueueList.add( new QueueListBuilder() .setQueueNumber(Uint32.valueOf(queueEntry.getKey())) - .setQueueRef(new OvsdbQueueRef(queueIid)).build()); + .setQueueRef(new OvsdbQueueRef(queueIid.toIdentifier())).build()); } } 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 082bad34b..e64974104 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 @@ -37,9 +37,9 @@ 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.queues.QueuesOtherConfigBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.queues.QueuesOtherConfigKey; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.opendaylight.yangtools.yang.common.Uint8; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodecTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodecTest.java index 6da28076d..5902838d9 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodecTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodecTest.java @@ -24,8 +24,8 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.dom.api.DOMSchemaService; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.XMLNamespace; 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 1d98f9ce6..96dea172a 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 @@ -60,8 +60,9 @@ 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.NetworkTopology; 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.NodeKey; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.opendaylight.yangtools.yang.common.Uint32; public class SouthboundMapperTest { @@ -100,7 +101,7 @@ public class SouthboundMapperTest { // When bridge is empty, we expect a new identifier pointing to the bridge when(bridge.getExternalIdsColumn()).thenReturn(null); - when(client.getNodeKey().getNodeId().getValue()).thenReturn("uri"); + 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()); @@ -128,7 +129,7 @@ public class SouthboundMapperTest { // When controller is empty, we expect a new identifier pointing to the bridge when(controller.getExternalIdsColumn()).thenReturn(null); - when(client.getNodeKey().getNodeId().getValue()).thenReturn("uri"); + when(client.getNodeKey()).thenReturn(new NodeKey(new NodeId("uri"))); InstanceIdentifier returnedIid = SouthboundMapper.createInstanceIdentifier(iidc, client, controller, "bridgeName"); assertEquals("Incorrect identifier type", Node.class, returnedIid.getTargetType()); 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 5ec9ba117..cd15ee720 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 @@ -29,7 +29,6 @@ import org.opendaylight.infrautils.diagstatus.DiagStatusService; import org.opendaylight.infrautils.diagstatus.ServiceRegistration; import org.opendaylight.infrautils.ready.testutils.TestSystemReadyMonitor; import org.opendaylight.mdsal.binding.dom.adapter.test.AbstractConcurrentDataBrokerTest; -import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.mdsal.eos.binding.api.Entity; @@ -43,6 +42,7 @@ import org.opendaylight.ovsdb.lib.operations.DefaultOperations; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; +import org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; 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 3ab933726..1f72f54d2 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 @@ -25,7 +25,6 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; -import org.mockito.stubbing.Answer; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.ReadTransaction; import org.opendaylight.mdsal.binding.api.ReadWriteTransaction; @@ -42,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.util.concurrent.FluentFutures; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.powermock.api.mockito.PowerMockito; @@ -66,12 +66,12 @@ public class SouthboundUtilTest { ReadTransaction transaction = mock(ReadTransaction.class); when(db.newReadOnlyTransaction()).thenReturn(transaction); when(mn.getManagedBy()).thenReturn(ref); - when(ref.getValue()).thenAnswer( - (Answer>) invocation -> InstanceIdentifier.create(NetworkTopology.class) + when(ref.getValue()).thenAnswer(invocation -> DataObjectIdentifier.builder(NetworkTopology.class) .child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)) - .child(Node.class, new NodeKey(new NodeId("testNode")))); + .child(Node.class, new NodeKey(new NodeId("testNode"))) + .build()); FluentFuture> nf = mock(FluentFuture.class); - when(transaction.read(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class))).thenReturn(nf); + when(transaction.read(eq(LogicalDatastoreType.OPERATIONAL), any(DataObjectIdentifier.class))).thenReturn(nf); doNothing().when(transaction).close(); //node, ovsdbNode not null diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEventTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEventTest.java index 28d488374..aa4f96529 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEventTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/DataChangesManagedByOvsdbNodeEventTest.java @@ -24,7 +24,7 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.powermock.reflect.Whitebox; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommandTest.java index 4d42d438e..44766d410 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommandTest.java @@ -53,7 +53,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.NodeKey; 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.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.powermock.api.mockito.PowerMockito; import org.powermock.api.support.membermodification.MemberMatcher; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtilsTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtilsTest.java index ef9fe638e..e73785ee3 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtilsTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtilsTest.java @@ -45,7 +45,7 @@ import org.opendaylight.ovsdb.southbound.InstanceIdentifierCodec; import org.opendaylight.ovsdb.southbound.SouthboundMapper; import org.opendaylight.ovsdb.southbound.SouthboundUtil; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; 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 baba20840..856c2b9e1 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 @@ -49,11 +49,11 @@ 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.DataObject; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.util.concurrent.FluentFutures; -import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; @RunWith(MockitoJUnitRunner.class) public class BridgeConfigReconciliationTaskTest { @@ -104,7 +104,7 @@ public class BridgeConfigReconciliationTaskTest { return new NodeBuilder() .setNodeId(new NodeId(new Uri(bridgeName))) .addAugmentation(new OvsdbBridgeAugmentationBuilder() - .setManagedBy(new OvsdbNodeRef(iid)) + .setManagedBy(new OvsdbNodeRef(iid.toIdentifier())) .setProtocolEntry(BindingMap.of( new ProtocolEntryBuilder().setProtocol(OvsdbBridgeProtocolOpenflow10.VALUE).build())) .setControllerEntry(BindingMap.of( 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 80e7adbf0..175e3e534 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 @@ -74,6 +74,8 @@ 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.BindingInstanceIdentifier; +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.MemberMatcher; @@ -250,9 +252,10 @@ public class OvsdbBridgeUpdateCommandTest { .thenReturn(bridgeIid); ManagedNodeEntry managedBridge = new ManagedNodeEntryBuilder() - .setBridgeRef(new OvsdbBridgeRef(InstanceIdentifier.create(NetworkTopology.class) + .setBridgeRef(new OvsdbBridgeRef(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())) .build(); ManagedNodeEntryBuilder managedNodeEntryBuilder = mock(ManagedNodeEntryBuilder.class); @@ -478,11 +481,11 @@ public class OvsdbBridgeUpdateCommandTest { .child(Node.class, new NodeKey(new NodeId("testNode")))); OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder = mock(OvsdbBridgeAugmentationBuilder.class); Bridge bridge = mock(Bridge.class); - when(ovsdbBridgeAugmentationBuilder.setBridgeOpenflowNodeRef(any(InstanceIdentifier.class))) + when(ovsdbBridgeAugmentationBuilder.setBridgeOpenflowNodeRef(any(BindingInstanceIdentifier.class))) .thenReturn(ovsdbBridgeAugmentationBuilder); Whitebox.invokeMethod(ovsdbBridgeUpdateCommand, "setOpenFlowNodeRef", ovsdbBridgeAugmentationBuilder, bridge); verify(controllerEntry, times(2)).getIsConnected(); - verify(ovsdbBridgeAugmentationBuilder).setBridgeOpenflowNodeRef(any(InstanceIdentifier.class)); + verify(ovsdbBridgeAugmentationBuilder).setBridgeOpenflowNodeRef(any(BindingInstanceIdentifier.class)); } } 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 d18bb50a2..68a11d391 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 @@ -181,7 +181,7 @@ public class OvsdbControllerUpdateCommandTest { .child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)) .child(Node.class, new NodeKey(new NodeId("testBridge"))); ManagedNodeEntry managedNodeEntry = new ManagedNodeEntryBuilder() - .setBridgeRef(new OvsdbBridgeRef(bridgeIid)) + .setBridgeRef(new OvsdbBridgeRef(bridgeIid.toIdentifier())) .build(); when(ovsdbNodeAugmentation.getManagedNodeEntry()).thenReturn(Map.of(managedNodeEntry.key(), managedNodeEntry)); @@ -201,11 +201,9 @@ public class OvsdbControllerUpdateCommandTest { ControllerEntry controllerEntry = mock(ControllerEntry.class); OvsdbConnectionInstance client = mock(OvsdbConnectionInstance.class); when(ovsdbControllerUpdateCommand.getOvsdbConnectionInstance()).thenReturn(client); - NodeKey nodeKey = mock(NodeKey.class); + NodeId nodeId = new NodeId(NODE_ID); + NodeKey nodeKey = new NodeKey(nodeId); when(client.getNodeKey()).thenReturn(nodeKey); - NodeId nodeId = mock(NodeId.class); - when(nodeKey.getNodeId()).thenReturn(nodeId); - when(nodeId.getValue()).thenReturn(NODE_ID); PowerMockito.whenNew(Uri.class).withAnyArguments().thenReturn(mock(Uri.class)); PowerMockito.whenNew(NodeId.class).withAnyArguments().thenReturn(nodeId); PowerMockito.whenNew(NodeKey.class).withAnyArguments().thenReturn(nodeKey); 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 056327525..1970523ca 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 @@ -45,6 +45,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.Uint32; import org.powermock.reflect.Whitebox; @@ -95,9 +96,10 @@ public class OvsdbNodeRemoveCommandTest { doReturn(true).when(ovsdbNodeRemoveCommand).checkIfOnlyConnectedManager(any(OvsdbNodeAugmentation.class)); ManagedNodeEntry managedNode = new ManagedNodeEntryBuilder() - .setBridgeRef(new OvsdbBridgeRef(InstanceIdentifier.create(NetworkTopology.class) + .setBridgeRef(new OvsdbBridgeRef(DataObjectIdentifier.builder(NetworkTopology.class) .child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)) - .child(Node.class, new NodeKey(new NodeId("testBridge"))))) + .child(Node.class, new NodeKey(new NodeId("testBridge"))) + .build())) .build(); when(ovsdbNodeAugmentation.getManagedNodeEntry()).thenReturn(Map.of(managedNode.key(), managedNode)); 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 e8f06ceca..5b4d6b7e8 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 @@ -340,7 +340,7 @@ public class OvsdbPortUpdateCommandTest { .child(Node.class, new NodeKey(new NodeId("testNode"))); ManagedNodeEntry managedNodeEntry = new ManagedNodeEntryBuilder() - .setBridgeRef(new OvsdbBridgeRef(iidNode)) + .setBridgeRef(new OvsdbBridgeRef(iidNode.toIdentifier())) .build(); when(ovsdbNode.nonnullManagedNodeEntry()).thenCallRealMethod(); when(ovsdbNode.getManagedNodeEntry()).thenReturn(Map.of(managedNodeEntry.key(), managedNodeEntry)); 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 9dc4e7a9d..3fd72a3dd 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 @@ -159,12 +159,13 @@ 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.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.EntryObject; +import org.opendaylight.yangtools.binding.Key; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.Key; -import org.opendaylight.yangtools.yang.binding.KeyAware; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint32; import org.opendaylight.yangtools.yang.common.Uint8; @@ -252,7 +253,8 @@ public class SouthboundIT extends AbstractMdsalTestBase { if (obj instanceof ManagedNodeEntry managedNodeEntry) { LOG.info("{} DataChanged: created managed {}", managedNodeEntry.getBridgeRef().getValue()); - createdIids.add(managedNodeEntry.getBridgeRef().getValue()); + createdIids.add(((DataObjectIdentifier) managedNodeEntry.getBridgeRef().getValue()) + .toLegacy()); } } else { LOG.info("{} DataTreeChanged: updated {}", type, identifier); @@ -782,7 +784,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static void setManagedBy(final OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder, final ConnectionInfo connectionInfo) { InstanceIdentifier connectionNodePath = SouthboundUtils.createInstanceIdentifier(connectionInfo); - ovsdbBridgeAugmentationBuilder.setManagedBy(new OvsdbNodeRef(connectionNodePath)); + ovsdbBridgeAugmentationBuilder.setManagedBy(new OvsdbNodeRef(connectionNodePath.toIdentifier())); } private static Map createMdsalProtocols() { @@ -1444,7 +1446,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { } } - private static , T extends KeyAware> void assertExpectedExist( + private static , T extends EntryObject> void assertExpectedExist( final Map expected, final Map test) { if (expected != null && test != null) { for (T exp : expected.values()) { @@ -1453,7 +1455,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { } } - private interface SouthboundTerminationPointHelper, T extends KeyAware> { + private interface SouthboundTerminationPointHelper, T extends EntryObject> { void writeValues(OvsdbTerminationPointAugmentationBuilder builder, Map values); Map readValues(OvsdbTerminationPointAugmentation augmentation); @@ -1464,7 +1466,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { * * @see SouthboundIT.generatePortExternalIdsTestCases() for specific test case information */ - private static , T extends KeyAware> void testCRUDTerminationPoint( + private static , T extends EntryObject> void testCRUDTerminationPoint( final KeyValueBuilder builder, final String prefix, final SouthboundTerminationPointHelper helper) throws InterruptedException { final int terminationPointTestIndex = 0; @@ -2015,13 +2017,13 @@ public class SouthboundIT extends AbstractMdsalTestBase { new BridgeOtherConfigsSouthboundHelper()); } - private interface SouthboundBridgeHelper, T extends KeyAware> { + private interface SouthboundBridgeHelper, T extends EntryObject> { void writeValues(OvsdbBridgeAugmentationBuilder builder, Map values); Map readValues(OvsdbBridgeAugmentation augmentation); } - private static , T extends KeyAware> void testCRUDBridge(final String prefix, + private static , T extends EntryObject> void testCRUDBridge(final String prefix, final KeyValueBuilder builder, final SouthboundBridgeHelper helper) throws InterruptedException { ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber); // updateFromTestCases represent the original test case value. updateToTestCases represent the new value after @@ -2171,7 +2173,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { } } - private interface SouthboundQueueHelper, T extends KeyAware> { + private interface SouthboundQueueHelper, T extends EntryObject> { void writeValues(QueuesBuilder builder, Map values); Map readValues(Queues queue); @@ -2212,7 +2214,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { } } - private interface SouthboundQosHelper, T extends KeyAware> { + private interface SouthboundQosHelper, T extends EntryObject> { void writeValues(QosEntriesBuilder builder, Map values); Map readValues(QosEntries qos); @@ -2227,7 +2229,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { return null; } - private static , T extends KeyAware> void testCRUDQueue( + private static , T extends EntryObject> void testCRUDQueue( final KeyValueBuilder builder, final String prefix, final SouthboundQueueHelper helper) throws InterruptedException { @@ -2359,7 +2361,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { } - private static , T extends KeyAware> void testCRUDQos( + private static , T extends EntryObject> void testCRUDQos( final KeyValueBuilder builder, final String prefix, final SouthboundQosHelper helper) throws InterruptedException { @@ -2485,12 +2487,12 @@ public class SouthboundIT extends AbstractMdsalTestBase { assertNotNull(operQueue1); InstanceIdentifier queue1Iid = testQueue1.getInstanceIdentifier(); - OvsdbQueueRef queue1Ref = new OvsdbQueueRef(queue1Iid); + OvsdbQueueRef queue1Ref = new OvsdbQueueRef(queue1Iid.toIdentifier()); Queues operQueue2 = getQueue(new Uri("queue2"), ovsdbNodeAugmentation); assertNotNull(operQueue2); InstanceIdentifier queue2Iid = testQueue2.getInstanceIdentifier(); - OvsdbQueueRef queue2Ref = new OvsdbQueueRef(queue2Iid); + OvsdbQueueRef queue2Ref = new OvsdbQueueRef(queue2Iid.toIdentifier()); Map queueList = BindingMap.of( new QueueListBuilder().setQueueNumber(Uint32.ONE).setQueueRef(queue1Ref).build(), @@ -2579,7 +2581,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { * * @param The type of data used for the test case. */ - private static final class SouthboundTestCase, T extends KeyAware> { + private static final class SouthboundTestCase, T extends EntryObject> { private final String name; private final Map inputValues; private final Map expectedValues; @@ -2603,7 +2605,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { * * @param The type of data used for the test case. */ - private static final class SouthboundTestCaseBuilder, T extends KeyAware> { + private static final class SouthboundTestCaseBuilder, T extends EntryObject> { private String name; private List inputValues; private List expectedValues; @@ -2872,7 +2874,7 @@ public class SouthboundIT extends AbstractMdsalTestBase { * Generates the test cases involved in testing key-value-based data. See inline comments for descriptions of * the particular cases considered. */ - private static , T extends KeyAware> List> + private static , T extends EntryObject> List> generateKeyValueTestCases(final KeyValueBuilder builder, final String testName) { List> testCases = new ArrayList<>(); diff --git a/southbound/southbound-karaf/pom.xml b/southbound/southbound-karaf/pom.xml index 3e2b197bc..73bfaf331 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 - 13.0.11 + 14.0.2 4.0.0 diff --git a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalObject.java b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalObject.java index 3d1caff65..719bfae1f 100644 --- a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalObject.java +++ b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalObject.java @@ -5,10 +5,9 @@ * 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.utils.mdsal.utils; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class MdsalObject { 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 c512f61fa..4b21e50b4 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 @@ -15,7 +15,7 @@ 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.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 91383f1c5..2afe27bff 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 @@ -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.utils.mdsal.utils; import com.google.common.util.concurrent.FluentFuture; @@ -17,14 +16,14 @@ 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.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MdsalUtilsAsync { - private static final Logger LOG = LoggerFactory.getLogger(MdsalUtilsAsync.class); + private final DataBroker databroker; /** 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 97b8c0363..56d88e656 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 @@ -17,8 +17,8 @@ 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.concepts.Registration; -import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/TransactionHistory.java b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/TransactionHistory.java index 692e57ae8..6e1fab7eb 100644 --- a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/TransactionHistory.java +++ b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/TransactionHistory.java @@ -5,11 +5,10 @@ * 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.utils.mdsal.utils; import java.util.ArrayList; -import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class TransactionHistory extends ArrayList { 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 135131628..480cadbe7 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 @@ -37,8 +37,8 @@ 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.node.attributes.SupportingNode; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNodeBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNodeKey; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; @RunWith(MockitoJUnitRunner.class) public class MdsalUtilsAsyncTest extends AbstractDataBrokerTest { 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 238f8d167..33c8fddb7 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,8 +27,8 @@ 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.yangtools.binding.DataObject; import org.opendaylight.yangtools.util.concurrent.FluentFutures; -import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** diff --git a/utils/odl-ovsdb-utils/pom.xml b/utils/odl-ovsdb-utils/pom.xml index c94b22c20..e10c8c946 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 - 13.0.11 + 14.0.2 @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller controller-artifacts - 9.0.2 + 10.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 ae1c184e3..c6210d54d 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/pom.xml b/utils/pom.xml index efce0a0ef..0791b9468 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 - 13.0.11 + 14.0.2 diff --git a/utils/southbound-utils/src/main/java/org/opendaylight/ovsdb/utils/southbound/utils/SouthboundUtils.java b/utils/southbound-utils/src/main/java/org/opendaylight/ovsdb/utils/southbound/utils/SouthboundUtils.java index c9833bae2..aeaa2ebf0 100644 --- a/utils/southbound-utils/src/main/java/org/opendaylight/ovsdb/utils/southbound/utils/SouthboundUtils.java +++ b/utils/southbound-utils/src/main/java/org/opendaylight/ovsdb/utils/southbound/utils/SouthboundUtils.java @@ -114,12 +114,14 @@ 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.yang.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObject; +import org.opendaylight.yangtools.binding.DataObjectIdentifier; +import org.opendaylight.yangtools.binding.Key; +import org.opendaylight.yangtools.binding.KeyStep; +import org.opendaylight.yangtools.binding.NodeStep; +import org.opendaylight.yangtools.binding.PropertyIdentifier; +import org.opendaylight.yangtools.binding.util.BindingMap; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.Key; -import org.opendaylight.yangtools.yang.binding.KeyStep; -import org.opendaylight.yangtools.yang.binding.NodeStep; -import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint32; import org.slf4j.Logger; @@ -536,7 +538,7 @@ public class SouthboundUtils { OvsdbBridgeAugmentation bridgeAugmentation = extractBridgeAugmentation(bridgeNode); if (bridgeAugmentation != null) { InstanceIdentifier ovsdbNodeIid = - (InstanceIdentifier) bridgeAugmentation.getManagedBy().getValue(); + ((DataObjectIdentifier) bridgeAugmentation.getManagedBy().getValue()).toLegacy(); ovsdbNode = provider.read(LogicalDatastoreType.OPERATIONAL, ovsdbNodeIid); } else { LOG.debug("readOvsdbNode: Provided node is not a bridge node : {}",bridgeNode); @@ -670,7 +672,7 @@ public class SouthboundUtils { .setProtocolEntry(createMdsalProtocols()) .setFailMode(OVSDB_FAIL_MODE_MAP.inverse().get("secure")) .setBridgeExternalIds(setBridgeExternalIds()) - .setManagedBy(new OvsdbNodeRef(createInstanceIdentifier(ovsdbNode.key().getNodeId()))) + .setManagedBy(new OvsdbNodeRef(createInstanceIdentifier(ovsdbNode.key().getNodeId()).toIdentifier())) // TODO: Currently netvirt relies on this function to set disabled-in-band=true. However, // TODO (cont): a better design would be to have netvirt pass that in. That way this function // TODO (cont): can take a null otherConfigs to erase other_configs. @@ -767,7 +769,7 @@ public class SouthboundUtils { private static void setManagedBy(final OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder, final ConnectionInfo connectionInfo) { InstanceIdentifier connectionNodePath = createInstanceIdentifier(connectionInfo); - ovsdbBridgeAugmentationBuilder.setManagedBy(new OvsdbNodeRef(connectionNodePath)); + ovsdbBridgeAugmentationBuilder.setManagedBy(new OvsdbNodeRef(connectionNodePath.toIdentifier())); } public boolean addTerminationPoint( @@ -1030,7 +1032,12 @@ public class SouthboundUtils { // see OVSDB-470 for background private static boolean matchesBridgeName(ManagedNodeEntry managedNode, String bridgeName) { - InstanceIdentifier bridgeIid = managedNode.getBridgeRef().getValue(); + final var iid = switch (managedNode.getBridgeRef().getValue()) { + case DataObjectIdentifier doi -> doi; + case PropertyIdentifier pi -> pi.container(); + }; + + InstanceIdentifier bridgeIid = iid.toLegacy(); for (var bridgeIidPathArg : bridgeIid.getPathArguments()) { if (bridgeIidPathArg instanceof KeyStep identifiableItem) { Key key = identifiableItem.key(); diff --git a/utils/yang-utils/pom.xml b/utils/yang-utils/pom.xml index 35848bfaa..a1548e4b5 100644 --- a/utils/yang-utils/pom.xml +++ b/utils/yang-utils/pom.xml @@ -15,9 +15,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html ../../commons/binding-parent - org.opendaylight.ovsdb utils.yang-utils - 1.19.0-SNAPSHOT bundle @@ -25,8 +23,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - org.opendaylight.mdsal - yang-binding + org.opendaylight.yangtools + binding-spec diff --git a/utils/yang-utils/src/main/java/org/opendaylight/ovsdb/utils/yang/YangUtils.java b/utils/yang-utils/src/main/java/org/opendaylight/ovsdb/utils/yang/YangUtils.java index 95ab35439..7425767bf 100644 --- a/utils/yang-utils/src/main/java/org/opendaylight/ovsdb/utils/yang/YangUtils.java +++ b/utils/yang-utils/src/main/java/org/opendaylight/ovsdb/utils/yang/YangUtils.java @@ -14,8 +14,8 @@ import java.util.Map; import java.util.function.Function; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; -import org.opendaylight.yangtools.yang.binding.Key; -import org.opendaylight.yangtools.yang.binding.KeyAware; +import org.opendaylight.yangtools.binding.EntryObject; +import org.opendaylight.yangtools.binding.Key; /** * YANG utility functions. @@ -65,7 +65,7 @@ public final class YangUtils { * @param The value type. * @return The map. */ - public static , T extends KeyAware, K, V> + public static , T extends EntryObject, K, V> @NonNull Map copyYangKeyValueListToMap(@NonNull Map map, @Nullable Map yangList, @NonNull Function keyExtractor, @NonNull Function valueExtractor) { @@ -102,7 +102,7 @@ public final class YangUtils { * @param The value type. * @return The map. */ - public static , T extends KeyAware, K, V> @NonNull Map + public static , T extends EntryObject, K, V> @NonNull Map convertYangKeyValueListToMap(@Nullable Map yangList, @NonNull Function keyExtractor, @NonNull Function valueExtractor) { return copyYangKeyValueListToMap(new HashMap<>(), yangList, keyExtractor, valueExtractor); -- 2.43.0 From 8ce7ed437928ffe887819712d63bab650072f7a4 Mon Sep 17 00:00:00 2001 From: jenkins-releng Date: Thu, 8 Aug 2024 09:50:23 +0000 Subject: [PATCH 2/2] 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 | 4 ++-- .../odl-ovsdb-hwvtepsouthbound-test/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-ui/pom.xml | 4 ++-- .../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 | 4 ++-- .../odl-ovsdb-southbound-impl-ui/pom.xml | 4 ++-- .../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, 66 insertions(+), 66 deletions(-) diff --git a/commons/binding-parent/pom.xml b/commons/binding-parent/pom.xml index 9d3c6ab22..4eedb0653 100644 --- a/commons/binding-parent/pom.xml +++ b/commons/binding-parent/pom.xml @@ -17,7 +17,7 @@ org.opendaylight.ovsdb ovsdb-binding-parent - 1.19.0-SNAPSHOT + 1.19.0 pom diff --git a/commons/it/pom.xml b/commons/it/pom.xml index 206402570..4fcee628d 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.19.0-SNAPSHOT + 1.19.0 pom diff --git a/commons/pom.xml b/commons/pom.xml index 992a54fef..1c2f6b379 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.19.0-SNAPSHOT + 1.19.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-api/pom.xml index 868c73049..5983117e6 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent 4.0.0 org.opendaylight.ovsdb hwvtepsouthbound-api - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml index 8705fff79..d37cc487a 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.19.0-SNAPSHOT + 1.19.0 pom diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml index 09de4666a..01962d079 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.19.0-SNAPSHOT + 1.19.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 3fc7ee5cd..b461ce58b 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.19.0-SNAPSHOT + 1.19.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 f1397c740..ea0000f7f 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.19.0-SNAPSHOT + 1.19.0 feature diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml index c94031386..b84d7603c 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent diff --git a/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml index b50f49bde..e12a261cf 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.19.0-SNAPSHOT + 1.19.0 ../../commons/it diff --git a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml index c96a4595f..8167324d2 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.19.0-SNAPSHOT + 1.19.0 pom diff --git a/hwvtepsouthbound/pom.xml b/hwvtepsouthbound/pom.xml index 12c19f4b5..45f219daf 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.19.0-SNAPSHOT + 1.19.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/library/artifacts/pom.xml b/library/artifacts/pom.xml index c654e1158..6c57507db 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.19.0-SNAPSHOT + 1.19.0 pom diff --git a/library/features/features/pom.xml b/library/features/features/pom.xml index 1dd804a54..139dd749a 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.19.0-SNAPSHOT + 1.19.0 feature diff --git a/library/features/odl-ovsdb-library/pom.xml b/library/features/odl-ovsdb-library/pom.xml index a7534640b..b2ac28ee8 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.19.0-SNAPSHOT + 1.19.0 feature ODL :: ovsdb :: ${project.artifactId} diff --git a/library/impl/pom.xml b/library/impl/pom.xml index ca171e037..2f563bbdb 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent 4.0.0 org.opendaylight.ovsdb library - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/library/it/pom.xml b/library/it/pom.xml index 5c9f7624e..34ea198d6 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.19.0-SNAPSHOT + 1.19.0 ../../commons/it 4.0.0 org.opendaylight.ovsdb library-it - 1.19.0-SNAPSHOT + 1.19.0 jar @@ -27,7 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.ovsdb library-karaf - 1.19.0-SNAPSHOT + 1.19.0 zip diff --git a/library/karaf/pom.xml b/library/karaf/pom.xml index b56c88b0e..57c6972c7 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.19.0-SNAPSHOT + 1.19.0 pom diff --git a/library/pom.xml b/library/pom.xml index 0ea825461..b77dad528 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.19.0-SNAPSHOT + 1.19.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/pom.xml b/pom.xml index 889a6c774..29b1d74ee 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.19.0-SNAPSHOT + 1.19.0 ${project.artifactId} pom diff --git a/schemas/hardwarevtep/pom.xml b/schemas/hardwarevtep/pom.xml index 70c118d26..6c808344f 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent org.opendaylight.ovsdb schema.hardwarevtep - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/schemas/openvswitch/pom.xml b/schemas/openvswitch/pom.xml index a2f5f2703..136c9f0f5 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent org.opendaylight.ovsdb schema.openvswitch - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/schemas/pom.xml b/schemas/pom.xml index 41bfa899b..9b92bfdab 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.19.0-SNAPSHOT + 1.19.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/southbound/pom.xml b/southbound/pom.xml index 73b0e4560..337a8fb11 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.19.0-SNAPSHOT + 1.19.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/southbound/southbound-api/pom.xml b/southbound/southbound-api/pom.xml index 36e640f16..3daa6b903 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent 4.0.0 org.opendaylight.ovsdb southbound-api - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/southbound/southbound-artifacts/pom.xml b/southbound/southbound-artifacts/pom.xml index 67110daaa..708512f20 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.19.0-SNAPSHOT + 1.19.0 pom diff --git a/southbound/southbound-features/features/pom.xml b/southbound/southbound-features/features/pom.xml index a495de2f4..abc39335b 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.19.0-SNAPSHOT + 1.19.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 52258d22f..62eca9cde 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.19.0-SNAPSHOT + 1.19.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 d1ba82d83..c9d05e918 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.19.0-SNAPSHOT + 1.19.0 feature ODL :: ovsdb :: ${project.artifactId} diff --git a/southbound/southbound-impl/pom.xml b/southbound/southbound-impl/pom.xml index 494da27e3..c21424aac 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent diff --git a/southbound/southbound-it/pom.xml b/southbound/southbound-it/pom.xml index a927273bc..40098492d 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.19.0-SNAPSHOT + 1.19.0 ../../commons/it 4.0.0 diff --git a/southbound/southbound-karaf/pom.xml b/southbound/southbound-karaf/pom.xml index 73bfaf331..5bf7a715e 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.19.0-SNAPSHOT + 1.19.0 pom diff --git a/utils/config/pom.xml b/utils/config/pom.xml index 5548042d6..d67cfaedc 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.config - 1.19.0-SNAPSHOT + 1.19.0 ODL :: ovsdb :: ${project.artifactId} diff --git a/utils/hwvtepsouthbound-utils/pom.xml b/utils/hwvtepsouthbound-utils/pom.xml index fb4586094..a76df9b44 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.hwvtepsouthbound-utils - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/utils/mdsal-utils/pom.xml b/utils/mdsal-utils/pom.xml index 67b61b155..c111598f6 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.mdsal-utils - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/utils/odl-ovsdb-utils/pom.xml b/utils/odl-ovsdb-utils/pom.xml index e10c8c946..1ed0ec03b 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.19.0-SNAPSHOT + 1.19.0 feature diff --git a/utils/ovsdb-it-utils/pom.xml b/utils/ovsdb-it-utils/pom.xml index b3ca76819..a40d87876 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent diff --git a/utils/pom.xml b/utils/pom.xml index 0791b9468..6ded4ced9 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.19.0-SNAPSHOT + 1.19.0 pom diff --git a/utils/servicehelper/pom.xml b/utils/servicehelper/pom.xml index de0ee8ca5..9817b6a13 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.servicehelper - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/utils/southbound-utils/pom.xml b/utils/southbound-utils/pom.xml index 7f6291acb..f0b256fb2 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent org.opendaylight.ovsdb utils.southbound-utils - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/utils/yang-utils/pom.xml b/utils/yang-utils/pom.xml index a1548e4b5..aecc9ae04 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.19.0-SNAPSHOT + 1.19.0 ../../commons/binding-parent -- 2.43.0