summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java7
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java8
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateAAIInventory.java1
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java1
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnet.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java24
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java10
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java42
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java1
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java7
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java78
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java23
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java31
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java69
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/QueryVnfNotification.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/UpdateVnfNotification.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify_Service.java12
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java9
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRoutesTest.java4
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java14
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java13
-rw-r--r--common/src/main/java/org/onap/so/client/RestClient.java1
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIClient.java1
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java2
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIObjectType.java2
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIRestClient.java2
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java1
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java1
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIVersion.java2
-rw-r--r--common/src/main/java/org/onap/so/client/aai/entities/CustomQuery.java17
-rw-r--r--common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java1
-rw-r--r--common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java1
-rw-r--r--common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java2
-rw-r--r--common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java1
-rw-r--r--common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java2
-rw-r--r--common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java4
-rw-r--r--common/src/main/java/org/onap/so/client/grm/GRMRestClient.java2
-rw-r--r--common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java10
-rw-r--r--common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java1
-rw-r--r--common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java1
-rw-r--r--common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java1
-rw-r--r--common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java5
-rw-r--r--pom.xml2
50 files changed, 210 insertions, 257 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
index 7bf68fff78..e16bf90d4d 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
@@ -28,9 +28,7 @@ import com.woorea.openstack.heat.model.CreateStackParam;
import com.woorea.openstack.heat.model.Stack;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.Arrays;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Scanner;
import javax.ws.rs.core.Response;
@@ -64,6 +62,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
+import com.google.common.collect.ImmutableSet;
@Component
public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
@@ -75,8 +74,8 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
public static final String VF_MODULE_ID = "vf_module_id";
public static final String TEMPLATE_TYPE = "template_type";
public static final String MULTICLOUD_QUERY_BODY_NULL = "multicloudQueryBody is null";
- public static final List<String> MULTICLOUD_INPUTS =
- Arrays.asList(OOF_DIRECTIVES, SDNC_DIRECTIVES, USER_DIRECTIVES, TEMPLATE_TYPE);
+ public static final ImmutableSet<String> MULTICLOUD_INPUTS =
+ ImmutableSet.of(OOF_DIRECTIVES, SDNC_DIRECTIVES, USER_DIRECTIVES, TEMPLATE_TYPE);
private static final Logger logger = LoggerFactory.getLogger(MsoMulticloudUtils.class);
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
index 627f6a276c..889f6fe860 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
@@ -54,7 +54,7 @@ public class HeatStackAudit {
protected static final Logger logger = LoggerFactory.getLogger(HeatStackAudit.class);
- private static final String exceptionMsg = "Error finding Path from Self Link";
+ private static final String EXCEPTION_MSG = "Error finding Path from Self Link";
@Autowired
protected MsoHeatUtils heat;
@@ -112,10 +112,10 @@ public class HeatStackAudit {
processNestedResourceGroup(cloudRegion, tenantId, vServersWithLInterface,
nestedResourceGroupResources);
} else
- throw new Exception(exceptionMsg);
+ throw new Exception(EXCEPTION_MSG);
} catch (Exception e) {
logger.error("Error Parsing Link to obtain Path", e);
- throw new Exception(exceptionMsg);
+ throw new Exception(EXCEPTION_MSG);
}
}
}
@@ -145,7 +145,7 @@ public class HeatStackAudit {
addSubInterfaceToVserver(vServersWithLInterface, subinterfaceStack, subinterfaceResources);
}
} else
- throw new Exception(exceptionMsg);
+ throw new Exception(EXCEPTION_MSG);
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateAAIInventory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateAAIInventory.java
index 4453071e06..608832f49f 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateAAIInventory.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateAAIInventory.java
@@ -22,7 +22,6 @@ package org.onap.so.adapters.inventory.create;
import java.util.Optional;
import java.util.stream.Stream;
-import org.onap.aai.domain.yang.LInterface;
import org.onap.so.adapters.audit.AAIObjectAudit;
import org.onap.so.adapters.audit.AAIObjectAuditList;
import org.onap.so.client.aai.AAIObjectType;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
index add3aac74d..8d0c2bdfc1 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
@@ -30,7 +30,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnet.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnet.java
index 0c55bd6945..25667efc71 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnet.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnet.java
@@ -66,7 +66,7 @@ public class ContrailSubnet {
private List<ContrailSubnetPool> allocationPools = new ArrayList<>();
@JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes")
- private final ContrailSubnetHostRoutes host_routes = new ContrailSubnetHostRoutes();
+ private final ContrailSubnetHostRoutes hostRoutes = new ContrailSubnetHostRoutes();
public ContrailSubnet() {
super();
@@ -173,7 +173,7 @@ public class ContrailSubnet {
}
}
if (inputSubnet.getHostRoutes() != null) {
- List<ContrailSubnetHostRoute> hrList = host_routes.getHost_routes();
+ List<ContrailSubnetHostRoute> hrList = hostRoutes.getHostRoutes();
for (HostRoute hr : inputSubnet.getHostRoutes()) {
if (!msoCommonUtils.isNullOrEmpty(hr.getPrefix())
|| !msoCommonUtils.isNullOrEmpty(hr.getNextHop())) {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java
index b1908d9541..0802194b4a 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java
@@ -33,12 +33,12 @@ public class ContrailSubnetHostRoutes {
public ContrailSubnetHostRoutes() {}
- public List<ContrailSubnetHostRoute> getHost_routes() {
+ public List<ContrailSubnetHostRoute> getHostRoutes() {
return hostRoutes;
}
- public void setHost_routes(List<ContrailSubnetHostRoute> host_routes) {
- this.hostRoutes = host_routes;
+ public void setHostRoutes(List<ContrailSubnetHostRoute> hostRoutes) {
+ this.hostRoutes = hostRoutes;
}
@Override
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
index 4753b1c18d..429948cef1 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
@@ -71,6 +71,8 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
private static final String NETWORK_EXCEPTION_MSG = "Got a NetworkException on createNetwork: ";
private static final String CREATE_NETWORK_ERROR_LOGMSG = "{} {} Error sending createNetwork notification {} ";
private static final String FAULT_INFO_ERROR_LOGMSG = "{} {} Exception - fault info ";
+ private static final String SHARED = "shared";
+ private static final String EXTERNAL = "external";
@Autowired
private Environment environment;
@@ -127,13 +129,13 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
HashMap<String, String> params = (HashMap<String, String>) networkParams;
if (params == null)
- params = new HashMap<String, String>();
+ params = new HashMap<>();
String shared = null;
String external = null;
- if (params.containsKey("shared"))
- shared = params.get("shared");
- if (params.containsKey("external"))
- external = params.get("external");
+ if (params.containsKey(SHARED))
+ shared = params.get(SHARED);
+ if (params.containsKey(EXTERNAL))
+ external = params.get(EXTERNAL);
try {
networkAdapter.createNetwork(cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkName,
@@ -211,13 +213,13 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
HashMap<String, String> params = (HashMap<String, String>) networkParams;
if (params == null)
- params = new HashMap<String, String>();
+ params = new HashMap<>();
String shared = null;
String external = null;
- if (params.containsKey("shared"))
- shared = params.get("shared");
- if (params.containsKey("external"))
- external = params.get("external");
+ if (params.containsKey(SHARED))
+ shared = params.get(SHARED);
+ if (params.containsKey(EXTERNAL))
+ external = params.get(EXTERNAL);
try {
networkAdapter.updateNetwork(cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkId,
@@ -268,7 +270,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
MsoRequest msoRequest, String notificationUrl) {
logger.debug("Async Query Network {} in {}/{}", networkNameOrId, cloudSiteId, tenantId);
- String errorCreateNetworkMessage = "{} {} Error sending createNetwork notification {} ";
+ String errorCreateNetworkMessage = CREATE_NETWORK_ERROR_LOGMSG;
// Use the synchronous method to perform the actual Create
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index a79a6191cf..029da43f48 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -88,7 +88,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
private static final String NETWORK_ID = "network_id";
private static final String NETWORK_FQDN = "network_fqdn";
private static final String CREATE_NETWORK_CONTEXT = "CreateNetwork";
- private static final String MSO_CONFIGURATION_ERROR = "MsoConfigurationError";
private static final String NEUTRON_MODE = "NEUTRON";
private static final Logger logger = LoggerFactory.getLogger(MsoNetworkAdapterImpl.class);
@@ -115,6 +114,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
@Autowired
private NetworkResourceRepository networkResourceRepo;
+ public MsoNetworkAdapterImpl() {}
+
/**
* Health Check web method. Does nothing but return to show the adapter is deployed.
*/
@@ -128,7 +129,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
*
* @see MsoNetworkAdapterImpl#MsoNetworkAdapterImpl(MsoPropertiesFactory)
*/
- public MsoNetworkAdapterImpl() {}
@Override
public void createNetwork(String cloudSiteId, String tenantId, String networkType, String modelCustomizationUuid,
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
index b44704d1cf..c15fc0d204 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
@@ -86,7 +86,7 @@ public class NetworkAdapterRest {
private static final Logger logger = LoggerFactory.getLogger(NetworkAdapterRest.class);
private static final String TESTING_KEYWORD = "___TESTING___";
- private String EXCEPTION = "Exception:";
+ private String exceptionMsg = "Exception:";
@Autowired
private MsoNetworkAdapterImpl adapter;
@@ -233,7 +233,7 @@ public class NetworkAdapterRest {
rollback.value.getNetworkStackId(), networkFqdn.value, rollback.value.getNetworkCreated(),
subnetIdMap.value, rollback.value, req.getMessageId());
} catch (NetworkException e) {
- logger.debug(EXCEPTION, e);
+ logger.debug(exceptionMsg, e);
eresp = new CreateNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
}
if (!req.isSynchronous()) {
@@ -328,7 +328,7 @@ public class NetworkAdapterRest {
}
response = new DeleteNetworkResponse(req.getNetworkId(), networkDeleted.value, req.getMessageId());
} catch (NetworkException e) {
- logger.debug(EXCEPTION, e);
+ logger.debug(exceptionMsg, e);
eresp = new DeleteNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
}
if (!req.isSynchronous()) {
@@ -467,7 +467,7 @@ public class NetworkAdapterRest {
adapter.rollbackNetwork(nwr);
response = new RollbackNetworkResponse(true, req.getMessageId());
} catch (NetworkException e) {
- logger.debug(EXCEPTION, e);
+ logger.debug(exceptionMsg, e);
eresp = new RollbackNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true,
req.getMessageId());
}
@@ -614,7 +614,7 @@ public class NetworkAdapterRest {
// an update
subnetIdMap.value, req.getMessageId());
} catch (NetworkException e) {
- logger.debug(EXCEPTION, e);
+ logger.debug(exceptionMsg, e);
eresp = new UpdateNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
}
if (!req.isSynchronous()) {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java
index c275073c46..68142e6cc9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkAdapterNotify_Service.java
@@ -57,11 +57,11 @@ public class NetworkAdapterNotify_Service extends Service {
}
public NetworkAdapterNotify_Service() {
- super(__getWsdlLocation(), NETWORKADAPTERNOTIFY_QNAME);
+ super(getWsdlLocation(), NETWORKADAPTERNOTIFY_QNAME);
}
public NetworkAdapterNotify_Service(WebServiceFeature... features) {
- super(__getWsdlLocation(), NETWORKADAPTERNOTIFY_QNAME, features);
+ super(getWsdlLocation(), NETWORKADAPTERNOTIFY_QNAME, features);
}
public NetworkAdapterNotify_Service(URL wsdlLocation) {
@@ -100,7 +100,7 @@ public class NetworkAdapterNotify_Service extends Service {
return super.getPort(new QName(URL, "MsoNetworkAdapterAsyncImplPort"), NetworkAdapterNotify.class, features);
}
- private static URL __getWsdlLocation() {
+ private static URL getWsdlLocation() {
if (NETWORKADAPTERNOTIFY_EXCEPTION != null) {
throw NETWORKADAPTERNOTIFY_EXCEPTION;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java
index 81ccd8aa04..a7a2974660 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/ObjectFactory.java
@@ -39,22 +39,22 @@ import javax.xml.namespace.QName;
@XmlRegistry
public class ObjectFactory {
- private static final String Url = "http://org.onap.so/networkNotify";
- private static final QName _RollbackNetworkNotification_QNAME = new QName(Url, "rollbackNetworkNotification");
- private static final QName _UpdateNetworkNotification_QNAME = new QName(Url, "updateNetworkNotification");
+ private static final String URL = "http://org.onap.so/networkNotify";
+ private static final QName _RollbackNetworkNotification_QNAME = new QName(URL, "rollbackNetworkNotification");
+ private static final QName _UpdateNetworkNotification_QNAME = new QName(URL, "updateNetworkNotification");
private static final QName _QueryNetworkNotificationResponse_QNAME =
- new QName(Url, "queryNetworkNotificationResponse");
+ new QName(URL, "queryNetworkNotificationResponse");
private static final QName _UpdateNetworkNotificationResponse_QNAME =
- new QName(Url, "updateNetworkNotificationResponse");
+ new QName(URL, "updateNetworkNotificationResponse");
private static final QName _CreateNetworkNotificationResponse_QNAME =
- new QName(Url, "createNetworkNotificationResponse");
- private static final QName _DeleteNetworkNotification_QNAME = new QName(Url, "deleteNetworkNotification");
+ new QName(URL, "createNetworkNotificationResponse");
+ private static final QName _DeleteNetworkNotification_QNAME = new QName(URL, "deleteNetworkNotification");
private static final QName _DeleteNetworkNotificationResponse_QNAME =
- new QName(Url, "deleteNetworkNotificationResponse");
- private static final QName _CreateNetworkNotification_QNAME = new QName(Url, "createNetworkNotification");
- private static final QName _QueryNetworkNotification_QNAME = new QName(Url, "queryNetworkNotification");
+ new QName(URL, "deleteNetworkNotificationResponse");
+ private static final QName _CreateNetworkNotification_QNAME = new QName(URL, "createNetworkNotification");
+ private static final QName _QueryNetworkNotification_QNAME = new QName(URL, "queryNetworkNotification");
private static final QName _RollbackNetworkNotificationResponse_QNAME =
- new QName(Url, "rollbackNetworkNotificationResponse");
+ new QName(URL, "rollbackNetworkNotificationResponse");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package:
@@ -211,7 +211,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link RollbackNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "rollbackNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "rollbackNetworkNotification")
public JAXBElement<RollbackNetworkNotification> createRollbackNetworkNotification(
RollbackNetworkNotification value) {
return new JAXBElement<>(_RollbackNetworkNotification_QNAME, RollbackNetworkNotification.class, null, value);
@@ -221,7 +221,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link UpdateNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "updateNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "updateNetworkNotification")
public JAXBElement<UpdateNetworkNotification> createUpdateNetworkNotification(UpdateNetworkNotification value) {
return new JAXBElement<>(_UpdateNetworkNotification_QNAME, UpdateNetworkNotification.class, null, value);
}
@@ -230,7 +230,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link QueryNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "queryNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "queryNetworkNotificationResponse")
public JAXBElement<QueryNetworkNotificationResponse> createQueryNetworkNotificationResponse(
QueryNetworkNotificationResponse value) {
return new JAXBElement<>(_QueryNetworkNotificationResponse_QNAME, QueryNetworkNotificationResponse.class, null,
@@ -241,7 +241,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link UpdateNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "updateNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "updateNetworkNotificationResponse")
public JAXBElement<UpdateNetworkNotificationResponse> createUpdateNetworkNotificationResponse(
UpdateNetworkNotificationResponse value) {
return new JAXBElement<>(_UpdateNetworkNotificationResponse_QNAME, UpdateNetworkNotificationResponse.class,
@@ -252,7 +252,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link CreateNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "createNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "createNetworkNotificationResponse")
public JAXBElement<CreateNetworkNotificationResponse> createCreateNetworkNotificationResponse(
CreateNetworkNotificationResponse value) {
return new JAXBElement<>(_CreateNetworkNotificationResponse_QNAME, CreateNetworkNotificationResponse.class,
@@ -263,7 +263,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link DeleteNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "deleteNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "deleteNetworkNotification")
public JAXBElement<DeleteNetworkNotification> createDeleteNetworkNotification(DeleteNetworkNotification value) {
return new JAXBElement<>(_DeleteNetworkNotification_QNAME, DeleteNetworkNotification.class, null, value);
}
@@ -272,7 +272,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link DeleteNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "deleteNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "deleteNetworkNotificationResponse")
public JAXBElement<DeleteNetworkNotificationResponse> createDeleteNetworkNotificationResponse(
DeleteNetworkNotificationResponse value) {
return new JAXBElement<>(_DeleteNetworkNotificationResponse_QNAME, DeleteNetworkNotificationResponse.class,
@@ -283,7 +283,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link CreateNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "createNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "createNetworkNotification")
public JAXBElement<CreateNetworkNotification> createCreateNetworkNotification(CreateNetworkNotification value) {
return new JAXBElement<>(_CreateNetworkNotification_QNAME, CreateNetworkNotification.class, null, value);
}
@@ -292,7 +292,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link QueryNetworkNotification }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "queryNetworkNotification")
+ @XmlElementDecl(namespace = URL, name = "queryNetworkNotification")
public JAXBElement<QueryNetworkNotification> createQueryNetworkNotification(QueryNetworkNotification value) {
return new JAXBElement<>(_QueryNetworkNotification_QNAME, QueryNetworkNotification.class, null, value);
}
@@ -301,7 +301,7 @@ public class ObjectFactory {
* Create an instance of {@link JAXBElement }{@code <}{@link RollbackNetworkNotificationResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = Url, name = "rollbackNetworkNotificationResponse")
+ @XmlElementDecl(namespace = URL, name = "rollbackNetworkNotificationResponse")
public JAXBElement<RollbackNetworkNotificationResponse> createRollbackNetworkNotificationResponse(
RollbackNetworkNotificationResponse value) {
return new JAXBElement<>(_RollbackNetworkNotificationResponse_QNAME, RollbackNetworkNotificationResponse.class,
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
index 4396fc035d..9fc5c979d8 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
@@ -89,7 +89,7 @@ public class CXFConfiguration {
}
@Bean
- public ServletRegistrationBean SoapDispatcherServlet() {
+ public ServletRegistrationBean soapDispatcherServlet() {
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new CXFServlet(), "/services/*");
servletRegistrationBean.setName("services");
return servletRegistrationBean;
@@ -149,7 +149,7 @@ public class CXFConfiguration {
}
@Bean
- public Endpoint VnfAsyncAdapterEndpoint() {
+ public Endpoint vnfAsyncAdapterEndpoint() {
EndpointImpl endpoint = new EndpointImpl(springBus(), vnfAdapterAsyncImpl);
endpoint.publish("/VnfAsyncAdapter");
endpoint.setWsdlLocation("VnfAsyncAdapter.wsdl");
@@ -160,7 +160,7 @@ public class CXFConfiguration {
}
@Bean
- public Endpoint VnfCloudAdapterEndpoint() {
+ public Endpoint vnfCloudAdapterEndpoint() {
EndpointImpl endpoint = new EndpointImpl(springBus(), vnfCloudifyAdapterImpl);
endpoint.publish("/VnfCloudifyAdapterImpl");
endpoint.setWsdlLocation("VnfCloudifyAdapterImpl.wsdl");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java
index 97a2500c59..436836491d 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java
@@ -22,7 +22,6 @@ package org.onap.so.adapters.openstack;
import java.util.concurrent.Executor;
import org.onap.so.logging.jaxrs.filter.MDCTaskDecorator;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
index fe11fa07b4..d2dfae4b4b 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
@@ -64,6 +64,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
private static final String BPEL_AUTH_PROP = "org.onap.so.adapters.vnf.bpelauth";
private static final String ENCRYPTION_KEY_PROP = "org.onap.so.adapters.network.encryptionKey";
+ private static final String UPDATE_VNFA = "{} UpdateVnfA";
@Autowired
private Environment environment;
@@ -173,7 +174,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
String vnfName, String requestType, String volumeGroupHeatStackId, Map<String, Object> inputs,
String messageId, MsoRequest msoRequest, String notificationUrl) {
- logger.info("{} UpdateVnfA", MessageEnum.RA_ASYNC_UPDATE_VNF);
+ logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF);
// Use the synchronous method to perform the actual Create
MsoVnfAdapter vnfAdapter = vnfImpl;
@@ -207,7 +208,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
logger.error("{} {} Exception sending updateVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
ErrorCode.BusinessProcesssError.getValue(), e1);
}
- logger.info("{} UpdateVnfA", MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
+ logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
return;
}
logger.debug("Async Update VNF: {} VnfId:{}", vnfName, vnfId.value);
@@ -220,7 +221,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
logger.error("{} {} Exception sending updateVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
ErrorCode.BusinessProcesssError.getValue(), e);
}
- logger.info("{} UpdateVnfA", MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
+ logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
return;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index 5c7e70673b..b59a1fa79a 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -107,7 +107,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
private static final Logger logger = LoggerFactory.getLogger(MsoVnfAdapterImpl.class);
- private static final String MSO_CONFIGURATION_ERROR = "MsoConfigurationError";
private static final String VNF_ADAPTER_SERVICE_NAME = "MSO-BPMN:MSO-VnfAdapter.";
private static final String CHECK_REQD_PARAMS = "org.onap.so.adapters.vnf.checkRequiredParameters";
private static final String ADD_GET_FILES_ON_VOLUME_REQ = "org.onap.so.adapters.vnf.addGetFilesOnVolumeReq";
@@ -115,7 +114,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
private static final String VALET_ENABLED = "org.onap.so.adapters.vnf.valet_enabled";
private static final String FAIL_REQUESTS_ON_VALET_FAILURE =
"org.onap.so.adapters.vnf.fail_requests_on_valet_failure";
- private static final String SUCCESS_MSG = "Successfully received response from Open Stack";
+ private static final String OPENSTACK = "OpenStack";
@Autowired
private VFModuleCustomizationRepository vfModuleCustomRepo;
@@ -133,7 +132,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
/**
* DO NOT use that constructor to instantiate this class, the msoPropertiesfactory will be NULL.
- *
+ *
* @see MsoVnfAdapterImpl#MsoVnfAdapterImpl(MsoPropertiesFactory, CloudConfigFactory)
*/
public MsoVnfAdapterImpl() {
@@ -268,7 +267,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error =
"Query VNF: " + vnfName + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vnfName, cloudSiteId,
- tenantId, "OpenStack", "QueryVNF", ErrorCode.DataError.getValue(), "Exception - queryStack", me);
+ tenantId, OPENSTACK, "QueryVNF", ErrorCode.DataError.getValue(), "Exception - queryStack", me);
logger.debug(error);
throw new VnfException(me);
}
@@ -328,7 +327,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error =
"Delete VNF: " + vnfName + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_DELETE_VNF_ERR.toString(), vnfName, cloudOwner,
- cloudSiteId, tenantId, "OpenStack", "DeleteVNF", ErrorCode.DataError.getValue(),
+ cloudSiteId, tenantId, OPENSTACK, "DeleteVNF", ErrorCode.DataError.getValue(),
"Exception - DeleteVNF", me);
logger.debug(error);
throw new VnfException(me);
@@ -348,7 +347,7 @@ public class MsoVnfAdapterImpl 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;
}
@@ -373,7 +372,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error =
"Rollback VNF: " + vnfId + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_DELETE_VNF_ERR.toString(), vnfId, cloudOwner,
- cloudSiteId, tenantId, "OpenStack", "DeleteStack", ErrorCode.DataError.getValue(),
+ cloudSiteId, tenantId, OPENSTACK, "DeleteStack", ErrorCode.DataError.getValue(),
"Exception - DeleteStack", me);
logger.debug(error);
throw new VnfException(me);
@@ -655,7 +654,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VF Module: Query " + vfModuleName + " in " + cloudOwner + "/" + cloudSiteId + "/"
+ tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "queryStack", ErrorCode.DataError.getValue(),
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "queryStack", ErrorCode.DataError.getValue(),
"Exception - queryStack", me);
logger.debug(error);
// Failed to query the Stack due to an openstack exception.
@@ -674,7 +673,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
+ status.toString() + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId
+ "; please wait for it to complete, or fix manually.";
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_VNF_ALREADY_EXIST.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "queryStack", ErrorCode.DataError.getValue(),
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "queryStack", ErrorCode.DataError.getValue(),
"Stack " + vfModuleName + " already exists");
logger.debug(error);
throw new VnfAlreadyExists(vfModuleName, cloudOwner, cloudSiteId, tenantId,
@@ -685,7 +684,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VF: Stack " + vfModuleName + " already exists and is in FAILED state in "
+ cloudOwner + "/" + cloudSiteId + "/" + tenantId + "; requires manual intervention.";
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_VNF_ALREADY_EXIST.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "queryStack", ErrorCode.DataError.getValue(),
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "queryStack", ErrorCode.DataError.getValue(),
"Stack " + vfModuleName + " already exists and is " + "in FAILED state");
logger.debug(error);
throw new VnfAlreadyExists(vfModuleName, cloudOwner, cloudSiteId, tenantId,
@@ -697,7 +696,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
+ status.toString() + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId
+ "; requires manual intervention.";
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_VNF_ALREADY_EXIST.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "queryStack", ErrorCode.DataError.getValue(),
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "queryStack", ErrorCode.DataError.getValue(),
"Stack " + vfModuleName + " already exists and is " + "in UPDATED or UNKNOWN state");
logger.debug(error);
throw new VnfAlreadyExists(vfModuleName, cloudOwner, cloudSiteId, tenantId,
@@ -709,7 +708,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VF: Stack " + vfModuleName + " already exists in " + cloudOwner + "/"
+ cloudSiteId + "/" + tenantId;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_VNF_ALREADY_EXIST.toString(),
- vfModuleName, cloudOwner, cloudSiteId, tenantId, "OpenStack", "queryStack",
+ vfModuleName, cloudOwner, cloudSiteId, tenantId, OPENSTACK, "queryStack",
ErrorCode.DataError.getValue(), "Stack " + vfModuleName + " already exists");
logger.debug(error);
throw new VnfAlreadyExists(vfModuleName, cloudOwner, cloudSiteId, tenantId,
@@ -741,7 +740,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached heatStack ID Query " + nestedStackId + " in " + cloudOwner
+ "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "queryStack",
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "queryStack",
ErrorCode.BusinessProcesssError.getValue(), "MsoException trying to query nested stack", me);
logger.debug("ERROR trying to query nested stack= {}", error);
throw new VnfException(me);
@@ -750,7 +749,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached heatStack ID DOES NOT EXIST " + nestedStackId + " in "
+ cloudOwner + "/" + cloudSiteId + "/" + tenantId + " USER ERROR";
logger.error("{} {} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, error, "OpenStack", "queryStack",
+ cloudOwner, cloudSiteId, tenantId, error, OPENSTACK, "queryStack",
ErrorCode.BusinessProcesssError.getValue(),
"Create VFModule: Attached heatStack ID " + "DOES NOT EXIST");
logger.debug(error);
@@ -776,7 +775,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached baseHeatStack ID Query " + nestedBaseStackId + " in "
+ cloudOwner + "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "QueryStack",
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "QueryStack",
ErrorCode.BusinessProcesssError.getValue(), "MsoException trying to query nested base stack",
me);
logger.debug("ERROR trying to query nested base stack= {}", error);
@@ -786,7 +785,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule: Attached base heatStack ID DOES NOT EXIST " + nestedBaseStackId
+ " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId + " USER ERROR";
logger.error("{} {} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, error, "OpenStack", "QueryStack",
+ cloudOwner, cloudSiteId, tenantId, error, OPENSTACK, "QueryStack",
ErrorCode.BusinessProcesssError.getValue(),
"Create VFModule: Attached base heatStack ID DOES NOT EXIST");
logger.debug("Exception occurred", error);
@@ -821,7 +820,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error =
"Create vfModule error: Unable to find vfModuleCust with modelCustomizationUuid=" + mcu;
logger.error("{} {} {} {} {} {}", MessageEnum.RA_VNF_UNKNOWN_PARAM.toString(),
- "VF Module ModelCustomizationUuid", modelCustomizationUuid, "OpenStack",
+ "VF Module ModelCustomizationUuid", modelCustomizationUuid, OPENSTACK,
ErrorCode.DataError.getValue(),
"Create VF Module: Unable to find vfModule with " + "modelCustomizationUuid=" + mcu);
logger.debug(error);
@@ -850,7 +849,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
if (vnfResource == null) {
String error = "Create VNF: Unknown VNF Type: " + vnfType;
logger.error("{} {} {} {} {} {}", MessageEnum.RA_VNF_UNKNOWN_PARAM.toString(), "VNF Type", vnfType,
- "OpenStack", ErrorCode.DataError.getValue(), "Create VNF: Unknown VNF Type");
+ OPENSTACK, ErrorCode.DataError.getValue(), "Create VNF: Unknown VNF Type");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
}
@@ -923,7 +922,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
+ vnfResource.getModelUUID() + " VersionMin=" + minVersionVnf + " VersionMax:"
+ maxVersionVnf + " NOT supported on Cloud: " + cloudSiteId
+ " with AIC_Version:" + cloudSiteOpt.get().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);
@@ -966,7 +965,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "UpdateVF: No Heat Template ID defined in catalog database for " + vfModuleType
+ ", reqType=" + requestTypeString;
logger.error("{} {} {} {} {} {}", MessageEnum.RA_VNF_UNKNOWN_PARAM.toString(), "Heat Template ID",
- vfModuleType, "OpenStack", ErrorCode.DataError.getValue(), error);
+ vfModuleType, OPENSTACK, ErrorCode.DataError.getValue(), error);
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.INTERNAL);
} else {
@@ -980,7 +979,7 @@ public class MsoVnfAdapterImpl 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);
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.INTERNAL);
} else {
@@ -1161,7 +1160,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
if (checkRequiredParameters) {
// Problem - missing one or more required parameters
String error = "Create VFModule: Missing Required inputs: " + missingParams;
- logger.error("{} {} {} {} {}", MessageEnum.RA_MISSING_PARAM.toString(), missingParams, "OpenStack",
+ logger.error("{} {} {} {} {}", MessageEnum.RA_MISSING_PARAM.toString(), missingParams, OPENSTACK,
ErrorCode.DataError.getValue(), "Create VFModule: Missing Required inputs");
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -1227,7 +1226,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VF Module " + vfModuleType + " in " + cloudOwner + "/" + cloudSiteId + "/"
+ tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {}", MessageEnum.RA_CREATE_VNF_ERR.toString(), vfModuleType,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", ErrorCode.DataError.getValue(),
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, ErrorCode.DataError.getValue(),
"MsoException - createStack", me);
logger.debug(error);
if (isValetEnabled && sendResponseToValet) {
@@ -1246,7 +1245,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Create VFModule " + vfModuleType + " in " + cloudOwner + "/" + cloudSiteId + "/"
+ tenantId + ": " + npe;
logger.error("{} {} {} {} {} {} {} {}", MessageEnum.RA_CREATE_VNF_ERR.toString(), vfModuleType,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", ErrorCode.DataError.getValue(),
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, ErrorCode.DataError.getValue(),
"NullPointerException - createStack", npe);
logger.debug(error);
logger.debug("NULL POINTER EXCEPTION at heat.createStack");
@@ -1305,7 +1304,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Delete VFModule: Query to get outputs: " + vnfName + " in " + cloudOwner + "/" + cloudSiteId
+ "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vnfName, cloudOwner,
- cloudSiteId, tenantId, "OpenStack", "QueryStack", ErrorCode.DataError.getValue(),
+ cloudSiteId, tenantId, OPENSTACK, "QueryStack", ErrorCode.DataError.getValue(),
"Exception - QueryStack", me);
logger.debug(error);
throw new VnfException(me);
@@ -1338,7 +1337,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error =
"Delete VF: " + vnfName + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_DELETE_VNF_ERR.toString(), vnfName, cloudOwner,
- cloudSiteId, tenantId, "OpenStack", "DeleteStack", ErrorCode.DataError.getValue(),
+ cloudSiteId, tenantId, OPENSTACK, "DeleteStack", ErrorCode.DataError.getValue(),
"Exception - deleteStack", me);
logger.debug(error);
if (isValetEnabled && valetDeleteRequestSucceeded) {
@@ -1474,7 +1473,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Update VFModule: Query " + vfModuleName + " in " + cloudOwner + "/" + cloudSiteId + "/"
+ tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "QueryStack", ErrorCode.DataError.getValue(),
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "QueryStack", ErrorCode.DataError.getValue(),
"Exception - QueryStack", me);
logger.debug(error);
throw new VnfException(me);
@@ -1486,8 +1485,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Update VF: Stack " + vfModuleName + " does not exist in " + cloudOwner + "/" + cloudSiteId
+ "/" + tenantId;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_VNF_NOT_EXIST.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "QueryStack", ErrorCode.DataError.getValue(),
- error);
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "QueryStack", ErrorCode.DataError.getValue(), error);
throw new VnfNotFound(cloudSiteId, cloudOwner, tenantId, vfModuleName);
} else {
logger.debug("Found Existing stack, status={}", heatStack.getStatus());
@@ -1511,7 +1509,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Update VF: Attached heatStack ID Query " + nestedStackId + " in " + cloudOwner + "/"
+ cloudSiteId + "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vnfName, cloudOwner,
- cloudSiteId, tenantId, "OpenStack", "QueryStack", ErrorCode.DataError.getValue(),
+ cloudSiteId, tenantId, OPENSTACK, "QueryStack", ErrorCode.DataError.getValue(),
"Exception - " + error, me);
logger.debug("ERROR trying to query nested stack= {}", error);
throw new VnfException(me);
@@ -1520,7 +1518,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Update VFModule: Attached volume heatStack ID DOES NOT EXIST " + nestedStackId + " in "
+ cloudOwner + "/" + cloudSiteId + "/" + tenantId + " USER ERROR";
logger.error("{} {} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vnfName,
- cloudOwner, cloudSiteId, tenantId, error, "OpenStack", "QueryStack",
+ cloudOwner, cloudSiteId, tenantId, error, OPENSTACK, "QueryStack",
ErrorCode.DataError.getValue(), error);
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -1545,7 +1543,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Update VFModule: Attached baseHeatStack ID Query " + nestedBaseStackId + " in "
+ cloudOwner + "/" + cloudSiteId + "/" + tenantId + ": " + me;
logger.error("{} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, "OpenStack", "QueryStack", ErrorCode.DataError.getValue(),
+ cloudOwner, cloudSiteId, tenantId, OPENSTACK, "QueryStack", ErrorCode.DataError.getValue(),
"Exception - " + error, me);
logger.debug("ERROR trying to query nested base stack= {}", error);
throw new VnfException(me);
@@ -1554,7 +1552,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Update VFModule: Attached base heatStack ID DOES NOT EXIST " + nestedBaseStackId
+ " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId + " USER ERROR";
logger.error("{} {} {} {} {} {} {} {} {} {}", MessageEnum.RA_QUERY_VNF_ERR.toString(), vfModuleName,
- cloudOwner, cloudSiteId, tenantId, error, "OpenStack", "QueryStack",
+ cloudOwner, cloudSiteId, tenantId, error, OPENSTACK, "QueryStack",
ErrorCode.DataError.getValue(), error);
logger.debug(error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
@@ -1585,7 +1583,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
if (vf == null) {
String error = "Update VfModule: unable to find vfModule with modelCustomizationUuid=" + mcu;
logger.error("{} {} {} {} {} {}", MessageEnum.RA_VNF_UNKNOWN_PARAM.toString(), "VF Module Type",
- vfModuleType, "OpenStack", ErrorCode.DataError.getValue(), error);
+ vfModuleType, OPENSTACK, ErrorCode.DataError.getValue(), error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
}
logger.debug("Got VF module definition from Catalog: {}", vf.toString());
@@ -1665,7 +1663,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "VNF Resource type: " + vnfResource.getModelName() + " VersionMin="
+ minVersionVnf + " VersionMax:" + maxVersionVnf + " NOT supported on Cloud: "
+ cloudSiteId + " with AIC_Version:" + aicV;
- 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);
@@ -1697,7 +1695,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "UpdateVF: No Heat Template ID defined in catalog database for " + vfModuleType
+ ", reqType=" + requestTypeString;
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());
@@ -1706,7 +1704,7 @@ public class MsoVnfAdapterImpl 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);
throw new VnfException(error, MsoExceptionCategory.INTERNAL);
} else {
logger.debug("Got Heat Environment from DB: {}", heatEnvironment.getEnvironment());
@@ -1913,7 +1911,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
// Problem - missing one or more required parameters
if (checkRequiredParameters) {
String error = "Update VNF: Missing Required inputs: " + missingParams;
- logger.error("{} {} {} {} {}", MessageEnum.RA_MISSING_PARAM.toString(), missingParams, "OpenStack",
+ logger.error("{} {} {} {} {}", MessageEnum.RA_MISSING_PARAM.toString(), missingParams, OPENSTACK,
ErrorCode.DataError.getValue(), error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
} else {
@@ -1936,7 +1934,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
extraParams.removeAll(paramList);
if (!extraParams.isEmpty()) {
logger.warn("{} {} {} {} {} {}", MessageEnum.RA_VNF_EXTRA_PARAM.toString(), vnfType,
- extraParams.toString(), "OpenStack", ErrorCode.DataError.getValue(), "Extra params");
+ extraParams.toString(), OPENSTACK, ErrorCode.DataError.getValue(), "Extra params");
inputs.keySet().removeAll(extraParams);
}
}
@@ -2000,7 +1998,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String error = "Update VFModule " + vfModuleType + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId
+ ": " + me;
logger.error("{} {} {} {} {} {} {} {}", MessageEnum.RA_UPDATE_VNF_ERR.toString(), vfModuleType, cloudOwner,
- cloudSiteId, tenantId, "OpenStack", ErrorCode.DataError.getValue(), "Exception - " + error, me);
+ cloudSiteId, tenantId, OPENSTACK, ErrorCode.DataError.getValue(), "Exception - " + error, me);
if (isValetEnabled && sendResponseToValet) {
logger.debug("valet is enabled, the orchestration failed - now sending rollback to valet");
try {
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 2ea7ff417c..9d6c944747 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
@@ -79,12 +79,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
private static Logger logger = LoggerFactory.getLogger(MsoVnfCloudifyAdapterImpl.class);
- private static final String MSO_CONFIGURATION_ERROR = "MsoConfigurationError";
- private static final String VNF_ADAPTER_SERVICE_NAME = "MSO-BPMN:MSO-VnfAdapter.";
- private static final String LOG_REPLY_NAME = "MSO-VnfAdapter:MSO-BPMN.";
private static final String CHECK_REQD_PARAMS = "org.onap.so.adapters.vnf.checkRequiredParameters";
- private static final String ADD_GET_FILES_ON_VOLUME_REQ = "org.onap.so.adapters.vnf.addGetFilesOnVolumeReq";
- private static final String CLOUDIFY_RESPONSE_SUCCESS = "Successfully received response from Cloudify";
private static final String CLOUDIFY = "Cloudify";
private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
@@ -105,16 +100,8 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
protected MsoCloudifyUtils cloudifyUtils;
/**
- * Health Check web method. Does nothing but return to show the adapter is deployed.
- */
- @Override
- public void healthCheck() {
- logger.debug("Health check call in VNF Cloudify Adapter");
- }
-
- /**
* DO NOT use that constructor to instantiate this class, the msoPropertiesfactory will be NULL.
- *
+ *
* @see MsoVnfCloudifyAdapterImpl#MsoVnfAdapterImpl(MsoPropertiesFactory, CloudConfigFactory)
*/
public MsoVnfCloudifyAdapterImpl() {
@@ -122,6 +109,14 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
}
/**
+ * Health Check web method. Does nothing but return to show the adapter is deployed.
+ */
+ @Override
+ public void healthCheck() {
+ logger.debug("Health check call in VNF Cloudify Adapter");
+ }
+
+ /**
* This is the "Create VNF" web service implementation. This function is now unsupported and will return an error.
*
*/
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java
index 440b0dae0a..7c6d251263 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/VnfAdapterRestV2.java
@@ -82,6 +82,7 @@ public class VnfAdapterRestV2 {
private static Logger logger = LoggerFactory.getLogger(VnfAdapterRestV2.class);
private static final String TESTING_KEYWORD = "___TESTING___";
private static final String RESP = ", resp=";
+ private static final String BRACKETS = "{} {} {} {}";
@Autowired
private VnfAdapterRestUtils vnfAdapterRestUtils;
@@ -134,7 +135,7 @@ public class VnfAdapterRestV2 {
t1.start();
} catch (Exception e) {
// problem handling delete, send generic failure as sync resp to caller
- logger.error("{} {} {} {}", MessageEnum.RA_DELETE_VNF_ERR.toString(), "deleteVfModule",
+ logger.error(BRACKETS, MessageEnum.RA_DELETE_VNF_ERR.toString(), "deleteVfModule",
ErrorCode.BusinessProcesssError.getValue(), "Exception in deleteVfModule", e);
return Response.serverError().build();
}
@@ -178,7 +179,7 @@ public class VnfAdapterRestV2 {
public void run() {
try {
String cloudsite = req.getCloudSiteId();
- Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
+ Holder<Map<String, String>> outputs = new Holder<>();
if (cloudsite != null && !cloudsite.equals(TESTING_KEYWORD)) {
// vnfAdapter.deleteVnf (req.getCloudSiteId(), req.getTenantId(), req.getVfModuleStackId(),
// req.getMsoRequest());
@@ -237,10 +238,10 @@ public class VnfAdapterRestV2 {
try {
int respStatus = HttpStatus.SC_OK;
QueryVfModuleResponse qryResp = new QueryVfModuleResponse(aaiVnfId, aaiVfModuleId, null, null, null);
- Holder<Boolean> vnfExists = new Holder<Boolean>();
- Holder<String> vfModuleId = new Holder<String>();
- Holder<VnfStatus> status = new Holder<VnfStatus>();
- Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
+ Holder<Boolean> vnfExists = new Holder<>();
+ Holder<String> vfModuleId = new Holder<>();
+ Holder<VnfStatus> status = new Holder<>();
+ Holder<Map<String, String>> outputs = new Holder<>();
// Support different Adapter Implementations
MsoVnfAdapter adapter = vnfAdapterRestUtils.getVnfAdapterImpl(mode, cloudSiteId);
@@ -308,7 +309,7 @@ public class VnfAdapterRestV2 {
t1.start();
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
- logger.error("{} {} {} {}", MessageEnum.RA_CREATE_VNF_ERR.toString(), "createVfModule",
+ logger.error(BRACKETS, MessageEnum.RA_CREATE_VNF_ERR.toString(), "createVfModule",
ErrorCode.BusinessProcesssError.getValue(), "Exception - createVfModule", e);
return Response.serverError().build();
}
@@ -353,9 +354,9 @@ public class VnfAdapterRestV2 {
logger.debug("CreateVfModuleTask start");
try {
// Synchronous Web Service Outputs
- Holder<String> vfModuleStackId = new Holder<String>();
- Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
- Holder<VnfRollback> vnfRollback = new Holder<VnfRollback>();
+ Holder<String> vfModuleStackId = new Holder<>();
+ Holder<Map<String, String>> outputs = new Holder<>();
+ Holder<VnfRollback> vnfRollback = new Holder<>();
String completeVnfVfModuleType = req.getVnfType() + "::" + req.getVfModuleType();
logger.debug("completeVnfVfModuleType=" + completeVnfVfModuleType);
@@ -423,7 +424,7 @@ public class VnfAdapterRestV2 {
t1.start();
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
- logger.error("{} {} {} {}", MessageEnum.RA_UPDATE_VNF_ERR.toString(), "updateVfModule",
+ logger.error(BRACKETS, MessageEnum.RA_UPDATE_VNF_ERR.toString(), "updateVfModule",
ErrorCode.BusinessProcesssError.getValue(), "Exception - updateVfModule", e);
return Response.serverError().build();
}
@@ -469,9 +470,9 @@ public class VnfAdapterRestV2 {
// MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl (msoPropertiesFactory, cloudConfigFactory);
// Synchronous Web Service Outputs
- Holder<String> vfModuleStackId = new Holder<String>();
- Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
- Holder<VnfRollback> vnfRollback = new Holder<VnfRollback>();
+ Holder<String> vfModuleStackId = new Holder<>();
+ Holder<Map<String, String>> outputs = new Holder<>();
+ Holder<VnfRollback> vnfRollback = new Holder<>();
String completeVnfVfModuleType = req.getVnfType() + "::" + req.getVfModuleType();
logger.debug("in updateVf - completeVnfVfModuleType=" + completeVnfVfModuleType);
@@ -535,7 +536,7 @@ public class VnfAdapterRestV2 {
t1.start();
} catch (Exception e) {
// problem handling create, send generic failure as sync resp to caller
- logger.error("{} {} {} {}", MessageEnum.RA_ROLLBACK_VNF_ERR.toString(), "rollbackVfModule",
+ logger.error(BRACKETS, MessageEnum.RA_ROLLBACK_VNF_ERR.toString(), "rollbackVfModule",
ErrorCode.BusinessProcesssError.getValue(), "Exception - rollbackVfModule", e);
return Response.serverError().build();
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java
index ced49e2313..bb2a9059b9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,28 +36,28 @@ import javax.xml.namespace.QName;
* The Java representation of XML content can consist of schema derived interfaces and classes representing the binding
* of schema type definitions, element declarations and model groups. Factory methods for each of these are provided in
* this class.
- *
+ *
*/
@XmlRegistry
public class ObjectFactory {
private static final String URL = "http://org.onap.so/vnfNotify";
- private final static QName _QueryVnfNotification_QNAME = new QName(URL, "queryVnfNotification");
- private final static QName _RollbackVnfNotification_QNAME = new QName(URL, "rollbackVnfNotification");
- private final static QName _CreateVnfNotification_QNAME = new QName(URL, "createVnfNotification");
- private final static QName _DeleteVnfNotification_QNAME = new QName(URL, "deleteVnfNotification");
- private final static QName _UpdateVnfNotification_QNAME = new QName(URL, "updateVnfNotification");
+ private static final QName _QueryVnfNotification_QNAME = new QName(URL, "queryVnfNotification");
+ private static final QName _RollbackVnfNotification_QNAME = new QName(URL, "rollbackVnfNotification");
+ private static final QName _CreateVnfNotification_QNAME = new QName(URL, "createVnfNotification");
+ private static final QName _DeleteVnfNotification_QNAME = new QName(URL, "deleteVnfNotification");
+ private static final QName _UpdateVnfNotification_QNAME = new QName(URL, "updateVnfNotification");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package:
* org.onap.so.adapters.vnf.async.client
- *
+ *
*/
public ObjectFactory() {}
/**
* Create an instance of {@link UpdateVnfNotification }
- *
+ *
*/
public UpdateVnfNotification createUpdateVnfNotification() {
return new UpdateVnfNotification();
@@ -65,7 +65,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link UpdateVnfNotification.Outputs }
- *
+ *
*/
public UpdateVnfNotification.Outputs createUpdateVnfNotificationOutputs() {
return new UpdateVnfNotification.Outputs();
@@ -73,7 +73,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link CreateVnfNotification }
- *
+ *
*/
public CreateVnfNotification createCreateVnfNotification() {
return new CreateVnfNotification();
@@ -81,7 +81,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link CreateVnfNotification.Outputs }
- *
+ *
*/
public CreateVnfNotification.Outputs createCreateVnfNotificationOutputs() {
return new CreateVnfNotification.Outputs();
@@ -89,7 +89,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link QueryVnfNotification }
- *
+ *
*/
public QueryVnfNotification createQueryVnfNotification() {
return new QueryVnfNotification();
@@ -97,7 +97,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link QueryVnfNotification.Outputs }
- *
+ *
*/
public QueryVnfNotification.Outputs createQueryVnfNotificationOutputs() {
return new QueryVnfNotification.Outputs();
@@ -105,7 +105,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link RollbackVnfNotification }
- *
+ *
*/
public RollbackVnfNotification createRollbackVnfNotification() {
return new RollbackVnfNotification();
@@ -113,7 +113,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link DeleteVnfNotification }
- *
+ *
*/
public DeleteVnfNotification createDeleteVnfNotification() {
return new DeleteVnfNotification();
@@ -121,7 +121,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link MsoRequest }
- *
+ *
*/
public MsoRequest createMsoRequest() {
return new MsoRequest();
@@ -129,7 +129,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link VnfRollback }
- *
+ *
*/
public VnfRollback createVnfRollback() {
return new VnfRollback();
@@ -137,7 +137,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link UpdateVnfNotification.Outputs.Entry }
- *
+ *
*/
public UpdateVnfNotification.Outputs.Entry createUpdateVnfNotificationOutputsEntry() {
return new UpdateVnfNotification.Outputs.Entry();
@@ -145,7 +145,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link CreateVnfNotification.Outputs.Entry }
- *
+ *
*/
public CreateVnfNotification.Outputs.Entry createCreateVnfNotificationOutputsEntry() {
return new CreateVnfNotification.Outputs.Entry();
@@ -153,7 +153,7 @@ public class ObjectFactory {
/**
* Create an instance of {@link QueryVnfNotification.Outputs.Entry }
- *
+ *
*/
public QueryVnfNotification.Outputs.Entry createQueryVnfNotificationOutputsEntry() {
return new QueryVnfNotification.Outputs.Entry();
@@ -161,52 +161,47 @@ public class ObjectFactory {
/**
* Create an instance of {@link JAXBElement }{@code <}{@link QueryVnfNotification }{@code >}}
- *
+ *
*/
@XmlElementDecl(namespace = URL, name = "queryVnfNotification")
public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) {
- return new JAXBElement<QueryVnfNotification>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null,
- value);
+ return new JAXBElement<>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link RollbackVnfNotification }{@code >}}
- *
+ *
*/
@XmlElementDecl(namespace = URL, name = "rollbackVnfNotification")
public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) {
- return new JAXBElement<RollbackVnfNotification>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class,
- null, value);
+ return new JAXBElement<>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link CreateVnfNotification }{@code >}}
- *
+ *
*/
@XmlElementDecl(namespace = URL, name = "createVnfNotification")
public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) {
- return new JAXBElement<CreateVnfNotification>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null,
- value);
+ return new JAXBElement<>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link DeleteVnfNotification }{@code >}}
- *
+ *
*/
@XmlElementDecl(namespace = URL, name = "deleteVnfNotification")
public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) {
- return new JAXBElement<DeleteVnfNotification>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null,
- value);
+ return new JAXBElement<>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link UpdateVnfNotification }{@code >}}
- *
+ *
*/
@XmlElementDecl(namespace = URL, name = "updateVnfNotification")
public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) {
- return new JAXBElement<UpdateVnfNotification>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null,
- value);
+ return new JAXBElement<>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/QueryVnfNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/QueryVnfNotification.java
index 8968851fe1..8681070972 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/QueryVnfNotification.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/QueryVnfNotification.java
@@ -310,7 +310,7 @@ public class QueryVnfNotification {
*/
public List<QueryVnfNotification.Outputs.Entry> getEntry() {
if (entry == null) {
- entry = new ArrayList<QueryVnfNotification.Outputs.Entry>();
+ entry = new ArrayList<>();
}
return this.entry;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/UpdateVnfNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/UpdateVnfNotification.java
index b738d6dc64..968b3767c3 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/UpdateVnfNotification.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/UpdateVnfNotification.java
@@ -266,7 +266,7 @@ public class UpdateVnfNotification {
*/
public List<UpdateVnfNotification.Outputs.Entry> getEntry() {
if (entry == null) {
- entry = new ArrayList<UpdateVnfNotification.Outputs.Entry>();
+ entry = new ArrayList<>();
}
return this.entry;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify_Service.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify_Service.java
index e1a42706a9..073ea35f9e 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify_Service.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify_Service.java
@@ -37,9 +37,9 @@ import javax.xml.ws.WebServiceFeature;
wsdlLocation = "/VnfAdapterNotify.wsdl")
public class VnfAdapterNotify_Service extends Service {
- private final static URL VNFADAPTERNOTIFY_WSDL_LOCATION;
- private final static WebServiceException VNFADAPTERNOTIFY_EXCEPTION;
- private final static QName VNFADAPTERNOTIFY_QNAME = new QName("http://org.onap.so/vnfNotify", "vnfAdapterNotify");
+ private static final URL VNFADAPTERNOTIFY_WSDL_LOCATION;
+ private static final WebServiceException VNFADAPTERNOTIFY_EXCEPTION;
+ private static final QName VNFADAPTERNOTIFY_QNAME = new QName("http://org.onap.so/vnfNotify", "vnfAdapterNotify");
static {
VNFADAPTERNOTIFY_WSDL_LOCATION = org.onap.so.adapters.vnf.async.client.VnfAdapterNotify_Service.class
@@ -53,11 +53,11 @@ public class VnfAdapterNotify_Service extends Service {
}
public VnfAdapterNotify_Service() {
- super(__getWsdlLocation(), VNFADAPTERNOTIFY_QNAME);
+ super(getWsdlLocation(), VNFADAPTERNOTIFY_QNAME);
}
public VnfAdapterNotify_Service(WebServiceFeature... features) {
- super(__getWsdlLocation(), VNFADAPTERNOTIFY_QNAME, features);
+ super(getWsdlLocation(), VNFADAPTERNOTIFY_QNAME, features);
}
public VnfAdapterNotify_Service(URL wsdlLocation) {
@@ -98,7 +98,7 @@ public class VnfAdapterNotify_Service extends Service {
VnfAdapterNotify.class, features);
}
- private static URL __getWsdlLocation() {
+ private static URL getWsdlLocation() {
if (VNFADAPTERNOTIFY_EXCEPTION != null) {
throw VNFADAPTERNOTIFY_EXCEPTION;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
index dd64d53732..933b42e0b2 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
@@ -14,10 +14,6 @@ package org.onap.so.heatbridge.constants;
public class HeatBridgeConstants {
- private HeatBridgeConstants() {
- throw new IllegalStateException("Trying to instantiate a constants class.");
- }
-
/**
* Openstack related constants
*/
@@ -70,4 +66,9 @@ public class HeatBridgeConstants {
public static final String KEY_MSO_REQUEST_ID = "msoRequestId";
public static final String KEY_SO_WORKFLOW_EXCEPTION = "WorkflowException";
public static final String KEY_PROCESS_STATUS_MSG = "processStatusMsg";
+
+ private HeatBridgeConstants() {
+ throw new IllegalStateException("Trying to instantiate a constants class.");
+ }
+
}
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRoutesTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRoutesTest.java
index eb8912f56d..830d94cf85 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRoutesTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRoutesTest.java
@@ -27,8 +27,8 @@ public class ContrailSubnetHostRoutesTest {
@Test
public void testContrailSubnetHostRoutes() {
- cshr.setHost_routes(host_routes);
- assertEquals(cshr.getHost_routes(), host_routes);
+ cshr.setHostRoutes(host_routes);
+ assertEquals(cshr.getHostRoutes(), host_routes);
assert (cshr.toString() != null);
}
}
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 23c31f3298..50a555882d 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -2140,19 +2140,24 @@ public class ToscaResourceInstaller {
}
protected VnfResourceCustomization createVnfResource(NodeTemplate vfNodeTemplate,
- ToscaResourceStructure toscaResourceStructure, Service service) {
+ ToscaResourceStructure toscaResourceStructure, Service service) throws ArtifactInstallerException {
VnfResourceCustomization vnfResourceCustomization = null;
if (vnfResourceCustomization == null) {
VnfResource vnfResource = findExistingVnfResource(service,
vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
- if (vnfResource == null)
+ if (vnfResource == null) {
vnfResource = createVnfResource(vfNodeTemplate);
+ }
vnfResourceCustomization =
createVnfResourceCustomization(vfNodeTemplate, toscaResourceStructure, vnfResource);
vnfResourceCustomization.setVnfResources(vnfResource);
vnfResourceCustomization.setService(service);
+
+ // setting resource input for vnf customization
+ vnfResourceCustomization.setResourceInput(
+ getResourceInput(toscaResourceStructure, vnfResourceCustomization.getModelCustomizationUUID()));
vnfResource.getVnfResourceCustomizations().add(vnfResourceCustomization);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
index 28186528e4..18ba91263b 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
@@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,8 +58,8 @@ import org.springframework.stereotype.Component;
public class AAIDeleteTasks {
private static final Logger logger = LoggerFactory.getLogger(AAIDeleteTasks.class);
- private static String CONTRAIL_NETWORK_POLICY_FQDN_LIST = "contrailNetworkPolicyFqdnList";
- private static String NETWORK_POLICY_FQDN_PARAM = "network-policy-fqdn";
+ private static String contrailNetworkPolicyFqdnList = "contrailNetworkPolicyFqdnList";
+ private static String networkPolicyFqdnParam = "network-policy-fqdn";
@Autowired
private ExceptionBuilder exceptionUtil;
@@ -176,15 +176,15 @@ public class AAIDeleteTasks {
public void deleteNetworkPolicies(BuildingBlockExecution execution) {
try {
- String fqdns = execution.getVariable(CONTRAIL_NETWORK_POLICY_FQDN_LIST);
+ String fqdns = execution.getVariable(contrailNetworkPolicyFqdnList);
if (fqdns != null && !fqdns.isEmpty()) {
- String fqdnList[] = fqdns.split(",");
+ String[] fqdnList = fqdns.split(",");
int fqdnCount = fqdnList.length;
if (fqdnCount > 0) {
for (int i = 0; i < fqdnCount; i++) {
String fqdn = fqdnList[i];
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY);
- uri.queryParam(NETWORK_POLICY_FQDN_PARAM, fqdn);
+ uri.queryParam(networkPolicyFqdnParam, fqdn);
Optional<NetworkPolicies> oNetPolicies = aaiNetworkResources.getNetworkPolicies(uri);
if (oNetPolicies.isPresent()) {
NetworkPolicies networkPolicies = oNetPolicies.get();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java
index 01519fab6e..4cf5131747 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/Constants.java
@@ -2,6 +2,8 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -20,8 +22,7 @@
package org.onap.so.bpmn.infrastructure.adapter.vnfm.tasks;
-import static com.google.common.collect.Sets.newHashSet;
-import java.util.Set;
+import com.google.common.collect.ImmutableSet;
import org.onap.vnfmadapter.v1.model.OperationStateEnum;
import org.onap.vnfmadapter.v1.model.OperationStatusRetrievalStatusEnum;
@@ -51,11 +52,11 @@ public class Constants {
public static final String PRELOAD_VNFS_URL = "/restconf/config/VNF-API:preload-vnfs/vnf-preload-list/";
- public static final Set<OperationStateEnum> OPERATION_FINISHED_STATES =
- newHashSet(OperationStateEnum.COMPLETED, OperationStateEnum.FAILED, OperationStateEnum.ROLLED_BACK);
+ public static final ImmutableSet<OperationStateEnum> OPERATION_FINISHED_STATES =
+ ImmutableSet.of(OperationStateEnum.COMPLETED, OperationStateEnum.FAILED, OperationStateEnum.ROLLED_BACK);
- public static final Set<OperationStatusRetrievalStatusEnum> OPERATION_RETRIEVAL_STATES = newHashSet(
- OperationStatusRetrievalStatusEnum.STATUS_FOUND, OperationStatusRetrievalStatusEnum.WAITING_FOR_STATUS);
+ public static final ImmutableSet<OperationStatusRetrievalStatusEnum> OPERATION_RETRIEVAL_STATES = ImmutableSet
+ .of(OperationStatusRetrievalStatusEnum.STATUS_FOUND, OperationStatusRetrievalStatusEnum.WAITING_FOR_STATUS);
public static final String OPERATION_STATUS_PARAM_NAME = "operationStatus";
diff --git a/common/src/main/java/org/onap/so/client/RestClient.java b/common/src/main/java/org/onap/so/client/RestClient.java
index 0b10d85bbf..0b3aa651a0 100644
--- a/common/src/main/java/org/onap/so/client/RestClient.java
+++ b/common/src/main/java/org/onap/so/client/RestClient.java
@@ -28,7 +28,6 @@ import java.net.URL;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.Base64;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIClient.java b/common/src/main/java/org/onap/so/client/aai/AAIClient.java
index 131bc27783..a1e0d7c102 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIClient.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIClient.java
@@ -25,7 +25,6 @@ import javax.ws.rs.NotFoundException;
import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.RestClient;
import org.onap.so.client.graphinventory.GraphInventoryClient;
-import org.onap.so.client.graphinventory.GraphInventoryVersion;
import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri;
import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriComputationException;
import org.slf4j.Logger;
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java b/common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java
index 7029ffe5e4..66ea8f950e 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIClientResponseExceptionMapper.java
@@ -24,8 +24,6 @@ import java.io.IOException;
import java.util.Optional;
import javax.annotation.Priority;
import javax.ws.rs.ext.Provider;
-import javax.annotation.Priority;
-import javax.ws.rs.ext.Provider;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.client.ResponseExceptionMapper;
import org.onap.so.client.aai.entities.AAIError;
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java b/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java
index cd4e1125ce..6b2b6f2b3e 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java
@@ -36,9 +36,7 @@ import org.onap.aai.domain.yang.Configuration;
import org.onap.aai.domain.yang.Connector;
import org.onap.aai.domain.yang.Customer;
import org.onap.aai.domain.yang.Device;
-import org.onap.aai.domain.yang.EsrSystemInfoList;
import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.EsrVnfmList;
import org.onap.aai.domain.yang.ExtAaiNetwork;
import org.onap.aai.domain.yang.Flavor;
import org.onap.aai.domain.yang.GenericVnf;
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIRestClient.java b/common/src/main/java/org/onap/so/client/aai/AAIRestClient.java
index 6eafb965a2..b546aaa23e 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIRestClient.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIRestClient.java
@@ -23,11 +23,9 @@ package org.onap.so.client.aai;
import java.net.URI;
import java.util.Map;
import java.util.Optional;
-import javax.ws.rs.core.Response;
import org.onap.so.client.ResponseExceptionMapper;
import org.onap.so.client.graphinventory.GraphInventoryPatchConverter;
import org.onap.so.client.graphinventory.GraphInventoryRestClient;
-import org.onap.so.client.policy.CommonObjectMapperProvider;
import org.onap.so.utils.TargetEntity;
public class AAIRestClient extends GraphInventoryRestClient {
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java b/common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java
index 0d400339f9..b2223be688 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java
@@ -21,7 +21,6 @@
package org.onap.so.client.aai;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
public class AAIUpdatorImpl implements AAIUpdator {
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java b/common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java
index 3987d7375a..95ed01ee94 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java
@@ -25,7 +25,6 @@ import java.util.List;
import org.onap.aai.domain.yang.GenericVnf;
import org.onap.aai.domain.yang.Pserver;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
public class AAIValidatorImpl implements AAIValidator {
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
index 499246d7d1..91030d831a 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
@@ -25,7 +25,7 @@ import org.onap.so.client.graphinventory.GraphInventoryVersion;
public enum AAIVersion implements GraphInventoryVersion {
V13("v13"), V14("v14"), V15("v15");
- public final static AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1];
+ public static final AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1];
private final String value;
private AAIVersion(String value) {
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/CustomQuery.java b/common/src/main/java/org/onap/so/client/aai/entities/CustomQuery.java
index af7ccf661e..3433e36151 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/CustomQuery.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/CustomQuery.java
@@ -34,15 +34,6 @@ public class CustomQuery {
private String query;
private String gremlin;
- public String getGremlin() {
- return gremlin;
- }
-
- public void setGremlin(String gremlin) {
- this.gremlin = gremlin;
- }
-
-
public CustomQuery(List<AAIResourceUri> start) {
this.setStart(start);
}
@@ -56,6 +47,14 @@ public class CustomQuery {
this.gremlin = gremlin;
}
+ public String getGremlin() {
+ return gremlin;
+ }
+
+ public void setGremlin(String gremlin) {
+ this.gremlin = gremlin;
+ }
+
public List<String> getStart() {
return start;
}
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java b/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java
index 16a4c178e5..45f2c965f9 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java
@@ -23,7 +23,6 @@ package org.onap.so.client.aai.entities.bulkprocess;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java
index 5d28013c85..b2d67af156 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java
@@ -23,7 +23,6 @@ package org.onap.so.client.aai.entities.singletransaction;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java
index 7572541206..f2f99050db 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java
@@ -25,9 +25,7 @@ import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.aai.AAIObjectPlurals;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.graphinventory.Format;
-import org.onap.so.client.graphinventory.GraphInventoryObjectType;
import org.onap.so.client.graphinventory.entities.uri.Depth;
-import org.onap.so.client.graphinventory.entities.uri.GraphInventoryResourceUri;
import org.onap.so.client.graphinventory.entities.uri.SimpleUri;
public class AAISimpleUri extends SimpleUri implements AAIResourceUri {
diff --git a/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java b/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
index 1d85dac7dc..68b4e84448 100644
--- a/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
+++ b/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
@@ -23,7 +23,6 @@ package org.onap.so.client.dmaap.rest;
import java.net.URL;
import java.util.Map;
import org.onap.so.client.RestClient;
-import org.onap.so.utils.CryptoUtils;
import org.onap.so.utils.TargetEntity;
public class DMaaPRestClient extends RestClient {
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
index 992d1f017b..5fc8726427 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
@@ -27,8 +27,6 @@ import java.util.Optional;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.core.GenericType;
import org.onap.aai.domain.yang.Relationship;
-import org.onap.so.client.aai.AAIVersion;
-import org.onap.so.client.aai.entities.singletransaction.SingleTransactionRequest;
import org.onap.so.client.graphinventory.entities.GraphInventoryEdgeLabel;
import org.onap.so.client.graphinventory.entities.uri.GraphInventoryResourceUri;
import org.onap.so.client.graphinventory.exceptions.BulkProcessFailed;
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java
index 892951f950..6703416832 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java
@@ -27,10 +27,6 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Predicate;
-import org.onap.so.client.aai.AAICommonObjectMapperProvider;
-import org.onap.so.client.aai.AAIObjectType;
-import org.onap.so.client.aai.entities.AAIResultWrapper;
-import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
import org.onap.so.client.graphinventory.GraphInventoryObjectName;
import org.onap.so.client.graphinventory.GraphInventoryObjectType;
diff --git a/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java b/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java
index fa155de6a2..507f1130b5 100644
--- a/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java
+++ b/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java
@@ -22,11 +22,9 @@ package org.onap.so.client.grm;
import java.net.URI;
-import java.util.Base64;
import java.util.Map;
import java.util.Optional;
import org.onap.so.client.RestClient;
-import org.onap.so.client.RestProperties;
import org.onap.so.utils.TargetEntity;
public class GRMRestClient extends RestClient {
diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java
index 975f6bb9d8..5dbf88d346 100644
--- a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java
+++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java
@@ -21,34 +21,24 @@
package org.onap.so.logging.jaxrs.filter;
-import org.apache.commons.io.IOUtils;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.utils.TargetEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
-import org.slf4j.MarkerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.Priority;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.client.ClientResponseContext;
import javax.ws.rs.client.ClientResponseFilter;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Providers;
-import java.io.*;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
-import java.util.Map;
import java.util.UUID;
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
index 635d95be2e..4741f7f099 100644
--- a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
+++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
@@ -46,7 +46,6 @@ import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import com.fasterxml.jackson.databind.ObjectMapper;
@Priority(1)
@Provider
diff --git a/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java b/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java
index 8e7a95b581..fa5a5d5da4 100644
--- a/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java
+++ b/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java
@@ -30,7 +30,6 @@ import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.Providers;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
-import org.onap.so.logger.LogConstants;
import org.onap.so.logging.jaxrs.filter.MDCSetup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java b/common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java
index fc9bb388f4..9062f60280 100644
--- a/common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java
+++ b/common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java
@@ -22,7 +22,6 @@ package org.onap.so.openpojo.rules;
import static org.hamcrest.CoreMatchers.anything;
import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeDiagnosingMatcher;
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java b/common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java
index 53ce3884e9..7c1df67903 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java
@@ -23,7 +23,6 @@ package org.onap.so.serviceinstancebeans;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
@JsonInclude(Include.NON_DEFAULT)
public class GetOrchestrationResponse {
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
index 449aa4ba3f..3996d511a7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
@@ -928,21 +928,14 @@ public class E2EServiceInstances {
// subscriptionServiceType
requestParameters.setSubscriptionServiceType("MOG");
- // Userparams
- // List<E2EUserParam> userParams;
- // userParams =
- // e2eSir.getService().getParameters().getRequestParameters().getUserParams();
+
List<Map<String, Object>> userParamList = new ArrayList<>();
Map<String, Object> userParamMap = new HashMap<>();
// complete json request updated in the camunda
userParamMap.put("UUIRequest", requestJSON);
userParamMap.put("ServiceInstanceName", e2eSir.getService().getName());
- // Map<String, String> userParamMap3 = null;
- // for (E2EUserParam userp : userParams) {
- // userParamMap.put(userp.getName(), userp.getValue());
- //
- // }
+
userParamList.add(userParamMap);
requestParameters.setUserParams(userParamList);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
index 277675f310..401a6a9db6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/MsoRequest.java
@@ -574,7 +574,7 @@ public class MsoRequest {
throws JsonGenerationException, JsonMappingException, IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(Include.NON_NULL);
- // mapper.configure(Feature.WRAP_ROOT_VALUE, true);
+
logger.debug("building sir from object {}", sir);
String requestJSON = mapper.writeValueAsString(sir);
@@ -636,7 +636,7 @@ public class MsoRequest {
public String getVfModuleType(ServiceInstancesRequest sir, String requestScope, Actions action, int reqVersion) {
String serviceInstanceType = null;
- String networkType = null;
+
String vnfType = null;
String vfModuleType = null;
String vfModuleModelName = null;
@@ -800,6 +800,7 @@ public class MsoRequest {
selfLinkUrl = Optional.of(new URL(aUrl.getProtocol(), aUrl.getHost(), aUrl.getPort(), selfLinkPath));
} catch (Exception e) {
selfLinkUrl = Optional.empty(); // ignore
+ logger.info(e.getMessage());
}
return selfLinkUrl;
}
diff --git a/pom.xml b/pom.xml
index bc97b37ca2..aa8e987343 100644
--- a/pom.xml
+++ b/pom.xml
@@ -444,6 +444,7 @@
<goals>
<goal>format</goal>
</goals>
+ <phase>process-sources</phase>
<configuration>
<skip>${format.skipExecute}</skip>
<configFile>${base-path}/project-configs/code-tools/onap-eclipse-format.xml</configFile>
@@ -454,6 +455,7 @@
<goals>
<goal>format</goal>
</goals>
+ <phase>process-sources</phase>
<configuration>
<skip>${format.skipExecute}</skip>
<sourceDirectory>${project.basedir}</sourceDirectory>