summaryrefslogtreecommitdiffstats
path: root/common-app-api
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-12-10 18:55:03 +0200
committerTal Gitelman <tg851x@intl.att.com>2017-12-10 19:33:38 +0200
commit51d50f0ef642e0f996a1c8b8d2ef4838bdfec892 (patch)
tree3ac236a864d74d19b0f5c9020891a7a7e5c31b44 /common-app-api
parentb5cc2e0695f195716d6ccdc65e73807a6632ec70 (diff)
Final commit to master merge from
Change-Id: Ib464f9a8828437c86fe6def8af238aaf83473507 Issue-ID: SDC-714 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'common-app-api')
-rw-r--r--common-app-api/.gitignore2
-rw-r--r--common-app-api/pom.xml8
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java157
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/be/monitoring/BeMonitoringService.java9
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java13
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java24
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java2
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java2
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/listener/AppContextListener.java1
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/util/HealthCheckUtil.java42
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/util/PairUtils.java6
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java10
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/exception/ResponseFormat.java2
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java54
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/fe/config/FeEcompErrorManager.java1
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/BeEcompErrorManagerTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/CleanComponentsConfigurationTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/ConfigurationTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorConfigurationTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorInfoTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/Neo4jErrorsConfigurationTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/validation/DeploymentArtifactHeatConfigurationTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java5
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/ResponseInfoTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInfoTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInterfaceTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeysEnumTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/ESTimeBasedEventTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/WrapperTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java1
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/monitoring/MonitoringEventTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestConfigurationInfoTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseAsByteArrayTest.java4
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/test/CommonUtilsTest.java1
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/test/TestExternalConfiguration.java14
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/test/YamlTest.java3
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/test/config/TestConfiguration.java4
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/util/CapabilityTypeNameEnumTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/util/GeneralUtilityTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/util/GsonFactoryTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/util/StreamUtilsTests.java1
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/util/ValidationUtilsTest.java2
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/fe/config/ConfigurationTest.java3
50 files changed, 309 insertions, 112 deletions
diff --git a/common-app-api/.gitignore b/common-app-api/.gitignore
deleted file mode 100644
index 19f2e002ce..0000000000
--- a/common-app-api/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/target
-/target
diff --git a/common-app-api/pom.xml b/common-app-api/pom.xml
index 5e7d0a0b7b..75e7e4535a 100644
--- a/common-app-api/pom.xml
+++ b/common-app-api/pom.xml
@@ -11,8 +11,11 @@
<version>1.2.0-SNAPSHOT</version>
</parent>
- <dependencies>
+ <properties>
+ <sonar.skip>true</sonar.skip>
+ </properties>
+ <dependencies>
<dependency>
<groupId>org.openecomp.sdc</groupId>
<artifactId>security-utils</artifactId>
@@ -181,8 +184,7 @@
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito.version}</version>
+ <artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
index c962500c2b..79d6438df3 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
@@ -20,6 +20,8 @@
package org.openecomp.sdc.be.config;
+import static java.lang.String.format;
+
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
@@ -28,8 +30,6 @@ import java.util.Set;
import org.openecomp.sdc.common.api.BasicConfiguration;
-import static java.lang.String.format;
-
public class Configuration extends BasicConfiguration {
private List<String> identificationHeaderFields;
@@ -117,6 +117,8 @@ public class Configuration extends BasicConfiguration {
private OnboardingConfig onboarding;
+ private DcaeConfig dcae;
+
private CassandrConfig cassandraConfig;
private SwitchoverDetectorConfig switchoverDetector;
@@ -132,6 +134,60 @@ public class Configuration extends BasicConfiguration {
private Map<String, VfModuleProperty> vfModuleProperties;
private Map<String, String> genericAssetNodeTypes;
+
+ private String appVersion;
+ private String artifactGeneratorConfig;
+
+ public String getAutoHealingOwner() {
+ return autoHealingOwner;
+ }
+
+ public void setAutoHealingOwner(String autoHealingOwner) {
+ this.autoHealingOwner = autoHealingOwner;
+ }
+
+ private String autoHealingOwner;
+
+ private Map<String, List<String>> resourcesForUpgrade;
+ private boolean skipUpgradeFailedVfs;
+
+ private boolean skipUpgradeVSPs;
+
+
+
+
+
+ public void setSkipUpgradeVSPs(boolean skipUpgradeVSPs) { this.skipUpgradeVSPs = skipUpgradeVSPs; }
+
+ public boolean getSkipUpgradeVSPsFlag() { return skipUpgradeVSPs; }
+
+ public boolean getSkipUpgradeFailedVfs() {
+ return skipUpgradeFailedVfs;
+ }
+
+ public void setSkipUpgradeFailedVfs(boolean skipUpgradeFailedVfs) {
+ this.skipUpgradeFailedVfs = skipUpgradeFailedVfs;
+ }
+
+ public String getAppVersion() {
+ return appVersion;
+ }
+
+ public void setAppVersion(String appVersion) {
+ this.appVersion = appVersion;
+ }
+
+ public String getArtifactGeneratorConfig() {
+ return artifactGeneratorConfig;
+ }
+
+ public void setArtifactGeneratorConfig(String artifactGeneratorConfig) {
+ this.artifactGeneratorConfig = artifactGeneratorConfig;
+ }
+
+ private String workloadContext;
+
+ private EnvironmentContext environmentContext;
public Map<String, String> getGenericAssetNodeTypes() {
return genericAssetNodeTypes;
@@ -485,6 +541,22 @@ public class Configuration extends BasicConfiguration {
this.uebHealthCheckReadTimeout = uebHealthCheckReadTimeout;
}
+ public String getWorkloadContext() {
+ return workloadContext;
+ }
+
+ public void setWorkloadContext(String workloadContext) {
+ this.workloadContext = workloadContext;
+ }
+
+ public EnvironmentContext getEnvironmentContext() {
+ return environmentContext;
+ }
+
+ public void setEnvironmentContext(EnvironmentContext environmentContext) {
+ this.environmentContext = environmentContext;
+ }
+
public static class ElasticSearchConfig {
List<IndicesTimeFrequencyEntry> indicesTimeFrequency;
@@ -902,6 +974,54 @@ public class Configuration extends BasicConfiguration {
}
+ public DcaeConfig getDcae() {
+ return dcae;
+ }
+
+ public void setDcae(DcaeConfig dcae) {
+ this.dcae = dcae;
+ }
+
+ public static class DcaeConfig {
+
+ String protocol = "http";
+ String host;
+ Integer port;
+ String healthCheckUri;
+
+ public String getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public Integer getPort() {
+ return port;
+ }
+
+ public void setPort(Integer port) {
+ this.port = port;
+ }
+
+ public String getHealthCheckUri() {
+ return healthCheckUri;
+ }
+
+ public void setHealthCheckUri(String healthCheckUri) {
+ this.healthCheckUri = healthCheckUri;
+ }
+ }
+
public static class EcompPortalConfig {
private String defaultFunctionalMenu;
@@ -1118,6 +1238,30 @@ public class Configuration extends BasicConfiguration {
}
}
+ public static class EnvironmentContext {
+
+ String defaultValue;
+ List<String> validValues;
+
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ public List<String> getValidValues() {
+ return validValues;
+ }
+
+ public void setValidValues(List<String> validValues) {
+ this.validValues = validValues;
+ }
+ }
+
+
+
public CleanComponentsConfiguration getCleanComponentsConfiguration() {
return cleanComponentsConfiguration;
}
@@ -1340,4 +1484,13 @@ public class Configuration extends BasicConfiguration {
public void setDefaultImports(LinkedList<Map<String, Map<String, String>>> defaultImports) {
this.defaultImports = defaultImports;
}
+
+ public Map<String, List<String>> getResourcesForUpgrade() {
+ return resourcesForUpgrade;
+ }
+
+ public void setResourcesForUpgrade(Map<String, List<String>> resourcesForUpgrade) {
+ this.resourcesForUpgrade = resourcesForUpgrade;
+ }
+
}
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/monitoring/BeMonitoringService.java b/common-app-api/src/main/java/org/openecomp/sdc/be/monitoring/BeMonitoringService.java
index 1f036678cf..ac7391d8cc 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/be/monitoring/BeMonitoringService.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/be/monitoring/BeMonitoringService.java
@@ -82,7 +82,8 @@ public class BeMonitoringService {
}
public void start(int interval) {
- Configuration config = ((ConfigurationManager) context.getAttribute(Constants.CONFIGURATION_MANAGER_ATTR)).getConfiguration();
+ Configuration config = ((ConfigurationManager) context.getAttribute(Constants.CONFIGURATION_MANAGER_ATTR))
+ .getConfiguration();
if (config.getSystemMonitoring().getEnabled()) {
log.info("BE monitoring service is enabled, interval is {} seconds", interval);
this.monitoringExecutor.scheduleAtFixedRate(new MonitoringScheduledTask(), 0, interval, TimeUnit.SECONDS);
@@ -94,8 +95,10 @@ public class BeMonitoringService {
private void processMonitoringEvent(MonitoringEvent monitoringMetrics) {
CloseableHttpClient httpClient = null;
try {
- Configuration config = ((ConfigurationManager) context.getAttribute(Constants.CONFIGURATION_MANAGER_ATTR)).getConfiguration();
- String redirectedUrl = String.format(URL, config.getBeProtocol(), config.getBeFqdn(), config.getBeHttpPort());
+ Configuration config = ((ConfigurationManager) context.getAttribute(Constants.CONFIGURATION_MANAGER_ATTR))
+ .getConfiguration();
+ String redirectedUrl = String.format(URL, config.getBeProtocol(), config.getBeFqdn(),
+ config.getBeHttpPort());
httpClient = getHttpClient(config);
HttpPost httpPost = new HttpPost(redirectedUrl);
String monitoringMetricsJson = gson.toJson(monitoringMetrics);
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java
index fcde7f13ac..8e15b96e0c 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/Constants.java
@@ -109,6 +109,8 @@ public interface Constants {
public static final String ARTIFACT_NAME = "artifactName";
public static final String ARTIFACT_ID = "uniqueId";
public static final String REQUIRED_ARTIFACTS = "requiredArtifacts";
+ public static final String ARTIFACT_HEAT_PARAMS = "heatParameters";
+ public static final String ARTIFACT_ES_ID = "esId";
public static final String ABSTRACT = "abstract";
public static final String GLOBAL_SUBSTITUTION_TYPES_SERVICE_TEMPLATE = "Definitions/GlobalSubstitutionTypesServiceTemplate.yaml";
@@ -127,4 +129,15 @@ public interface Constants {
public static final String SERVICE_TEMPLATE_FILE_POSTFIX = "ServiceTemplate.yaml";
public static final String SERVICE_TEMPLATES_CONTAINING_FOLDER = "Definitions/";
public static final String UNBOUNDED = "unbounded";
+
+ //SDC HealthCheck components
+ public static final String HC_COMPONENT_FE = "FE";
+ public static final String HC_COMPONENT_BE = "BE";
+ public static final String HC_COMPONENT_TITAN = "TITAN";
+ public static final String HC_COMPONENT_CASSANDRA = "CASSANDRA";
+ public static final String HC_COMPONENT_DISTRIBUTION_ENGINE = "DE";
+
+ //external HealthCheck components
+ public static final String HC_COMPONENT_ON_BOARDING = "ON_BOARDING";
+ public static final String HC_COMPONENT_DCAE = "DCAE";
}
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java
index 2e4f54f153..8afd2fb4c9 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java
@@ -27,14 +27,14 @@ import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
public class HealthCheckInfo {
-
- private HealthCheckComponent healthCheckComponent;
+
+ private String healthCheckComponent;
private HealthCheckStatus healthCheckStatus;
private String version;
private String description;
private List<HealthCheckInfo> componentsInfo;
- public HealthCheckInfo(HealthCheckComponent healthCheckComponent, HealthCheckStatus healthCheckStatus,
+ public HealthCheckInfo(String healthCheckComponent, HealthCheckStatus healthCheckStatus,
String version, String description) {
super();
this.healthCheckComponent = healthCheckComponent;
@@ -43,7 +43,7 @@ public class HealthCheckInfo {
this.description = description;
}
- public HealthCheckInfo(HealthCheckComponent healthCheckComponent, HealthCheckStatus healthCheckStatus,
+ public HealthCheckInfo(String healthCheckComponent, HealthCheckStatus healthCheckStatus,
String version, String description, List<HealthCheckInfo> componentsInfo) {
super();
this.healthCheckComponent = healthCheckComponent;
@@ -57,7 +57,7 @@ public class HealthCheckInfo {
super();
}
- public HealthCheckComponent getHealthCheckComponent() {
+ public String getHealthCheckComponent() {
return healthCheckComponent;
}
@@ -65,6 +65,10 @@ public class HealthCheckInfo {
return healthCheckStatus;
}
+ public void setHealthCheckStatus(HealthCheckStatus healthCheckStatus) {
+ this.healthCheckStatus = healthCheckStatus;
+ }
+
public List<HealthCheckInfo> getComponentsInfo() {
return componentsInfo;
}
@@ -85,11 +89,15 @@ public class HealthCheckInfo {
return description;
}
- public enum HealthCheckComponent {
- FE, BE, TITAN, DE, ON_BOARDING, CASSANDRA,
- CAS, ZU;//Amdocs components
+ public void setDescription(String description) {
+ this.description = description;
}
+ /*public enum HealthCheckComponent {
+ FE, BE, TITAN, DE, ON_BOARDING, CASSANDRA, DCAE,
+ CAS, ZU;//Amdocs components
+ }*/
+
public enum HealthCheckStatus {
UP, DOWN, UNKNOWN;
}
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java
index 5051d8e645..950af691da 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java
@@ -25,9 +25,7 @@ import java.util.IllegalFormatException;
import java.util.Locale;
import org.apache.commons.lang3.StringUtils;
-import org.openecomp.sdc.common.config.EcompErrorConfiguration.EcompAlarmSeverity;
import org.openecomp.sdc.common.config.EcompErrorConfiguration.EcompErrorSeverity;
-import org.openecomp.sdc.common.config.EcompErrorConfiguration.EcompErrorType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java
index 584a1d8ad1..87453dedc4 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java
@@ -30,9 +30,9 @@ import java.util.Date;
import java.util.List;
import org.openecomp.sdc.common.config.EcompErrorEnum;
-import org.openecomp.sdc.common.config.EcompErrorLogUtil;
import org.openecomp.sdc.common.config.EcompErrorEnum.AlarmSeverity;
import org.openecomp.sdc.common.config.EcompErrorEnum.ErrorType;
+import org.openecomp.sdc.common.config.EcompErrorLogUtil;
public class GenerateEcompErrorsCsv {
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/listener/AppContextListener.java b/common-app-api/src/main/java/org/openecomp/sdc/common/listener/AppContextListener.java
index 45976c42d1..a6965a75ac 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/listener/AppContextListener.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/listener/AppContextListener.java
@@ -38,7 +38,6 @@ import org.openecomp.sdc.common.impl.ExternalConfiguration;
import org.openecomp.sdc.common.impl.FSConfigurationSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
public class AppContextListener implements ServletContextListener {
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/HealthCheckUtil.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/HealthCheckUtil.java
new file mode 100644
index 0000000000..e0d5206066
--- /dev/null
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/HealthCheckUtil.java
@@ -0,0 +1,42 @@
+package org.openecomp.sdc.common.util;
+
+import java.util.List;
+
+import org.openecomp.sdc.common.api.HealthCheckInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class HealthCheckUtil {
+
+ private static Logger log = LoggerFactory.getLogger(HealthCheckUtil.class.getName());
+
+ public static boolean getAggregateStatus(List<HealthCheckInfo> healthCheckInfos) {
+
+ boolean status = true;
+
+ for (HealthCheckInfo healthCheckInfo : healthCheckInfos) {
+ if (healthCheckInfo.getHealthCheckStatus().equals(HealthCheckInfo.HealthCheckStatus.DOWN)) {
+ log.debug("Component {} is reported as DOWN - Aggregated HC will be DOWN", healthCheckInfo.getHealthCheckComponent());
+ status = false;
+ break;
+ }
+ }
+
+ return status;
+ }
+
+ public static String getAggregateDescription(List<HealthCheckInfo> healthCheckInfos, String parentDescription) {
+
+ StringBuilder sb = new StringBuilder();
+ healthCheckInfos.forEach(x -> {
+ if (x.getHealthCheckStatus() == HealthCheckInfo.HealthCheckStatus.DOWN) {
+ sb.append("Component ").append(x.getHealthCheckComponent()).append(" is Down, ");
+ }
+ });
+
+ return sb.length() > 0 ? sb.substring(0, sb.length() - 1) : "";
+
+// return description;
+ }
+
+}
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/PairUtils.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/PairUtils.java
index eb6c29ce4a..d58b9a970d 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/PairUtils.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/PairUtils.java
@@ -20,12 +20,12 @@
package org.openecomp.sdc.common.util;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.apache.commons.lang3.tuple.Pair;
-
import java.util.List;
import java.util.stream.Collectors;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+
public class PairUtils {
public static <L, R> List<L> leftSequence(List<ImmutablePair<L, R>> pairs) {
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java
index 242d74a9ca..322725b032 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java
@@ -267,8 +267,14 @@ public class YamlToObjectConverter {
public boolean isValidYaml(byte[] fileContents) {
try {
- Map<String, Object> mappedToscaTemplate = (Map<String, Object>) defaultYaml
- .load(new ByteArrayInputStream(fileContents));
+
+ Iterable<Object> mappedToscaTemplateIt = defaultYaml.loadAll(new ByteArrayInputStream(fileContents));
+
+ for (Object o : mappedToscaTemplateIt) {
+ System.out.println("Loaded object type:" + o.getClass());
+ Map<String, Object> map = (Map<String, Object>) o;
+ }
+
} catch (Exception e) {
log.error("Failed to convert yaml file to object - yaml is invalid", e);
return false;
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/exception/ResponseFormat.java b/common-app-api/src/main/java/org/openecomp/sdc/exception/ResponseFormat.java
index 9058647bdb..109164d07d 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/exception/ResponseFormat.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/exception/ResponseFormat.java
@@ -20,8 +20,6 @@
package org.openecomp.sdc.exception;
-import javax.ws.rs.core.Response;
-
/**
* Nested POJOs to express required JSON format of the error
*
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java
index 536ec7a1bc..9ee8fc6be0 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java
@@ -20,13 +20,13 @@
package org.openecomp.sdc.fe.config;
+import static java.lang.String.format;
+
import java.util.Date;
import java.util.List;
import org.openecomp.sdc.common.api.BasicConfiguration;
-import static java.lang.String.format;
-
public class Configuration extends BasicConfiguration {
/**
* fe FQDN
@@ -61,6 +61,8 @@ public class Configuration extends BasicConfiguration {
private OnboardingConfig onboarding;
+ private DcaeConfig dcae;
+
public String getKibanaProtocol() {
return kibanaProtocol;
}
@@ -349,6 +351,54 @@ public class Configuration extends BasicConfiguration {
}
}
+ public DcaeConfig getDcae() {
+ return dcae;
+ }
+
+ public void setDcae(DcaeConfig dcae) {
+ this.dcae = dcae;
+ }
+
+ public static class DcaeConfig {
+
+ String protocol = "http";
+ String host;
+ Integer port;
+ String healthCheckUri;
+
+ public String getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public Integer getPort() {
+ return port;
+ }
+
+ public void setPort(Integer port) {
+ this.port = port;
+ }
+
+ public String getHealthCheckUri() {
+ return healthCheckUri;
+ }
+
+ public void setHealthCheckUri(String healthCheckUri) {
+ this.healthCheckUri = healthCheckUri;
+ }
+ }
+
@Override
public String toString() {
return new StringBuilder().append(format("backend host: %s%n", beHost))
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/FeEcompErrorManager.java b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/FeEcompErrorManager.java
index 6733e179ba..a36293b829 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/FeEcompErrorManager.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/FeEcompErrorManager.java
@@ -23,7 +23,6 @@ package org.openecomp.sdc.fe.config;
import org.openecomp.sdc.common.config.AbsEcompErrorManager;
import org.openecomp.sdc.common.config.EcompErrorEnum;
import org.openecomp.sdc.common.config.IEcompConfigurationManager;
-import org.openecomp.sdc.fe.config.ConfigurationManager;
public class FeEcompErrorManager extends AbsEcompErrorManager {
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/BeEcompErrorManagerTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/BeEcompErrorManagerTest.java
index 592ab058b0..440f7587c7 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/BeEcompErrorManagerTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/BeEcompErrorManagerTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.be.config;
-import javax.annotation.Generated;
-
import org.junit.Test;
import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity;
import org.openecomp.sdc.common.config.IEcompConfigurationManager;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/CleanComponentsConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/CleanComponentsConfigurationTest.java
index 86c78b236e..f7124d3eb4 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/CleanComponentsConfigurationTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/CleanComponentsConfigurationTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.be.config;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/ConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/ConfigurationTest.java
index 5b98270ee9..15508c540f 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/ConfigurationTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/ConfigurationTest.java
@@ -6,8 +6,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import javax.annotation.Generated;
-
import org.junit.Test;
import org.openecomp.sdc.be.config.Configuration.ApplicationL1CacheConfig;
import org.openecomp.sdc.be.config.Configuration.ApplicationL2CacheConfig;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java
index 8eb9befa7f..03da2ffe8a 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.be.config;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
import org.openecomp.sdc.be.config.DistributionEngineConfiguration.ComponentArtifactTypesConfig;
import org.openecomp.sdc.be.config.DistributionEngineConfiguration.CreateTopicConfig;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorConfigurationTest.java
index 47e380b7cc..d9e6066224 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorConfigurationTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorConfigurationTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.be.config;
import java.util.Map;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorInfoTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorInfoTest.java
index 86bedf6beb..4c95543fb9 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorInfoTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/ErrorInfoTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.be.config;
-import javax.annotation.Generated;
-
import org.junit.Test;
import org.openecomp.sdc.be.config.ErrorInfo.ErrorInfoType;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/Neo4jErrorsConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/Neo4jErrorsConfigurationTest.java
index 2c62d6677c..6b7b163f45 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/Neo4jErrorsConfigurationTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/Neo4jErrorsConfigurationTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.be.config;
import java.util.Map;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/validation/DeploymentArtifactHeatConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/validation/DeploymentArtifactHeatConfigurationTest.java
index 616dbf9491..d2c394bff2 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/validation/DeploymentArtifactHeatConfigurationTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/validation/DeploymentArtifactHeatConfigurationTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.be.config.validation;
import java.util.Map;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java
index ef313377c6..14519a45ef 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.common.api;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java
index 466eb3bab2..525080e535 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.common.api;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java
index 7d2e3de68a..d37e1ccbb7 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java
@@ -2,10 +2,7 @@ package org.openecomp.sdc.common.api;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
-import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckComponent;
import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus;
@@ -19,7 +16,7 @@ public class HealthCheckInfoTest {
@Test
public void testGetHealthCheckComponent() throws Exception {
HealthCheckInfo testSubject;
- HealthCheckComponent result;
+ String result;
// default test
testSubject = createTestSubject();
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ResponseInfoTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ResponseInfoTest.java
index 50c53d0587..d05484db40 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ResponseInfoTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ResponseInfoTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.api;
-import javax.annotation.Generated;
-
import org.junit.Test;
import org.openecomp.sdc.common.api.ResponseInfo.ResponseStatusEnum;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInfoTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInfoTest.java
index 0a83b8ec61..42b057e521 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInfoTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInfoTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.common.api;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInterfaceTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInterfaceTest.java
index 7d14df9c6d..9c19d3132d 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInterfaceTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ToscaNodeTypeInterfaceTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.common.api;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java
index f731bb78fa..aeea08999f 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.common.api;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeysEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeysEnumTest.java
index 521f2e38d1..ec55db5c95 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeysEnumTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeysEnumTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.datastructure;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/ESTimeBasedEventTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/ESTimeBasedEventTest.java
index 2826b49c66..4d5d97b7fa 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/ESTimeBasedEventTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/ESTimeBasedEventTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.common.datastructure;
import java.util.Map;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java
index 272c9d1796..515ee0bb76 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.datastructure;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/WrapperTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/WrapperTest.java
index eac9196b75..9c18861d40 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/WrapperTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/WrapperTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.datastructure;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java
index fa86708eb2..3ff24f2b07 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.kpi.api;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java
index a9936adae5..298f6fe85d 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java
@@ -2,7 +2,6 @@ package org.openecomp.sdc.common.listener;
import java.util.Map;
-import javax.annotation.Generated;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/monitoring/MonitoringEventTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/monitoring/MonitoringEventTest.java
index 2e64590ccc..66f519197c 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/monitoring/MonitoringEventTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/monitoring/MonitoringEventTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.monitoring;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestConfigurationInfoTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestConfigurationInfoTest.java
index 89309e7c03..efbb7d799d 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestConfigurationInfoTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestConfigurationInfoTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.rest.api;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseAsByteArrayTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseAsByteArrayTest.java
index bb4c569f8a..c1bcae31cd 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseAsByteArrayTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseAsByteArrayTest.java
@@ -1,10 +1,6 @@
package org.openecomp.sdc.common.rest.api;
-import javax.annotation.Generated;
-
import org.junit.Test;
-import java.util.*;
-import org.junit.Assert;
public class RestResponseAsByteArrayTest {
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseTest.java
index c7fe36581d..1ca37b16df 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/rest/api/RestResponseTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.rest.api;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/test/CommonUtilsTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/test/CommonUtilsTest.java
index ae882d8a92..8cab6b4ed4 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/test/CommonUtilsTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/test/CommonUtilsTest.java
@@ -29,7 +29,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.junit.Ignore;
import org.junit.Test;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.util.GeneralUtility;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/test/TestExternalConfiguration.java b/common-app-api/src/test/java/org/openecomp/sdc/common/test/TestExternalConfiguration.java
index e27e442e84..d2ec093f39 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/test/TestExternalConfiguration.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/test/TestExternalConfiguration.java
@@ -20,6 +20,9 @@
package org.openecomp.sdc.common.test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
@@ -29,24 +32,13 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import static org.mockito.Matchers.anyList;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-
import org.junit.Before;
import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
import org.openecomp.sdc.be.config.DistributionEngineConfiguration;
import org.openecomp.sdc.common.api.BasicConfiguration;
import org.openecomp.sdc.common.api.ConfigurationListener;
import org.openecomp.sdc.common.api.ConfigurationSource;
import org.openecomp.sdc.common.api.FileChangeCallback;
-import org.openecomp.sdc.common.impl.ConfigFileChangeListener;
import org.openecomp.sdc.common.impl.ExternalConfiguration;
import org.openecomp.sdc.common.impl.FSConfigurationSource;
import org.openecomp.sdc.common.test.config.TestConfiguration;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/test/YamlTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/test/YamlTest.java
index d45a61cebb..81e17849b1 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/test/YamlTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/test/YamlTest.java
@@ -20,7 +20,8 @@
package org.openecomp.sdc.common.test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import org.apache.commons.codec.binary.Base64;
import org.junit.BeforeClass;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/test/config/TestConfiguration.java b/common-app-api/src/test/java/org/openecomp/sdc/common/test/config/TestConfiguration.java
index b8bf394fd7..f8acf549fa 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/test/config/TestConfiguration.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/test/config/TestConfiguration.java
@@ -20,14 +20,14 @@
package org.openecomp.sdc.common.test.config;
+import static java.lang.String.format;
+
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.openecomp.sdc.common.api.BasicConfiguration;
-import static java.lang.String.format;
-
public class TestConfiguration extends BasicConfiguration {
/**
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/util/CapabilityTypeNameEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/util/CapabilityTypeNameEnumTest.java
index 405da1076c..67862928ce 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/util/CapabilityTypeNameEnumTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/util/CapabilityTypeNameEnumTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.util;
-import javax.annotation.Generated;
-
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/util/GeneralUtilityTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/util/GeneralUtilityTest.java
index f574accd13..ebfffe572a 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/util/GeneralUtilityTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/util/GeneralUtilityTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.common.util;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Assert;
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/util/GsonFactoryTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/util/GsonFactoryTest.java
index c11ccb79ce..0840d27934 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/util/GsonFactoryTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/util/GsonFactoryTest.java
@@ -1,7 +1,5 @@
package org.openecomp.sdc.common.util;
-import javax.annotation.Generated;
-
import org.junit.Test;
import com.google.gson.Gson;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/util/StreamUtilsTests.java b/common-app-api/src/test/java/org/openecomp/sdc/common/util/StreamUtilsTests.java
index 31dc5f5f47..deb9029e0d 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/util/StreamUtilsTests.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/util/StreamUtilsTests.java
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.junit.Test;
-import org.openecomp.sdc.common.util.StreamUtils;
import fj.data.Either;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/util/ValidationUtilsTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/util/ValidationUtilsTest.java
index 2c4e0b7f00..9b30039023 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/util/ValidationUtilsTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/util/ValidationUtilsTest.java
@@ -2,8 +2,6 @@ package org.openecomp.sdc.common.util;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Assert;
import org.junit.Test;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/fe/config/ConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/fe/config/ConfigurationTest.java
index d034f2ddfa..6342da8222 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/fe/config/ConfigurationTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/fe/config/ConfigurationTest.java
@@ -3,10 +3,7 @@ package org.openecomp.sdc.fe.config;
import java.util.Date;
import java.util.List;
-import javax.annotation.Generated;
-
import org.junit.Test;
-import org.openecomp.sdc.be.config.Configuration.OnboardingConfig;
import org.openecomp.sdc.fe.config.Configuration.FeMonitoringConfig;