summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/openroadm/provider/src/test
diff options
context:
space:
mode:
authorMichael Dürre <michael.duerre@highstreet-technologies.com>2022-07-20 09:32:50 +0200
committerMichael Dürre <michael.duerre@highstreet-technologies.com>2022-07-21 12:38:52 +0200
commit25423c50e504676f15c7a57c03aad40bfc35c7e6 (patch)
tree811649e2ec44e0332e601c6563e00e914d355b9a /sdnr/wt/devicemanager-onap/openroadm/provider/src/test
parentcea47224b7b6afdd7b3d3ead8d08baf46eadc575 (diff)
migrate sdnr features to sulfur
fix sdnr code for sulfur Issue-ID: CCSDK-3692 Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com> Change-Id: I0a62ade424bb978222e7ce6450215fb327f957b7 Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/openroadm/provider/src/test')
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestChangeNotificationListener.java7
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmDeviceChangeNotification.java7
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmPMDataBuilder.java9
3 files changed, 13 insertions, 10 deletions
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<? extends PathArgument> pathArguments = Arrays.asList(new PathArgument() {
+ List<? extends PathArgument> pathArguments = Arrays.asList(new PathArgument() {
@Override
public int compareTo(PathArgument arg0) {
@@ -65,10 +66,10 @@ public class TestChangeNotificationListener {
@Override
public Class<? extends DataObject> 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<? extends PathArgument> pathArguments = Arrays.asList(new PathArgument() {
+ List<? extends PathArgument> pathArguments = Arrays.asList(new PathArgument() {
@Override
public int compareTo(PathArgument arg0) {
@@ -74,10 +75,10 @@ public class TestOpenRoadmDeviceChangeNotification {
@Override
public Class<? extends DataObject> 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<? extends DataObject> 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<? extends DataObject> 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);