diff options
author | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2021-04-29 19:06:54 +0200 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2021-06-11 00:45:36 +0000 |
commit | db9f267b3930a28054e967c75db228e27663aedc (patch) | |
tree | e8ecaeff503afaa9c00b31781003b92a6f1844f2 /sdnr/wt/devicemanager-onap/openroadm | |
parent | e536aaa0422660283fa388c1a5d1a9c32dc52f9e (diff) |
migrate features to silicon
migrate features to silicon
Issue-ID: CCSDK-3278
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: Icabe6bd5b760438eedd8c6b78a70197c287c5199
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/openroadm')
-rw-r--r-- | sdnr/wt/devicemanager-onap/openroadm/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/test/TestOpenRoadmPMDataBuilder.java | 23 |
1 files changed, 19 insertions, 4 deletions
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 5069acec9..9d80e8f75 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 @@ -26,9 +26,11 @@ import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.eclipse.jdt.annotation.NonNull; import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.features.sdnr.wt.devicemanager.openroadm.impl.PmDataBuilderOpenRoadm; @@ -54,10 +56,13 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev191129.PmName import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev191129.Validity; import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev191129.ResourceTypeEnum; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Pmdata15mEntity; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.units.rev200413.Celsius; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.units.rev200413.PerformanceMeasurementUnitId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; +import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument; import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint64; @@ -82,8 +87,16 @@ public class TestOpenRoadmPMDataBuilder { private Map<HistoricalPmKey, HistoricalPm> historicalPMCollection = new HashMap<HistoricalPmKey, HistoricalPm>(); private Map<HistoricalPmEntryKey, HistoricalPmEntry> historicalPmEntryCollection = new HashMap<HistoricalPmEntryKey, HistoricalPmEntry>(); - - + private PathArgument pa =new PathArgument() { + @Override + public int compareTo(PathArgument o) { + return 0; + } + @Override + public @NonNull Class<? extends DataObject> getType() { + return Pmdata15mEntity.class; + } + }; // public methods @Before @@ -125,7 +138,8 @@ public class TestOpenRoadmPMDataBuilder { when(historicalPm.getMeasurement()).thenReturn(measurementData); historicalPMCollection.put(historicalPmBuilder.key(), historicalPmBuilder.build()); - historicalPmEntryBuiler.setPmResourceTypeExtension("dshjdekjdewkk") + historicalPmEntryBuiler.setPmResourceInstance(InstanceIdentifier.create(Arrays.asList(pa))) + .setPmResourceTypeExtension("dshjdekjdewkk") .setPmResourceType(ResourceTypeEnum.CircuitPack).setHistoricalPm(historicalPMCollection); historicalPmEntryCollection.put(historicalPmEntryBuiler.key(), historicalPmEntryBuiler.build()); @@ -149,7 +163,8 @@ public class TestOpenRoadmPMDataBuilder { when(historicalPm.getMeasurement()).thenReturn(measurementData); historicalPMCollection.put(historicalPmBuilder.key(), historicalPmBuilder.build()); - historicalPmEntryBuiler.setPmResourceTypeExtension("dshjdekjdewkk") + historicalPmEntryBuiler.setPmResourceInstance(InstanceIdentifier.create(Arrays.asList(pa))) + .setPmResourceTypeExtension("dshjdekjdewkk") .setPmResourceType(ResourceTypeEnum.Device).setHistoricalPm(historicalPMCollection); historicalPmEntryCollection.put(historicalPmEntryBuiler.key(), historicalPmEntryBuiler.build()); |