summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/openroadm71/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/openroadm71/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/openroadm71/provider/src/test')
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestChangeNotificationListener.java7
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmDeviceChangeNotification.java7
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmInventory.java8
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElement.java10
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElementFactory.java2
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmPMDataBuilder.java9
6 files changed, 23 insertions, 20 deletions
diff --git a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestChangeNotificationListener.java b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestChangeNotificationListener.java
index f7732c7af..fa21e77fe 100644
--- a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestChangeNotificationListener.java
+++ b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/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.openroadm71.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.rev200529.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.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 Component.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/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmDeviceChangeNotification.java b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmDeviceChangeNotification.java
index 6188cc5e6..f9b5b514d 100644
--- a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmDeviceChangeNotification.java
+++ b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmDeviceChangeNotification.java
@@ -41,6 +41,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.CreateTe
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.CreateTechInfoNotificationBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.change.notification.Edit;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.change.notification.EditBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.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/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmInventory.java b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmInventory.java
index 2b2b2c618..7a03aa385 100644
--- a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmInventory.java
+++ b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmInventory.java
@@ -32,12 +32,12 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev1911
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.LifecycleState;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev200529.OpenroadmVersionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.OrgOpenroadmDevice;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.packs.CircuitPacks;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.interfaces.grp.Interface;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.OrgOpenroadmDevice;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.Info;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.InfoBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.Xponder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.Info;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.InfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.Xponder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.shelves.Shelves;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.NodeTypes;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.XpdrNodeTypes;
diff --git a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElement.java b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElement.java
index 9ef0f6474..a018df739 100644
--- a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElement.java
+++ b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElement.java
@@ -50,16 +50,16 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev1911
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.LifecycleState;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev200529.OpenroadmVersionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.OrgOpenroadmDevice;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.pack.ParentCircuitPack;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.packs.CircuitPacks;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.packs.CircuitPacksKey;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.interfaces.grp.Interface;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.interfaces.grp.InterfaceKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.OrgOpenroadmDevice;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.Info;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.InfoBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.Xponder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.org.openroadm.device.XponderKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.Info;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.InfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.Xponder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.XponderKey;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.shelf.Slots;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.shelf.SlotsKey;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.shelves.Shelves;
diff --git a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElementFactory.java b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElementFactory.java
index a35c5f0ae..5e71fac44 100644
--- a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElementFactory.java
+++ b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmNetworkElementFactory.java
@@ -37,7 +37,7 @@ import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAcc
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.openroadm.device.container.OrgOpenroadmDevice;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.OrgOpenroadmDevice;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
diff --git a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmPMDataBuilder.java b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmPMDataBuilder.java
index 3a0781e8f..49585acb2 100644
--- a/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/test/TestOpenRoadmPMDataBuilder.java
+++ b/sdnr/wt/devicemanager-onap/openroadm71/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm71/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.rev200529.circuit.pack.features.circuit.pack.components.Component;
import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev200529.HistoricalPmList;
import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev200529.historical.pm.group.HistoricalPm;
import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.rev200529.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);