From 7d04c23c7c51738d68f325e450ac408c1ae9905f Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 29 Jun 2021 17:13:09 +0100 Subject: Update CLAMP: checkstyle 8.43/Spring dependencies Updates are indentation changes on annotations and rationallization of the dependencies for Spring/Springboot Generation of swagger.json, swagger.html and swagger.pdf temporarily disabled due to a missing dependency in the generation toolchain. Issue-ID: POLICY-3209 Change-Id: Iff5881df45ef54b20fa30f63e2393cc1cdbf4bfe Signed-off-by: liamfallon --- .../org/onap/policy/clamp/clds/Application.java | 4 +- .../clamp/loop/template/LoopElementModel.java | 5 +- .../org/onap/policy/clamp/tosca/Dictionary.java | 5 +- .../resources/clds/camel/rest/clds-services.xml | 42 +- .../resources/clds/camel/routes/loop-flows.xml | 506 ++++++++++---------- .../resources/clds/camel/routes/utils-flows.xml | 52 +- runtime/src/main/resources/logback-default.xml | 525 +++++++++------------ runtime/src/main/resources/logback-spring.xml | 36 +- 8 files changed, 545 insertions(+), 630 deletions(-) (limited to 'runtime/src/main') diff --git a/runtime/src/main/java/org/onap/policy/clamp/clds/Application.java b/runtime/src/main/java/org/onap/policy/clamp/clds/Application.java index 07c174293..bdab9c9a2 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/clds/Application.java +++ b/runtime/src/main/java/org/onap/policy/clamp/clds/Application.java @@ -6,6 +6,7 @@ * reserved. * ================================================================================ * Modifications Copyright (c) 2019 Samsung + * Modifications Copyright (C) 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. @@ -20,7 +21,6 @@ * limitations under the License. * ============LICENSE_END============================================ * =================================================================== - * */ package org.onap.policy.clamp.clds; @@ -61,7 +61,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; @ComponentScan(basePackages = {"org.onap.policy.clamp"}) @SpringBootApplication(exclude = {SecurityAutoConfiguration.class, UserDetailsServiceAutoConfiguration.class, - ServletMappingAutoConfiguration.class}) + ServletMappingAutoConfiguration.class}) @EnableJpaRepositories(basePackages = {"org.onap.policy.clamp"}) @EntityScan(basePackages = {"org.onap.policy.clamp"}) @EnableTransactionManagement diff --git a/runtime/src/main/java/org/onap/policy/clamp/loop/template/LoopElementModel.java b/runtime/src/main/java/org/onap/policy/clamp/loop/template/LoopElementModel.java index 6eb3c7195..52f1c5d23 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/loop/template/LoopElementModel.java +++ b/runtime/src/main/java/org/onap/policy/clamp/loop/template/LoopElementModel.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2018 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright (C) 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. @@ -103,8 +104,8 @@ public class LoopElementModel extends AuditEntity implements Serializable { name = "loopelementmodels_to_policymodels", joinColumns = @JoinColumn(name = "loop_element_name", referencedColumnName = "name"), inverseJoinColumns = { - @JoinColumn(name = "policy_model_type", referencedColumnName = "policy_model_type"), - @JoinColumn(name = "policy_model_version", referencedColumnName = "version")}) + @JoinColumn(name = "policy_model_type", referencedColumnName = "policy_model_type"), + @JoinColumn(name = "policy_model_version", referencedColumnName = "version")}) @SortNatural private SortedSet policyModels = new TreeSet<>(); diff --git a/runtime/src/main/java/org/onap/policy/clamp/tosca/Dictionary.java b/runtime/src/main/java/org/onap/policy/clamp/tosca/Dictionary.java index 4f748d5dd..40ea25ff8 100644 --- a/runtime/src/main/java/org/onap/policy/clamp/tosca/Dictionary.java +++ b/runtime/src/main/java/org/onap/policy/clamp/tosca/Dictionary.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2020 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright (C) 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. @@ -70,8 +71,8 @@ public class Dictionary extends AuditEntity implements Serializable { name = "dictionary_to_dictionaryelements", joinColumns = @JoinColumn(name = "dictionary_name", referencedColumnName = "name"), inverseJoinColumns = {@JoinColumn( - name = "dictionary_element_short_name", - referencedColumnName = "short_name")}) + name = "dictionary_element_short_name", + referencedColumnName = "short_name")}) private Set dictionaryElements = new HashSet<>(); /** diff --git a/runtime/src/main/resources/clds/camel/rest/clds-services.xml b/runtime/src/main/resources/clds/camel/rest/clds-services.xml index aa4c3cbee..e92b7b272 100644 --- a/runtime/src/main/resources/clds/camel/rest/clds-services.xml +++ b/runtime/src/main/resources/clds/camel/rest/clds-services.xml @@ -1,24 +1,24 @@ - - - - - - - - ${body} == 'NOT-OK' - - 404 - - - - - + + + + + + + + ${body} == 'NOT-OK' + + 404 + + + + + - - - - + + + + diff --git a/runtime/src/main/resources/clds/camel/routes/loop-flows.xml b/runtime/src/main/resources/clds/camel/routes/loop-flows.xml index 4a3cc84b2..85e73ed2e 100644 --- a/runtime/src/main/resources/clds/camel/routes/loop-flows.xml +++ b/runtime/src/main/resources/clds/camel/routes/loop-flows.xml @@ -1,256 +1,256 @@ - - - - ${header.loopName} - - - - + + + + ${header.loopName} + + + + - - ${exchangeProperty[loopObject]} == null - - 404 - - - - - - - - - ${exchangeProperty[loopObject].getComponent('POLICY')} - - - - true - - - true - - - - ${exchangeProperty[loopObject].getMicroServicePolicies()} - - - ${body.getName()} - - - ${body.getPolicyModel().getPolicyModelType()} - - - ${body.getPolicyModel().getVersion()} - - - ${body.getPdpGroup()} - - - 1.0.0 - - - null - - - - - - - ${exchangeProperty[loopObject].getOperationalPolicies()} - - - ${body.getName()} - - - ${body.getPolicyModel().getPolicyModelType()} - - - ${body.getPolicyModel().getVersion()} - - - 1.0.0 - - - ${body.getPdpGroup()} - - - null - - - - - - ${exchangeProperty[policyComponent].getState()} - - - - - - - - - - - ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true - - - ${exchangeProperty[loopObject].getComponent('DCAE')} - - - ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} != null - - - ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} - - - false - - - - ${header.CamelHttpResponseCode} == 200 - - - - - - - - ${exchangeProperty[dcaeComponent].computeState(*)} - - - - - - - ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false - - - ${exchangeProperty[loopObject].getMicroServicePolicies()} - - - ${body} - - - ${exchangeProperty[loopObject].getComponent('DCAE_' + ${exchangeProperty[microServicePolicy].getName()})} - - - ${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} != null - - - ${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} - - - false - - - - ${header.CamelHttpResponseCode} == 200 - - - - - - - - ${exchangeProperty[dcaeComponent].computeState(*)} - - - - - > - - - - - - - - - ${exchangeProperty['dcaeState'].getStateName()} == - 'BLUEPRINT_DEPLOYED' && ${exchangeProperty['policyState'].getStateName()} - == 'NOT_SENT' - - - - - ${exchangeProperty['dcaeState'].getStateName()} == 'IN_ERROR' || - ${exchangeProperty['dcaeState'].getStateName()} == - 'MICROSERVICE_INSTALLATION_FAILED' - - - - - ${exchangeProperty['dcaeState'].getStateName()} == - 'MICROSERVICE_UNINSTALLATION_FAILED' || - ${exchangeProperty['policyState'].getStateName()} == 'IN_ERROR' - - - - - ${exchangeProperty['dcaeState'].getStateName()} == - 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && - ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' - - - - - ${exchangeProperty['dcaeState'].getStateName()} == - 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && - ${exchangeProperty['policyState'].getStateName()} == 'SENT' - - - - - ${exchangeProperty['dcaeState'].getStateName()} == - 'BLUEPRINT_DEPLOYED' || ${exchangeProperty['dcaeState'].getStateName()} == - 'MICROSERVICE_UNINSTALLED_SUCCESSFULLY' && - ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' - - - - - ${exchangeProperty['dcaeState'].getStateName()} == - 'PROCESSING_MICROSERVICE_INSTALLATION' || - ${exchangeProperty['dcaeState'].getStateName()} == - 'PROCESSING_MICROSERVICE_UNINSTALLATION' && - ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' - - - - - ${exchangeProperty['dcaeState'].getStateName()} == - 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && - ${exchangeProperty['policyState'].getStateName()} != 'NOT_SENT' - - - - - - + + ${exchangeProperty[loopObject]} == null + + 404 + + + + + + + + + ${exchangeProperty[loopObject].getComponent('POLICY')} + + + + true + + + true + + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body.getName()} + + + ${body.getPolicyModel().getPolicyModelType()} + + + ${body.getPolicyModel().getVersion()} + + + ${body.getPdpGroup()} + + + 1.0.0 + + + null + + + + + + + ${exchangeProperty[loopObject].getOperationalPolicies()} + + + ${body.getName()} + + + ${body.getPolicyModel().getPolicyModelType()} + + + ${body.getPolicyModel().getVersion()} + + + 1.0.0 + + + ${body.getPdpGroup()} + + + null + + + + + + ${exchangeProperty[policyComponent].getState()} + + + + + + + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true + + + ${exchangeProperty[loopObject].getComponent('DCAE')} + + + ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} != null + + + ${exchangeProperty[loopObject].getDcaeDeploymentStatusUrl()} + + + false + + + + ${header.CamelHttpResponseCode} == 200 + + + + + + + + ${exchangeProperty[dcaeComponent].computeState(*)} + + + + + + + ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false + + + ${exchangeProperty[loopObject].getMicroServicePolicies()} + + + ${body} + + + ${exchangeProperty[loopObject].getComponent('DCAE_' + ${exchangeProperty[microServicePolicy].getName()})} + + + ${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} != null + + + ${exchangeProperty[microServicePolicy].getDcaeDeploymentStatusUrl()} + + + false + + + + ${header.CamelHttpResponseCode} == 200 + + + + + + + + ${exchangeProperty[dcaeComponent].computeState(*)} + + + + + > + + + + + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'BLUEPRINT_DEPLOYED' && ${exchangeProperty['policyState'].getStateName()} + == 'NOT_SENT' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == 'IN_ERROR' || + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLATION_FAILED' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_UNINSTALLATION_FAILED' || + ${exchangeProperty['policyState'].getStateName()} == 'IN_ERROR' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && + ${exchangeProperty['policyState'].getStateName()} == 'SENT' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'BLUEPRINT_DEPLOYED' || ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_UNINSTALLED_SUCCESSFULLY' && + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'PROCESSING_MICROSERVICE_INSTALLATION' || + ${exchangeProperty['dcaeState'].getStateName()} == + 'PROCESSING_MICROSERVICE_UNINSTALLATION' && + ${exchangeProperty['policyState'].getStateName()} == 'SENT_AND_DEPLOYED' + + + + + ${exchangeProperty['dcaeState'].getStateName()} == + 'MICROSERVICE_INSTALLED_SUCCESSFULLY' && + ${exchangeProperty['policyState'].getStateName()} != 'NOT_SENT' + + + + + + - - \ No newline at end of file + + diff --git a/runtime/src/main/resources/clds/camel/routes/utils-flows.xml b/runtime/src/main/resources/clds/camel/routes/utils-flows.xml index 90900f842..da91335c8 100644 --- a/runtime/src/main/resources/clds/camel/routes/utils-flows.xml +++ b/runtime/src/main/resources/clds/camel/routes/utils-flows.xml @@ -1,28 +1,28 @@ - - - - true - - + + + + true + + - - - - - - ${exchangeProperty[logComponent]} == null - - - - - - null - - - - - \ No newline at end of file + + + + + + ${exchangeProperty[logComponent]} == null + + + + + + null + + + + + diff --git a/runtime/src/main/resources/logback-default.xml b/runtime/src/main/resources/logback-default.xml index 5397eab04..1d7b2a14f 100644 --- a/runtime/src/main/resources/logback-default.xml +++ b/runtime/src/main/resources/logback-default.xml @@ -1,110 +1,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - INFO - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + INFO + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + + + ERROR ACCEPT DENY - ${logDirectory}/error.log - true - - ${errorPattern} - - - ${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - - ${logDirectory}/debug.log - true - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n - - - - ${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - - - + ${logDirectory}/error.log + true + + ${errorPattern} + + + ${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + + ${logDirectory}/debug.log + true + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + ${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + + + ENTRY EXIT @@ -112,31 +80,26 @@ DENY ACCEPT - ${logDirectory}/audit.log - true - - ${auditPattern} - - - ${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - 256 - - - - - + ${logDirectory}/audit.log + true + + ${auditPattern} + + + ${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + 256 + + + + + INVOKE INVOKE-RETURN @@ -144,186 +107,136 @@ DENY ACCEPT - ${logDirectory}/metric.log - true - - ${metricPattern} - - - ${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - - 256 - - - - - - ${logDirectory}/security.log - true - - %X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n - - - - ${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - - - 256 - - - - - - - ${logDirectory}/Audits.log - - ${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - "%d [%thread] %-5level %logger{1024} - %msg%n" - - - - - - - ${logDirectory}/Perform.log - - ${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 20 - 1GB - - - "%d [%thread] %-5level %logger{1024} - %msg%n" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ${logDirectory}/metric.log + true + + ${metricPattern} + + + ${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + + 256 + + + + + + ${logDirectory}/security.log + true + + %X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n + + + + ${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + + + 256 + + + + + + + ${logDirectory}/Audits.log + + ${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + + + ${logDirectory}/Perform.log + + ${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip + + 50MB + 20 + 1GB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/runtime/src/main/resources/logback-spring.xml b/runtime/src/main/resources/logback-spring.xml index ffa497f1d..e7b67473c 100644 --- a/runtime/src/main/resources/logback-spring.xml +++ b/runtime/src/main/resources/logback-spring.xml @@ -1,19 +1,19 @@ - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + -- cgit 1.2.3-korg