aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dcaegen2/services/sonhms/child/ChildThread.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/dcaegen2/services/sonhms/child/ChildThread.java')
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/child/ChildThread.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/child/ChildThread.java b/src/main/java/org/onap/dcaegen2/services/sonhms/child/ChildThread.java
index 1e740a9..fd2de30 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/child/ChildThread.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/child/ChildThread.java
@@ -25,6 +25,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import fj.data.Either;
+import org.json.JSONObject;
import java.io.IOException;
import java.sql.Timestamp;
@@ -80,6 +81,7 @@ public class ChildThread implements Runnable {
HoMetricsComponent hoMetricsComponent;
private static final Logger log = org.slf4j.LoggerFactory.getLogger(ChildThread.class);
private static Timestamp startTime;
+ private static String networkId;
/**
@@ -169,7 +171,14 @@ public class ChildThread implements Runnable {
new PolicyDmaapClient(new DmaapUtils(), Configuration.getInstance()), new HoMetricsComponent());
try {
- String networkId = cluster.getNetworkId();
+ networkId = cluster.getNetworkId();
+ if (cluster.getCellPciNeighbourMap().isEmpty()) {
+ FixedPciCellsRepository fixedPciCellsRepository = BeanUtil.getBean(FixedPciCellsRepository.class);
+ List<String> fixedPciCells = fixedPciCellsRepository.getFixedPciCells();
+ String cellId = fixedPciCells.get(0);
+ JSONObject cellData = SdnrRestClient.getCellData(cellId);
+ networkId = cellData.getJSONObject("Cell").getString("networkId");
+ }
Boolean done = false;
@@ -526,4 +535,4 @@ public class ChildThread implements Runnable {
}
return Either.right(404);
}
-} \ No newline at end of file
+}