From 06e6c3f68ae5e1a459a8c11afe027f1db902ec05 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 5 Jun 2024 10:06:38 +0200 Subject: [PATCH] Update upstreams to Sulfur GA Bump upstreams to: - odlparent-10.0.0 - mdsal-9.0.2 - controller-5.0.3 - netconf-3.0.2 - openflowplugin-0.14.0 Also fixes up invalid InstanceIdentifier instantiations. Change-Id: I2e7e8ababc5252c0799dd4246059bc954beedacf Signed-off-by: Robert Varga --- .../arphandler/core/ArpPacketHandlerTest.java | 14 ++++---- .../arphandler/core/PacketDispatcherTest.java | 28 +++++++++++---- artifacts/pom.xml | 2 +- distribution/karaf/pom.xml | 2 +- features/feature-parent/pom.xml | 4 +-- features/features-l2switch/pom.xml | 2 +- features/odl-l2switch-all/pom.xml | 2 +- features/pom.xml | 2 +- .../TopologyLinkDataChangeHandlerTest.java | 36 +++++++++++++++---- parent/pom.xml | 6 ++-- 10 files changed, 67 insertions(+), 31 deletions(-) diff --git a/arphandler/src/test/java/org/opendaylight/l2switch/arphandler/core/ArpPacketHandlerTest.java b/arphandler/src/test/java/org/opendaylight/l2switch/arphandler/core/ArpPacketHandlerTest.java index dc7e508e..18881763 100644 --- a/arphandler/src/test/java/org/opendaylight/l2switch/arphandler/core/ArpPacketHandlerTest.java +++ b/arphandler/src/test/java/org/opendaylight/l2switch/arphandler/core/ArpPacketHandlerTest.java @@ -9,7 +9,7 @@ package org.opendaylight.l2switch.arphandler.core; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; import java.util.ArrayList; import org.junit.Before; @@ -54,7 +54,7 @@ public class ArpPacketHandlerTest { @Test public void onArpPacketReceivedTest_NullInput() throws Exception { arpPacketHandler.onArpPacketReceived(null); - verifyZeroInteractions(packetDispatcher); + verifyNoInteractions(packetDispatcher); } @Test @@ -62,7 +62,7 @@ public class ArpPacketHandlerTest { ArpPacketReceived arpReceived = new ArpPacketReceivedBuilder().build(); arpPacketHandler.onArpPacketReceived(arpReceived); - verifyZeroInteractions(packetDispatcher); + verifyNoInteractions(packetDispatcher); } @Test @@ -71,7 +71,7 @@ public class ArpPacketHandlerTest { ArpPacketReceived arpReceived = new ArpPacketReceivedBuilder().setPacketChain(packetChainList).build(); arpPacketHandler.onArpPacketReceived(arpReceived); - verifyZeroInteractions(packetDispatcher); + verifyNoInteractions(packetDispatcher); } @Test @@ -82,7 +82,7 @@ public class ArpPacketHandlerTest { ArpPacketReceived arpReceived = new ArpPacketReceivedBuilder().setPacketChain(packetChainList).build(); arpPacketHandler.onArpPacketReceived(arpReceived); - verifyZeroInteractions(packetDispatcher); + verifyNoInteractions(packetDispatcher); } @Test @@ -93,7 +93,7 @@ public class ArpPacketHandlerTest { ArpPacketReceived arpReceived = new ArpPacketReceivedBuilder().setPacketChain(packetChainList).build(); arpPacketHandler.onArpPacketReceived(arpReceived); - verifyZeroInteractions(packetDispatcher); + verifyNoInteractions(packetDispatcher); } @Test @@ -104,6 +104,6 @@ public class ArpPacketHandlerTest { ArpPacketReceived arpReceived = new ArpPacketReceivedBuilder().setPacketChain(packetChainList).build(); arpPacketHandler.onArpPacketReceived(arpReceived); - verifyZeroInteractions(packetDispatcher); + verifyNoInteractions(packetDispatcher); } } diff --git a/arphandler/src/test/java/org/opendaylight/l2switch/arphandler/core/PacketDispatcherTest.java b/arphandler/src/test/java/org/opendaylight/l2switch/arphandler/core/PacketDispatcherTest.java index b74d81a5..9e727958 100644 --- a/arphandler/src/test/java/org/opendaylight/l2switch/arphandler/core/PacketDispatcherTest.java +++ b/arphandler/src/test/java/org/opendaylight/l2switch/arphandler/core/PacketDispatcherTest.java @@ -63,15 +63,19 @@ public class PacketDispatcherTest { @Test public void testSendPacketOut_NullIngress() throws Exception { - packetDispatcher.sendPacketOut(null, null, - new NodeConnectorRef(InstanceIdentifier.create(NodeConnector.class))); + packetDispatcher.sendPacketOut(null, null, new NodeConnectorRef(InstanceIdentifier.builder(Nodes.class) + .child(Node.class) + .child(NodeConnector.class) + .build())); verify(packetProcessingService, times(0)).transmitPacket(any(TransmitPacketInput.class)); } @Test public void testSendPacketOut_NullEgress() throws Exception { - packetDispatcher.sendPacketOut(null, new NodeConnectorRef(InstanceIdentifier.create(NodeConnector.class)), - null); + packetDispatcher.sendPacketOut(null, new NodeConnectorRef(InstanceIdentifier.builder(Nodes.class) + .child(Node.class) + .child(NodeConnector.class) + .build()), null); verify(packetProcessingService, times(0)).transmitPacket(any(TransmitPacketInput.class)); } @@ -90,7 +94,10 @@ public class PacketDispatcherTest { when(inventoryReader.getSwitchNodeConnectors()).thenReturn(switchNodeConnectors); packetDispatcher.floodPacket("", null, new NodeConnectorRef(ncInsId2), - new NodeConnectorRef(InstanceIdentifier.create(NodeConnector.class))); + new NodeConnectorRef(InstanceIdentifier.builder(Nodes.class) + .child(Node.class) + .child(NodeConnector.class) + .build())); verify(inventoryReader, times(0)).setRefreshData(true); verify(inventoryReader, times(0)).readInventory(); verify(packetProcessingService, times(2)).transmitPacket(any(TransmitPacketInput.class)); @@ -102,8 +109,15 @@ public class PacketDispatcherTest { when(switchNodeConnectors.get(any(String.class))).thenReturn(null); when(inventoryReader.getSwitchNodeConnectors()).thenReturn(switchNodeConnectors); - packetDispatcher.floodPacket("", null, new NodeConnectorRef(InstanceIdentifier.create(NodeConnector.class)), - new NodeConnectorRef(InstanceIdentifier.create(NodeConnector.class))); + packetDispatcher.floodPacket("", null, + new NodeConnectorRef(InstanceIdentifier.builder(Nodes.class) + .child(Node.class) + .child(NodeConnector.class) + .build()), + new NodeConnectorRef(InstanceIdentifier.builder(Nodes.class) + .child(Node.class) + .child(NodeConnector.class) + .build())); verify(inventoryReader, times(1)).setRefreshData(true); verify(inventoryReader, times(1)).readInventory(); verify(packetProcessingService, times(0)).transmitPacket(any(TransmitPacketInput.class)); diff --git a/artifacts/pom.xml b/artifacts/pom.xml index d7a72fca..7c0ce005 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent odlparent-lite - 9.0.15 + 10.0.0 diff --git a/distribution/karaf/pom.xml b/distribution/karaf/pom.xml index 1cc9875b..e6c4a73d 100644 --- a/distribution/karaf/pom.xml +++ b/distribution/karaf/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent karaf4-parent - 9.0.15 + 10.0.0 distribution-karaf diff --git a/features/feature-parent/pom.xml b/features/feature-parent/pom.xml index 6b316dd7..c41d967a 100644 --- a/features/feature-parent/pom.xml +++ b/features/feature-parent/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 9.0.15 + 10.0.0 @@ -27,7 +27,7 @@ org.opendaylight.netconf netconf-artifacts - 2.0.16 + 3.0.2 import pom diff --git a/features/features-l2switch/pom.xml b/features/features-l2switch/pom.xml index a779c7a4..db61b3e2 100644 --- a/features/features-l2switch/pom.xml +++ b/features/features-l2switch/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 9.0.15 + 10.0.0 diff --git a/features/odl-l2switch-all/pom.xml b/features/odl-l2switch-all/pom.xml index b6a0ca8d..a2d4775c 100644 --- a/features/odl-l2switch-all/pom.xml +++ b/features/odl-l2switch-all/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 9.0.15 + 10.0.0 diff --git a/features/pom.xml b/features/pom.xml index c1165f4b..0d493a73 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 9.0.15 + 10.0.0 diff --git a/loopremover/implementation/src/test/java/org/opendaylight/l2switch/loopremover/topology/TopologyLinkDataChangeHandlerTest.java b/loopremover/implementation/src/test/java/org/opendaylight/l2switch/loopremover/topology/TopologyLinkDataChangeHandlerTest.java index 11d5aef4..da196006 100644 --- a/loopremover/implementation/src/test/java/org/opendaylight/l2switch/loopremover/topology/TopologyLinkDataChangeHandlerTest.java +++ b/loopremover/implementation/src/test/java/org/opendaylight/l2switch/loopremover/topology/TopologyLinkDataChangeHandlerTest.java @@ -38,6 +38,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.l2switch.loopremover.rev140 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2switch.loopremover.rev140714.StpStatusAwareNodeConnector; import org.opendaylight.yang.gen.v1.urn.opendaylight.l2switch.loopremover.rev140714.StpStatusAwareNodeConnectorBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.LinkId; +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.TopologyId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; @@ -76,7 +77,10 @@ public class TopologyLinkDataChangeHandlerTest { @SuppressWarnings("unchecked") @Test public void testOnDataChanged_CreatedDataNoRefresh() throws Exception { - InstanceIdentifier instanceId = InstanceIdentifier.create(Link.class); + InstanceIdentifier instanceId = InstanceIdentifier.builder(NetworkTopology.class) + .child(Topology.class) + .child(Link.class) + .build(); Link hostLink = new LinkBuilder().setLinkId(new LinkId("host:1")).build(); DataTreeModification mockChange = Mockito.mock(DataTreeModification.class); DataObjectModification mockModification = Mockito.mock(DataObjectModification.class); @@ -93,7 +97,10 @@ public class TopologyLinkDataChangeHandlerTest { @SuppressWarnings("unchecked") @Test public void testOnDataChanged_CreatedDataRefresh() throws Exception { - InstanceIdentifier instanceId = InstanceIdentifier.create(Link.class); + InstanceIdentifier instanceId = InstanceIdentifier.builder(NetworkTopology.class) + .child(Topology.class) + .child(Link.class) + .build(); Link hostLink = new LinkBuilder().setLinkId(new LinkId("openflow:1")).build(); DataTreeModification mockChange = Mockito.mock(DataTreeModification.class); DataObjectModification mockModification = Mockito.mock(DataObjectModification.class); @@ -110,7 +117,10 @@ public class TopologyLinkDataChangeHandlerTest { @SuppressWarnings("unchecked") @Test public void testOnDataChanged_RemovedDataNoRefresh() throws Exception { - InstanceIdentifier instanceId = InstanceIdentifier.create(Link.class); + InstanceIdentifier instanceId = InstanceIdentifier.builder(NetworkTopology.class) + .child(Topology.class) + .child(Link.class) + .build(); Link hostLink = new LinkBuilder().setLinkId(new LinkId("host:1")).build(); DataTreeModification mockChange = Mockito.mock(DataTreeModification.class); DataObjectModification mockModification = Mockito.mock(DataObjectModification.class); @@ -127,7 +137,10 @@ public class TopologyLinkDataChangeHandlerTest { @SuppressWarnings("unchecked") @Test public void testOnDataChanged_RemovedDataRefresh() throws Exception { - InstanceIdentifier instanceId = InstanceIdentifier.create(Link.class); + InstanceIdentifier instanceId = InstanceIdentifier.builder(NetworkTopology.class) + .child(Topology.class) + .child(Link.class) + .build(); Link hostLink = new LinkBuilder().setLinkId(new LinkId("openflow:1")).build(); DataTreeModification mockChange = Mockito.mock(DataTreeModification.class); DataObjectModification mockModification = Mockito.mock(DataObjectModification.class); @@ -145,7 +158,10 @@ public class TopologyLinkDataChangeHandlerTest { @Test public void testUpdateNodeConnectorStatus_NoLinks() throws Exception { // Setup code to trigger the TopologyDataChangeEventProcessor - InstanceIdentifier instanceId = InstanceIdentifier.create(Link.class); + InstanceIdentifier instanceId = InstanceIdentifier.builder(NetworkTopology.class) + .child(Topology.class) + .child(Link.class) + .build(); Link nodeLink = new LinkBuilder().setLinkId(new LinkId("openflow:1")).build(); DataTreeModification mockChange = Mockito.mock(DataTreeModification.class); DataObjectModification mockModification = Mockito.mock(DataObjectModification.class); @@ -175,7 +191,10 @@ public class TopologyLinkDataChangeHandlerTest { @Test public void testUpdateNodeConnectorStatus_WithLinks() throws Exception { // Setup code to trigger the TopologyDataChangeEventProcessor - InstanceIdentifier instanceId = InstanceIdentifier.create(Link.class); + InstanceIdentifier instanceId = InstanceIdentifier.builder(NetworkTopology.class) + .child(Topology.class) + .child(Link.class) + .build(); Link nodeLink = new LinkBuilder().setLinkId(new LinkId("openflow:1")).build(); DataTreeModification mockChange = Mockito.mock(DataTreeModification.class); DataObjectModification mockModification = Mockito.mock(DataObjectModification.class); @@ -245,7 +264,10 @@ public class TopologyLinkDataChangeHandlerTest { @Test public void testUpdateNodeConnectorStatus_WithStpLinks() throws Exception { // Setup code to trigger the TopologyDataChangeEventProcessor - InstanceIdentifier instanceId = InstanceIdentifier.create(Link.class); + InstanceIdentifier instanceId = InstanceIdentifier.builder(NetworkTopology.class) + .child(Topology.class) + .child(Link.class) + .build(); Link nodeLink = new LinkBuilder().setLinkId(new LinkId("openflow:1")).build(); DataTreeModification mockChange = Mockito.mock(DataTreeModification.class); DataObjectModification mockModification = Mockito.mock(DataObjectModification.class); diff --git a/parent/pom.xml b/parent/pom.xml index 885af625..a0d81c67 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.mdsal binding-parent - 8.0.15 + 9.0.2 org.opendaylight.l2switch @@ -18,14 +18,14 @@ org.opendaylight.controller controller-artifacts - 4.0.12 + 5.0.3 import pom org.opendaylight.openflowplugin openflowplugin-artifacts - 0.13.3 + 0.14.0 import pom -- 2.36.6