From 25423c50e504676f15c7a57c03aad40bfc35c7e6 Mon Sep 17 00:00:00 2001 From: Michael Dürre Date: Wed, 20 Jul 2022 09:32:50 +0200 Subject: migrate sdnr features to sulfur MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix sdnr code for sulfur Issue-ID: CCSDK-3692 Signed-off-by: Michael Dürre Change-Id: I0a62ade424bb978222e7ce6450215fb327f957b7 Signed-off-by: Michael Dürre --- .../openroadm/test/TestChangeNotificationListener.java | 7 ++++--- .../openroadm/test/TestOpenRoadmDeviceChangeNotification.java | 7 ++++--- .../devicemanager/openroadm/test/TestOpenRoadmPMDataBuilder.java | 9 +++++---- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'sdnr/wt/devicemanager-onap/openroadm/provider/src/test') diff --git a/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestChangeNotificationListener.java b/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestChangeNotificationListener.java index 87f195dc3..4d64cca19 100644 --- a/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestChangeNotificationListener.java +++ b/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestChangeNotificationListener.java @@ -32,6 +32,7 @@ import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; import org.onap.ccsdk.features.sdnr.wt.devicemanager.openroadm.impl.OpenroadmChangeNotificationListener; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.WebsocketManagerService; +import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev191129.circuit.pack.features.CircuitPackComponents; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.EditOperationType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.notifications.rev120206.NetconfConfigChange; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.notifications.rev120206.netconf.config.change.Edit; @@ -56,7 +57,7 @@ public class TestChangeNotificationListener { OpenroadmChangeNotificationListener notifListener = new OpenroadmChangeNotificationListener(netconfAccessor, databaseService, notificationService); when(netconfAccessor.getNodeId()).thenReturn(new NodeId(NODEID)); - Iterable pathArguments = Arrays.asList(new PathArgument() { + List pathArguments = Arrays.asList(new PathArgument() { @Override public int compareTo(PathArgument arg0) { @@ -65,10 +66,10 @@ public class TestChangeNotificationListener { @Override public Class getType() { - return DataObject.class; + return CircuitPackComponents.class; } }); - InstanceIdentifier target = InstanceIdentifier.create(pathArguments); + InstanceIdentifier target = InstanceIdentifier.unsafeOf(pathArguments); notifListener.onNetconfConfigChange(createNotification(EditOperationType.Create, target)); EventlogEntity event = new EventlogBuilder().setNodeId(NODEID) diff --git a/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmDeviceChangeNotification.java b/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmDeviceChangeNotification.java index ca9ce351c..2e94e79ef 100644 --- a/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmDeviceChangeNotification.java +++ b/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmDeviceChangeNotification.java @@ -41,6 +41,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev191129.CreateTe import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev191129.CreateTechInfoNotificationBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev191129.change.notification.Edit; import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev191129.change.notification.EditBuilder; +import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev191129.circuit.pack.features.circuit.pack.components.Component; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.EditOperationType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EventlogBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EventlogEntity; @@ -65,7 +66,7 @@ public class TestOpenRoadmDeviceChangeNotification { public void testOnChangeNotification() { when(netconfAccessor.getNodeId()).thenReturn(new NodeId(NODEID)); - Iterable pathArguments = Arrays.asList(new PathArgument() { + List pathArguments = Arrays.asList(new PathArgument() { @Override public int compareTo(PathArgument arg0) { @@ -74,10 +75,10 @@ public class TestOpenRoadmDeviceChangeNotification { @Override public Class getType() { - return DataObject.class; + return Component.class; } }); - InstanceIdentifier target = InstanceIdentifier.create(pathArguments); + InstanceIdentifier target = InstanceIdentifier.unsafeOf(pathArguments); deviceChangeListener.onChangeNotification(createNotification(EditOperationType.Create, target)); EventlogEntity event = diff --git a/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmPMDataBuilder.java b/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmPMDataBuilder.java index 2a70ec7b6..202449033 100644 --- a/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmPMDataBuilder.java +++ b/sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmPMDataBuilder.java @@ -40,6 +40,7 @@ import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.alarm.pm.types.rev191129.Direction; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.alarm.pm.types.rev191129.Location; +import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev191129.circuit.pack.features.circuit.pack.components.Component; import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev191129.HistoricalPmList; import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev191129.historical.pm.group.HistoricalPm; import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev191129.historical.pm.group.HistoricalPmBuilder; @@ -142,10 +143,10 @@ public class TestOpenRoadmPMDataBuilder { @Override public @NonNull Class getType() { // TODO Auto-generated method stub - return Pmdata15mEntity.class; + return Component.class; } }; - historicalPmEntryBuiler.setPmResourceInstance(InstanceIdentifier.create(Arrays.asList(pa))) + historicalPmEntryBuiler.setPmResourceInstance(InstanceIdentifier.unsafeOf(Arrays.asList(pa))) .setPmResourceTypeExtension("dshjdekjdewkk") .setPmResourceType(ResourceTypeEnum.CircuitPack).setHistoricalPm(historicalPMCollection); @@ -179,11 +180,11 @@ public class TestOpenRoadmPMDataBuilder { @Override public Class getType() { // TODO Auto-generated method stub - return Pmdata15mEntity.class; + return Component.class; } }; historicalPMCollection.put(historicalPmBuilder.key(), historicalPmBuilder.build()); - historicalPmEntryBuiler.setPmResourceInstance(InstanceIdentifier.create(Arrays.asList(pa))) + historicalPmEntryBuiler.setPmResourceInstance(InstanceIdentifier.unsafeOf(Arrays.asList(pa))) .setPmResourceTypeExtension("dshjdekjdewkk") .setPmResourceType(ResourceTypeEnum.Device).setHistoricalPm(historicalPMCollection); -- cgit 1.2.3-korg