diff options
Diffstat (limited to 'components')
43 files changed, 136 insertions, 98 deletions
diff --git a/components/datalake-handler/feeder/src/assembly/init_db/db_scripts/init_db_data.sql b/components/datalake-handler/feeder/src/assembly/init_db/db_scripts/init_db_data.sql index 498230a9..f34fbbaf 100644 --- a/components/datalake-handler/feeder/src/assembly/init_db/db_scripts/init_db_data.sql +++ b/components/datalake-handler/feeder/src/assembly/init_db/db_scripts/init_db_data.sql @@ -58,12 +58,12 @@ insert into db_type (id, name, tool) values ('KIBANA', 'Kibana', true); insert into db_type (id, name, tool) values ('SUPERSET', 'Apache Superset', true); insert into db (id, db_type_id, enabled, encrypt, name,host,login,pass,database_name) values (1, 'CB', true, true, 'Couchbase 1','dl-couchbase','dl','dl1234','datalake'); -insert into db (id, db_type_id, enabled, encrypt, name,host) values (2, 'ES', true, true, 'Elasticsearch','dl-es'); -insert into db (id, db_type_id, enabled, encrypt, name,host,port,database_name) values (3, 'MONGO', true, true, 'MongoDB 1','dl-mongodb',27017,'datalake'); -insert into db (id, db_type_id, enabled, encrypt, name,host) values (4, 'DRUID', true, true, 'Druid','dl-druid'); -insert into db (id, db_type_id, enabled, encrypt, name,host,login) values (5, 'HDFS', true, true, 'Hadoop Cluster','dl-hdfs','dl'); -insert into db (id, db_type_id, enabled, encrypt, name,host) values (6, 'KIBANA', true, false, 'Kibana demo','dl-es'); -insert into db (id, db_type_id, enabled, encrypt, name,host) values (7, 'SUPERSET', true, false, 'Superset demo','dl-druid'); +insert into db (id, db_type_id, enabled, encrypt, name,host,port,database_name) values (2, 'MONGO', true, true, 'MongoDB 1','dl-mongodb',27017,'datalake'); +insert into db (id, db_type_id, enabled, encrypt, name,host) values (3, 'DRUID', true, true, 'Druid','dl-druid'); +insert into db (id, db_type_id, enabled, encrypt, name,host,login) values (4, 'HDFS', true, true, 'Hadoop Cluster','dl-hdfs','dl'); +insert into db (id, db_type_id, enabled, encrypt, name,host) values (5, 'KIBANA', true, false, 'Kibana demo','dl-es'); +insert into db (id, db_type_id, enabled, encrypt, name,host) values (6, 'SUPERSET', true, false, 'Superset demo','dl-druid'); +-- (execute this query if Elasticsearch is needed) insert into db (id, db_type_id, enabled, encrypt, name,host) values (7, 'ES', true, true, 'Elasticsearch','dl-es'); insert into topic_name (id) values ('_DL_DEFAULT_'); insert into topic_name (id) values ('unauthenticated.SEC_FAULT_OUTPUT'); diff --git a/components/kpi-computation-ms/pom.xml b/components/kpi-computation-ms/pom.xml index e9e315eb..d8e8f4d4 100644 --- a/components/kpi-computation-ms/pom.xml +++ b/components/kpi-computation-ms/pom.xml @@ -2,6 +2,7 @@ <!-- ~ ============LICENSE_START======================================================= ~ Copyright (c) 2021 China Mobile. All rights reserved. + ~ Copyright (c) 2021 Wipro Limited. ~ ================================================================================ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. @@ -28,7 +29,7 @@ <groupId>org.onap.dcaegen2.services.components</groupId> <artifactId>kpi-ms</artifactId> - <version>1.0.0-SNAPSHOT</version> + <version>1.0.1-SNAPSHOT</version> <name>dcaegen2-services-kpi-computation-ms</name> <description>Kpi ms</description> <packaging>jar</packaging> @@ -50,11 +51,11 @@ ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml </sonar.coverage.jacoco.xmlReportPaths> <lombok.version>1.18.4</lombok.version> - <undertow.version>2.0.30.Final</undertow.version> + <undertow.version>2.2.8.Final</undertow.version> <xml.version>2.3.1</xml.version> <jaxb.version>2.3.0.1</jaxb.version> <docker.repository>nexus3.onap.org:10003</docker.repository> - <spring.version>5.2.7.RELEASE</spring.version> + <spring.version>5.3.7</spring.version> <junit.version>5.3.2</junit.version> <mockito.version>2.23.4</mockito.version> <mockito-ju5-ext.version>2.23.4</mockito-ju5-ext.version> @@ -72,37 +73,37 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> - <version>5.2.7.RELEASE</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> - <version>5.2.7.RELEASE</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>5.2.7.RELEASE</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> - <version>5.2.7.RELEASE</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>5.2.7.RELEASE</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>5.2.7.RELEASE</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> - <version>5.2.7.RELEASE</version> + <version>${spring.version}</version> </dependency> <!-- cbs client --> <dependency> @@ -170,13 +171,13 @@ <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> - <version>4.5.7</version> + <version>4.5.13</version> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-server</artifactId> - <version>9.4.17.v20190418</version> + <version>9.4.41.v20210516</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> diff --git a/components/kpi-computation-ms/version.properties b/components/kpi-computation-ms/version.properties index be08607d..a6311499 100644 --- a/components/kpi-computation-ms/version.properties +++ b/components/kpi-computation-ms/version.properties @@ -20,7 +20,7 @@ ############################################################################### major=1 minor=0 -patch=0 +patch=1 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT diff --git a/components/pm-subscription-handler/Changelog.md b/components/pm-subscription-handler/Changelog.md index be2a7a73..58d40cc9 100755 --- a/components/pm-subscription-handler/Changelog.md +++ b/components/pm-subscription-handler/Changelog.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.3.2] +### Changed +* Update to use version 2.2.1 of https://pypi.org/project/onap_dcae_cbs_docker_client/ + ## [1.3.1] ### Changed * Updated Subscription object retrieving key from App Config data (DCAEGEN2-2713) diff --git a/components/pm-subscription-handler/pmsh_service/mod/__init__.py b/components/pm-subscription-handler/pmsh_service/mod/__init__.py index 505add06..5f78ca19 100644 --- a/components/pm-subscription-handler/pmsh_service/mod/__init__.py +++ b/components/pm-subscription-handler/pmsh_service/mod/__init__.py @@ -1,5 +1,5 @@ # ============LICENSE_START=================================================== -# Copyright (C) 2019-2020 Nordix Foundation. +# Copyright (C) 2019-2021 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ # ============LICENSE_END===================================================== import logging as logging import os +import ssl import pathlib from urllib.parse import quote @@ -44,11 +45,13 @@ def launch_api_server(app_config): connex_app.add_api('api/pmsh_swagger.yml') if app_config.enable_tls: logger.info('Launching secure http API server') + ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) + ssl_ctx.load_cert_chain(app_config.cert_params[0], app_config.cert_params[1]) connex_app.run(port=os.environ.get('PMSH_API_PORT', '8443'), - ssl_context=app_config.cert_params) + ssl_options=ssl_ctx, server="tornado") else: logger.info('Launching unsecure http API server') - connex_app.run(port=os.environ.get('PMSH_API_PORT', '8443')) + connex_app.run(port=os.environ.get('PMSH_API_PORT', '8443'), server="tornado") def create_app(): diff --git a/components/pm-subscription-handler/setup.py b/components/pm-subscription-handler/setup.py index e4d31332..2b8d24a9 100644 --- a/components/pm-subscription-handler/setup.py +++ b/components/pm-subscription-handler/setup.py @@ -1,5 +1,6 @@ # ============LICENSE_START======================================================= # Copyright (C) 2019-2021 Nordix Foundation. +# Copyright (C) 2021 AT&T Property. All rights reserved. # Copyright 2020 Deutsche Telekom. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,7 +22,7 @@ from setuptools import setup, find_packages setup( name="pm_subscription_handler", - version="1.3.1", + version="1.3.2", packages=find_packages(), author="lego@est.tech", author_email="lego@est.tech", @@ -35,9 +36,10 @@ setup( "connexion==2.5.0", "flask_sqlalchemy==2.4.1", "Flask==1.1.1", + "tornado==6.1", "swagger-ui-bundle==0.0.6", "psycopg2-binary==2.8.6", - "onap_dcae_cbs_docker_client==2.1.1", + "onap_dcae_cbs_docker_client==2.2.1", "onappylog==1.0.9", "ruamel.yaml==0.16.10", "jsonschema==3.2.0"] diff --git a/components/pm-subscription-handler/version.properties b/components/pm-subscription-handler/version.properties index fee49286..ef20baaf 100644 --- a/components/pm-subscription-handler/version.properties +++ b/components/pm-subscription-handler/version.properties @@ -1,6 +1,6 @@ major=1 minor=3 -patch=1 +patch=2 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT diff --git a/components/slice-analysis-ms/pom.xml b/components/slice-analysis-ms/pom.xml index e3485872..23fab21e 100644 --- a/components/slice-analysis-ms/pom.xml +++ b/components/slice-analysis-ms/pom.xml @@ -31,7 +31,7 @@ </parent> <groupId>org.onap.dcaegen2.services.components</groupId> <artifactId>slice-analysis-ms</artifactId> - <version>1.0.5-SNAPSHOT</version> + <version>1.0.6-SNAPSHOT</version> <name>dcaegen2-services-slice-analysis-ms</name> <description>Network slice PM analyser</description> <packaging>jar</packaging> @@ -68,32 +68,32 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> - <version>5.2.7.RELEASE</version> + <version>5.3.7</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> - <version>5.2.7.RELEASE</version> + <version>5.3.7</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>5.2.7.RELEASE</version> + <version>5.3.7</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> - <version>5.2.7.RELEASE</version> + <version>5.3.7</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>5.2.7.RELEASE</version> + <version>5.3.7</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> - <version>5.2.7.RELEASE</version> + <version>5.3.7</version> </dependency> <dependency> <groupId>org.springframework.data</groupId> @@ -165,7 +165,7 @@ <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - <version>42.2.5</version> + <version>42.2.13</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -231,7 +231,7 @@ <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> - <version>4.5.7</version> + <version>4.5.13</version> </dependency> <!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils --> <dependency> @@ -243,7 +243,7 @@ <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-server</artifactId> - <version>9.4.17.v20190418</version> + <version>9.4.41.v20210516</version> </dependency> <!-- https://mvnrepository.com/artifact/org.webjars/bootstrap --> <dependency> @@ -266,7 +266,7 @@ <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> - <version>9.0.36</version> + <version>9.0.46</version> </dependency> <!-- https://mvnrepository.com/artifact/nl.jqno.equalsverifier/equalsverifier --> <dependency> diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/configdb/CpsService.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/configdb/CpsService.java index f72c99c2..f0c27e19 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/configdb/CpsService.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/configdb/CpsService.java @@ -20,8 +20,6 @@ *******************************************************************************/ package org.onap.slice.analysis.ms.configdb; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -30,8 +28,6 @@ import org.onap.slice.analysis.ms.restclients.CpsRestClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; /** diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/ConfigFetchFromCbs.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/ConfigFetchFromCbs.java index ea148f25..01fa91d0 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/ConfigFetchFromCbs.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/ConfigFetchFromCbs.java @@ -124,4 +124,4 @@ public class ConfigFetchFromCbs implements Runnable { } } -}
\ No newline at end of file +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/HealthCheck.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/HealthCheck.java index 854bdf4f..a1f1fed8 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/HealthCheck.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/HealthCheck.java @@ -37,4 +37,4 @@ public class HealthCheck { public ResponseEntity<HttpStatus> healthCheck() { return new ResponseEntity<>(HttpStatus.OK); } -}
\ No newline at end of file +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationCallback.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationCallback.java index ce1ebd6f..8841236c 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationCallback.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationCallback.java @@ -21,6 +21,10 @@ package org.onap.slice.analysis.ms.dmaap; +/** + * Interface for NotificationCallback + * + */ public interface NotificationCallback { public abstract void activateCallBack(String msg); diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationProducer.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationProducer.java index 03e1c238..ce362019 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationProducer.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationProducer.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,6 @@ public class NotificationProducer { private CambriaBatchingPublisher cambriaBatchingPublisher; - /** * Parameterized constructor. */ @@ -45,9 +44,7 @@ public class NotificationProducer { * sends notification to dmaap. */ public int sendNotification(String msg) throws IOException { - return cambriaBatchingPublisher.send("", msg); - } } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/PmNotificationCallback.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/PmNotificationCallback.java index 963165d2..c8deccd1 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/PmNotificationCallback.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/PmNotificationCallback.java @@ -34,6 +34,9 @@ public class PmNotificationCallback implements NotificationCallback { private static Logger log = LoggerFactory.getLogger(PmNotificationCallback.class); + /** + * Triggers on handleNofitication method + */ @Override public void activateCallBack(String msg) { handleNotification(msg); diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CUModel.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CUModel.java index 6473ab23..91201f05 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CUModel.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CUModel.java @@ -61,6 +61,9 @@ public class CUModel { return "CUModel [gNBCUName=" + gNBCUName + ", nearRTRICId=" + nearRTRICId + ", cellCUList=" + cellCUList + "]"; } + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -71,6 +74,9 @@ public class CUModel { return result; } + /** + * Checks whether the object matches with the CUModel + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CellCUList.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CellCUList.java index cd566778..5225fd36 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CellCUList.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CellCUList.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,9 @@ public class CellCUList { private Integer cellLocalId; private ConfigData configData; + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -38,6 +41,9 @@ public class CellCUList { return result; } + /** + * Checks whether the object matches with the CellCUList + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigData.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigData.java index f8711154..ea811824 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigData.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigData.java @@ -54,6 +54,9 @@ public class ConfigData { this.lastUpdatedTS = lastUpdatedTS; } + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -64,6 +67,9 @@ public class ConfigData { return result; } + /** + * Checks whether the object matches with ConfigData + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigPolicy.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigPolicy.java index 6f2b4ec6..e18c8c0f 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigPolicy.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigPolicy.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,6 @@ import java.util.Map; * Model class for configuration policy * */ - public class ConfigPolicy { private static ConfigPolicy instance = null; @@ -69,4 +68,5 @@ public class ConfigPolicy { public String toString() { return "ConfigPolicy [config=" + config + "]"; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MLOutputModel.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MLOutputModel.java index 7533d215..aee819be 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MLOutputModel.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MLOutputModel.java @@ -47,6 +47,9 @@ public class MLOutputModel { return "MLOutputModel [snssai=" + snssai + ", data=" + data + "]"; } + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -56,6 +59,9 @@ public class MLOutputModel { return result; } + /** + * Checks whether the object matches with the MLOutputModel + */ @Override public boolean equals(Object obj) { if (this == obj) @@ -78,5 +84,4 @@ public class MLOutputModel { return true; } - } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java index b94d75da..cbe97a9b 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,9 @@ public class MeasurementObject { private String measurementObjectId; private Map<String, Integer> pmData; + /** + * Returns the index of the MeasurementObject + */ public static int findIndex(String measurementObjectId, List<MeasurementObject> list) { int index = -1; int len = list.size(); @@ -74,6 +77,9 @@ public class MeasurementObject { } + /** + * Returns a hachcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -83,6 +89,9 @@ public class MeasurementObject { return result; } + /** + * Checks whether the object matches with the MeasurementObject + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/SubCounter.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/SubCounter.java index 2990d365..cd540194 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/SubCounter.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/SubCounter.java @@ -43,6 +43,9 @@ public final class SubCounter { return measuredObject; } + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -52,6 +55,9 @@ public final class SubCounter { return result; } + /** + * Checks whether the object matches with the SubCounter + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/CellsModel.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/CellsModel.java index e024bf7c..5c8f2dc9 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/CellsModel.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/CellsModel.java @@ -26,13 +26,11 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * Model class for the CellsModel Object */ - @JsonIgnoreProperties(ignoreUnknown = true) public class CellsModel { private String cellLocalId; - public String getCellLocalId() { return cellLocalId; } @@ -46,6 +44,4 @@ public class CellsModel { return "CellsModel [cellLocalId=" + cellLocalId + "]"; } - - } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/NetworkFunctionModel.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/NetworkFunctionModel.java index 46291d51..6821871f 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/NetworkFunctionModel.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/NetworkFunctionModel.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ *******************************************************************************/ package org.onap.slice.analysis.ms.models.configdb; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** @@ -31,7 +30,6 @@ public class NetworkFunctionModel { private String gNBDUId; - public String getgNBDUId() { return gNBDUId; } @@ -45,8 +43,4 @@ public class NetworkFunctionModel { return "NetworkFunctionModel [gNBDUId=" + gNBDUId + "]"; } - - - - } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/Event.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/Event.java index 4e41e261..4b0fcaa7 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/Event.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/Event.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,4 +44,5 @@ public class Event { public void setPerf3gppFields(Perf3gppFields perf3gppFields) { this.perf3gppFields = perf3gppFields; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/MeasValuesList.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/MeasValuesList.java index 38b7c23c..36e7b103 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/MeasValuesList.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/MeasValuesList.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,4 +55,5 @@ public class MeasValuesList { public void setMeasResults(List<MeasResult> measResults) { this.measResults = measResults; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/AdditionalProperties.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/AdditionalProperties.java index 0d4e4bd8..24c1dd2f 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/AdditionalProperties.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/AdditionalProperties.java @@ -71,5 +71,4 @@ public class AdditionalProperties<T> { this.scriptName = scriptName; } - } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/Payload.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/Payload.java index 57aab994..d96850cb 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/Payload.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/Payload.java @@ -32,62 +32,50 @@ public class Payload { private String networkType; private AdditionalProperties<?> additionalProperties; - public String getName() { return name; } - public void setName(String name) { this.name = name; } - public String getServiceInstanceID() { return serviceInstanceID; } - public void setServiceInstanceID(String serviceInstanceId) { this.serviceInstanceID = serviceInstanceId; } - public String getGlobalSubscriberId() { return globalSubscriberId; } - public void setGlobalSubscriberId(String globalSubscriberId) { this.globalSubscriberId = globalSubscriberId; } - public String getSubscriptionServiceType() { return subscriptionServiceType; } - public void setSubscriptionServiceType(String subscriptionServiceType) { this.subscriptionServiceType = subscriptionServiceType; } - public String getNetworkType() { return networkType; } - public void setNetworkType(String networkType) { this.networkType = networkType; } - public AdditionalProperties<?> getAdditionalProperties() { return additionalProperties; } - public void setAdditionalProperties(AdditionalProperties<?> additionalProperties) { this.additionalProperties = additionalProperties; } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/AaiRestClient.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/AaiRestClient.java index 62e39ad5..1f7d084f 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/AaiRestClient.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/AaiRestClient.java @@ -39,6 +39,9 @@ public class AaiRestClient extends RestClient { super(); } + /** + * Sends post request to Aai + */ public <T> ResponseEntity<T> sendPostRequest(String requestUrl, String requestBody, ParameterizedTypeReference<T> responseType) { HttpHeaders headers = new HttpHeaders(); @@ -47,6 +50,9 @@ public class AaiRestClient extends RestClient { return super.sendPostRequest(headers, requestUrl, requestBody, responseType); } + /** + * Sends get request to Aai + */ public <T> ResponseEntity<T> sendGetRequest(String requestUrl, ParameterizedTypeReference<T> responseType) { HttpHeaders headers = new HttpHeaders(); headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); @@ -55,5 +61,6 @@ public class AaiRestClient extends RestClient { headers.set("X-TransactionId", "get_aai_subscr"); return super.sendGetRequest(headers, requestUrl, responseType); } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/ConfigDbRestClient.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/ConfigDbRestClient.java index dbc42912..ebc211c2 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/ConfigDbRestClient.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/ConfigDbRestClient.java @@ -61,4 +61,5 @@ public class ConfigDbRestClient extends RestClient { headers.setContentType(MediaType.APPLICATION_JSON); return super.sendGetRequest(headers, requestUrl, responseType); } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/CpsRestClient.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/CpsRestClient.java index 1d6e2388..0d8e72a8 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/CpsRestClient.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/CpsRestClient.java @@ -61,5 +61,5 @@ public class CpsRestClient extends RestClient { headers.setContentType(MediaType.APPLICATION_JSON); return super.sendGetRequest(headers, requestUrl, responseType); } -} +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/RestClient.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/RestClient.java index 3be3fc65..239cedf4 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/RestClient.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/RestClient.java @@ -68,7 +68,6 @@ public class RestClient { /** * Post Request Template. */ - public <T> ResponseEntity<T> sendPostRequest(HttpHeaders headers, String requestUrl, String requestBody, ParameterizedTypeReference<T> responseType) { HttpEntity<Object> requestEntity = new HttpEntity<>(requestBody, headers); @@ -83,7 +82,6 @@ public class RestClient { /** * Get Request Template. */ - public <T> ResponseEntity<T> sendGetRequest(HttpHeaders headers, String requestUrl, ParameterizedTypeReference<T> responseType) { HttpEntity<Void> requestEntity = new HttpEntity<>(headers); diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java index 52670d53..74c48d97 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,6 @@ public class AverageCalculator { log.debug("find average for samples {}", samples); int numOfSamples = samples.size(); List<MeasurementObject> result = new ArrayList<>(); - if(!samples.isEmpty()) { for(List<MeasurementObject> sample : samples) { for(MeasurementObject cellMeasObj : sample) { int index = MeasurementObject.findIndex(cellMeasObj.getMeasurementObjectId(), result); @@ -65,7 +64,6 @@ public class AverageCalculator { } } } - } return findAvg(result, numOfSamples); } @@ -95,5 +93,5 @@ public class AverageCalculator { } return result; } -} +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/ConsumerThread.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/ConsumerThread.java index b676273f..e8028200 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/ConsumerThread.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/ConsumerThread.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,9 +91,9 @@ public class ConsumerThread extends Thread { } } - /** - * Checks whether enough samples are available for the network functions - */ + /** + * Checks whether enough samples are available for the network functions + */ public boolean checkForEnoughSamples(List<String> nfs, String snssai) { for(String nf : nfs) { if(! pmDataQueue.checkSamplesInQueue(new SubCounter(nf, snssai), samples)) { diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/MLMessageProcessor.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/MLMessageProcessor.java index b67d3507..8bc7b0d5 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/MLMessageProcessor.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/MLMessageProcessor.java @@ -90,5 +90,5 @@ public class MLMessageProcessor { } policyService.sendOnsetMessageToPolicy(snssai, addProps, serviceDetails); } -} +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmDataQueue.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmDataQueue.java index 868b94c7..612be46d 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmDataQueue.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmDataQueue.java @@ -116,4 +116,5 @@ public class PmDataQueue { } return snssai; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmEventProcessor.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmEventProcessor.java index 51a04660..81a49f9d 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmEventProcessor.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmEventProcessor.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -103,4 +103,5 @@ public class PmEventProcessor implements IPmEventProcessor{ result.put("snssai", pmNameArr[2]); return result; } -}
\ No newline at end of file + +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmThread.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmThread.java index e2903ae1..2a24a49c 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmThread.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmThread.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,4 +89,5 @@ public class PmThread extends Thread { } } } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PolicyService.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PolicyService.java index ca5bf265..2d3a2df0 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PolicyService.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PolicyService.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,6 +48,9 @@ public class PolicyService { private static Logger log = LoggerFactory.getLogger(PolicyService.class); private ObjectMapper objectMapper = new ObjectMapper(); + /** + * Initialization + */ @PostConstruct public void init() { Configuration configuration = Configuration.getInstance(); diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/SnssaiSamplesProcessor.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/SnssaiSamplesProcessor.java index 0c5c0eb8..ccb34edb 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/SnssaiSamplesProcessor.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/SnssaiSamplesProcessor.java @@ -224,4 +224,5 @@ public class SnssaiSamplesProcessor { } log.info("Throughput computed for RIC {}", ricToThroughputMapping); } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/AppConfig.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/AppConfig.java index 29d7d105..45ef1c38 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/AppConfig.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/AppConfig.java @@ -37,8 +37,6 @@ import org.springframework.web.client.RestTemplate; @Configuration public class AppConfig { - - /** * Rest Template bean. */ @@ -65,4 +63,5 @@ public class AppConfig { byteArrayHttpMessageConverter.setSupportedMediaTypes(supportedApplicationTypes); return byteArrayHttpMessageConverter; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/BeanUtil.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/BeanUtil.java index 5f4006c9..3257ac05 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/BeanUtil.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/BeanUtil.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,4 +49,5 @@ public class BeanUtil implements ApplicationContextAware { public static <T> T getBean(Class<T> beanClass) { return context.getBean(beanClass); } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/DmaapUtils.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/DmaapUtils.java index 7457533b..6e1cf912 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/DmaapUtils.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/DmaapUtils.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/components/slice-analysis-ms/version.properties b/components/slice-analysis-ms/version.properties index a2c346b8..2a687c49 100644 --- a/components/slice-analysis-ms/version.properties +++ b/components/slice-analysis-ms/version.properties @@ -20,7 +20,7 @@ ############################################################################### major=1 minor=0 -patch=5 +patch=6 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT |