aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnet.java94
-rw-r--r--adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetIp.java23
-rw-r--r--adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetPool.java1
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java64
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/AAIRestClientImpl.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/entities/Results.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/policy/LoggingFilter.java15
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Body.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Input.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/RequestHealthDiagnostic.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/ResultInfo.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/vcpe/workflow/WorkflowAsyncVcpeResource.java3
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java4
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java17
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java2
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java2
17 files changed, 119 insertions, 134 deletions
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnet.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnet.java
index b755cad220..ec523b87d9 100644
--- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnet.java
+++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnet.java
@@ -34,22 +34,22 @@ import org.openecomp.mso.openstack.beans.Subnet;
import static org.openecomp.mso.openstack.utils.MsoCommonUtils.isNullOrEmpty;
public class ContrailSubnet {
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static MsoLogger logger = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
@JsonProperty("network_ipam_refs_data_ipam_subnets_subnet")
private ContrailSubnetIp subnet = new ContrailSubnetIp();
@JsonProperty("network_ipam_refs_data_ipam_subnets_default_gateway")
- private String default_gateway;
+ private String defaultGateway;
@JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_name")
- private String subnet_name;
+ private String subnetName;
@JsonProperty("network_ipam_refs_data_ipam_subnets_enable_dhcp")
- private Boolean enable_dhcp;
+ private Boolean enableDhcp;
@JsonProperty("network_ipam_refs_data_ipam_subnets_addr_from_start")
- private Boolean addr_from_start = true;
+ private Boolean addrFromStart = true;
/** future - leave this commented
private String subnet_uuid;
@@ -60,18 +60,18 @@ public class ContrailSubnet {
**/
@JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools")
- private List<ContrailSubnetPool> allocation_pools = new ArrayList <> ();
+ private List<ContrailSubnetPool> allocationPools = new ArrayList <> ();
public ContrailSubnet() {
super();
}
- public String getDefault_gateway() {
- return default_gateway;
+ public String getDefaultGateway() {
+ return defaultGateway;
}
- public void setDefault_gateway(String default_gateway) {
- this.default_gateway = default_gateway;
+ public void setDefaultGateway(String defaultGateway) {
+ this.defaultGateway = defaultGateway;
}
public ContrailSubnetIp getSubnet() {
@@ -82,36 +82,36 @@ public class ContrailSubnet {
this.subnet = subnet;
}
- public Boolean isEnable_dhcp() {
- return enable_dhcp;
+ public Boolean isEnableDhcp() {
+ return enableDhcp;
}
- public void setEnable_dhcp(Boolean enable_dhcp) {
- this.enable_dhcp = enable_dhcp;
+ public void setEnableDhcp(Boolean enableDhcp) {
+ this.enableDhcp = enableDhcp;
}
- public String getSubnet_name() {
- return subnet_name;
+ public String getSubnetName() {
+ return subnetName;
}
- public void setSubnet_name(String subnet_name) {
- this.subnet_name = subnet_name;
+ public void setSubnetName(String subnetName) {
+ this.subnetName = subnetName;
}
- public List<ContrailSubnetPool> getAllocation_pools() {
- return allocation_pools;
+ public List<ContrailSubnetPool> getAllocationPools() {
+ return allocationPools;
}
- public void setPools(List<ContrailSubnetPool> allocation_pools) {
- this.allocation_pools = allocation_pools;
+ public void setPools(List<ContrailSubnetPool> allocationPools) {
+ this.allocationPools = allocationPools;
}
- public Boolean isAddr_from_start() {
- return addr_from_start;
+ public Boolean isAddrFromStart() {
+ return addrFromStart;
}
- public void setAddr_from_start(Boolean addr_from_start) {
- this.addr_from_start = addr_from_start;
+ public void setAddrFromStart(Boolean addrFromStart) {
+ this.addrFromStart = addrFromStart;
}
public JsonNode toJsonNode()
@@ -124,8 +124,8 @@ public class ContrailSubnet {
}
catch (Exception e)
{
- String error = "Error creating JsonNode for Contrail Subnet:" + subnet_name;
- LOGGER.error (MessageEnum.RA_MARSHING_ERROR, error, "", "", MsoLogger.ErrorCode.SchemaError, "Exception creating JsonNode for Contrail Subnet", e);
+ String error = "Error creating JsonNode for Contrail Subnet:" + subnetName;
+ logger.error (MessageEnum.RA_MARSHING_ERROR, error, "", "", MsoLogger.ErrorCode.SchemaError, "Exception creating JsonNode for Contrail Subnet", e);
}
return node;
@@ -141,41 +141,41 @@ public class ContrailSubnet {
}
catch (Exception e)
{
- String error = "Error creating JsonString for Contrail Subnet:" + subnet_name;
- LOGGER.error (MessageEnum.RA_MARSHING_ERROR, error, "", "", MsoLogger.ErrorCode.SchemaError, "Exception creating JsonString for Contrail Subnet", e);
+ String error = "Error creating JsonString for Contrail Subnet:" + subnetName;
+ logger.error (MessageEnum.RA_MARSHING_ERROR, error, "", "", MsoLogger.ErrorCode.SchemaError, "Exception creating JsonString for Contrail Subnet", e);
}
return jsonString;
}
//poulate contrail subnet with input(from bopel) subnet
- public void populateWith(Subnet i_subnet)
+ public void populateWith(Subnet inputSubnet)
{
- if (i_subnet != null)
+ if (inputSubnet != null)
{
- if (!isNullOrEmpty(i_subnet.getSubnetName()))
- subnet_name = i_subnet.getSubnetName();
+ if (!isNullOrEmpty(inputSubnet.getSubnetName()))
+ subnetName = inputSubnet.getSubnetName();
else
- subnet_name = i_subnet.getSubnetId();
- enable_dhcp = i_subnet.getEnableDHCP();
- default_gateway = i_subnet.getGatewayIp();
- if (!isNullOrEmpty(i_subnet.getCidr()) )
+ subnetName = inputSubnet.getSubnetId();
+ enableDhcp = inputSubnet.getEnableDHCP();
+ defaultGateway = inputSubnet.getGatewayIp();
+ if (!isNullOrEmpty(inputSubnet.getCidr()) )
{
- int idx = i_subnet.getCidr().indexOf("/");
+ int idx = inputSubnet.getCidr().indexOf("/");
if (idx != -1)
{
- subnet.setIp_prefix(i_subnet.getCidr().substring(0, idx));
- subnet.setIp_prefix_len(i_subnet.getCidr().substring(idx+1));
+ subnet.setIpPrefix(inputSubnet.getCidr().substring(0, idx));
+ subnet.setIpPrefixLen(inputSubnet.getCidr().substring(idx+1));
}
}
- if (i_subnet.getAllocationPools() != null)
+ if (inputSubnet.getAllocationPools() != null)
{
- for (Pool pool : i_subnet.getAllocationPools())
+ for (Pool pool : inputSubnet.getAllocationPools())
{
if ( !isNullOrEmpty(pool.getStart()) && !isNullOrEmpty(pool.getEnd()) )
{
ContrailSubnetPool csp = new ContrailSubnetPool();
csp.populateWith(pool);
- allocation_pools.add (csp);
+ allocationPools.add (csp);
}
}
}
@@ -186,11 +186,11 @@ public class ContrailSubnet {
public String toString() {
StringBuilder buf = new StringBuilder ();
- for (ContrailSubnetPool pool : allocation_pools)
+ for (ContrailSubnetPool pool : allocationPools)
{
buf.append(pool.toString());
}
- return "ContrailSubnet [subnet=" + subnet.toString() + " default_gateway=" + default_gateway
- + " enable_dhcp=" + enable_dhcp + " addr_from_start=" + addr_from_start + " subnet_name=" + subnet_name + " allocation_pools=" + buf + " ]";
+ return "ContrailSubnet [subnet=" + subnet.toString() + " default_gateway=" + defaultGateway
+ + " enable_dhcp=" + enableDhcp + " addr_from_start=" + addrFromStart + " subnet_name=" + subnetName + " allocation_pools=" + buf + " ]";
}
}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetIp.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetIp.java
index ce7fec392c..b7af894f8b 100644
--- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetIp.java
+++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetIp.java
@@ -26,33 +26,34 @@ import org.codehaus.jackson.annotate.JsonProperty;
public class ContrailSubnetIp {
@JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix")
- private String ip_prefix;
+ private String ipPrefix;
@JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len")
- private String ip_prefix_len;
+ private String ipPrefixLen;
public ContrailSubnetIp() {
+ /* Empty constructor */
}
- public String getIp_prefix() {
- return ip_prefix;
+ public String getIpPrefix() {
+ return ipPrefix;
}
- public void setIp_prefix(String ip_prefix) {
- this.ip_prefix = ip_prefix;
+ public void setIpPrefix(String ipPrefix) {
+ this.ipPrefix = ipPrefix;
}
- public String getIp_prefix_len() {
- return ip_prefix_len;
+ public String getIpPrefixLen() {
+ return ipPrefixLen;
}
- public void setIp_prefix_len(String ip_prefix_len) {
- this.ip_prefix_len = ip_prefix_len;
+ public void setIpPrefixLen(String ipPrefixLen) {
+ this.ipPrefixLen = ipPrefixLen;
}
@Override
public String toString() {
- return "ContrailSubnetIp [ip_prefix=" + ip_prefix + ", ip_prefix_len=" + ip_prefix_len + "]";
+ return "ContrailSubnetIp [ip_prefix=" + ipPrefix + ", ip_prefix_len=" + ipPrefixLen + "]";
}
}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetPool.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetPool.java
index 71b9ebb4e2..6429e49e41 100644
--- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetPool.java
+++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetPool.java
@@ -32,6 +32,7 @@ public class ContrailSubnetPool {
private String end;
public ContrailSubnetPool() {
+ /* Empty constructor */
}
public String getStart() {
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index a5e9690252..f8a2c986da 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -21,7 +21,6 @@
package org.openecomp.mso.adapters.requestsdb;
import java.sql.Timestamp;
-import java.util.List;
import javax.jws.WebService;
@@ -43,7 +42,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
protected AbstractSessionFactoryManager requestsDbSessionFactoryManager = new RequestsDbSessionFactoryManager ();
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static MsoLogger logger = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
@Override
public void updateInfraRequest (String requestId,
@@ -110,90 +109,90 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
}
queryString += "lastModifiedBy = :lastModifiedBy where requestId = :requestId OR clientRequestId = :requestId";
- LOGGER.debug("Executing update: " + queryString);
+ logger.debug("Executing update: " + queryString);
Query query = session.createQuery (queryString);
query.setParameter ("requestId", requestId);
if (statusMessage != null) {
query.setParameter ("statusMessage", statusMessage);
- LOGGER.debug ("StatusMessage in updateInfraRequest is set to: " + statusMessage);
+ logger.debug ("StatusMessage in updateInfraRequest is set to: " + statusMessage);
}
if (responseBody != null) {
query.setParameter ("responseBody", responseBody);
- LOGGER.debug ("ResponseBody in updateInfraRequest is set to: " + responseBody);
+ logger.debug ("ResponseBody in updateInfraRequest is set to: " + responseBody);
}
if (requestStatus != null) {
query.setParameter ("requestStatus", requestStatus.toString ());
- LOGGER.debug ("RequestStatus in updateInfraRequest is set to: " + requestStatus.toString());
+ logger.debug ("RequestStatus in updateInfraRequest is set to: " + requestStatus.toString());
}
if (progress != null) {
query.setParameter ("progress", Long.parseLong (progress));
- LOGGER.debug ("Progress in updateInfraRequest is set to: " + progress);
+ logger.debug ("Progress in updateInfraRequest is set to: " + progress);
}
if (vnfOutputs != null) {
query.setParameter ("vnfOutputs", vnfOutputs);
- LOGGER.debug ("VnfOutputs in updateInfraRequest is set to: " + vnfOutputs);
+ logger.debug ("VnfOutputs in updateInfraRequest is set to: " + vnfOutputs);
}
if (serviceInstanceId != null) {
query.setParameter ("serviceInstanceId", serviceInstanceId);
- LOGGER.debug ("ServiceInstanceId in updateInfraRequest is set to: " + serviceInstanceId);
+ logger.debug ("ServiceInstanceId in updateInfraRequest is set to: " + serviceInstanceId);
}
if (networkId != null) {
query.setParameter ("networkId", networkId);
- LOGGER.debug ("NetworkId in updateInfraRequest is set to: " + networkId);
+ logger.debug ("NetworkId in updateInfraRequest is set to: " + networkId);
}
if (vnfId != null) {
query.setParameter ("vnfId", vnfId);
- LOGGER.debug ("VnfId in updateInfraRequest is set to: " + vnfId);
+ logger.debug ("VnfId in updateInfraRequest is set to: " + vnfId);
}
if (vfModuleId != null) {
query.setParameter ("vfModuleId", vfModuleId);
- LOGGER.debug ("vfModuleId in updateInfraRequest is set to: " + vfModuleId);
+ logger.debug ("vfModuleId in updateInfraRequest is set to: " + vfModuleId);
}
if (volumeGroupId != null) {
query.setParameter ("volumeGroupId", volumeGroupId);
- LOGGER.debug ("VolumeGroupId in updateInfraRequest is set to: " + volumeGroupId);
+ logger.debug ("VolumeGroupId in updateInfraRequest is set to: " + volumeGroupId);
}
if (serviceInstanceName != null) {
query.setParameter ("serviceInstanceName", serviceInstanceName);
- LOGGER.debug ("ServiceInstanceName in updateInfraRequest is set to: " + serviceInstanceName);
+ logger.debug ("ServiceInstanceName in updateInfraRequest is set to: " + serviceInstanceName);
}
if (vfModuleName != null) {
query.setParameter ("vfModuleName", vfModuleName);
- LOGGER.debug ("vfModuleName in updateInfraRequest is set to: " + vfModuleName);
+ logger.debug ("vfModuleName in updateInfraRequest is set to: " + vfModuleName);
}
Timestamp nowTimeStamp = new Timestamp (System.currentTimeMillis ());
if (requestStatus == RequestStatusType.COMPLETE || requestStatus == RequestStatusType.FAILED) {
query.setParameter ("endTime", nowTimeStamp);
- LOGGER.debug ("EndTime in updateInfraRequest is set to: " + nowTimeStamp);
+ logger.debug ("EndTime in updateInfraRequest is set to: " + nowTimeStamp);
} else {
query.setParameter ("modifyTime", nowTimeStamp);
- LOGGER.debug ("ModifyTime in updateInfraRequest is set to: " + nowTimeStamp);
+ logger.debug ("ModifyTime in updateInfraRequest is set to: " + nowTimeStamp);
}
query.setParameter ("lastModifiedBy", lastModifiedBy);
- LOGGER.debug ("LastModifiedBy in updateInfraRequest is set to: " + lastModifiedBy);
+ logger.debug ("LastModifiedBy in updateInfraRequest is set to: " + lastModifiedBy);
result = query.executeUpdate ();
- checkIfExists (result, requestId, startTime);
+ checkIfExists (result, requestId);
session.getTransaction ().commit ();
} catch (HibernateException e) {
String error = "Unable to update MSO Requests DB: " + e.getMessage ();
- LOGGER.error (MessageEnum.RA_CANT_UPDATE_REQUEST, "infra request parameters", requestId, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e);
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error);
+ logger.error (MessageEnum.RA_CANT_UPDATE_REQUEST, "infra request parameters", requestId, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e);
+ logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error);
throw new MsoRequestsDbException (error, e);
} finally {
if (session != null && session.isOpen ()) {
session.close ();
}
}
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+ logger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
}
- private void checkIfExists (int result, String requestId, long startTime) throws MsoRequestsDbException {
+ private void checkIfExists (int result, String requestId) throws MsoRequestsDbException {
if (result == 0) {
String error = "Request ID does not exist in MSO Requests DB: " + requestId;
- LOGGER.error (MessageEnum.RA_DB_REQUEST_NOT_EXIST, requestId, "", "", MsoLogger.ErrorCode.DataError, error);
+ logger.error (MessageEnum.RA_DB_REQUEST_NOT_EXIST, requestId, "", "", MsoLogger.ErrorCode.DataError, error);
throw new MsoRequestsDbException (error);
}
}
@@ -205,7 +204,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
MsoLogger.setLogContext (requestId, null);
Session session = requestsDbSessionFactoryManager.getSessionFactory ().openSession ();
- LOGGER.debug ("Call to MSO Infra RequestsDb adapter get method with request Id: " + requestId);
+ logger.debug ("Call to MSO Infra RequestsDb adapter get method with request Id: " + requestId);
InfraActiveRequests request = null;
try {
@@ -216,15 +215,15 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
} catch (HibernateException e) {
String error = "Unable to retrieve MSO Infra Requests DB for Request ID "
+ requestId;
- LOGGER.error (MessageEnum.RA_DB_REQUEST_NOT_EXIST, "Get Infra request", requestId, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e);
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error);
+ logger.error (MessageEnum.RA_DB_REQUEST_NOT_EXIST, "Get Infra request", requestId, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e);
+ logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error);
throw new MsoRequestsDbException (error, e);
} finally {
if (session != null && session.isOpen ()) {
session.close ();
}
}
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+ logger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
return request;
}
@@ -235,13 +234,14 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
* @param siteName The unique name of the site
* @return Status of that site
*/
+ @Override
public boolean getSiteStatus (String siteName) {
- UUIDChecker.generateUUID (LOGGER);
+ UUIDChecker.generateUUID (logger);
Session session = requestsDbSessionFactoryManager.getSessionFactory ().openSession ();
long startTime = System.currentTimeMillis ();
SiteStatus siteStatus = null;
- LOGGER.debug ("Request database - get Site Status with Site name:" + siteName);
+ logger.debug ("Request database - get Site Status with Site name:" + siteName);
try {
String hql = "FROM SiteStatus WHERE siteName = :site_name";
Query query = session.createQuery (hql);
@@ -255,10 +255,10 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
}
if (siteStatus == null) {
// if not exist in DB, it means the site is not disabled, thus return true
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+ logger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
return true;
} else {
- LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+ logger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
return siteStatus.getStatus();
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/AAIRestClientImpl.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/AAIRestClientImpl.java
index c58f22f949..ae8638f0b7 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/AAIRestClientImpl.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/AAIRestClientImpl.java
@@ -42,8 +42,6 @@ import org.onap.aai.domain.yang.Pservers;
import org.openecomp.mso.bpmn.core.PropertyConfiguration;
import org.openecomp.mso.client.aai.entities.CustomQuery;
import org.openecomp.mso.client.aai.entities.Results;
-import org.openecomp.mso.logger.MsoLogger;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
import org.springframework.stereotype.Service;
import com.fasterxml.jackson.core.JsonParseException;
@@ -56,15 +54,10 @@ public class AAIRestClientImpl implements AAIRestClient {
private final WebTarget webTarget;
- private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
-
- private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
-
private static final String ENDPOINT_VERSION = "v10";
private static final String ENDPOINT_GET_ALL = ENDPOINT_VERSION + "/cloud-infrastructure/pservers";
private static final String ENDPOINT_GET_ALL_VNFS = ENDPOINT_VERSION + "/network/generic-vnfs";
private static final String ENDPOINT_CUSTOM_QUERY = ENDPOINT_VERSION + "/query";
- private static final String PSERVER_BY_VNF_QUERY = "g.V().has('aai-node-type', 'generic-vnf').has('vnf-name','USAUTOUFTIL2001UJDM02').out('runsOnPserver').has('aai-node-type', 'pserver')";
private static final String PSERVER_VNF_QUERY = "pservers-fromVnf";
private static final String GENERIC_VNF_PATH = ENDPOINT_VERSION + "/network/generic-vnfs/generic-vnf";
private static final String SERVICE_TOPOLOGY_BY_SERVICE_INSTANCE_ID = "store(‘x’).union(__.in(‘subscribesTo’).has(‘aai-node-type’,’customer’).store(‘x’),__.out(‘uses’).has(‘aai-node-type’,’allotted-resource’).store(‘x’),__.in(‘hasInstance’).has(‘aai-node-type’,’generic-vnf’).store(‘x’).union("
@@ -92,7 +85,6 @@ public class AAIRestClientImpl implements AAIRestClient {
public AAIRestClientImpl(final String host) throws NoSuchAlgorithmException {
Logger logger = Logger.getLogger(getClass().getName());
Client client = this.getSSLClient();
- Map<String, String> properties = PropertyConfiguration.getInstance().getProperties("mso.bpmn.urn.properties");
webTarget = client.register(logger).register(new AAIClientResponseExceptionMapper()).target(host + "/aai");
}
@@ -107,7 +99,7 @@ public class AAIRestClientImpl implements AAIRestClient {
@Override
public List<Pserver> getPhysicalServerByVnfId(String vnfId, String transactionLoggingUuid)
throws JsonParseException, JsonMappingException, IOException {
- List<String> startNodes = new ArrayList<String>();
+ List<String> startNodes = new ArrayList<>();
startNodes.add("network/generic-vnfs/generic-vnf/" + vnfId);
String jsonInput = webTarget.register(AAIQueryObjectMapperProvider.class).path(ENDPOINT_CUSTOM_QUERY)
.queryParam("format", "resource").request().header("X-FromAppId", "MSO")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/entities/Results.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/entities/Results.java
index c9c12c4afb..aea223da56 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/entities/Results.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/aai/entities/Results.java
@@ -42,7 +42,7 @@ public class Results<T> {
public List<T> getResult() {
if (result == null) {
- result = new ArrayList<T>();
+ result = new ArrayList<>();
}
return this.result;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
index b164682bc7..26c1c4acd2 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
@@ -63,15 +63,7 @@ public class ApplicationControllerClient {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
- private static final int ACCEPT_SERIES = 100;
- private static final int ERROR_SERIES = 200;
- private static final int REJECT_SERIES = 300;
- private static final int SUCCESS_SERIES = 400;
- private static final int SUCCESS_STATUS = SUCCESS_SERIES + 0;
private static final int PARTIAL_SERIES = 500;
- private static final int PARTIAL_SUCCESS_STATUS = PARTIAL_SERIES + 0;
-
- private final boolean useLCMBypass = false;
private final String apiVer = "2.00";
private final String originatorId = "MSO";
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/policy/LoggingFilter.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/policy/LoggingFilter.java
index abd8543f84..665b9052eb 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/policy/LoggingFilter.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/policy/LoggingFilter.java
@@ -53,19 +53,20 @@ public class LoggingFilter implements ClientRequestFilter, ClientResponseFilter,
private InputStream logInboundEntity(final StringBuilder b, InputStream stream, final Charset charset)
throws IOException {
- if (!stream.markSupported()) {
- stream = new BufferedInputStream(stream);
+ InputStream inputStream = stream;
+ if (!inputStream.markSupported()) {
+ inputStream = new BufferedInputStream(inputStream);
}
- stream.mark(maxEntitySize + 1);
+ inputStream.mark(maxEntitySize + 1);
final byte[] entity = new byte[maxEntitySize + 1];
- final int entitySize = stream.read(entity);
+ final int entitySize = inputStream.read(entity);
b.append(new String(entity, 0, Math.min(entitySize, maxEntitySize), charset));
if (entitySize > maxEntitySize) {
b.append("...more...");
}
b.append('\n');
- stream.reset();
- return stream;
+ inputStream.reset();
+ return inputStream;
}
@Override
@@ -126,4 +127,4 @@ public class LoggingFilter implements ClientRequestFilter, ClientResponseFilter,
out.write(i);
}
}
-} \ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Body.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Body.java
index 3138349fd2..2db4dea069 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Body.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Body.java
@@ -41,7 +41,7 @@ public class Body implements Serializable
@JsonProperty("input")
private Input input;
@JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+ private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = 9101706044452851559L;
@JsonProperty("input")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Input.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Input.java
index 27efe03243..25eb2ed270 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Input.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/Input.java
@@ -41,7 +41,7 @@ public class Input implements Serializable
@JsonProperty("request-healthdiagnostic")
private RequestHealthDiagnostic RequestHealthDiagnostic;
@JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+ private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = 7155546785389227528L;
@JsonProperty("request-healthdiagnostic")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/RequestHealthDiagnostic.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/RequestHealthDiagnostic.java
index 20bd735ae2..b1ed77b513 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/RequestHealthDiagnostic.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/RequestHealthDiagnostic.java
@@ -59,7 +59,7 @@ public class RequestHealthDiagnostic implements Serializable
@JsonProperty("health-diagnostic-code")
private String healthDiagnosticCode;
@JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+ private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = 1166788526178388021L;
@JsonProperty("request-client-name")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/ResultInfo.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/ResultInfo.java
index 63894b9c16..0997b2df90 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/ResultInfo.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/ResultInfo.java
@@ -51,7 +51,7 @@ private String requestId;
@JsonProperty("status")
private String status;
@JsonIgnore
-private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+private Map<String, Object> additionalProperties = new HashMap<>();
@JsonProperty("client-name")
public String getClientName() {
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/vcpe/workflow/WorkflowAsyncVcpeResource.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/vcpe/workflow/WorkflowAsyncVcpeResource.java
index dbddbee928..b11a1d022d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/vcpe/workflow/WorkflowAsyncVcpeResource.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/vcpe/workflow/WorkflowAsyncVcpeResource.java
@@ -39,7 +39,8 @@ import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;
*/
@Path("/async")
public class WorkflowAsyncVcpeResource extends WorkflowAsyncResource {
-
+
+ @Override
protected ProcessEngineServices getProcessEngineServices() {
return pes4junit.orElse(ProcessEngines.getProcessEngine("vcpe"));
}
diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
index 9e43ee3512..60d65665fe 100644
--- a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
@@ -37,6 +37,7 @@ public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfig
private String resourceName;
+ @Override
protected void init() {
throw new IllegalArgumentException(
"Normal 'init' on process engine only used for extended MyBatis mappings is not allowed, please use 'initFromProcessEngineConfiguration'. You cannot construct a process engine with this configuration.");
@@ -55,7 +56,6 @@ public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfig
setDatabaseTablePrefix(processEngineConfiguration.getDatabaseTablePrefix());
initDataSource();
- //initVariableTypes();
initCommandContextFactory();
initTransactionFactory();
initTransactionContextFactory();
@@ -75,7 +75,7 @@ public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfig
*/
@Override
protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() {
- List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>();
+ List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<>();
defaultCommandInterceptorsTxRequired.add(new LogInterceptor());
defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true));
return defaultCommandInterceptorsTxRequired;
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java
index f63e12910c..27a310fd2d 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java
@@ -40,11 +40,7 @@ import org.openecomp.mso.apihandler.common.CommonConstants;
CommonConstants.REQUEST_DETAILS_VARIABLE})
@JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
public class BpmnRequest {
-
- public BpmnRequest() {
-
- }
-
+
@JsonProperty(CommonConstants.CAMUNDA_HOST)
private CamundaInput host;
@@ -89,8 +85,11 @@ public class BpmnRequest {
@JsonProperty(CommonConstants.REQUEST_DETAILS_VARIABLE)
private CamundaInput requestDetails;
-
-
+
+ public BpmnRequest() {
+ /* Empty constructor */
+
+ }
@JsonProperty(CommonConstants.CAMUNDA_HOST)
public CamundaInput getHost() {
@@ -246,9 +245,7 @@ public class BpmnRequest {
@Override
public String toString() {
- //return "CamundaRequest [requestId=" + + ", host="
- // + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid="
- // + svcid + ", timeout=" + timeout + "]";
+
return "BpmnRequest";
}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java
index 7c882bea1b..f73829688c 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java
@@ -21,7 +21,6 @@
package org.openecomp.mso.apihandler.camundabeans;
import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonRootName;
import org.openecomp.mso.apihandler.common.CommonConstants;
@@ -38,6 +37,7 @@ public class CamundaBpmnRequestInput {
public CamundaBpmnRequestInput() {
+ /* Empty constructor */
}
@JsonProperty(CommonConstants.CAMUNDA_VALUE)
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java
index 8a90db675c..0c69a76b14 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java
@@ -22,7 +22,6 @@ package org.openecomp.mso.apihandler.camundabeans;
import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonRootName;
import org.openecomp.mso.apihandler.common.CommonConstants;
@@ -42,6 +41,7 @@ public class CamundaInput {
public CamundaInput() {
+ /* Empty constructor */
}
@JsonProperty(CommonConstants.CAMUNDA_VALUE)