aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java4
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java1
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNO.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java1
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java (renamed from bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncVlOperationTask.java)2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java (renamed from bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncVlOperationTaskEntityImpl.java)16
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncOperationTaskYangToolsImpl.java (renamed from bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncVlOperationTaskYangToolsImpl.java)9
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java61
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java48
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java10
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java113
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java98
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkTopologyRequestBodyBuilder.java5
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java83
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationInputEntity.java (renamed from bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/InputEntity.java)2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationOutputEntity.java (renamed from bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OutputEntity.java)2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OnapModelInformationEntity.java (renamed from bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/EcompModelInformationEntity.java)2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationInputEntity.java (renamed from bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRpcInputEntity.java)8
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationOutputEntity.java (renamed from bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRpcOutputEntity.java)8
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java39
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java39
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java41
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java51
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java72
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java83
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn270
-rw-r--r--common/src/main/java/org/openecomp/mso/db/AbstractSessionFactoryManager.java2
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java3
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java2
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java5
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java2
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java3
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java2
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java2
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java2
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java2
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java6
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java2
44 files changed, 982 insertions, 169 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java
index 3ba2ae25db..23230071c7 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java
@@ -56,9 +56,9 @@ public class CloudConfig {
private boolean validCloudConfig = false;
@JsonProperty("identity_services")
- private Map<String, CloudIdentity> identityServices = new HashMap<String, CloudIdentity>();
+ private Map<String, CloudIdentity> identityServices = new HashMap<>();
@JsonProperty("cloud_sites")
- private Map<String, CloudSite> cloudSites = new HashMap<String, CloudSite>();
+ private Map<String, CloudSite> cloudSites = new HashMap<>();
private static ObjectMapper mapper = new ObjectMapper();
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java
index 53fc7a55f1..9677d0ee1c 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigIdentityMapper.java
@@ -23,6 +23,7 @@ package org.openecomp.mso.cloud;
* This interface provides the method signature for mapping registration.
* All mappings should be registered by the implementing class.
*/
+@FunctionalInterface
public interface CloudConfigIdentityMapper {
public void registerAllMappings();
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java
index f40c7d9882..41f70e4492 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeAbstract.java
@@ -72,7 +72,7 @@ public abstract class IdentityAuthenticationTypeAbstract {
@Override
public final boolean equals(Object other) {
- return ((this.identityType != null) && (other != null) && (other instanceof IdentityAuthenticationTypeAbstract) && (this.identityType.equals(other.toString())));
+ return (this.identityType != null) && (other != null) && (other instanceof IdentityAuthenticationTypeAbstract) && (this.identityType.equals(other.toString()));
}
@Override
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNO.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNO.java
index e573c41a70..caa3ff58e9 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNO.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNO.java
@@ -47,7 +47,7 @@ public class SDNO implements Serializable
@JsonProperty("body")
private Body body;
@JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+ private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = -5303297382564282650L;
@JsonProperty("operation")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
index ec628e7659..950dc7b83b 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
@@ -22,6 +22,7 @@ package org.openecomp.mso.client.sdno;
import java.io.IOException;
+@FunctionalInterface
public interface SDNOValidator {
void healthDiagnostic(String vnfName, String uuid) throws IOException, Exception;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncVlOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
index f6f922f706..0f384096cb 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncVlOperationTask.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
@@ -37,7 +37,7 @@ import java.util.Map;
/**
* Created by 10112215 on 2017/9/16.
*/
-public abstract class AbstractSdncVlOperationTask extends BaseTask {
+public abstract class AbstractSdncOperationTask extends BaseTask {
private static final String DEFAULT_MSB_IP = "127.0.0.1";
private static final int DEFAULT_MSB_Port = 10081;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncVlOperationTaskEntityImpl.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
index 4781ec1528..9e0b4f7806 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncVlOperationTaskEntityImpl.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
@@ -24,8 +24,8 @@ import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.openecomp.mso.bpmn.core.WorkflowException;
import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.GenericResourceApi;
import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder.NetworkRpcInputEntityBuilder;
-import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.NetworkRpcInputEntity;
-import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.NetworkRpcOutputEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationInputEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationOutputEntity;
import org.openecomp.mso.requestsdb.RequestsDbConstant;
import java.util.Map;
@@ -33,23 +33,23 @@ import java.util.Map;
/**
* Created by 10112215 on 2017/9/20.
*/
-public class SdncVlOperationTaskEntityImpl extends AbstractSdncVlOperationTask {
+public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask {
@Override
public void sendRestrequestAndHandleResponse(DelegateExecution execution,
Map<String, String> inputs,
GenericResourceApi genericResourceApiClient) throws Exception {
updateProgress(execution, null, null, "40", "sendRestrequestAndHandleResponse begin!");
NetworkRpcInputEntityBuilder builder = new NetworkRpcInputEntityBuilder();
- NetworkRpcInputEntity body = builder.build(inputs);
+ RpcNetworkTopologyOperationInputEntity inputEntity = builder.build(execution, inputs);
updateProgress(execution, null, null, "50", "RequestBody build finished!");
- NetworkRpcOutputEntity networkRpcOutputEntiy = genericResourceApiClient.postNetworkTopologyPeration(body).execute().body();
+ RpcNetworkTopologyOperationOutputEntity outputEntity = genericResourceApiClient.postNetworkTopologyOperation(inputEntity).execute().body();
updateProgress(execution, null, null, "90", "sendRestrequestAndHandleResponse finished!");
- saveOutput(execution, networkRpcOutputEntiy);
+ saveOutput(execution, outputEntity);
}
- private void saveOutput(DelegateExecution execution, NetworkRpcOutputEntity output) throws Exception {
+ private void saveOutput(DelegateExecution execution, RpcNetworkTopologyOperationOutputEntity output) throws Exception {
String responseCode = output.getOutput().getResponseCode();
- if (!responseCode.equals("200")) {
+ if (!"200".equals(responseCode)) {
String processKey = getProcessKey(execution);
int errorCode = Integer.valueOf(responseCode);
String errorMessage = output.getOutput().getResponseMessage();
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncVlOperationTaskYangToolsImpl.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncOperationTaskYangToolsImpl.java
index 8e7f8b5e8d..25727bdcd0 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncVlOperationTaskYangToolsImpl.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncOperationTaskYangToolsImpl.java
@@ -24,7 +24,6 @@ import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.NetworkTopologyOperationOutput;
-import org.opendaylight.yangtools.yang.binding.DataObject;
import org.openecomp.mso.bpmn.core.WorkflowException;
import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.GenericResourceApi;
import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder.NetworkTopologyRequestBodyBuilder;
@@ -37,16 +36,16 @@ import java.util.Map;
/**
* Created by 10112215 on 2017/9/20.
*/
-public class SdncVlOperationTaskYangToolsImpl extends AbstractSdncVlOperationTask {
+public class SdncOperationTaskYangToolsImpl extends AbstractSdncOperationTask {
public void sendRestrequestAndHandleResponse(DelegateExecution execution,
Map<String, String> inputs,
GenericResourceApi genericResourceApiClient) throws Exception {
updateProgress(execution, null, null, "40", "sendRestrequestAndHandleResponse begin!");
NetworkTopologyRequestBodyBuilder builder = new NetworkTopologyRequestBodyBuilder();
- RequestBody body = builder.build(inputs);
+ RequestBody body = builder.build(execution, inputs);
updateProgress(execution, null, null, "50", "RequestBody build finished!");
- ResponseBody responseBody = genericResourceApiClient.postNetworkTopologyPeration(body).execute().body();
+ ResponseBody responseBody = genericResourceApiClient.postNetworkTopologyOperation(body).execute().body();
updateProgress(execution, null, null, "90", "sendRestrequestAndHandleResponse finished!");
saveResponse(execution, responseBody);
}
@@ -56,7 +55,7 @@ public class SdncVlOperationTaskYangToolsImpl extends AbstractSdncVlOperationTas
NetworkTopologyOperationOutput output = (NetworkTopologyOperationOutput) java2jsonService.
transformRpcDataObjectFromString(NetworkTopologyRequestBodyBuilder.URI_PATH, responseBody.string());
String responseCode = output.getResponseCode();
- if (!responseCode.equals("200")) {
+ if (!"200".equals(responseCode)) {
String processKey = getProcessKey(execution);
int errorCode = Integer.valueOf(responseCode);
String errorMessage = output.getResponseMessage();
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
new file mode 100644
index 0000000000..b5f312d71f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask;
+
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.GenericResourceApi;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder.ServiceRpcInputEntityBuilder;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcServiceTopologyOperationInputEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcServiceTopologyOperationOutputEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.ServiceTopologyOperationOutputEntity;
+import org.openecomp.mso.requestsdb.RequestsDbConstant;
+
+import java.util.Map;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask {
+ @Override
+ public void sendRestrequestAndHandleResponse(DelegateExecution execution,
+ Map<String, String> inputs,
+ GenericResourceApi genericResourceApiClient) throws Exception {
+ ServiceRpcInputEntityBuilder builder = new ServiceRpcInputEntityBuilder();
+ RpcServiceTopologyOperationInputEntity inputEntity = builder.build(execution, inputs);
+ RpcServiceTopologyOperationOutputEntity outputEntity = genericResourceApiClient.postServiceTopologyOperation(inputEntity).execute().body();
+ saveOutput(execution, outputEntity);
+ }
+
+ private void saveOutput(DelegateExecution execution, RpcServiceTopologyOperationOutputEntity output) throws Exception {
+ String responseCode = output.getOutput().getResponseCode();
+ if (!"200".equals(responseCode)) {
+ String processKey = getProcessKey(execution);
+ int errorCode = Integer.valueOf(responseCode);
+ String errorMessage = output.getOutput().getResponseMessage();
+ WorkflowException workflowException = new WorkflowException(processKey, errorCode, errorMessage);
+ execution.setVariable("SDNCA_SuccessIndicator", workflowException);
+ updateProgress(execution, RequestsDbConstant.Status.ERROR, String.valueOf(errorCode), null, errorMessage);
+ throw new Exception("");
+ }
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
index ac41202b7e..8832fe1a1c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
@@ -25,8 +25,8 @@ import org.onap.msb.sdk.httpclient.RestServiceCreater;
import org.onap.msb.sdk.httpclient.msb.MSBServiceClient;
import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.GenericResourceApi;
import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder.NetworkRpcInputEntityBuilder;
-import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.NetworkRpcInputEntity;
-import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.NetworkRpcOutputEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationInputEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationOutputEntity;
import org.openecomp.mso.logger.MsoLogger;
import org.openecomp.mso.requestsdb.RequestsDatabase;
import org.openecomp.mso.requestsdb.RequestsDbConstant;
@@ -67,11 +67,11 @@ public class SdncUnderlayVpnOperationClient {
public boolean sendRestrequestAndHandleResponse(Map<String, String> inputs, GenericResourceApi genericResourceApiClient){
updateProgress(null, null, "40", "sendRestrequestAndHandleResponse begin!");
NetworkRpcInputEntityBuilder builder = new NetworkRpcInputEntityBuilder();
- NetworkRpcInputEntity body = builder.build(inputs);
+ RpcNetworkTopologyOperationInputEntity body = builder.build(null, inputs);
updateProgress(null, null, "50", "RequestBody build finished!");
- NetworkRpcOutputEntity networkRpcOutputEntiy = null;
+ RpcNetworkTopologyOperationOutputEntity networkRpcOutputEntiy = null;
try {
- networkRpcOutputEntiy = genericResourceApiClient.postNetworkTopologyPeration(body).execute().body();
+ networkRpcOutputEntiy = genericResourceApiClient.postNetworkTopologyOperation(body).execute().body();
} catch (Exception e) {
e.printStackTrace();
updateProgress(RequestsDbConstant.Status.ERROR, null, null, "sendRestrequestAndHandleResponse exception:" + e.getMessage());
@@ -115,7 +115,7 @@ public class SdncUnderlayVpnOperationClient {
requestsDB.updateResOperStatus(resourceOperationStatus);
}
- private void saveOutput(NetworkRpcOutputEntity output) {
+ private void saveOutput(RpcNetworkTopologyOperationOutputEntity output) {
}
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java
new file mode 100644
index 0000000000..49ded45b4a
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.openecomp.mso.bpmn.core.BaseTask;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.requestsdb.ResourceOperationStatus;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class SdncUnderlayVpnPreprocessTask extends BaseTask {
+ public static final String RESOURCE_OPER_TYPE = "resourceOperType";
+ private RequestsDatabase requestsDB = RequestsDatabase.getInstance();
+
+ @Override
+ public void execute(DelegateExecution execution) {
+ String operType = getOperType(execution);
+ execution.setVariable(RESOURCE_OPER_TYPE, operType);
+ }
+
+ private String getOperType(DelegateExecution execution) {
+ String serviceId = (String) execution.getVariable("serviceId");
+ String operationId = (String) execution.getVariable("operationId");
+ String resourceTemplateUUID = (String) execution.getVariable("resourceTemplateUUID");
+ ResourceOperationStatus resourceOperationStatus = requestsDB.getResourceOperationStatus(serviceId, operationId, resourceTemplateUUID);
+ return resourceOperationStatus.getOperType();
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java
index c364589da0..62375afa20 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java
@@ -23,8 +23,7 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import org.onap.msb.sdk.httpclient.annotaion.ServiceHttpEndPoint;
-import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.NetworkRpcInputEntity;
-import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.NetworkRpcOutputEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.*;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;
@@ -36,10 +35,13 @@ import retrofit2.http.POST;
public interface GenericResourceApi {
@POST("/restconf/operations/GENERIC-RESOURCE-API:network-topology-operation")
- Call<ResponseBody> postNetworkTopologyPeration(@Body RequestBody input);
+ Call<ResponseBody> postNetworkTopologyOperation(@Body RequestBody input);
@POST("/restconf/operations/GENERIC-RESOURCE-API:network-topology-operation")
- Call<NetworkRpcOutputEntity> postNetworkTopologyPeration(@Body NetworkRpcInputEntity input);
+ Call<RpcNetworkTopologyOperationOutputEntity> postNetworkTopologyOperation(@Body RpcNetworkTopologyOperationInputEntity input);
+
+ @POST("/restconf/operations/GENERIC-RESOURCE-API:service-topology-operation")
+ Call<RpcServiceTopologyOperationOutputEntity> postServiceTopologyOperation(@Body RpcServiceTopologyOperationInputEntity input);
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java
index d4a1a1a5c6..91b95df1b2 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java
@@ -20,9 +20,118 @@
package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder;
+import org.apache.commons.lang3.StringUtils;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.request.information.RequestInformation;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.sdnc.request.header.SdncRequestHeader;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncUnderlayVpnPreprocessTask;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.OnapModelInformationEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.ParamEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.RequestInformationEntity;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.ServiceInformationEntity;
+import org.openecomp.mso.requestsdb.RequestsDbConstant;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
/**
* Created by 10112215 on 2017/9/20.
*/
-public interface AbstractBuilder<IN, OUT> {
- OUT build(IN input) throws Exception;
+public abstract class AbstractBuilder<IN, OUT> {
+ protected String requestId = null;
+
+ abstract OUT build(DelegateExecution execution, IN input) throws Exception;
+
+ protected String getRequestActoin(DelegateExecution execution) {
+ String action = RequestInformation.RequestAction.CreateNetworkInstance.name();
+ String operType = getOperType(execution);
+ if (!StringUtils.isBlank(operType)) {
+ if (RequestsDbConstant.OperationType.DELETE.equals(operType)) {
+ action = RequestInformation.RequestAction.DeleteNetworkInstance.name();
+ } else if (RequestsDbConstant.OperationType.CREATE.equals(operType)) {
+ action = RequestInformation.RequestAction.CreateNetworkInstance.name();
+ }
+ }
+ return action;
+ }
+
+ protected String getOperationType(DelegateExecution execution) {
+ String action = SdncRequestHeader.SvcAction.Create.name();
+ String operType = getOperType(execution);
+ if (!StringUtils.isBlank(operType)) {
+ if (RequestsDbConstant.OperationType.DELETE.equals(operType)) {
+ action = SdncRequestHeader.SvcAction.Delete.name();
+ } else if (RequestsDbConstant.OperationType.CREATE.equals(operType)) {
+ action = SdncRequestHeader.SvcAction.Create.name();
+ }
+ }
+ return action;
+ }
+
+ protected synchronized String getRequestId(DelegateExecution execution) {
+ if (StringUtils.isBlank(requestId)) {
+ requestId = (String) execution.getVariable("msoRequestId");
+ if (StringUtils.isBlank(requestId)) {
+ requestId = UUID.randomUUID().toString();
+ }
+ }
+ return requestId;
+ }
+
+ protected String getOperType(DelegateExecution execution) {
+ return (String) execution.getVariable(SdncUnderlayVpnPreprocessTask.RESOURCE_OPER_TYPE);
+ }
+
+ protected OnapModelInformationEntity getOnapModelInformationEntity(DelegateExecution execution) {
+ OnapModelInformationEntity onapModelInformationEntity = new OnapModelInformationEntity();
+ {
+ String modelInvariantUuid = (String) execution.getVariable("modelInvariantUuid");
+ String modelVersion = (String) execution.getVariable("modelVersion");
+ String modelUuid = (String) execution.getVariable("modelUuid");
+ String modelName = (String) execution.getVariable("modelName");
+ onapModelInformationEntity.setModelInvariantUuid(modelInvariantUuid);
+ onapModelInformationEntity.setModelVersion(modelVersion);
+ onapModelInformationEntity.setModelUuid(modelUuid);
+ onapModelInformationEntity.setModelName(modelName);
+ }
+ return onapModelInformationEntity;
+ }
+
+ protected List<ParamEntity> getParamEntities(Map<String, String> inputs) {
+ List<ParamEntity> paramEntityList = new ArrayList<>();
+ if (inputs != null && !inputs.isEmpty()) {
+ inputs.keySet().forEach(key -> {
+ ParamEntity paramEntity = new ParamEntity();
+ paramEntity.setName(key);
+ paramEntity.setValue(inputs.get(key));
+ paramEntityList.add(paramEntity);
+ });
+ }
+ return paramEntityList;
+ }
+
+ protected RequestInformationEntity getRequestInformationEntity(DelegateExecution execution) {
+ RequestInformationEntity requestInformationEntity = new RequestInformationEntity();
+ {
+ requestInformationEntity.setRequestId(getRequestId(execution));
+ requestInformationEntity.setRequestAction(getRequestActoin(execution));
+ }
+ return requestInformationEntity;
+ }
+
+ protected ServiceInformationEntity getServiceInformationEntity(DelegateExecution execution) {
+ ServiceInformationEntity serviceInformationEntity = new ServiceInformationEntity();
+ serviceInformationEntity.setServiceId((String) execution.getVariable("productFamilyId"));
+ serviceInformationEntity.setSubscriptionServiceType((String) execution.getVariable("subscriptionServiceType"));
+ serviceInformationEntity.setOnapModelInformation(getOnapModelInformationEntity(execution));
+ serviceInformationEntity.setServiceInstanceId((String) execution.getVariable("serviceInstanceId"));
+ serviceInformationEntity.setGlobalCustomerId((String) execution.getVariable("globalSubscriberId"));
+ return serviceInformationEntity;
+ }
+
+ protected String getServiceInstanceName(DelegateExecution execution) {
+ return (String) execution.getVariable("serviceInstanceName");
+ }
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java
index ae1b92c8e9..a1e47df501 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java
@@ -20,43 +20,26 @@
package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder;
-import org.apache.commons.lang3.StringUtils;
-import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.request.information.RequestInformation;
-import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.sdnc.request.header.SdncRequestHeader;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.*;
-import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by 10112215 on 2017/9/20.
*/
-public class NetworkRpcInputEntityBuilder implements AbstractBuilder<Map<String, String>, NetworkRpcInputEntity> {
+public class NetworkRpcInputEntityBuilder extends AbstractBuilder<Map<String, String>, RpcNetworkTopologyOperationInputEntity> {
- public static final String SVC_REQUEST_ID = "MSO";
- public static final String SDC_ACTION = "SDC_ACTION";
- public static final RequestInformation.RequestAction REQUEST_ACTION = RequestInformation.RequestAction.CreateNetworkInstance;
-
- protected NetworkRpcInputEntity getSdncEntityInput(Map<String, String> inputs) {
- NetworkRpcInputEntity networkRpcInputEntity = new NetworkRpcInputEntity();
- InputEntity inputEntity = new InputEntity();
- {
- loadSdncRequestHeaderEntity(inputs, inputEntity);
- loadRequestInformationEntity(inputEntity);
-
- ServiceInformationEntity serviceInformationEntity = new ServiceInformationEntity();
- String serviceId = inputs.get("serviceId");
- serviceInformationEntity.setServiceId(serviceId);
-
-
- loadNetwrokRequestInputEntity(inputs, inputEntity);
- }
- networkRpcInputEntity.setInput(inputEntity);
- return networkRpcInputEntity;
+ @Override
+ public RpcNetworkTopologyOperationInputEntity build(DelegateExecution execution, Map<String, String> inputs) {
+ RpcNetworkTopologyOperationInputEntity rpcNetworkTopologyOperationInputEntity = new RpcNetworkTopologyOperationInputEntity();
+ NetworkTopologyOperationInputEntity networkTopologyOperationInputEntity = getNetworkTopologyOperationInputEntity(execution, inputs);
+ rpcNetworkTopologyOperationInputEntity.setInput(networkTopologyOperationInputEntity);
+ return rpcNetworkTopologyOperationInputEntity;
}
- private void loadNetwrokRequestInputEntity(Map<String, String> inputs, InputEntity inputEntity) {
+ private void loadNetwrokRequestInputEntity(Map<String, String> inputs, NetworkTopologyOperationInputEntity networkTopologyOperationInputEntity) {
NetworkRequestInputEntity networkRequestInputEntity = new NetworkRequestInputEntity();
{
NetworkInputPaarametersEntity networkInputPaarametersEntity = new NetworkInputPaarametersEntity();
@@ -64,52 +47,47 @@ public class NetworkRpcInputEntityBuilder implements AbstractBuilder<Map<String,
List<ParamEntity> paramEntityList = getParamEntities(inputs);
networkInputPaarametersEntity.setParamList(paramEntityList);
}
-
}
- inputEntity.setNetworkRequestInput(networkRequestInputEntity);
+ networkTopologyOperationInputEntity.setNetworkRequestInput(networkRequestInputEntity);
}
- private List<ParamEntity> getParamEntities(Map<String, String> inputs) {
- List<ParamEntity> paramEntityList = new ArrayList<>();
- if (inputs != null && !inputs.isEmpty()) {
- inputs.keySet().forEach(key -> {
- ParamEntity paramEntity = new ParamEntity();
- paramEntity.setName(key);
- paramEntity.setValue(inputs.get(key));
- paramEntityList.add(paramEntity);
- });
- }
- return paramEntityList;
+ private void loadRequestInformationEntity(NetworkTopologyOperationInputEntity networkTopologyOperationInputEntity, DelegateExecution execution) {
+ RequestInformationEntity requestInformationEntity = getRequestInformationEntity(execution);
+ networkTopologyOperationInputEntity.setRequestInformation(requestInformationEntity);
}
- private void loadRequestInformationEntity(InputEntity inputEntity) {
- RequestInformationEntity requestInformationEntity = new RequestInformationEntity();
+ private void loadSdncRequestHeaderEntity(NetworkTopologyOperationInputEntity networkTopologyOperationInputEntity, DelegateExecution execution) {
+ SdncRequestHeaderEntity sdncRequestHeaderEntity = new SdncRequestHeaderEntity();
{
- requestInformationEntity.setRequestId(SVC_REQUEST_ID);
- requestInformationEntity.setRequestAction(REQUEST_ACTION.name());
+ sdncRequestHeaderEntity.setSvcRequestId(getRequestId(execution));
+ sdncRequestHeaderEntity.setSvcAction(getOperationType(execution));
}
- inputEntity.setRequestInformation(requestInformationEntity);
+ networkTopologyOperationInputEntity.setSdncRequestHeader(sdncRequestHeaderEntity);
}
- private void loadSdncRequestHeaderEntity(Map<String, String> inputs, InputEntity inputEntity) {
- SdncRequestHeaderEntity sdncRequestHeaderEntity = new SdncRequestHeaderEntity();
+ private void loadServiceInformation(NetworkTopologyOperationInputEntity networkTopologyOperationInputEntity, DelegateExecution execution) {
+ ServiceInformationEntity serviceInformationEntity = getServiceInformationEntity(execution);
+ networkTopologyOperationInputEntity.setServiceInformation(serviceInformationEntity);
+ }
+
+ private NetworkTopologyOperationInputEntity getNetworkTopologyOperationInputEntity(DelegateExecution execution, Map<String, String> inputs) {
+ NetworkTopologyOperationInputEntity networkTopologyOperationInputEntity = new NetworkTopologyOperationInputEntity();
{
- sdncRequestHeaderEntity.setSvcRequestId(SVC_REQUEST_ID);
- String action = inputs.get(SDC_ACTION);
- if (!StringUtils.isBlank(action)) {
- if (action.toLowerCase().contains("delete")) {
- action = SdncRequestHeader.SvcAction.Delete.name();
- } else if (action.toLowerCase().contains("create")) {
- action = SdncRequestHeader.SvcAction.Create.name();
- }
- }
- sdncRequestHeaderEntity.setSvcAction(action);
+ loadSdncRequestHeaderEntity(networkTopologyOperationInputEntity, execution);
+ loadRequestInformationEntity(networkTopologyOperationInputEntity, execution);
+ loadServiceInformation(networkTopologyOperationInputEntity, execution);
+ loadNetworkInformationEntity(execution, networkTopologyOperationInputEntity);
+ loadNetwrokRequestInputEntity(inputs, networkTopologyOperationInputEntity);
}
- inputEntity.setSdncRequestHeader(sdncRequestHeaderEntity);
+ return networkTopologyOperationInputEntity;
}
- @Override
- public NetworkRpcInputEntity build(Map<String, String> input) {
- return null;
+ private void loadNetworkInformationEntity(DelegateExecution execution, NetworkTopologyOperationInputEntity networkTopologyOperationInputEntity) {
+ NetworkInformationEntity networkInformationEntity = new NetworkInformationEntity();
+ {
+ OnapModelInformationEntity onapModelInformationEntity = getOnapModelInformationEntity(execution);
+ networkInformationEntity.setOnapModelInformation(onapModelInformationEntity);
+ }
+ networkTopologyOperationInputEntity.setNetworkInformation(networkInformationEntity);
}
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkTopologyRequestBodyBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkTopologyRequestBodyBuilder.java
index 4ccf659947..d5ba528911 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkTopologyRequestBodyBuilder.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkTopologyRequestBodyBuilder.java
@@ -22,6 +22,7 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builde
import okhttp3.RequestBody;
import org.apache.commons.lang3.StringUtils;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.json.JSONObject;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.NetworkTopologyOperationInput;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.NetworkTopologyOperationInputBuilder;
@@ -44,7 +45,7 @@ import java.util.Map;
/**
* Created by 10112215 on 2017/9/20.
*/
-public class NetworkTopologyRequestBodyBuilder implements AbstractBuilder<Map<String, String>, RequestBody> {
+public class NetworkTopologyRequestBodyBuilder extends AbstractBuilder<Map<String, String>, RequestBody> {
public static final String URI_PATH = "GENERIC-RESOURCE-API:network-topology-operation";
public static final SdncRequestHeader.SvcAction SVC_DEFAULT_ACTION = SdncRequestHeader.SvcAction.Create;
@@ -64,7 +65,7 @@ public class NetworkTopologyRequestBodyBuilder implements AbstractBuilder<Map<St
}
@Override
- public RequestBody build(Map<String, String> input) throws Exception {
+ public RequestBody build(DelegateExecution execution, Map<String, String> input) throws Exception {
NetworkTopologyOperationInput sdncInput = getSdncInput(input);
RequestBody body = getRequestBody(sdncInput);
return body;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java
new file mode 100644
index 0000000000..5cb9272564
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.*;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class ServiceRpcInputEntityBuilder extends AbstractBuilder<Map<String, String>, RpcServiceTopologyOperationInputEntity> {
+ @Override
+ public RpcServiceTopologyOperationInputEntity build(DelegateExecution execution, Map<String, String> inputs) throws Exception {
+ RpcServiceTopologyOperationInputEntity rpcServiceTopologyOperationInputEntity = new RpcServiceTopologyOperationInputEntity();
+ ServiceTopologyOperationInputEntity serviceTopologyOperationInputEntity = new ServiceTopologyOperationInputEntity();
+ {
+ loadSdncRequestHeaderEntity(serviceTopologyOperationInputEntity, execution);
+ loadRequestInformationEntity(serviceTopologyOperationInputEntity, execution);
+ loadServiceInformation(serviceTopologyOperationInputEntity, execution);
+ loadServiceRequestInputEntity(serviceTopologyOperationInputEntity, execution);
+ }
+ rpcServiceTopologyOperationInputEntity.setServiceTopologyOperationInputEntity(serviceTopologyOperationInputEntity);
+ return rpcServiceTopologyOperationInputEntity;
+ }
+
+ private void loadServiceRequestInputEntity(ServiceTopologyOperationInputEntity serviceTopologyOperationInputEntity, DelegateExecution execution) {
+ ServiceRequestInputEntity serviceRequestInputEntity = getServiceRequestInputEntity(execution);
+ serviceTopologyOperationInputEntity.setServiceRequestInput(serviceRequestInputEntity);
+ }
+
+ private ServiceRequestInputEntity getServiceRequestInputEntity(DelegateExecution execution) {
+ ServiceRequestInputEntity serviceRequestInputEntity = new ServiceRequestInputEntity();
+ serviceRequestInputEntity.setServiceInstanceName(getServiceInstanceName(execution));
+ return serviceRequestInputEntity;
+ }
+
+ private ServiceInputParametersEntity getServiceInputParametersEntity(Map<String, String> inputs) {
+ List<ParamEntity> paramEntityList = getParamEntities(inputs);
+ ServiceInputParametersEntity serviceInputParametersEntity = new ServiceInputParametersEntity();
+ serviceInputParametersEntity.setParamList(paramEntityList);
+ return serviceInputParametersEntity;
+ }
+
+ private void loadServiceInformation(ServiceTopologyOperationInputEntity serviceTopologyOperationInputEntity, DelegateExecution execution) {
+ ServiceInformationEntity serviceInformationEntity = getServiceInformationEntity(execution);
+ serviceTopologyOperationInputEntity.setServiceInformation(serviceInformationEntity);
+ }
+
+ private void loadRequestInformationEntity(ServiceTopologyOperationInputEntity serviceTopologyOperationInputEntity, DelegateExecution execution) {
+ RequestInformationEntity requestInformationEntity = getRequestInformationEntity(execution);
+ serviceTopologyOperationInputEntity.setRequestInformation(requestInformationEntity);
+ }
+
+ private void loadSdncRequestHeaderEntity(ServiceTopologyOperationInputEntity serviceTopologyOperationInputEntity, DelegateExecution execution) {
+ SdncRequestHeaderEntity sdncRequestHeaderEntity = new SdncRequestHeaderEntity();
+ {
+ sdncRequestHeaderEntity.setSvcRequestId(getRequestId(execution));
+ sdncRequestHeaderEntity.setSvcAction(getOperationType(execution));
+ }
+ serviceTopologyOperationInputEntity.setSdncRequestHeader(sdncRequestHeaderEntity);
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java
index 83ea7f950b..02ac6824a1 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java
@@ -32,8 +32,8 @@ public class NetworkInformationEntity {
@JsonProperty("network-type")
private String networkType;
- @JsonProperty("ecomp-model-information")
- private EcompModelInformationEntity ecompModelInformation;
+ @JsonProperty("onap-model-information")
+ private OnapModelInformationEntity onapModelInformation;
public String getNetworkId() {
return networkId;
@@ -51,11 +51,11 @@ public class NetworkInformationEntity {
this.networkType = networkType;
}
- public EcompModelInformationEntity getEcompModelInformation() {
- return ecompModelInformation;
+ public OnapModelInformationEntity getOnapModelInformation() {
+ return onapModelInformation;
}
- public void setEcompModelInformation(EcompModelInformationEntity ecompModelInformation) {
- this.ecompModelInformation = ecompModelInformation;
+ public void setOnapModelInformation(OnapModelInformationEntity onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
}
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java
index f5df5cb6e1..1aff6e948a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java
@@ -38,6 +38,9 @@ public class NetworkRequestInputEntity {
@JsonProperty("aic-clli")
private String aicClli;
+ @JsonProperty("network-input-parameters")
+ private NetworkInputPaarametersEntity networkInputPaarameters;
+
public String getNetworkName() {
return networkName;
}
@@ -77,7 +80,4 @@ public class NetworkRequestInputEntity {
public void setNetworkInputPaarameters(NetworkInputPaarametersEntity networkInputPaarameters) {
this.networkInputPaarameters = networkInputPaarameters;
}
-
- @JsonProperty("network-input-parameters")
- private NetworkInputPaarametersEntity networkInputPaarameters;
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/InputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationInputEntity.java
index a76fcba381..2fbc23e0cd 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/InputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationInputEntity.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by 10112215 on 2017/9/20.
*/
-public class InputEntity {
+public class NetworkTopologyOperationInputEntity {
@JsonProperty("sdnc-request-header")
private SdncRequestHeaderEntity sdncRequestHeader;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OutputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationOutputEntity.java
index f4a1fa109a..4be0844fc9 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OutputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationOutputEntity.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by 10112215 on 2017/9/22.
*/
-public class OutputEntity {
+public class NetworkTopologyOperationOutputEntity {
@JsonProperty("svc-request-id")
private String svcRequestId;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/EcompModelInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OnapModelInformationEntity.java
index df26d26baa..f061c9ab0a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/EcompModelInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OnapModelInformationEntity.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by 10112215 on 2017/9/20.
*/
-public class EcompModelInformationEntity {
+public class OnapModelInformationEntity {
@JsonProperty("model-invariant-uuid")
private String modelInvariantUuid;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRpcInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationInputEntity.java
index eb7a45a90b..ed8ae578a1 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRpcInputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationInputEntity.java
@@ -25,15 +25,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by 10112215 on 2017/9/20.
*/
-public class NetworkRpcInputEntity {
- public InputEntity getInput() {
+public class RpcNetworkTopologyOperationInputEntity {
+ public NetworkTopologyOperationInputEntity getInput() {
return input;
}
- public void setInput(InputEntity input) {
+ public void setInput(NetworkTopologyOperationInputEntity input) {
this.input = input;
}
@JsonProperty("input")
- private InputEntity input = null;
+ private NetworkTopologyOperationInputEntity input = null;
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRpcOutputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationOutputEntity.java
index 58e1116470..745d6c66b5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRpcOutputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationOutputEntity.java
@@ -25,15 +25,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by 10112215 on 2017/9/20.
*/
-public class NetworkRpcOutputEntity {
- public OutputEntity getOutput() {
+public class RpcNetworkTopologyOperationOutputEntity {
+ public NetworkTopologyOperationOutputEntity getOutput() {
return output;
}
- public void setOutput(OutputEntity output) {
+ public void setOutput(NetworkTopologyOperationOutputEntity output) {
this.output = output;
}
@JsonProperty("output")
- private OutputEntity output;
+ private NetworkTopologyOperationOutputEntity output;
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java
new file mode 100644
index 0000000000..5b49e11efd
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class RpcServiceTopologyOperationInputEntity {
+ public ServiceTopologyOperationInputEntity getServiceTopologyOperationInputEntity() {
+ return serviceTopologyOperationInputEntity;
+ }
+
+ public void setServiceTopologyOperationInputEntity(ServiceTopologyOperationInputEntity serviceTopologyOperationInputEntity) {
+ this.serviceTopologyOperationInputEntity = serviceTopologyOperationInputEntity;
+ }
+
+ @JsonProperty("input")
+ private ServiceTopologyOperationInputEntity serviceTopologyOperationInputEntity;
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java
new file mode 100644
index 0000000000..c59cc4eed1
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class RpcServiceTopologyOperationOutputEntity {
+ @JsonProperty("output")
+ private ServiceTopologyOperationOutputEntity output;
+
+ public ServiceTopologyOperationOutputEntity getOutput() {
+ return output;
+ }
+
+ public void setOutput(ServiceTopologyOperationOutputEntity output) {
+ this.output = output;
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java
index 7a79c9f21d..58d50fa724 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java
@@ -32,8 +32,8 @@ public class ServiceInformationEntity {
@JsonProperty("subscription-service-type")
private String subscriptionServiceType;
- @JsonProperty("ecomp-model-information")
- private EcompModelInformationEntity ecompModelInformation;
+ @JsonProperty("onap-model-information")
+ private OnapModelInformationEntity onapModelInformation;
@JsonProperty("service-instance-id")
private String serviceInstanceId;
@@ -60,12 +60,12 @@ public class ServiceInformationEntity {
this.subscriptionServiceType = subscriptionServiceType;
}
- public EcompModelInformationEntity getEcompModelInformation() {
- return ecompModelInformation;
+ public OnapModelInformationEntity getOnapModelInformation() {
+ return onapModelInformation;
}
- public void setEcompModelInformation(EcompModelInformationEntity ecompModelInformation) {
- this.ecompModelInformation = ecompModelInformation;
+ public void setOnapModelInformation(OnapModelInformationEntity onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
}
public String getServiceInstanceId() {
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java
new file mode 100644
index 0000000000..038c50c7c6
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class ServiceInputParametersEntity {
+ public List<ParamEntity> getParamList() {
+ return paramList;
+ }
+
+ public void setParamList(List<ParamEntity> paramList) {
+ this.paramList = paramList;
+ }
+
+ @JsonProperty("param")
+ private List<ParamEntity> paramList;
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java
new file mode 100644
index 0000000000..576995df49
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class ServiceRequestInputEntity {
+
+ @JsonProperty("service-instance-name")
+ private String serviceInstanceName;
+
+ @JsonProperty("service-input-parameters")
+ private ServiceInputParametersEntity serviceInputParametersEntity;
+
+ public String getServiceInstanceName() {
+ return serviceInstanceName;
+ }
+
+ public void setServiceInstanceName(String serviceInstanceName) {
+ this.serviceInstanceName = serviceInstanceName;
+ }
+
+ public ServiceInputParametersEntity getServiceInputParametersEntity() {
+ return serviceInputParametersEntity;
+ }
+
+ public void setServiceInputParametersEntity(ServiceInputParametersEntity serviceInputParametersEntity) {
+ this.serviceInputParametersEntity = serviceInputParametersEntity;
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java
new file mode 100644
index 0000000000..d817b0c52f
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class ServiceTopologyOperationInputEntity {
+ @JsonProperty("sdnc-request-header")
+ private SdncRequestHeaderEntity sdncRequestHeader;
+
+ @JsonProperty("request-information")
+ private RequestInformationEntity requestInformation;
+
+ @JsonProperty("service-information")
+ private ServiceInformationEntity serviceInformation;
+
+ @JsonProperty("service-request-input")
+ private ServiceRequestInputEntity serviceRequestInput;
+
+ public SdncRequestHeaderEntity getSdncRequestHeader() {
+ return sdncRequestHeader;
+ }
+
+ public void setSdncRequestHeader(SdncRequestHeaderEntity sdncRequestHeader) {
+ this.sdncRequestHeader = sdncRequestHeader;
+ }
+
+ public RequestInformationEntity getRequestInformation() {
+ return requestInformation;
+ }
+
+ public void setRequestInformation(RequestInformationEntity requestInformation) {
+ this.requestInformation = requestInformation;
+ }
+
+ public ServiceInformationEntity getServiceInformation() {
+ return serviceInformation;
+ }
+
+ public void setServiceInformation(ServiceInformationEntity serviceInformation) {
+ this.serviceInformation = serviceInformation;
+ }
+
+ public ServiceRequestInputEntity getServiceRequestInput() {
+ return serviceRequestInput;
+ }
+
+ public void setServiceRequestInput(ServiceRequestInputEntity serviceRequestInput) {
+ this.serviceRequestInput = serviceRequestInput;
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java
new file mode 100644
index 0000000000..ebc1ca807d
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Created by 10112215 on 2017/9/26.
+ */
+public class ServiceTopologyOperationOutputEntity {
+ @JsonProperty("svc-request-id")
+ private String svcRequestId;
+
+ @JsonProperty("response-code")
+ private String responseCode;
+
+ @JsonProperty("response-message")
+ private String responseMessage;
+
+ @JsonProperty("ack-final-indicator")
+ private String ackFinalIndicator;
+
+ @JsonProperty("service-response-information")
+ private ServiceResponseInformationEntity serviceResponseInformation;
+
+ public String getSvcRequestId() {
+ return svcRequestId;
+ }
+
+ public void setSvcRequestId(String svcRequestId) {
+ this.svcRequestId = svcRequestId;
+ }
+
+ public String getResponseCode() {
+ return responseCode;
+ }
+
+ public void setResponseCode(String responseCode) {
+ this.responseCode = responseCode;
+ }
+
+ public String getResponseMessage() {
+ return responseMessage;
+ }
+
+ public void setResponseMessage(String responseMessage) {
+ this.responseMessage = responseMessage;
+ }
+
+ public String getAckFinalIndicator() {
+ return ackFinalIndicator;
+ }
+
+ public void setAckFinalIndicator(String ackFinalIndicator) {
+ this.ackFinalIndicator = ackFinalIndicator;
+ }
+
+ public ServiceResponseInformationEntity getServiceResponseInformation() {
+ return serviceResponseInformation;
+ }
+
+ public void setServiceResponseInformation(ServiceResponseInformationEntity serviceResponseInformation) {
+ this.serviceResponseInformation = serviceResponseInformation;
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn
index b8e79a2508..f9525879b3 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUnderlayVpnOperation.bpmn
@@ -1,90 +1,292 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
- <bpmn:process id="Process_1" isExecutable="true">
+ <bpmn:process id="Process_1" name="no" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_0trm4dk</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:exclusiveGateway id="ExclusiveGateway_0vvnd7x" name="is response ok?" default="SequenceFlow_083crve">
- <bpmn:incoming>SequenceFlow_11dtpnr</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1vncx6p</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1amfirn</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_083crve</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="EndEvent_14p1b2x">
- <bpmn:incoming>SequenceFlow_1amfirn</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_10j9lbs</bpmn:incoming>
</bpmn:endEvent>
<bpmn:endEvent id="EndEvent_0urwhzh">
<bpmn:incoming>SequenceFlow_083crve</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0al8gdl</bpmn:incoming>
<bpmn:errorEventDefinition />
</bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0trm4dk" sourceRef="StartEvent_1" targetRef="Task_0brg0a4" />
- <bpmn:sequenceFlow id="SequenceFlow_11dtpnr" sourceRef="Task_0brg0a4" targetRef="ExclusiveGateway_0vvnd7x" />
- <bpmn:sequenceFlow id="SequenceFlow_1amfirn" name="ok" sourceRef="ExclusiveGateway_0vvnd7x" targetRef="EndEvent_14p1b2x">
+ <bpmn:sequenceFlow id="SequenceFlow_0trm4dk" sourceRef="StartEvent_1" targetRef="Task_0p43ddw" />
+ <bpmn:sequenceFlow id="SequenceFlow_1amfirn" name="ok" sourceRef="ExclusiveGateway_0vvnd7x" targetRef="ServiceTask_1uy6bdu">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("SendSdncResult")=='ok'}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_083crve" name="error" sourceRef="ExclusiveGateway_0vvnd7x" targetRef="EndEvent_0urwhzh" />
- <bpmn:serviceTask id="Task_0brg0a4" name="call sdnc network operation" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncVlOperationTaskEntityImpl">
+ <bpmn:serviceTask id="Task_0brg0a4" name="call sdnc network operation" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_0h35z1p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_07bp14s</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="Task_0p43ddw" name="call SdncUnderlayVpnPreprocessTask" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncUnderlayVpnPreprocessTask">
<bpmn:incoming>SequenceFlow_0trm4dk</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_11dtpnr</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_199ig0b</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0qsgg4i" name="Is create?" default="SequenceFlow_0h35z1p">
+ <bpmn:incoming>SequenceFlow_199ig0b</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1rj6k5t</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0h35z1p</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_199ig0b" sourceRef="Task_0p43ddw" targetRef="ExclusiveGateway_0qsgg4i" />
+ <bpmn:serviceTask id="Task_0rfvkh0" name="call SdncServiceTopologyOperationTask" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1rj6k5t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1vncx6p</bpmn:outgoing>
</bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1rj6k5t" name="yes" sourceRef="ExclusiveGateway_0qsgg4i" targetRef="Task_0rfvkh0">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("resourceOperType")=='create'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0h35z1p" name="no" sourceRef="ExclusiveGateway_0qsgg4i" targetRef="Task_0brg0a4" />
+ <bpmn:sequenceFlow id="SequenceFlow_1vncx6p" sourceRef="Task_0rfvkh0" targetRef="ExclusiveGateway_0vvnd7x" />
+ <bpmn:serviceTask id="ServiceTask_1uy6bdu" name="call sdnc network operation" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1amfirn</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0bsmh51</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0bsmh51" sourceRef="ServiceTask_1uy6bdu" targetRef="ExclusiveGateway_09xxhiu" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_09xxhiu" name="is response ok?" default="SequenceFlow_0al8gdl">
+ <bpmn:incoming>SequenceFlow_0bsmh51</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_10j9lbs</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0al8gdl</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_10j9lbs" name="ok" sourceRef="ExclusiveGateway_09xxhiu" targetRef="EndEvent_14p1b2x">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("SendSdncResult")=='ok'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1opobct" name="is response ok?" default="SequenceFlow_19glon5">
+ <bpmn:incoming>SequenceFlow_07bp14s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1oz5grh</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_19glon5</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:serviceTask id="ServiceTask_0dixxe6" name="call SdncServiceTopologyOperationTask" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn:incoming>SequenceFlow_1oz5grh</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_06e7qr6</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1x7erbs" name="is response ok?" default="SequenceFlow_1q83qn9">
+ <bpmn:incoming>SequenceFlow_06e7qr6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0koi1ia</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1q83qn9</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_1tt5u77">
+ <bpmn:incoming>SequenceFlow_0koi1ia</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:endEvent id="EndEvent_0ggbe9w">
+ <bpmn:incoming>SequenceFlow_19glon5</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1q83qn9</bpmn:incoming>
+ <bpmn:errorEventDefinition />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0al8gdl" name="error" sourceRef="ExclusiveGateway_09xxhiu" targetRef="EndEvent_0urwhzh" />
+ <bpmn:sequenceFlow id="SequenceFlow_07bp14s" sourceRef="Task_0brg0a4" targetRef="ExclusiveGateway_1opobct" />
+ <bpmn:sequenceFlow id="SequenceFlow_1oz5grh" name="ok" sourceRef="ExclusiveGateway_1opobct" targetRef="ServiceTask_0dixxe6">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("SendSdncResult")=='ok'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_06e7qr6" sourceRef="ServiceTask_0dixxe6" targetRef="ExclusiveGateway_1x7erbs" />
+ <bpmn:sequenceFlow id="SequenceFlow_0koi1ia" name="ok" sourceRef="ExclusiveGateway_1x7erbs" targetRef="EndEvent_1tt5u77">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("SendSdncResult")=='ok'}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_19glon5" name="error" sourceRef="ExclusiveGateway_1opobct" targetRef="EndEvent_0ggbe9w" />
+ <bpmn:sequenceFlow id="SequenceFlow_1q83qn9" name="error" sourceRef="ExclusiveGateway_1x7erbs" targetRef="EndEvent_0ggbe9w" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
- <dc:Bounds x="175" y="193" width="36" height="36" />
+ <dc:Bounds x="-38" y="193" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="148" y="229" width="90" height="20" />
+ <dc:Bounds x="-65" y="229" width="90" height="20" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0vvnd7x_di" bpmnElement="ExclusiveGateway_0vvnd7x" isMarkerVisible="true">
- <dc:Bounds x="561" y="186" width="50" height="50" />
+ <dc:Bounds x="593" y="26" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="546" y="240" width="80" height="12" />
+ <dc:Bounds x="578" y="80" width="80" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_14p1b2x_di" bpmnElement="EndEvent_14p1b2x">
- <dc:Bounds x="740" y="193" width="36" height="36" />
+ <dc:Bounds x="1058" y="33" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="758" y="233" width="0" height="12" />
+ <dc:Bounds x="1031" y="73" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0d0rf7s_di" bpmnElement="EndEvent_0urwhzh">
- <dc:Bounds x="740" y="347" width="36" height="36" />
+ <dc:Bounds x="1058" y="-150" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="758" y="387" width="0" height="12" />
+ <dc:Bounds x="1031" y="-110" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0trm4dk_di" bpmnElement="SequenceFlow_0trm4dk">
- <di:waypoint xsi:type="dc:Point" x="211" y="211" />
- <di:waypoint xsi:type="dc:Point" x="340" y="211" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="275.5" y="190" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_11dtpnr_di" bpmnElement="SequenceFlow_11dtpnr">
- <di:waypoint xsi:type="dc:Point" x="440" y="211" />
- <di:waypoint xsi:type="dc:Point" x="561" y="211" />
+ <di:waypoint xsi:type="dc:Point" x="-2" y="211" />
+ <di:waypoint xsi:type="dc:Point" x="100" y="211" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="500.5" y="190" width="0" height="12" />
+ <dc:Bounds x="4" y="190" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1amfirn_di" bpmnElement="SequenceFlow_1amfirn">
- <di:waypoint xsi:type="dc:Point" x="611" y="211" />
- <di:waypoint xsi:type="dc:Point" x="740" y="211" />
+ <di:waypoint xsi:type="dc:Point" x="643" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="743" y="51" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="669" y="190" width="13" height="12" />
+ <dc:Bounds x="686.5" y="30.000000000000014" width="13" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_083crve_di" bpmnElement="SequenceFlow_083crve">
- <di:waypoint xsi:type="dc:Point" x="586" y="236" />
- <di:waypoint xsi:type="dc:Point" x="586" y="365" />
- <di:waypoint xsi:type="dc:Point" x="740" y="365" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="26" />
+ <di:waypoint xsi:type="dc:Point" x="618" y="-132" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="-132" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="588" y="295" width="26" height="12" />
+ <dc:Bounds x="628.1578947368421" y="-151.89147286821705" width="26" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_035xqek_di" bpmnElement="Task_0brg0a4">
- <dc:Bounds x="340" y="171" width="100" height="80" />
+ <dc:Bounds x="392" y="379" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0bjsvlv_di" bpmnElement="Task_0p43ddw">
+ <dc:Bounds x="100" y="171" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0qsgg4i_di" bpmnElement="ExclusiveGateway_0qsgg4i" isMarkerVisible="true">
+ <dc:Bounds x="247.99837398373984" y="186" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="250" y="240" width="51" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_199ig0b_di" bpmnElement="SequenceFlow_199ig0b">
+ <di:waypoint xsi:type="dc:Point" x="200" y="211" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="211" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="224" y="190" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1omqxl9_di" bpmnElement="Task_0rfvkh0">
+ <dc:Bounds x="379" y="11" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rj6k5t_di" bpmnElement="SequenceFlow_1rj6k5t">
+ <di:waypoint xsi:type="dc:Point" x="273" y="186" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="379" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="279" y="112.5" width="19" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h35z1p_di" bpmnElement="SequenceFlow_0h35z1p">
+ <di:waypoint xsi:type="dc:Point" x="273" y="236" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="392" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="282" y="322" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vncx6p_di" bpmnElement="SequenceFlow_1vncx6p">
+ <di:waypoint xsi:type="dc:Point" x="479" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="593" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="536" y="30" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_1uy6bdu_di" bpmnElement="ServiceTask_1uy6bdu">
+ <dc:Bounds x="743" y="11" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bsmh51_di" bpmnElement="SequenceFlow_0bsmh51">
+ <di:waypoint xsi:type="dc:Point" x="843" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="942" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="892.5" y="30" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_09xxhiu_di" bpmnElement="ExclusiveGateway_09xxhiu" isMarkerVisible="true">
+ <dc:Bounds x="942" y="26" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="927" y="80" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10j9lbs_di" bpmnElement="SequenceFlow_10j9lbs">
+ <di:waypoint xsi:type="dc:Point" x="992" y="51" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="51" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1019" y="30" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1opobct_di" bpmnElement="ExclusiveGateway_1opobct" isMarkerVisible="true">
+ <dc:Bounds x="580" y="394" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="565" y="448" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0dixxe6_di" bpmnElement="ServiceTask_0dixxe6">
+ <dc:Bounds x="730" y="379" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1x7erbs_di" bpmnElement="ExclusiveGateway_1x7erbs" isMarkerVisible="true">
+ <dc:Bounds x="951" y="394" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="936" y="448" width="80" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1tt5u77_di" bpmnElement="EndEvent_1tt5u77">
+ <dc:Bounds x="1083" y="401" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1056" y="441" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ggbe9w_di" bpmnElement="EndEvent_0ggbe9w">
+ <dc:Bounds x="1093" y="585" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1066" y="625" width="0" height="12" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0al8gdl_di" bpmnElement="SequenceFlow_0al8gdl">
+ <di:waypoint xsi:type="dc:Point" x="967" y="26" />
+ <di:waypoint xsi:type="dc:Point" x="967" y="-132" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="-132" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="969" y="-59" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_07bp14s_di" bpmnElement="SequenceFlow_07bp14s">
+ <di:waypoint xsi:type="dc:Point" x="492" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="580" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="536" y="398" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1oz5grh_di" bpmnElement="SequenceFlow_1oz5grh">
+ <di:waypoint xsi:type="dc:Point" x="630" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="730" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="674" y="398" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_06e7qr6_di" bpmnElement="SequenceFlow_06e7qr6">
+ <di:waypoint xsi:type="dc:Point" x="830" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="951" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890.5" y="398" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0koi1ia_di" bpmnElement="SequenceFlow_0koi1ia">
+ <di:waypoint xsi:type="dc:Point" x="1001" y="419" />
+ <di:waypoint xsi:type="dc:Point" x="1083" y="419" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1036" y="398" width="13" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_19glon5_di" bpmnElement="SequenceFlow_19glon5">
+ <di:waypoint xsi:type="dc:Point" x="605" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="605" y="603" />
+ <di:waypoint xsi:type="dc:Point" x="1093" y="603" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="608" y="518" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1q83qn9_di" bpmnElement="SequenceFlow_1q83qn9">
+ <di:waypoint xsi:type="dc:Point" x="976" y="444" />
+ <di:waypoint xsi:type="dc:Point" x="976" y="603" />
+ <di:waypoint xsi:type="dc:Point" x="1093" y="603" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="978" y="518" width="26" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/common/src/main/java/org/openecomp/mso/db/AbstractSessionFactoryManager.java b/common/src/main/java/org/openecomp/mso/db/AbstractSessionFactoryManager.java
index d639978770..2988e30254 100644
--- a/common/src/main/java/org/openecomp/mso/db/AbstractSessionFactoryManager.java
+++ b/common/src/main/java/org/openecomp/mso/db/AbstractSessionFactoryManager.java
@@ -31,7 +31,7 @@ import java.util.concurrent.ConcurrentHashMap;
public abstract class AbstractSessionFactoryManager {
- protected static Map<String, SessionFactory> sessionFactories = new ConcurrentHashMap<String, SessionFactory>();
+ protected static Map<String, SessionFactory> sessionFactories = new ConcurrentHashMap<>();
protected synchronized SessionFactory initializeSessionFactory(URL hibernateConfigFile)
throws MsoDatabaseException {
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java
index 353246f576..b498259eed 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java
@@ -65,7 +65,7 @@ public class XMLValidator {
stringXsd = IOUtils.toString (xsdStream);
factory = SchemaFactory.newInstance (XMLConstants.W3C_XML_SCHEMA_NS_URI);
- factory.setResourceResolver ((new PathResourceResolver (XSDS_PATH)));
+ factory.setResourceResolver (new PathResourceResolver (XSDS_PATH));
factory.setFeature (XMLConstants.FEATURE_SECURE_PROCESSING, true);
String quotedXsd = stringXsd.replaceAll ("&#34;", "\"");
@@ -90,7 +90,7 @@ public class XMLValidator {
} catch (IOException | SAXException e) {
msoLogger.debug ("Exception: ", e);
- return ("ErrorDetails: " + e.getMessage ());
+ return "ErrorDetails: " + e.getMessage ();
} catch (Exception e) {
msoLogger.error (MessageEnum.APIH_CANNOT_READ_SCHEMA, "", "", MsoLogger.ErrorCode.SchemaError, "APIH cannot read schema file", e);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java
index 911808388f..91bf2df48c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java
@@ -46,4 +46,7 @@ public class Messages {
errors.put(ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB, "Could not communicate with MSO_CATALOG DB %s");
errors.put(ErrorNumbers.ERROR_FROM_CATALOG_DB, "Received error from MSO_CATALOG DB %s");
}
+
+ private Messages(){
+ }
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
index 455620784d..dd628bb863 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
@@ -87,7 +87,7 @@ public class HeatEnvironment extends MavenLikeVersioning implements Serializable
@Override
public String toString () {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append ("Artifact UUID=" + this.artifactUuid);
sb.append (", name=");
sb.append (name);
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
index e38e598d57..b90578d369 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
@@ -82,10 +82,13 @@ public class HeatFiles extends MavenLikeVersioning implements Serializable {
public void setAsdcUuid(String artifactUuid) {
this.artifactUuid = artifactUuid;
}
+
+ @Override
public String getVersion() {
return version;
}
+ @Override
public void setVersion(String version) {
this.version = version;
}
@@ -99,7 +102,7 @@ public class HeatFiles extends MavenLikeVersioning implements Serializable {
@Override
public String toString () {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append ("artifactUuid=" + this.artifactUuid);
if (this.description == null) {
sb.append(", description=null");
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java
index d59f49a533..eec0f410c6 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java
@@ -90,7 +90,7 @@ public class HeatNestedTemplate implements Serializable {
public int hashCode () {
// hash code does not have to be a unique result - only that two objects that should be treated as equal
// return the same value. so this should work.
- int result = 0;
+ int result;
result = this.parentTemplateId.hashCode() + this.childTemplateId.hashCode();
return result;
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
index b17fea460e..03813a7299 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
@@ -26,14 +26,11 @@ import java.text.DateFormat;
import java.util.Set;
import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
-import org.openecomp.mso.logger.MsoLogger;
public class HeatTemplate extends MavenLikeVersioning implements Serializable {
private static final long serialVersionUID = 768026109321305392L;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
-
private String artifactUuid;
private String templateName;
private String templateBody = null;
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java
index 96aa2c22bc..2c79d7d48c 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java
@@ -73,7 +73,7 @@ public class HeatTemplateArtifactUuidModelUuid implements Serializable {
public int hashCode () {
// hash code does not have to be a unique result - only that two objects that should be treated as equal
// return the same value. so this should work.
- int result = 0;
+ int result;
result = this.heatTemplateArtifactUuid.hashCode() + this.modelUuid.hashCode();
return result;
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java
index 68b881e652..7ceb19c5a0 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java
@@ -89,7 +89,7 @@ public class HeatTemplateParam implements Serializable {
@Override
public int hashCode () {
- int result = 0;
+ int result;
result = this.paramName == null ? 0 : this.paramName.hashCode() + this.heatTemplateArtifactUuid == null ? 0 : this.heatTemplateArtifactUuid.hashCode();
return result;
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
index f119259fd0..9ef1fb6fd3 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
@@ -45,7 +45,7 @@ public class NetworkRecipe extends Recipe implements Serializable {
@Override
public String toString () {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(super.toString());
sb.append (",modelName=" + modelName);
sb.append (",networkParamXSD=" + networkParamXSD);
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
index a3c8468cb1..b6151f176d 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
@@ -142,7 +142,7 @@ public class NetworkResource extends MavenLikeVersioning implements Serializable
@Override
public String toString () {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("NETWORK Resource:");
sb.append("modelVersion=");
sb.append(modelVersion);
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
index 19660f3fbb..ef09fef41f 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
@@ -104,7 +104,7 @@ public class NetworkResourceCustomization implements Serializable{
@Override
public String toString () {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("modelCustomizationUuid=");
sb.append(this.modelCustomizationUuid);
sb.append("networkResourceModelUuid=");
@@ -143,9 +143,9 @@ public class NetworkResourceCustomization implements Serializable{
public int hashCode () {
// hash code does not have to be a unique result - only that two objects that should be treated as equal
// return the same value. so this should work.
- int result = 0;
+ int result;
result = (this.modelCustomizationUuid != null ? this.modelCustomizationUuid.hashCode() : 0) + (this.networkResourceModelUuid != null ? this.networkResourceModelUuid.hashCode() : 0);
return result;
}
-} \ No newline at end of file
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java
index 3aad334a18..20801c105e 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java
@@ -91,7 +91,7 @@ public class TempNetworkHeatTemplateLookup implements Serializable {
public int hashCode () {
// hash code does not have to be a unique result - only that two objects that should be treated as equal
// return the same value. so this should work.
- int result = 0;
+ int result;
result = (this.networkResourceModelName != null ? this.networkResourceModelName.hashCode() : 0) + (this.heatTemplateArtifactUuid != null ? this.heatTemplateArtifactUuid.hashCode() : 0);
return result;
}