From 0688c66229fe1bfb1d7d8920705b019d5cfeb17f Mon Sep 17 00:00:00 2001 From: Kai Date: Fri, 10 Jul 2020 18:05:46 +0800 Subject: TCAGen2 java upgrade Issue-ID: DCAEGEN2-2285 Signed-off-by: Kai Lu Change-Id: I1a7b3db68141ed8648fe47865f39dea22f0d999c --- dcae-analytics/dcae-analytics-model/pom.xml | 10 +- .../ConfigBindingServiceConstants.java | 4 +- dcae-analytics/dcae-analytics-tca-core/pom.xml | 2 +- dcae-analytics/dcae-analytics-tca-model/pom.xml | 2 +- dcae-analytics/dcae-analytics-tca-web/Dockerfile | 4 +- dcae-analytics/dcae-analytics-tca-web/pom.xml | 7 +- .../dcae/analytics/tca/web/TcaAppProperties.java | 14 +- dcae-analytics/dcae-analytics-test/pom.xml | 37 +++-- .../dcae/analytics/test/BaseAnalyticsTest.java | 2 +- dcae-analytics/dcae-analytics-web/pom.xml | 3 +- ...nfigBindingServiceEnvironmentPostProcessor.java | 11 +- dcae-analytics/pom.xml | 163 ++++++++++++--------- dcae-analytics/version.properties | 2 +- eelf-logger/eelf-logger-api/pom.xml | 2 +- .../utils/eelf/logger/api/info/AppLogInfo.java | 2 +- .../utils/eelf/logger/api/info/ErrorLogInfo.java | 53 +++---- .../eelf/logger/api/info/NagiosAlertLevel.java | 35 ++++- .../eelf/logger/api/info/ResponseLogInfo.java | 61 ++++---- .../dcae/utils/eelf/logger/api/log/AuditLog.java | 4 + .../dcae/utils/eelf/logger/api/log/ErrorLog.java | 2 + .../dcae/utils/eelf/logger/api/log/MetricLog.java | 4 + eelf-logger/eelf-logger-logback-impl/pom.xml | 2 +- eelf-logger/eelf-logger-model/pom.xml | 2 +- eelf-logger/pom.xml | 58 ++------ eelf-logger/version.properties | 2 +- pom.xml | 2 +- version.properties | 2 +- 27 files changed, 257 insertions(+), 235 deletions(-) diff --git a/dcae-analytics/dcae-analytics-model/pom.xml b/dcae-analytics/dcae-analytics-model/pom.xml index 67a35a4..d7d2133 100644 --- a/dcae-analytics/dcae-analytics-model/pom.xml +++ b/dcae-analytics/dcae-analytics-model/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 dcae-analytics - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT dcae-analytics-model @@ -57,6 +57,14 @@ com.fasterxml.jackson.core jackson-databind + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-smile + diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/configbindingservice/ConfigBindingServiceConstants.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/configbindingservice/ConfigBindingServiceConstants.java index 2693a68..c859932 100644 --- a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/configbindingservice/ConfigBindingServiceConstants.java +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/configbindingservice/ConfigBindingServiceConstants.java @@ -46,10 +46,12 @@ public abstract class ConfigBindingServiceConstants { public static final String CONFIG = "config"; public static final String TCAPOLICY = "tca.policy"; public static final String ITEMS = "items"; + public static final String POLICIES = "policies"; public static final int CONFIG_SERVICE_REFRESHPERIOD = 1; + public static final String CONFIG_POLICIES = "config-binding-service.config.policies.items[0].config.tca.policy"; public static final String POLICY = "config-binding-service.config.tca.policy"; - public static final String POLICIES = "config-binding-service.policies"; + public static final String WITHPOLICIES = "config-binding-service.policies.items[0].tca.policy"; public static final String PROCESSINGBATCHSIZE = "config-binding-service.config.tca.processing_batch_size"; public static final String ENABLEABATEMENT = "config-binding-service.config.tca.enable_abatement"; public static final String ENABLEECOMPLOGGING = "config-binding-service.config.tca.enable_ecomp_logging"; diff --git a/dcae-analytics/dcae-analytics-tca-core/pom.xml b/dcae-analytics/dcae-analytics-tca-core/pom.xml index 2a2ba83..f56842d 100644 --- a/dcae-analytics/dcae-analytics-tca-core/pom.xml +++ b/dcae-analytics/dcae-analytics-tca-core/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 dcae-analytics - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT dcae-analytics-tca-core diff --git a/dcae-analytics/dcae-analytics-tca-model/pom.xml b/dcae-analytics/dcae-analytics-tca-model/pom.xml index f400d58..ec3f1f9 100644 --- a/dcae-analytics/dcae-analytics-tca-model/pom.xml +++ b/dcae-analytics/dcae-analytics-tca-model/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 dcae-analytics - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT dcae-analytics-tca-model diff --git a/dcae-analytics/dcae-analytics-tca-web/Dockerfile b/dcae-analytics/dcae-analytics-tca-web/Dockerfile index b6e4778..411b6b1 100644 --- a/dcae-analytics/dcae-analytics-tca-web/Dockerfile +++ b/dcae-analytics/dcae-analytics-tca-web/Dockerfile @@ -3,7 +3,7 @@ # Only changes made in docker/Dockerfile template file will be persistent # ========================================================================== -FROM openjdk:8-jre-alpine +FROM openjdk:11-jre-slim MAINTAINER Rajiv Singla @@ -14,7 +14,7 @@ ARG DOCKER_ARTIFACT_DIR RUN mkdir -p /var/log/ONAP/dcaegen2/analytics/tca-gen2 #Add a new user and group to allow container to be run as non-root -RUN addgroup -S tca-gen2 && adduser -S -G tca-gen2 tca-gen2; \ +RUN groupadd tca-gen2 && useradd -g tca-gen2 tca-gen2; \ chmod a+rwx /opt; \ chmod a+rwx /var/log/ONAP/dcaegen2/analytics/tca-gen2; \ chown -R tca-gen2:tca-gen2 /opt; \ diff --git a/dcae-analytics/dcae-analytics-tca-web/pom.xml b/dcae-analytics/dcae-analytics-tca-web/pom.xml index 1275c71..57f9bdf 100644 --- a/dcae-analytics/dcae-analytics-tca-web/pom.xml +++ b/dcae-analytics/dcae-analytics-tca-web/pom.xml @@ -29,7 +29,7 @@ org.onap.dcaegen2.analytics.tca-gen2 dcae-analytics - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT dcae-analytics-tca-web @@ -119,7 +119,6 @@ io.undertow undertow-core - 2.0.17.Final @@ -129,7 +128,7 @@ org.springframework spring-core - 5.0.11.RELEASE + 5.1.12.RELEASE @@ -157,7 +156,7 @@ com.spotify dockerfile-maven-plugin - 1.4.3 + 1.4.10 ${project.basedir} ${docker.repository}/${docker.image.name} diff --git a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java index 0214a3d..d70922b 100644 --- a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java +++ b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java @@ -30,11 +30,6 @@ import org.onap.dcae.analytics.model.configbindingservice.BaseConfigBindingServi import org.onap.dcae.analytics.model.configbindingservice.ConfigBindingServiceConstants; import org.springframework.core.env.Environment; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; - import lombok.Data; import lombok.ToString; @@ -106,17 +101,12 @@ public class TcaAppProperties extends BaseConfigBindingServiceProperties { */ private String getPolicy() { - String policies = environment.getProperty(ConfigBindingServiceConstants.POLICIES); + String policies = environment.getProperty(ConfigBindingServiceConstants.WITHPOLICIES); if (policies == null) { return environment.getProperty(ConfigBindingServiceConstants.POLICY); } - JsonObject policiesObject = new JsonParser().parse(policies).getAsJsonObject(); - JsonArray items = policiesObject.get(ConfigBindingServiceConstants.ITEMS).getAsJsonArray(); - JsonElement policy = items.get(0) - .getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG) - .getAsJsonObject().get(ConfigBindingServiceConstants.TCAPOLICY); - return policy.toString(); + return policies; } diff --git a/dcae-analytics/dcae-analytics-test/pom.xml b/dcae-analytics/dcae-analytics-test/pom.xml index 43afaed..e6ff020 100644 --- a/dcae-analytics/dcae-analytics-test/pom.xml +++ b/dcae-analytics/dcae-analytics-test/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 dcae-analytics - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT dcae-analytics-test @@ -54,14 +54,21 @@ org.springframework.boot spring-boot-starter-test - ${spring.boot.version} compile junit junit - + + org.junit.vintage + junit-vintage-engine + + + org.mockito + mockito-core + + @@ -70,6 +77,16 @@ jackson-databind compile + + com.fasterxml.jackson.core + jackson-core + compile + + + com.fasterxml.jackson.dataformat + jackson-dataformat-smile + compile + @@ -102,6 +119,12 @@ apiguardian-api compile + + + org.mockito + mockito-core + compile + @@ -114,14 +137,6 @@ jsonassert compile - - - - org.mockito - mockito-core - compile - - diff --git a/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsTest.java b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsTest.java index 419fe2f..8c7f025 100644 --- a/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsTest.java +++ b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsTest.java @@ -271,7 +271,7 @@ abstract class BaseAnalyticsTest { */ public static T deserializeJsonFileToModel(final String jsonFileLocation, final Class modelClass, final ObjectMapper objectMapper) { - try (final InputStream jsonFileInputStream = + try (InputStream jsonFileInputStream = BaseAnalyticsTest.class.getClassLoader().getResourceAsStream(jsonFileLocation)) { assertThat(jsonFileInputStream).as("Input JSON File location must be valid").isNotNull(); return objectMapper.readValue(jsonFileInputStream, modelClass); diff --git a/dcae-analytics/dcae-analytics-web/pom.xml b/dcae-analytics/dcae-analytics-web/pom.xml index 9d87508..2f2ef9f 100644 --- a/dcae-analytics/dcae-analytics-web/pom.xml +++ b/dcae-analytics/dcae-analytics-web/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 dcae-analytics - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT dcae-analytics-web @@ -143,7 +143,6 @@ io.undertow undertow-core - 2.0.17.Final diff --git a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java index d286d10..8798b4e 100644 --- a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java +++ b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java @@ -229,8 +229,13 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment Optional configServiceJsonOptional; JsonElement jsonConfig = jsonObject.get(ConfigBindingServiceConstants.CONFIG); + String policies = null; if (jsonConfig.getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG) != null) { configServiceJsonOptional = Optional.of(jsonConfig.toString()); + policies = jsonConfig.getAsJsonObject().get(ConfigBindingServiceConstants.POLICIES) + .getAsJsonObject().getAsJsonArray(ConfigBindingServiceConstants.ITEMS).get(0) + .getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG) + .getAsJsonObject().get(ConfigBindingServiceConstants.TCAPOLICY).toString(); } else { configServiceJsonOptional = Optional.of(jsonObject.toString()); } @@ -239,7 +244,9 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment // values Map configPropertiesMap = configServiceJsonOptional .map(new JsonStringToMapFunction(configServicePropertiesKey)).orElse(Collections.emptyMap()); - + if (policies != null) { + configPropertiesMap.put(ConfigBindingServiceConstants.CONFIG_POLICIES, policies); + } if (configPropertiesMap.isEmpty()) { logger.warn("No properties found in config binding service"); @@ -264,7 +271,7 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment .info("Adding property from config service in spring context: {} -> {}", key, value)); MutablePropertySources sources = env.getPropertySources(); addJsonPropertySource(sources, new MapPropertySource(configServicePropertiesKey, filterKeyMap)); - + } return configServiceJsonOptional.get(); } diff --git a/dcae-analytics/pom.xml b/dcae-analytics/pom.xml index 22fdccc..c419983 100644 --- a/dcae-analytics/pom.xml +++ b/dcae-analytics/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 tca-gen2-parent - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT dcae-analytics @@ -55,7 +55,7 @@ 1.0.1-SNAPSHOT - 2.0.5.RELEASE + 2.0.9.RELEASE Finchley.RC2 5.0.11.RELEASE 1.4 @@ -64,36 +64,34 @@ 3.0.1 - 5.0.2 - 1.0.2 + 5.6.2 + 1.6.2 1.0.0 true - 3.7.0 + 3.8.0 3.0.2 3.1.0 - 3.0.0-M1 - 2.19 - 2.19.1 + 3.0.0 + 2.22.2 + 2.22.2 3.0.1 2.8.2 0.8.1 ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml - 3.0.5 - 3.8 + 3.11.0 2.17 - 1.16.18.1 + 1.18.0.0 2.2.3 3.0.0 - - 1.0.0 + 1.0.0 - 1.8 - 1.8 + 11 + 11 **/*Test.java false **/*IT.java @@ -110,7 +108,10 @@ content/repositories/snapshots/ content/repositories/releases/ nexus3.onap.org:10003 - + 2.11.0 + 2.0.27 + 5.2.7.RELEASE + 2.10.5 org.onap.dcaegen2.analytics.tca-gen2 @@ -188,7 +188,7 @@ io.springfox springfox-swagger-ui - ${springfox-swagger2.version} + ${spring-swagger-ui.version} @@ -224,16 +224,28 @@ ${junit-jupiter.version} test + + junit + junit + 4.13 + test + + + org.junit.vintage + junit-vintage-engine + 5.6.2 + test + org.junit.platform junit-platform-engine - ${junit-platform.version} + 1.6.2 test org.junit.platform junit-platform-launcher - ${junit-platform.version} + 1.6.2 test @@ -253,6 +265,34 @@ org.springframework spring-web + + org.springframework.boot + spring-boot-starter-test + + + org.mockito + mockito-core + + + io.undertow + undertow-core + + + org.springframework + spring-webflux + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-smile + pom import @@ -265,11 +305,47 @@ pom import + + org.springframework + spring-webflux + ${spring-webflux.version} + org.springframework spring-web ${spring.version} + + org.springframework.boot + spring-boot-starter-test + 2.2.0.RELEASE + + + org.mockito + mockito-core + 2.23.4 + + + io.undertow + undertow-core + 2.0.27.Final + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-smile + ${jackson.version} + + @@ -383,13 +459,6 @@ ${integration.test.pattern} - - - org.junit.platform - junit-platform-surefire-provider - ${junit-platform.version} - - @@ -397,13 +466,6 @@ org.apache.maven.plugins maven-failsafe-plugin ${maven-failsafe-plugin.version} - - - org.junit.platform - junit-platform-surefire-provider - ${junit-platform.version} - - integration-tests @@ -430,34 +492,6 @@ - - - - org.codehaus.mojo - findbugs-maven-plugin - ${findbugs.plugin.version} - - Max - Low - true - - ${findbugs.failOnError} - ${main.basedir}/findbugs-exclude.xml - ${project.reporting.outputDirectory}/findbugs - ${project.reporting.outputDirectory}/findbugs - - - - - analyze-compile - compile - - check - - - - - org.apache.maven.plugins @@ -702,11 +736,6 @@ maven-pmd-plugin - - org.codehaus.mojo - findbugs-maven-plugin - - org.apache.maven.plugins maven-checkstyle-plugin diff --git a/dcae-analytics/version.properties b/dcae-analytics/version.properties index aeffff6..99c1da7 100644 --- a/dcae-analytics/version.properties +++ b/dcae-analytics/version.properties @@ -17,7 +17,7 @@ # # major=1 -minor=1 +minor=2 patch=0 base_version=${major}.${minor}.${patch} release_version=${base_version} diff --git a/eelf-logger/eelf-logger-api/pom.xml b/eelf-logger/eelf-logger-api/pom.xml index 2817cf1..5157e81 100644 --- a/eelf-logger/eelf-logger-api/pom.xml +++ b/eelf-logger/eelf-logger-api/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 eelf-logger - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT eelf-logger-api diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java index bdce8d1..1acf7a7 100644 --- a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java +++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/AppLogInfo.java @@ -29,7 +29,7 @@ public interface AppLogInfo extends LogInfo { /** * Required field contains UUID which identifies this service instance inside an inventory management system - * (e.g. A&AI) to reference/manage this service as a unit + * to reference/manage this service as a unit * * @return remote VM Name or service the request is acting upon. */ diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ErrorLogInfo.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ErrorLogInfo.java index 876037c..af70c89 100644 --- a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ErrorLogInfo.java +++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ErrorLogInfo.java @@ -30,36 +30,29 @@ public interface ErrorLogInfo extends LogInfo { /** * Required field contains an error code representing the error condition. The codes can be chose by * the logging application but they should adhere to the guidelines embodied in the table below: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Error typeNotes
100Permission errors
200Availability errors/Timeouts
300Data errors
400Schema errors
500Business process errors
900Unknown Errors
+ * + *
+ *
+ *

Error Type

+ *

100

+ *

200

+ *

300

+ *

400

+ *

500

+ *

+ * 900

+ *
+ *
+ *

Notes

+ *

Permission errors

+ *

Availability errors/Timeouts

+ *

Data errors

+ *

Schema errors

+ *

Business process errors

+ *

+ * Unknown Errors

+ *
+ *
* * @return error Code */ diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/NagiosAlertLevel.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/NagiosAlertLevel.java index 3da5fc3..81e0369 100644 --- a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/NagiosAlertLevel.java +++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/NagiosAlertLevel.java @@ -21,14 +21,33 @@ package org.onap.dcae.utils.eelf.logger.api.info; /** * Enum for Nagios monitoring/alerting codes as per table below. - *

- * - * - * - * - * - * - *
Return CodeService StateHost State
0OKUP
1WARNINGUP or DOWN/UNREACHABLE*
2CRITICALDOWN/UNREACHABLE
3UNKNOWNDOWN/UNREACHABLE
+ * + * + *

+ *
+ *

Return Code

+ *

0

+ *

1

+ *

2

+ *

3

+ *
+ *
+ *

Service State

+ *

OK

+ *

WARNING

+ *

CRITICAL

+ *

+ * UNKNOWN

+ *
+ *
+ *

Host State

+ *

UP

+ *

UP or DOWN/UNREACHABLE*

+ *

DOWN/UNREACHABLE

+ *

+ * DOWN/UNREACHABLE

+ *
+ *
* * @author Rajiv Singla */ diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ResponseLogInfo.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ResponseLogInfo.java index 1929e7f..ad09f3d 100644 --- a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ResponseLogInfo.java +++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/info/ResponseLogInfo.java @@ -30,43 +30,32 @@ public interface ResponseLogInfo extends LogInfo { * Required field contains application-specific response codes. While error codes are * application-specific, they * should conform categories mentioned in table below in order to provide consistency - *

- * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Error typeNotes
0Success
100Permission errors
200Availability errors/Timeouts
300Data errors
400Schema errors
500Business process errors
900Unknown Errors
+ *

+ *
+ *

Error Type

+ *

0

+ *

100

+ *

200

+ *

300

+ *

400

+ *

500

+ *

+ * 900

+ *
+ *
+ *

Notes

+ *

Success

+ *

Permission errors

+ *

Availability errors/Timeouts

+ *

Data errors

+ *

Schema errors

+ *

Business process errors

+ *

+ * Unknown Errors

+ *
+ *
* - * @return application-specific error code + * @return error Code */ Integer getResponseCode(); diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/AuditLog.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/AuditLog.java index 952176e..df33941 100644 --- a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/AuditLog.java +++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/AuditLog.java @@ -59,6 +59,7 @@ public interface AuditLog { * * @param message log message * @param auditLogSpec audit log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void info(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args); @@ -78,6 +79,7 @@ public interface AuditLog { * * @param message log message * @param auditLogSpec audit log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void warn(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args); @@ -96,6 +98,7 @@ public interface AuditLog { * * @param message log message * @param auditLogSpec audit log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void error(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args); @@ -114,6 +117,7 @@ public interface AuditLog { * * @param message log message * @param auditLogSpec audit log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void fatal(String message, AuditLogSpec auditLogSpec, OptionalLogSpec optionalLogSpec, String... args); diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/ErrorLog.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/ErrorLog.java index 6b27755..900eebf 100644 --- a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/ErrorLog.java +++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/ErrorLog.java @@ -57,6 +57,7 @@ public interface ErrorLog { * * @param message log message * @param errorLogSpec error log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void error(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args); @@ -76,6 +77,7 @@ public interface ErrorLog { * * @param message log message * @param errorLogSpec error log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void warn(String message, ErrorLogSpec errorLogSpec, OptionalLogSpec optionalLogSpec, String... args); diff --git a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/MetricLog.java b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/MetricLog.java index ebc33ca..508f791 100644 --- a/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/MetricLog.java +++ b/eelf-logger/eelf-logger-api/src/main/java/org/onap/dcae/utils/eelf/logger/api/log/MetricLog.java @@ -59,6 +59,7 @@ public interface MetricLog { * * @param message log message * @param metricLogSpec metric log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void info(String message, MetricLogSpec metricLogSpec, OptionalLogSpec optionalLogSpec, String... args); @@ -78,6 +79,7 @@ public interface MetricLog { * * @param message log message * @param metricLogSpec metric log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void warn(String message, MetricLogSpec metricLogSpec, OptionalLogSpec optionalLogSpec, String... args); @@ -96,6 +98,7 @@ public interface MetricLog { * * @param message log message * @param metricLogSpec metric log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void error(String message, MetricLogSpec metricLogSpec, OptionalLogSpec optionalLogSpec, String... args); @@ -114,6 +117,7 @@ public interface MetricLog { * * @param message log message * @param metricLogSpec metric log spec + * @param optionalLogSpec optional log spec * @param args argument values for log message interpolation */ void fatal(String message, MetricLogSpec metricLogSpec, OptionalLogSpec optionalLogSpec, String... args); diff --git a/eelf-logger/eelf-logger-logback-impl/pom.xml b/eelf-logger/eelf-logger-logback-impl/pom.xml index b829b51..429457f 100644 --- a/eelf-logger/eelf-logger-logback-impl/pom.xml +++ b/eelf-logger/eelf-logger-logback-impl/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 eelf-logger - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT eelf-logger-logback-impl diff --git a/eelf-logger/eelf-logger-model/pom.xml b/eelf-logger/eelf-logger-model/pom.xml index 50230b0..e3d941b 100644 --- a/eelf-logger/eelf-logger-model/pom.xml +++ b/eelf-logger/eelf-logger-model/pom.xml @@ -27,7 +27,7 @@ org.onap.dcaegen2.analytics.tca-gen2 eelf-logger - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT eelf-logger-model diff --git a/eelf-logger/pom.xml b/eelf-logger/pom.xml index 05eb504..bb762ae 100644 --- a/eelf-logger/pom.xml +++ b/eelf-logger/pom.xml @@ -26,7 +26,7 @@ org.onap.dcaegen2.analytics.tca-gen2 tca-gen2-parent - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT eelf-logger @@ -39,10 +39,7 @@ eelf-logger-logback-impl - - - UTF-8 UTF-8 @@ -54,38 +51,35 @@ 1.7.5 1.2.3 - 1.16.10 - + 1.18.12 4.12 - 2.2.11 + 2.22.0 2.6.0 - 3.3 + 3.8.0 2.19.1 2.19.1 - 3.0.2 - 3.5 - 2.10.4 - 2.4 + 3.11.0 + 3.0.0 + 3.2.1 2.4 2.8 - 1.16.10.0 + 1.18.0.0 3.5.1 - 1.7 - 1.7 + 11 + 11 **/*Test.java false **/*IT.java true true - true ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml @@ -290,34 +284,6 @@
- - - - org.codehaus.mojo - findbugs-maven-plugin - ${findbugs.plugin.version} - - Max - Low - true - - ${findbugs.failOnError} - ${main.basedir}/findbugs-exclude.xml - ${project.reporting.outputDirectory}/findbugs - ${project.reporting.outputDirectory}/findbugs - - - - - analyze-compile - compile - - check - - - - - org.apache.maven.plugins @@ -452,10 +418,6 @@ maven-pmd-plugin - - org.codehaus.mojo - findbugs-maven-plugin - diff --git a/eelf-logger/version.properties b/eelf-logger/version.properties index 2dd836f..bef49d7 100644 --- a/eelf-logger/version.properties +++ b/eelf-logger/version.properties @@ -16,7 +16,7 @@ # major=1 -minor=1 +minor=2 patch=0 base_version=${major}.${minor}.${patch} release_version=${base_version} diff --git a/pom.xml b/pom.xml index eb364e7..088736b 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.onap.dcaegen2.analytics.tca-gen2 tca-gen2-parent - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT dcaegen2-analytics-tca-gen2 pom diff --git a/version.properties b/version.properties index 7b8b963..00ef564 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ major=1 -minor=1 +minor=2 patch=0 base_version=${major}.${minor}.${patch} release_version=${base_version} -- cgit 1.2.3-korg