<groupId>org.onap.dcaegen2.services.son-handler</groupId>
<artifactId>son-handler</artifactId>
<name>dcaegen2-services-son-handler</name>
- <version>2.0.2-SNAPSHOT</version>
+ <version>2.0.3-SNAPSHOT</version>
<!--parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version> </parent -->
Long difference = fixedPciCreatedAt.getTime() - lastInvokedOofTimeStamp.getTime();
Configuration configuration = Configuration.getInstance();
- if (difference > configuration.getPolicyFixedPciTimeInterval()) {
+ if (Math.abs(difference) > configuration.getPolicyFixedPciTimeInterval()) {
log.info("Creating new child thread for sending fixedPciCells");
List<Graph> cluster = new ArrayList<>();
BlockingQueue<List<String>> childStatusQueue = new LinkedBlockingQueue<>();
import com.fasterxml.jackson.databind.ObjectMapper;
import fj.data.Either;
+import org.json.JSONObject;
import java.io.IOException;
import java.sql.Timestamp;
HoMetricsComponent hoMetricsComponent;
private static final Logger log = org.slf4j.LoggerFactory.getLogger(ChildThread.class);
private static Timestamp startTime;
+ private static String networkId;
/**
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;
}
return Either.right(404);
}
-}
\ No newline at end of file
+}
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return responseObject.getString("value");
}
+ /**
+ * Method to get CellData name from SDNR.
+ *
+ * @throws ConfigDbNotFoundException
+ * when request to configDB fails
+ */
+ public static JSONObject getCellData(String cellId) throws ConfigDbNotFoundException {
+ Configuration configuration = Configuration.getInstance();
+ String requestUrl = configuration.getConfigDbService() + "/api/sdnc-config-db/v3/getCell" + "/" + cellId;
+ String response = sendRequest(requestUrl);
+ JSONObject responseObject = new JSONObject(response);
+ return responseObject;
+ }
+
+
/**
* Method to send request.
*/
###############################################################################
major=2
minor=0
-patch=2
+patch=3
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT