summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/openroadm/provider/src/main
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-08-09 16:03:02 +0530
committerKAPIL SINGAL <ks220y@att.com>2021-08-09 21:33:18 +0000
commit1c4ad2b1a689d309d456a6ada894d1e8b1971b3c (patch)
tree42f91904482ca4b6ae7aa641279f912ec3a20a4d /sdnr/wt/devicemanager-onap/openroadm/provider/src/main
parenta41e9fc536f17d7559cf44b193f91973f33e1e67 (diff)
Update devicemanager-openroadm unit tests
and some minor changes Issue-ID: CCSDK-3419 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> Change-Id: I3382de7a9b1f863c0eb31eb4787b402330ce6516 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/openroadm/provider/src/main')
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElement.java2
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElementFactory.java2
-rw-r--r--sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/PmDataBuilderOpenRoadm.java3
3 files changed, 5 insertions, 2 deletions
diff --git a/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElement.java b/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElement.java
index cc406d843..45490a8b7 100644
--- a/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElement.java
+++ b/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElement.java
@@ -62,7 +62,7 @@ import org.slf4j.LoggerFactory;
public class OpenroadmNetworkElement extends OpenroadmNetworkElementBase {
// variables
- private final long equipmentLevel = 1;
+ private final long equipmentLevel = 0;
private static final Logger log = LoggerFactory.getLogger(OpenroadmNetworkElement.class);
private Hashtable<String, Long> circuitPacksRecord;
private Hashtable<String, Long> shelfProvisionedcircuitPacks;
diff --git a/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElementFactory.java b/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElementFactory.java
index cc8eaa68e..f4f486578 100644
--- a/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElementFactory.java
+++ b/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/OpenroadmNetworkElementFactory.java
@@ -63,7 +63,7 @@ public class OpenroadmNetworkElementFactory implements NetworkElementFactory {
if (bindingAccessor.isPresent()) {
return Optional.of(new OpenroadmNetworkElementBase(bindingAccessor.get(), serviceProvider));
}
- }
+ }
return Optional.empty();
}
// end of public methods
diff --git a/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/PmDataBuilderOpenRoadm.java b/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/PmDataBuilderOpenRoadm.java
index f1fd4471f..b032348ca 100644
--- a/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/PmDataBuilderOpenRoadm.java
+++ b/sdnr/wt/devicemanager-onap/openroadm/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/openroadm/impl/PmDataBuilderOpenRoadm.java
@@ -94,6 +94,9 @@ public class PmDataBuilderOpenRoadm {
// Build PM entity for writing into the database
public List<PmdataEntity> buildPmDataEntity(HistoricalPmList historicalPmEnitityList) {
List<PmdataEntity> pmEntitiyList = new ArrayList<>();
+ if(historicalPmEnitityList==null) {
+ return pmEntitiyList;
+ }
Collection<HistoricalPmEntry> pmDataEntryList =
YangHelper.getCollection(historicalPmEnitityList.getHistoricalPmEntry());
for (HistoricalPmEntry pmDataEntry : pmDataEntryList) {