summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java1
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java4
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ErrorNumbers.java4
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java4
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java10
8 files changed, 16 insertions, 18 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
index 19f1b217ff..d092b49d8c 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
@@ -84,6 +84,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
private static final String BRACKETS = "{} {} {} {} {} {} {} {} {}";
+ private static final String OPENSTACK = "OpenStack";
@Autowired
protected CloudConfig cloudConfig;
@@ -241,7 +242,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
long startTime = System.currentTimeMillis();
// rollback may be null (e.g. if stack already existed when Create was called)
if (rollback == null) {
- logger.info("{} {} {}", MessageEnum.RA_ROLLBACK_NULL.toString(), "OpenStack", "rollbackVnf");
+ logger.info("{} {} {}", MessageEnum.RA_ROLLBACK_NULL.toString(), OPENSTACK, "rollbackVnf");
return;
}
@@ -607,7 +608,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
String error = "VNF Resource type: " + vnfResource.getModelName() + ", ModelUuid="
+ vnfResource.getModelUUID() + " VersionMin=" + vnfMin + " VersionMax:" + vnfMax
+ " NOT supported on Cloud: " + cloudSiteId + " with AIC_Version:" + cloudSite.getCloudVersion();
- logger.error("{} {} {} {} {}", MessageEnum.RA_CONFIG_EXC.toString(), error, "OpenStack",
+ logger.error("{} {} {} {} {}", MessageEnum.RA_CONFIG_EXC.toString(), error, OPENSTACK,
ErrorCode.BusinessProcesssError.getValue(), "Exception - setVersion");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -819,7 +820,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
String error = "UpdateVF: No Heat Template ID defined in catalog database for " + vfModuleType
+ ", reqType=" + requestType;
logger.error("{} {} {} {} {} {}", MessageEnum.RA_VNF_UNKNOWN_PARAM.toString(), "Heat Template ID",
- vfModuleType, "OpenStack", ErrorCode.DataError.getValue(), error);
+ vfModuleType, OPENSTACK, ErrorCode.DataError.getValue(), error);
throw new VnfException(error, MsoExceptionCategory.INTERNAL);
} else {
logger.debug("Got HEAT Template from DB: {}", heatTemplate.getHeatTemplate());
@@ -828,7 +829,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
if (heatEnvironment == null) {
String error = "Update VNF: undefined Heat Environment. VF=" + vfModuleType;
logger.error("{} {} {} {} {}", MessageEnum.RA_VNF_UNKNOWN_PARAM.toString(), "Heat Environment ID",
- "OpenStack", ErrorCode.DataError.getValue(), error);
+ OPENSTACK, ErrorCode.DataError.getValue(), error);
// Alarm on this error, configuration must be fixed
throw new VnfException(error, MsoExceptionCategory.INTERNAL);
} else {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
index 954cbc1b1d..0e32955eed 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
@@ -42,7 +42,6 @@ import org.springframework.stereotype.Component;
@Component
public class SDNCVnfResources {
- private static final Logger logger = LoggerFactory.getLogger(SDNCVnfResources.class);
@Autowired
private VnfTopologyOperationRequestMapper sdncRM;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
index 939f53727d..efe5f34824 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
@@ -40,7 +40,6 @@ import org.springframework.stereotype.Component;
@Component
public class VnfAdapterVfModuleResources {
- private static final Logger logger = LoggerFactory.getLogger(VnfAdapterVfModuleResources.class);
@Autowired
private VnfAdapterVfModuleObjectMapper vnfAdapterVfModuleObjectMapper;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java
index c97ca8e0ea..2ec63182a0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java
@@ -39,7 +39,6 @@ import org.springframework.stereotype.Component;
@Component
public class VnfAdapterVolumeGroupResources {
- private static final Logger logger = LoggerFactory.getLogger(VnfAdapterVolumeGroupResources.class);
@Autowired
private VnfAdapterObjectMapper vnfAdapterObjectMapper;
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java
index 8977f11e36..7fb5df7af6 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java
@@ -40,6 +40,8 @@ public class CamundaResponse {
@JsonProperty("variables")
private String variables;
+ public CamundaResponse() {}
+
public String getProcessInstanceID() {
return processInstanceID;
}
@@ -56,8 +58,6 @@ public class CamundaResponse {
this.variables = variables;
}
- public CamundaResponse() {}
-
public String getResponse() {
return response;
}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ErrorNumbers.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ErrorNumbers.java
index 468fe61562..7400c0aaae 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ErrorNumbers.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ErrorNumbers.java
@@ -22,8 +22,6 @@ package org.onap.so.apihandler.common;
public final class ErrorNumbers {
- private ErrorNumbers() {}
-
public static final String REQUEST_FAILED_SCHEMA_VALIDATION = "1000";
public static final String RECIPE_DOES_NOT_EXIST = "1010";
public static final String VFMODULE_TYPE_DOES_NOT_EXIST = "1011";
@@ -73,4 +71,6 @@ public final class ErrorNumbers {
public static final String SVC_NO_SERVER_RESOURCES = "SVC1000";
public static final String SVC_DETAILED_SERVICE_ERROR = "SVC2000";
+ private ErrorNumbers() {}
+
}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java
index 0bbc3e336f..7cf2046646 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java
@@ -23,8 +23,6 @@ package org.onap.so.apihandlerinfra;
public class Constants {
- private Constants() {}
-
public static final String REQUEST_ID_PATH = "/{request-id}";
public static final String STATUS_SUCCESS = "SUCCESS";
@@ -50,4 +48,6 @@ public class Constants {
public final static String SERVICE_INSTANTIATION_PATH = "/serviceInstantiation";
public final static String ORCHESTRATION_REQUESTS_PATH = "/orchestrationRequests";
+ private Constants() {}
+
}
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
index b3d57b0137..3c4b1fa66b 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
@@ -89,6 +89,7 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
protected static final String REQUEST_ID = "requestId";
protected static final String REQUESTOR_ID = "requestorId";
protected static final String ACTION = "action";
+ protected static final String OPENV = "operationalEnvironment";
private static final List<String> VALID_COLUMNS =
Arrays.asList(REQUEST_ID, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, ACTION, REQUEST_STATUS);
@@ -173,13 +174,13 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
predicates.add(cb.equal(tableRoot.get(NETWORK_INSTANCE_NAME), instanceName));
} else if (requestScope.equals("configuration")) {
predicates.add(cb.equal(tableRoot.get(CONFIGURATION_INSTANCE_NAME), instanceName));
- } else if (requestScope.equals("operationalEnvironment")) {
+ } else if (requestScope.equals(OPENV)) {
predicates.add(cb.equal(tableRoot.get(OPERATIONAL_ENV_NAME), instanceName));
}
} else {
if (instanceIdMap != null) {
- if ("service".equals(requestScope) && instanceIdMap.get("serviceInstanceId") != null) {
+ if ("service".equals(requestScope) && instanceIdMap.get(SERVICE_INSTANCE_ID) != null) {
predicates
.add(cb.equal(tableRoot.get(SERVICE_INSTANCE_ID), instanceIdMap.get("serviceInstanceId")));
}
@@ -208,8 +209,7 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
instanceIdMap.get("configurationInstanceId")));
}
- if (requestScope.equals("operationalEnvironment")
- && instanceIdMap.get("operationalEnvironmentId") != null) {
+ if (requestScope.equals(OPENV) && instanceIdMap.get("operationalEnvironmentId") != null) {
predicates.add(
cb.equal(tableRoot.get(OPERATIONAL_ENV_ID), instanceIdMap.get("operationalEnvironmentId")));
}
@@ -336,7 +336,7 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
// as the same requestorId can also match on different API methods
final String resourceType = orchestrationMap.get("resourceType");
if (resourceType == null) {
- predicates.add(cb.equal(tableRoot.get("requestScope"), "operationalEnvironment"));
+ predicates.add(cb.equal(tableRoot.get("requestScope"), OPENV));
}
for (final Map.Entry<String, String> entry : orchestrationMap.entrySet()) {