diff options
author | Michael DÜrre <michael.duerre@highstreet-technologies.com> | 2022-03-10 10:39:16 +0100 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2022-03-23 15:08:48 -0400 |
commit | eb2a7c97c0007b013bd1784ac17d57be02b63d03 (patch) | |
tree | b0861438532727219216cfd426e21ae053abb31a /sdnr/wt/devicemanager-onap/onf12/provider/src/test | |
parent | 3c74361514bb920ed441d105f66ca978bd074ced (diff) |
migrate sdnr features to phosphorus
fix mapper and switch to dom api
Updated to use phosphorus version of parent poms
Issue-ID: CCSDK-3566
Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com>
Change-Id: I98c5bef9286622e0d66b53db687557d798cd53f5
Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/onf12/provider/src/test')
6 files changed, 42 insertions, 29 deletions
diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestExtendedEquipment.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestExtendedEquipment.java index 20d479efa..3ded68537 100644 --- a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestExtendedEquipment.java +++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestExtendedEquipment.java @@ -26,6 +26,7 @@ import org.eclipse.jdt.annotation.NonNull; import org.junit.Test; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.WrapperPTPModelRev170208; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.equipment.ExtendedEquipment; +import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.Equipment; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.EquipmentBuilder; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; @@ -66,7 +67,7 @@ public class TestExtendedEquipment { new ManufacturedThingBuilder().setManufacturerProperties(manufacturerProps).setEquipmentType(eqptType) .setEquipmentInstance(eqptInstance).build(); - Equipment equipment = new EquipmentBuilder().setUuid(id).setContainedHolder(holder) + Equipment equipment = new EquipmentBuilder().setUuid(id).setContainedHolder(YangToolsMapperHelper.toMap(holder)) .setManufacturedThing(manufacturedThing).build(); ExtendedEquipment extEqpt = new ExtendedEquipment(NODEID, "1234567890", equipment, "/var/opt", 3); diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java index 4049a549d..f4a0aaedb 100644 --- a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java +++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java @@ -32,6 +32,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.util.InconsistentPMDataException; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; +import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; @@ -109,7 +110,7 @@ public class TestWrapperMicrowaveModelRev170324 { Arrays.asList(new CurrentProblemListBuilder().setProblemName("Loss of Signal") .setProblemSeverity(SeverityType.Critical).setSequenceNumber(1).setTimeStamp(null).build()); airInterfaceCurrentProblems = - new AirInterfaceCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new AirInterfaceCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); mwEthInterfaceIID = InstanceIdentifier.builder(MwEthernetContainerPac.class, new MwEthernetContainerPacKey(uid)) .child(EthernetContainerCurrentProblems.class).build(); @@ -120,7 +121,7 @@ public class TestWrapperMicrowaveModelRev170324 { .setProblemSeverity(SeverityType.Critical).setSequenceNumber(1).setTimeStamp(null) .build()); ethernetContainerCurrentProblems = - new EthernetContainerCurrentProblemsBuilder().setCurrentProblemList(ethCurrentProblemsList).build(); + new EthernetContainerCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(ethCurrentProblemsList)).build(); NodeId nNodeId = new NodeId("nSky"); when(accessor.getNodeId()).thenReturn(nNodeId); @@ -189,7 +190,7 @@ public class TestWrapperMicrowaveModelRev170324 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); TdmContainerCurrentProblems tdmInterfaceCurrentProblems = - new TdmContainerCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new TdmContainerCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(tdmInterfaceCurrentProblems); @@ -214,7 +215,7 @@ public class TestWrapperMicrowaveModelRev170324 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); HybridMwStructureCurrentProblems hybridMwStructureCurrentProblems = - new HybridMwStructureCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new HybridMwStructureCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -239,7 +240,7 @@ public class TestWrapperMicrowaveModelRev170324 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); AirInterfaceDiversityCurrentProblems hybridMwStructureCurrentProblems = - new AirInterfaceDiversityCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new AirInterfaceDiversityCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -264,7 +265,7 @@ public class TestWrapperMicrowaveModelRev170324 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); PureEthernetStructureCurrentProblems hybridMwStructureCurrentProblems = - new PureEthernetStructureCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new PureEthernetStructureCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -306,9 +307,10 @@ public class TestWrapperMicrowaveModelRev170324 { new org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.microwave.model.rev170324.air._interface.historical.performances.g.HistoricalPerformanceDataListBuilder() .setHistoryDataId("123") .setGranularityPeriod(GranularityPeriodType.Period15Min) - .setPerformanceData(performanceData).build()); + .setSuspectIntervalFlag(true) + .setPerformanceData(performanceData).build()); AirInterfaceHistoricalPerformances airHistoricalPerformanceData = - new AirInterfaceHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(airHistPMList).build(); + new AirInterfaceHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(YangToolsMapperHelper.toMap(airHistPMList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwAirInterfaceHistoricalPerformanceIID)).thenReturn(airHistoricalPerformanceData); @@ -323,10 +325,11 @@ public class TestWrapperMicrowaveModelRev170324 { Arrays.asList( new org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.microwave.model.rev170324.ethernet.container.historical.performances.g.HistoricalPerformanceDataListBuilder() .setHistoryDataId("123") + .setSuspectIntervalFlag(true) .setGranularityPeriod(GranularityPeriodType.Period24Hours) .setPerformanceData(ethPerformanceData).build()); EthernetContainerHistoricalPerformances ethContainerHistoricalPerformanceData = - new EthernetContainerHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(ethHistPMList) + new EthernetContainerHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(YangToolsMapperHelper.toMap(ethHistPMList)) .build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, ethContainerIID)).thenReturn(ethContainerHistoricalPerformanceData); diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java index 078890fd2..173b973b9 100644 --- a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java +++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java @@ -32,6 +32,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.util.InconsistentPMDataException; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; +import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.logical.termination.point.g.Lp; @@ -106,7 +107,7 @@ public class TestWrapperMicrowaveModelRev180907 { Arrays.asList(new CurrentProblemListBuilder().setProblemName("Loss of Signal") .setProblemSeverity(SeverityType.Critical).setSequenceNumber(1).setTimeStamp(null).build()); airInterfaceCurrentProblems = - new AirInterfaceCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new AirInterfaceCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); mwEthInterfaceIID = InstanceIdentifier.builder(MwEthernetContainerPac.class, new MwEthernetContainerPacKey(uid)) .child(EthernetContainerCurrentProblems.class).build(); @@ -117,7 +118,7 @@ public class TestWrapperMicrowaveModelRev180907 { .setProblemSeverity(SeverityType.Critical).setSequenceNumber(1).setTimeStamp(null) .build()); ethernetContainerCurrentProblems = - new EthernetContainerCurrentProblemsBuilder().setCurrentProblemList(ethCurrentProblemsList).build(); + new EthernetContainerCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(ethCurrentProblemsList)).build(); NodeId nNodeId = new NodeId("nSky"); when(accessor.getNodeId()).thenReturn(nNodeId); @@ -185,7 +186,7 @@ public class TestWrapperMicrowaveModelRev180907 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); TdmContainerCurrentProblems tdmInterfaceCurrentProblems = - new TdmContainerCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new TdmContainerCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(tdmInterfaceCurrentProblems); @@ -210,7 +211,7 @@ public class TestWrapperMicrowaveModelRev180907 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); HybridMwStructureCurrentProblems hybridMwStructureCurrentProblems = - new HybridMwStructureCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new HybridMwStructureCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -235,7 +236,7 @@ public class TestWrapperMicrowaveModelRev180907 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); AirInterfaceDiversityCurrentProblems hybridMwStructureCurrentProblems = - new AirInterfaceDiversityCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new AirInterfaceDiversityCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -260,7 +261,7 @@ public class TestWrapperMicrowaveModelRev180907 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); PureEthernetStructureCurrentProblems hybridMwStructureCurrentProblems = - new PureEthernetStructureCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new PureEthernetStructureCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -302,9 +303,10 @@ public class TestWrapperMicrowaveModelRev180907 { new org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.microwave.model.rev180907.air._interface.historical.performances.g.HistoricalPerformanceDataListBuilder() .setHistoryDataId("123") .setGranularityPeriod(GranularityPeriodType.Period15Min) + .setSuspectIntervalFlag(true) .setPerformanceData(performanceData).build()); AirInterfaceHistoricalPerformances airHistoricalPerformanceData = - new AirInterfaceHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(airHistPMList).build(); + new AirInterfaceHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(YangToolsMapperHelper.toMap(airHistPMList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwAirInterfaceHistoricalPerformanceIID)).thenReturn(airHistoricalPerformanceData); @@ -320,9 +322,10 @@ public class TestWrapperMicrowaveModelRev180907 { new org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.microwave.model.rev180907.ethernet.container.historical.performances.g.HistoricalPerformanceDataListBuilder() .setHistoryDataId("123") .setGranularityPeriod(GranularityPeriodType.Period24Hours) + .setSuspectIntervalFlag(true) .setPerformanceData(ethPerformanceData).build()); EthernetContainerHistoricalPerformances ethContainerHistoricalPerformanceData = - new EthernetContainerHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(ethHistPMList) + new EthernetContainerHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(YangToolsMapperHelper.toMap(ethHistPMList)) .build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, ethContainerIID)).thenReturn(ethContainerHistoricalPerformanceData); diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java index 51e9dae72..c282e1a7b 100644 --- a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java +++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java @@ -32,8 +32,11 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.util.InconsistentPMDataException; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; +import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; +import org.onap.ccsdk.features.sdnr.wt.yang.mapper.mapperextensions.YangtoolsMapDesirializer; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.Yang; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.logical.termination.point.g.Lp; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.logical.termination.point.g.LpBuilder; @@ -110,7 +113,7 @@ public class TestWrapperMicrowaveModelRev181010 { Arrays.asList(new CurrentProblemListBuilder().setProblemName("Loss of Signal") .setProblemSeverity(SeverityType.Critical).setSequenceNumber(1).setTimeStamp(null).build()); airInterfaceCurrentProblems = - new AirInterfaceCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new AirInterfaceCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); mwEthInterfaceIID = InstanceIdentifier.builder(MwEthernetContainerPac.class, new MwEthernetContainerPacKey(uid)) .child(EthernetContainerCurrentProblems.class).build(); @@ -121,7 +124,7 @@ public class TestWrapperMicrowaveModelRev181010 { .setProblemSeverity(SeverityType.Critical).setSequenceNumber(1).setTimeStamp(null) .build()); ethernetContainerCurrentProblems = - new EthernetContainerCurrentProblemsBuilder().setCurrentProblemList(ethCurrentProblemsList).build(); + new EthernetContainerCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(ethCurrentProblemsList)).build(); NodeId nNodeId = new NodeId("nSky"); when(accessor.getNodeId()).thenReturn(nNodeId); @@ -190,7 +193,7 @@ public class TestWrapperMicrowaveModelRev181010 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); TdmContainerCurrentProblems tdmInterfaceCurrentProblems = - new TdmContainerCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new TdmContainerCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(tdmInterfaceCurrentProblems); @@ -215,7 +218,7 @@ public class TestWrapperMicrowaveModelRev181010 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); HybridMwStructureCurrentProblems hybridMwStructureCurrentProblems = - new HybridMwStructureCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new HybridMwStructureCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -240,7 +243,7 @@ public class TestWrapperMicrowaveModelRev181010 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); AirInterfaceDiversityCurrentProblems hybridMwStructureCurrentProblems = - new AirInterfaceDiversityCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new AirInterfaceDiversityCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -265,7 +268,7 @@ public class TestWrapperMicrowaveModelRev181010 { .setProblemName("Loss of Payload").setProblemSeverity(SeverityType.Major) .setSequenceNumber(2).setTimeStamp(null).build()); PureEthernetStructureCurrentProblems hybridMwStructureCurrentProblems = - new PureEthernetStructureCurrentProblemsBuilder().setCurrentProblemList(currentProblemList).build(); + new PureEthernetStructureCurrentProblemsBuilder().setCurrentProblemList(YangToolsMapperHelper.toMap(currentProblemList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwEthInterfaceIID)).thenReturn(hybridMwStructureCurrentProblems); @@ -306,9 +309,10 @@ public class TestWrapperMicrowaveModelRev181010 { new org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.microwave.model.rev181010.air._interface.historical.performances.g.HistoricalPerformanceDataListBuilder() .setHistoryDataId("123") .setGranularityPeriod(GranularityPeriodType.Period15Min) + .setSuspectIntervalFlag(true) .setPerformanceData(performanceData).build()); AirInterfaceHistoricalPerformances airHistoricalPerformanceData = - new AirInterfaceHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(airHistPMList).build(); + new AirInterfaceHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(YangToolsMapperHelper.toMap(airHistPMList)).build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, mwAirInterfaceHistoricalPerformanceIID)).thenReturn(airHistoricalPerformanceData); @@ -324,9 +328,10 @@ public class TestWrapperMicrowaveModelRev181010 { new org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.microwave.model.rev181010.ethernet.container.historical.performances.g.HistoricalPerformanceDataListBuilder() .setHistoryDataId("123") .setGranularityPeriod(GranularityPeriodType.Period24Hours) + .setSuspectIntervalFlag(true) .setPerformanceData(ethPerformanceData).build()); EthernetContainerHistoricalPerformances ethContainerHistoricalPerformanceData = - new EthernetContainerHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(ethHistPMList) + new EthernetContainerHistoricalPerformancesBuilder().setHistoricalPerformanceDataList(YangToolsMapperHelper.toMap(ethHistPMList)) .build(); when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, ethContainerIID)).thenReturn(ethContainerHistoricalPerformanceData); diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperNoPmData.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperNoPmData.java index 1cda8716d..9e330cb25 100644 --- a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperNoPmData.java +++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperNoPmData.java @@ -41,7 +41,7 @@ public class TestWrapperNoPmData { Lp lp = new LpBuilder().setUuid(new UniversalId("NodeUUID")).build(); //Build empty, without PerformanceData HistoricalPerformanceDataList pmRecord = - new HistoricalPerformanceDataListBuilder().setHistoryDataId("1").build(); + new HistoricalPerformanceDataListBuilder().setSuspectIntervalFlag(true).setHistoryDataId("1").build(); AirInterfaceConfiguration airConfiguration = new AirInterfaceConfigurationBuilder().build(); @SuppressWarnings("unused") diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java index 2adc248e1..a35e756a6 100644 --- a/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java +++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java @@ -27,6 +27,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.WrapperPTPModelRe import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; +import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ptp.dataset.rev170208.InstanceList; @@ -65,9 +66,9 @@ public class TestWrapperPTPModelRev170208 { List<PortDsList> portDsList = Arrays.asList(new PortDsListBuilder().setPortNumber(portNumber).setPortIdentity(portIdentity).build()); InstanceList instanceList = - new InstanceListBuilder().setInstanceNumber(Uint16.valueOf(1)).setPortDsList(portDsList).build(); + new InstanceListBuilder().setInstanceNumber(Uint16.valueOf(1)).setPortDsList(YangToolsMapperHelper.toMap(portDsList)).build(); InstanceIdentifier<InstanceList> PTPINSTANCES_IID = - InstanceIdentifier.builder(InstanceList.class, new InstanceListKey(1)).build(); + InstanceIdentifier.builder(InstanceList.class, new InstanceListKey(Uint16.valueOf(1))).build(); when(netconfAccessor.getTransactionUtils().readData(netconfAccessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, PTPINSTANCES_IID)).thenReturn(instanceList); } |