The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+
+## [2.1.6] - 2022/02/07
+ - [DCAEGEN2-3057](https://jira.onap.org/browse/DCAEGEN2-3057) - Fix bug in triggering control loop for PCI collision/confusion - by replacing Config DB with CPS
+
## [2.1.5] - 2021/10/14
- [DCAEGEN2-2943](https://jira.onap.org/browse/DCAEGEN2-2943) - Fix bug in filtering new FM notification
"designer_editable": false
},
{
- "name": "sonhandler.get.cell.data.url",
+ "name": "cps.get.celldata",
"value": "execute/cps-ran-schemaset/get-cell-list",
"description": "Cps get cell data url",
"sourced_at_deployment": false,
"designer_editable": false
},
{
- "name": "sonhandler.get.nbr.list.url",
+ "name": "cps.get.nbr.list.url",
"value": "execute/cps-ran-schemaset/get-nbr-list",
"description": "Cps get nbr list url",
"sourced_at_deployment": false,
"designer_editable": false
},
{
- "name": "sonhandler.get.pci.url",
+ "name": "cps.get.pci.url",
"value": "execute/ran-network-schemaset/get-pci",
"description": "Cps get pci url",
"sourced_at_deployment": false,
"designer_editable": false
},
{
- "name": "sonhandler.get.pnf.url",
+ "name": "cps.get.pnf.url",
"value": "execute/ran-network-schemaset/get-pnf",
"description": "Cps get pnf url",
"sourced_at_deployment": false,
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019-2021 Wipro Limited.
+ * Copyright (C) 2019-2022 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
<groupId>org.onap.dcaegen2.services.son-handler</groupId>
<artifactId>son-handler</artifactId>
<name>dcaegen2-services-son-handler</name>
- <version>2.1.5-SNAPSHOT</version>
+ <version>2.1.6-SNAPSHOT</version>
<!--parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version> </parent -->
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019-2021 Wipro Limited.
+ * Copyright (C) 2019-2022 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
public int getPolicyNegativeAckThreshold() {
- return policyNegativeAckThreshold;
- }
+ return policyNegativeAckThreshold;
+ }
- public void setPolicyNegativeAckThreshold(int policyNegativeAckThreshold) {
- this.policyNegativeAckThreshold = policyNegativeAckThreshold;
- }
+ public void setPolicyNegativeAckThreshold(int policyNegativeAckThreshold) {
+ this.policyNegativeAckThreshold = policyNegativeAckThreshold;
+ }
- public long getPolicyFixedPciTimeInterval() {
- return policyFixedPciTimeInterval;
- }
+ public long getPolicyFixedPciTimeInterval() {
+ return policyFixedPciTimeInterval;
+ }
- public void setPolicyFixedPciTimeInterval(long policyFixedPciTimeInterval) {
- this.policyFixedPciTimeInterval = policyFixedPciTimeInterval;
- }
+ public void setPolicyFixedPciTimeInterval(long policyFixedPciTimeInterval) {
+ this.policyFixedPciTimeInterval = policyFixedPciTimeInterval;
+ }
- public String getNfNamingCode() {
- return nfNamingCode;
- }
+ public String getNfNamingCode() {
+ return nfNamingCode;
+ }
- public void setNfNamingCode(String nfNamingCode) {
- this.nfNamingCode = nfNamingCode;
- }
+ public void setNfNamingCode(String nfNamingCode) {
+ this.nfNamingCode = nfNamingCode;
+ }
public static Logger getLog() {
return log;
Configuration.instance = instance;
}
- public ConfigInterface getConfigurationClient()
- {
- ConfigInterface conf = ConfigurationClient.configClient(Configuration.getInstance().getConfigClientType());
- log.info("ConfigurationClient obj is : " + conf);
- return conf;
- }
-
@Override
public String toString() {
return "Configuration [pgHost=" + pgHost + ", pgPort=" + pgPort + ", pgUsername=" + pgUsername + ", pgPassword="
getCellDataUrl = jsonObject.get("cps.get.celldata").getAsString();
getPnfUrl = jsonObject.get("cps.get.pnf.url").getAsString();
getPciUrl = jsonObject.get("cps.get.pci.url").getAsString();
+ getNbrListUrl = jsonObject.get("cps.get.nbr.list.url").getAsString();
ConfigClientType = jsonObject.get("sonhandler.clientType").getAsString();
log.info("configuration from CBS {}", this);
}
-
+ public ConfigInterface getConfigurationClient()
+ {
+ ConfigInterface conf = ConfigurationClient.configClient(Configuration.getInstance().getConfigClientType());
+ log.info("ConfigurationClient obj is : " + conf);
+ return conf;
+ }
}
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2021 Wipro Limited.
+ * Copyright (C) 2021-2022 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
reqbody.put("inputParameters", inputparam);
log.debug("request url: {}", requestUrl);
String response = sendRequest(requestUrl, reqbody);
+ log.info("Response from CPS is : " + response);
List<CellPciPair> nbrList = new ArrayList<>();
-
- JSONArray nbrListObj = new JSONArray(response);
+ JSONObject responseJson = new JSONObject(response);
+ JSONArray nbrListObj = responseJson.getJSONArray("NRCellRelation");
for (int i = 0; i < nbrListObj.length(); i++) {
JSONObject cellObj = nbrListObj.getJSONObject(i);
JSONObject obj = cellObj.getJSONObject("attributes");
inputparam.put("cellId", cellId);
reqbody.put("inputParameters", inputparam);
String response = sendRequest(requestUrl, reqbody);
+ log.info("Response from CPS is : " + response);
JSONObject respObj = new JSONObject(response);
- return respObj.getInt("value");
+ int obj = respObj.getInt("nRPCI");
+ log.info("The nRPCI value is " + obj );
+ return respObj.getInt("nRPCI");
}
/**
@Override
public String getPnfName(String cellId) throws CpsNotFoundException {
Configuration configuration = Configuration.getInstance();
+ String responseObject = "";
String requestUrl = configuration.getCpsServiceUrl() + "/" + configuration.getGetPnfUrl();
JSONObject inputparam = new JSONObject();
JSONObject reqbody = new JSONObject();
inputparam.put("cellId", cellId);
reqbody.put("inputParameters", inputparam);
String response = sendRequest(requestUrl, reqbody);
- JSONObject responseObject = new JSONObject(response);
- return responseObject.getString("value");
+ log.info("Response from CPS is : " + response);
+ JSONArray requestArray = new JSONArray(response);
+ for (int i=0;i<requestArray.length();i++) {
+ String pnfName = requestArray.getJSONObject(i).optString("idGNBCUCPFunction");
+ responseObject = pnfName;
+ }
+ return responseObject;
}
/**
inputparam.put("cellId", cellId);
reqbody.put("inputParameters", inputparam);
String response = sendRequest(requestUrl, reqbody);
+ log.info("Response from CPS is : " + response);
JSONObject responseObject = new JSONObject(response);
return responseObject;
}
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019-2021 Wipro Limited.
+ * Copyright (C) 2019-2022 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
+ "/" + ts;
log.debug("request url: {}", requestUrl);
String response = sendRequest(requestUrl);
+ log.info("Response from configdb getNbrList is : " + response);
List<CellPciPair> nbrList = new ArrayList<>();
JSONObject responseJson = new JSONObject(response);
JSONArray nbrListObj = responseJson.getJSONArray("nbrList");
String requestUrl = configuration.getConfigDbService() + "/api/sdnc-config-db/v3/getPCI" + "/" + cellId + "/"
+ ts;
String response = sendRequest(requestUrl);
+ log.info("Response from configdb getPci is : " + response);
JSONObject respObj = new JSONObject(response);
return respObj.getInt("value");
}
String requestUrl = configuration.getConfigDbService() + "/api/sdnc-config-db/v3/getPnfId" + "/" + cellId + "/"
+ ts;
String response = sendRequest(requestUrl);
+ log.info("Response from configdb getPnfName is : " + response);
JSONObject responseObject = new JSONObject(response);
return responseObject.getString("value");
}
@Override
public 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;
+ Configuration configuration = Configuration.getInstance();
+ String requestUrl = configuration.getConfigDbService() + "/api/sdnc-config-db/v3/getCell" + "/" + cellId;
+ String response = sendRequest(requestUrl);
+ log.info("Response from configdb getCellData is : " + response);
+ JSONObject responseObject = new JSONObject(response);
+ return responseObject;
}
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2021 Wipro Limited.
+ * Copyright (C) 2021-2022 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@Test
public void getPciTest() {
- String responseBody = "{\n" + " \"attribute-name\": \"string\",\n" + " \"value\": 0\n" + "}";
+ String responseBody = "{\n" + " \"nRPCI\": \"11\",\n" + " \"value\": 0\n" + "}";
PowerMockito.mockStatic(SonHandlerRestTemplate.class);
PowerMockito.mockStatic(Configuration.class);
PowerMockito.when(Configuration.getInstance()).thenReturn(configuration);
int result = cps.getPci("1");
String response = ResponseEntity.ok(responseBody).getBody();
JSONObject respObj = new JSONObject(response);
- assertEquals(respObj.getInt("value"), result);
+ assertEquals(respObj.getInt("nRPCI"), result);
} catch (CpsNotFoundException e) {
log.debug("CpsNotFoundException {}", e.toString());
;
@Test
public void getPnfNameTest() {
- String responseBody = "{\n" + " \"attribute-name\": \"string\",\n" + " \"value\": \"string\"\n" + "}";
+ String responseBody = "[{\n" + " \"idGNBCUCPFunction\": \"cucpserver1\",\n" + " \"value\": \"string\"\n" + "}]";
PowerMockito.mockStatic(SonHandlerRestTemplate.class);
PowerMockito.mockStatic(Configuration.class);
PowerMockito.when(Configuration.getInstance()).thenReturn(configuration);
Matchers.<ParameterizedTypeReference<String>>any()))
.thenReturn(ResponseEntity.ok(responseBody));
try {
- String result = cps.getPnfName("1");
+ String result = cps.getPnfName("cucpserver1");
String response = ResponseEntity.ok(responseBody).getBody();
- JSONObject respObj = new JSONObject(response);
- assertEquals(respObj.getString("value"), result);
+
+ JSONArray requestArray = new JSONArray(response);
+ for (int i=0;i<requestArray.length();i++) {
+ assertEquals(requestArray.getJSONObject(i).getString("idGNBCUCPFunction"), result);
+ }
} catch (CpsNotFoundException e) {
log.debug("CpsNotFoundException {}", e.toString());
;
}
-}
\ No newline at end of file
+}
# ============LICENSE_START=======================================================
# son-handler
# ================================================================================
-# Copyright (C) 2019-2020 Wipro Limited.
+# Copyright (C) 2019-2022 Wipro Limited.
# ==============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
###############################################################################
major=2
minor=1
-patch=5
+patch=6
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT