summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java346
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy36
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy47
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy26
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn146
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn5
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java3
14 files changed, 426 insertions, 210 deletions
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java
index 22d988f4e4..b04f3c30db 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vdu/mapper/VfModuleCustomizationToVduMapper.java
@@ -1,174 +1,174 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 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.adapters.vdu.mapper;
-
-import java.util.List;
-import java.util.Map;
-
-import org.openecomp.mso.adapters.vdu.VduArtifact;
-import org.openecomp.mso.adapters.vdu.VduArtifact.ArtifactType;
-import org.openecomp.mso.adapters.vdu.VduModelInfo;
-import org.openecomp.mso.db.catalog.CatalogDatabase;
-import org.openecomp.mso.db.catalog.beans.HeatEnvironment;
-import org.openecomp.mso.db.catalog.beans.HeatFiles;
-import org.openecomp.mso.db.catalog.beans.HeatTemplate;
-import org.openecomp.mso.db.catalog.beans.VfModuleCustomization;
-import org.openecomp.mso.logger.MsoLogger;
-import org.springframework.stereotype.Component;
-
-@Component
-public class VfModuleCustomizationToVduMapper {
-
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
-
- public VduModelInfo mapVfModuleCustomizationToVdu(VfModuleCustomization vfModuleCustom) throws Exception {
- CatalogDatabase db = CatalogDatabase.getInstance();
- VduModelInfo vduModel = new VduModelInfo();
- vduModel.setModelCustomizationUUID(vfModuleCustom.getModelCustomizationUuid());
- try {
- // Map the cloud templates, attached files, and environment file
- mapCloudTemplates(
- db.getHeatTemplateByArtifactUuid(vfModuleCustom.getVfModule().getHeatTemplateArtifactUUId()),
- vduModel);
- mapCloudFiles(vfModuleCustom, vduModel);
- mapEnvironment(db.getHeatEnvironmentByArtifactUuid(vfModuleCustom.getHeatEnvironmentArtifactUuid()),
- vduModel);
- } catch (Exception e) {
- LOGGER.debug("unhandled exception in mapVfModuleCustomizationToVdu", e);
- throw new Exception("Exception during mapVfModuleCustomizationToVdu " + e.getMessage());
- } finally {
- // Make sure DB session is closed
- db.close();
- }
-
- return vduModel;
- }
-
- public VduModelInfo mapVfModuleCustVolumeToVdu(VfModuleCustomization vfModuleCustom) throws Exception {
- CatalogDatabase db = CatalogDatabase.getInstance();
- VduModelInfo vduModel = new VduModelInfo();
- vduModel.setModelCustomizationUUID(vfModuleCustom.getModelCustomizationUuid());
- try {
- // Map the cloud templates, attached files, and environment file
- mapCloudTemplates(
- db.getHeatTemplateByArtifactUuid(vfModuleCustom.getVfModule().getVolHeatTemplateArtifactUUId()),
- vduModel);
- mapCloudFiles(vfModuleCustom, vduModel);
- mapEnvironment(db.getHeatEnvironmentByArtifactUuid(vfModuleCustom.getVolEnvironmentArtifactUuid()),
- vduModel);
- } catch (Exception e) {
- LOGGER.debug("unhandled exception in mapVfModuleCustVolumeToVdu", e);
- throw new Exception("Exception during mapVfModuleCustVolumeToVdu " + e.getMessage());
- } finally {
- // Make sure DB session is closed
- db.close();
- }
-
- return vduModel;
- }
-
- private void mapCloudTemplates(HeatTemplate heatTemplate, VduModelInfo vduModel) throws Exception {
- // TODO: These catalog objects will be refactored to be
- // non-Heat-specific
- CatalogDatabase db = CatalogDatabase.getInstance();
- try {
- List<VduArtifact> vduArtifacts = vduModel.getArtifacts();
-
- // Main template. Also set the VDU timeout based on the main
- // template.
- vduArtifacts.add(mapHeatTemplateToVduArtifact(heatTemplate, ArtifactType.MAIN_TEMPLATE));
- vduModel.setTimeoutMinutes(heatTemplate.getTimeoutMinutes());
-
- // Nested templates
- Map<String,Object> nestedTemplates = db.getNestedTemplates(heatTemplate.getArtifactUuid());
- if (nestedTemplates != null) {
- for (String name : nestedTemplates.keySet()) {
- String body = (String) nestedTemplates.get(name);
- VduArtifact vduArtifact = new VduArtifact(name, body.getBytes(), ArtifactType.NESTED_TEMPLATE);
- vduArtifacts.add(vduArtifact);
- }
- }
-
- } catch (Exception e) {
- LOGGER.debug("unhandled exception in mapCloudTemplates", e);
- throw new Exception("Exception during mapCloudTemplates " + e.getMessage());
- } finally {
- // Make sure DB session is closed
- db.close();
- }
- }
-
- private VduArtifact mapHeatTemplateToVduArtifact(HeatTemplate heatTemplate, ArtifactType artifactType) {
- VduArtifact vduArtifact = new VduArtifact();
- vduArtifact.setName(heatTemplate.getTemplateName());
- vduArtifact.setContent(heatTemplate.getHeatTemplate().getBytes());
- vduArtifact.setType(artifactType);
- return vduArtifact;
- }
-
- private void mapCloudFiles(VfModuleCustomization vfModuleCustom, VduModelInfo vduModel) throws Exception {
- // TODO: These catalog objects will be refactored to be
- // non-Heat-specific
- CatalogDatabase db = CatalogDatabase.getInstance();
-
- try{
- Map <String, HeatFiles> heatFiles = db.getHeatFilesForVfModule(vfModuleCustom.getVfModuleModelUuid());
- if (heatFiles != null) {
- for (HeatFiles heatFile: heatFiles.values()) {
- mapCloudFileToVduArtifact(heatFile, ArtifactType.TEXT_FILE);
- }
- }
- } catch (Exception e) {
- LOGGER.debug("unhandled exception in mapCloudFiles", e);
- throw new Exception("Exception during mapCloudFiles " + e.getMessage());
- } finally {
- // Make sure DB session is closed
- db.close();
- }
-
- }
-
- private VduArtifact mapCloudFileToVduArtifact(HeatFiles heatFile, ArtifactType artifactType) {
- VduArtifact vduArtifact = new VduArtifact();
- vduArtifact.setName(heatFile.getFileName());
- vduArtifact.setContent(heatFile.getFileBody().getBytes());
- vduArtifact.setType(artifactType);
- return vduArtifact;
- }
-
- private void mapEnvironment(HeatEnvironment heatEnvironment, VduModelInfo vduModel) {
- // TODO: These catalog objects will be refactored to be
- // non-Heat-specific
- if (heatEnvironment != null) {
- List<VduArtifact> vduArtifacts = vduModel.getArtifacts();
- vduArtifacts.add(mapEnvironmentFileToVduArtifact(heatEnvironment));
- }
- }
-
- private VduArtifact mapEnvironmentFileToVduArtifact(HeatEnvironment heatEnv) {
- VduArtifact vduArtifact = new VduArtifact();
- vduArtifact.setName(heatEnv.getName());
- vduArtifact.setContent(heatEnv.getEnvironment().getBytes());
- vduArtifact.setType(ArtifactType.ENVIRONMENT);
- return vduArtifact;
- }
-
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 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.adapters.vdu.mapper;
+
+import java.sql.SQLException;
+import java.util.List;
+import java.util.Map;
+import org.openecomp.mso.adapters.vdu.VduArtifact;
+import org.openecomp.mso.adapters.vdu.VduArtifact.ArtifactType;
+import org.openecomp.mso.adapters.vdu.VduModelInfo;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.HeatEnvironment;
+import org.openecomp.mso.db.catalog.beans.HeatFiles;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.VfModuleCustomization;
+import org.openecomp.mso.logger.MsoLogger;
+import org.springframework.stereotype.Component;
+
+@Component
+public class VfModuleCustomizationToVduMapper {
+
+ private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+
+ public VduModelInfo mapVfModuleCustomizationToVdu(VfModuleCustomization vfModuleCustom) throws SQLException {
+ CatalogDatabase db = CatalogDatabase.getInstance();
+ VduModelInfo vduModel = new VduModelInfo();
+ vduModel.setModelCustomizationUUID(vfModuleCustom.getModelCustomizationUuid());
+ try {
+ // Map the cloud templates, attached files, and environment file
+ mapCloudTemplates(
+ db.getHeatTemplateByArtifactUuid(vfModuleCustom.getVfModule().getHeatTemplateArtifactUUId()),
+ vduModel);
+ mapCloudFiles(vfModuleCustom, vduModel);
+ mapEnvironment(db.getHeatEnvironmentByArtifactUuid(vfModuleCustom.getHeatEnvironmentArtifactUuid()),
+ vduModel);
+ } catch (SQLException e) {
+ LOGGER.debug("unhandled exception in mapVfModuleCustomizationToVdu", e);
+ throw new SQLException("Exception during mapVfModuleCustomizationToVdu " + e.getMessage());
+ } finally {
+ // Make sure DB session is closed
+ db.close();
+ }
+
+ return vduModel;
+ }
+
+ public VduModelInfo mapVfModuleCustVolumeToVdu(VfModuleCustomization vfModuleCustom) throws SQLException {
+ CatalogDatabase db = CatalogDatabase.getInstance();
+ VduModelInfo vduModel = new VduModelInfo();
+ vduModel.setModelCustomizationUUID(vfModuleCustom.getModelCustomizationUuid());
+ try {
+ // Map the cloud templates, attached files, and environment file
+ mapCloudTemplates(
+ db.getHeatTemplateByArtifactUuid(vfModuleCustom.getVfModule().getVolHeatTemplateArtifactUUId()),
+ vduModel);
+ mapCloudFiles(vfModuleCustom, vduModel);
+ mapEnvironment(db.getHeatEnvironmentByArtifactUuid(vfModuleCustom.getVolEnvironmentArtifactUuid()),
+ vduModel);
+ } catch (SQLException e) {
+ LOGGER.debug("unhandled exception in mapVfModuleCustVolumeToVdu", e);
+ throw new SQLException("Exception during mapVfModuleCustVolumeToVdu " + e.getMessage());
+ } finally {
+ // Make sure DB session is closed
+ db.close();
+ }
+
+ return vduModel;
+ }
+
+ private void mapCloudTemplates(HeatTemplate heatTemplate, VduModelInfo vduModel) throws SQLException {
+ // TODO: These catalog objects will be refactored to be
+ // non-Heat-specific
+ CatalogDatabase db = CatalogDatabase.getInstance();
+ try {
+ List<VduArtifact> vduArtifacts = vduModel.getArtifacts();
+
+ // Main template. Also set the VDU timeout based on the main
+ // template.
+ vduArtifacts.add(mapHeatTemplateToVduArtifact(heatTemplate, ArtifactType.MAIN_TEMPLATE));
+ vduModel.setTimeoutMinutes(heatTemplate.getTimeoutMinutes());
+
+ // Nested templates
+ Map<String,Object> nestedTemplates = db.getNestedTemplates(heatTemplate.getArtifactUuid());
+ if (nestedTemplates != null) {
+ for (String name : nestedTemplates.keySet()) {
+ String body = (String) nestedTemplates.get(name);
+ VduArtifact vduArtifact = new VduArtifact(name, body.getBytes(), ArtifactType.NESTED_TEMPLATE);
+ vduArtifacts.add(vduArtifact);
+ }
+ }
+
+ } catch (IllegalArgumentException e) {
+ LOGGER.debug("unhandled exception in mapCloudTemplates", e);
+ throw new IllegalArgumentException("Exception during mapCloudTemplates " + e.getMessage());
+ } finally {
+ // Make sure DB session is closed
+ db.close();
+ }
+ }
+
+ private VduArtifact mapHeatTemplateToVduArtifact(HeatTemplate heatTemplate, ArtifactType artifactType) {
+ VduArtifact vduArtifact = new VduArtifact();
+ vduArtifact.setName(heatTemplate.getTemplateName());
+ vduArtifact.setContent(heatTemplate.getHeatTemplate().getBytes());
+ vduArtifact.setType(artifactType);
+ return vduArtifact;
+ }
+
+ private void mapCloudFiles(VfModuleCustomization vfModuleCustom, VduModelInfo vduModel) throws SQLException {
+ // TODO: These catalog objects will be refactored to be
+ // non-Heat-specific
+ CatalogDatabase db = CatalogDatabase.getInstance();
+
+ try{
+ Map <String, HeatFiles> heatFiles = db.getHeatFilesForVfModule(vfModuleCustom.getVfModuleModelUuid());
+ if (heatFiles != null) {
+ for (HeatFiles heatFile: heatFiles.values()) {
+ mapCloudFileToVduArtifact(heatFile, ArtifactType.TEXT_FILE);
+ }
+ }
+ } catch (IllegalArgumentException e) {
+ LOGGER.debug("unhandled exception in mapCloudFiles", e);
+ throw new IllegalArgumentException("Exception during mapCloudFiles " + e.getMessage());
+ } finally {
+ // Make sure DB session is closed
+ db.close();
+ }
+
+ }
+
+ private VduArtifact mapCloudFileToVduArtifact(HeatFiles heatFile, ArtifactType artifactType) {
+ VduArtifact vduArtifact = new VduArtifact();
+ vduArtifact.setName(heatFile.getFileName());
+ vduArtifact.setContent(heatFile.getFileBody().getBytes());
+ vduArtifact.setType(artifactType);
+ return vduArtifact;
+ }
+
+ private void mapEnvironment(HeatEnvironment heatEnvironment, VduModelInfo vduModel) {
+ // TODO: These catalog objects will be refactored to be
+ // non-Heat-specific
+ if (heatEnvironment != null) {
+ List<VduArtifact> vduArtifacts = vduModel.getArtifacts();
+ vduArtifacts.add(mapEnvironmentFileToVduArtifact(heatEnvironment));
+ }
+ }
+
+ private VduArtifact mapEnvironmentFileToVduArtifact(HeatEnvironment heatEnv) {
+ VduArtifact vduArtifact = new VduArtifact();
+ vduArtifact.setName(heatEnv.getName());
+ vduArtifact.setContent(heatEnv.getEnvironment().getBytes());
+ vduArtifact.setType(ArtifactType.ENVIRONMENT);
+ return vduArtifact;
+ }
+
} \ No newline at end of file
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
index f8cba6afcb..48e0a56ef1 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
@@ -1885,7 +1885,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
// Also new in 1510 - don't flag missing parameters if there's an environment - because they might be there.
// And also new - add parameter to turn off checking all together if we find we're blocking orders we
// shouldn't
- boolean haveEnvironmentParameters = false;
+// boolean haveEnvironmentParameters = false;
boolean checkRequiredParameters = true;
try {
String propertyString = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_VNF_ADAPTER)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index ede76c0fd2..64b84e6b40 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -210,13 +210,13 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
<global-customer-id>${globalCustomerId}</global-customer-id>
</service-information>
<network-information>
- <ecomp-model-information>
+ <onap-model-information>
<model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid>
<model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid>
<model-uuid>${modelUuid}</model-uuid>
<model-version>${modelVersion}</model-version>
<model-name>${modelName}</model-name>
- </ecomp-model-information>
+ </onap-model-information>
</network-information>
<network-request-input>
<network-input-parameters>${netowrkInputParameters}</network-input-parameters>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
index 479e091345..9358537448 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -29,7 +29,6 @@ import org.openecomp.mso.bpmn.infrastructure.properties.BPMNProperties;
import org.apache.http.HttpResponse
import org.json.JSONArray
import org.openecomp.mso.bpmn.common.recipe.BpmnRestClient
-import org.openecomp.mso.bpmn.common.recipe.ResourceInput;
import static org.apache.commons.lang3.StringUtils.*;
import groovy.xml.XmlUtil
@@ -44,6 +43,8 @@ import org.openecomp.mso.bpmn.core.WorkflowException
import org.openecomp.mso.rest.APIResponse;
import org.openecomp.mso.rest.RESTClient
import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.common.recipe.ResourceInput
+import com.fasterxml.jackson.databind.ObjectMapper
import java.util.List;
import java.util.UUID;
@@ -74,19 +75,19 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
String msg = ""
try {
- serviceInstanceId = execution.getVariable("serviceInstanceId")
- serviceInstanceName = execution.getVariable("serviceInstanceName")
- callbackURL = execution.getVariable("sdncCallbackUrl")
- requestId = execution.getVariable("msoRequestId")
- serviceId = execution.getVariable("productFamilyId")
- subscriptionServiceType = execution.getVariable("subscriptionServiceType")
- globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ String callbackURL = execution.getVariable("sdncCallbackUrl")
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceId = execution.getVariable("productFamilyId")
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
String recipeParamsFromRequest = execution.getVariable("recipeParams")
String serviceModelInfo = execution.getVariable("serviceModelInfo")
- modelInvariantUuid = ""
- modelVersion = ""
- modelUuid = ""
- modelName = ""
+ String modelInvariantUuid = ""
+ String modelVersion = ""
+ String modelUuid = ""
+ String modelName = ""
if (!isBlank(serviceModelInfo))
{
@@ -122,7 +123,7 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
serviceType = ""
}
- sdncRequestId = UUID.randomUUID().toString()
+ String sdncRequestId = UUID.randomUUID().toString()
String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
@@ -140,12 +141,13 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
operationType = "delete" + operationType + "Instance"
- if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "overlay")){
+ ResourceInput resourceInput = new ObjectMapper().readValue(execution.getVariable("resourceInput"), ResourceInput.class)
+ if(StringUtils.containsIgnoreCase(resourceInput.getResourceModelInfo().getModelName(), "overlay")){
//This will be resolved in R3.
sdnc_svcAction ="deactivate"
operationType = "DeActivateDCINetworkInstance"
}
- if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "underlay")){
+ if(StringUtils.containsIgnoreCase(resourceInput.getResourceModelInfo().getModelName(), "underlay")){
//This will be resolved in R3.
operationType ="DeleteNetworkInstance"
}
@@ -195,8 +197,8 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
//def sdncRequestId2 = UUID.randomUUID().toString()
//String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId}<", ">${sdncRequestId2}<")
execution.setVariable("sdncDelete", sdncDelete)
- execution.setVariable("sdncDeactivate", sdncDeactivate)
- utils.log("INFO","sdncDeactivate:\n" + sdncDeactivate, isDebugEnabled)
+// execution.setVariable("sdncDeactivate", sdncDeactivate)
+// utils.log("INFO","sdncDeactivate:\n" + sdncDeactivate, isDebugEnabled)
utils.log("INFO","sdncDelete:\n" + sdncDelete, isDebugEnabled)
} catch (BpmnError e) {
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
new file mode 100644
index 0000000000..be099eb9af
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
@@ -0,0 +1,47 @@
+
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.scripts
+
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+
+
+public class DeleteVFCNSResource extends AbstractServiceTaskProcessor {
+
+ String Prefix = "DCUSE_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** start preProcessRequest *****", isDebugEnabled)
+
+ utils.log("INFO"," ***** end preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void postProcessRequest (DelegateExecution execution) {
+ utils.log("INFO"," ***** start postProcessRequest *****", isDebugEnabled)
+
+ utils.log("INFO"," ***** end postProcessRequest *****", isDebugEnabled)
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
index 71aea024bf..ec7370fea3 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
@@ -332,11 +332,11 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
String modelInvariantUuid = execution.getVariable("model-invariant-id-original")
String modelVersionId = execution.getVariable("model-version-id-original")
- //here modelVersion is not set, we use modelUuid to decompose the service.
+
String serviceModelInfo = """{
"modelInvariantUuid":"${modelInvariantUuid}",
- "modelUuid":"${modelVersionId}",
- "modelVersion":""
+ "modelUuid":"",
+ "modelVersion":"${modelVersionId}"
}"""
execution.setVariable("serviceModelInfo", serviceModelInfo)
@@ -355,8 +355,26 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
try {
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
List<Resource> deleteResourceList = serviceDecomposition.getServiceResources()
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ List relationShipList = jsonSlurper.parseText(serviceRelationShip)
+
+
+ //Set the real resource instance id to the decomosed resource list
+ for(Resource resource: deleteResourceList){
+ //reset the resource instance id , because in the decompose flow ,its a random one.
+ resource.setResourceId("");
+ //match the resource-instance-name and the model name
+ if (relationShipList != null) {
+ relationShipList.each {
+ if(StringUtils.containsIgnoreCase(it.resourceType, resource.getModelInfo().getModelName())){
+ resource.setResourceId(it.resourceInstanceId);
+ }
+ }
+ }
+ }
execution.setVariable("deleteResourceList", deleteResourceList)
- execution.setVariable("resourceInstanceIDs", execution.getVariable("serviceRelationShip"))
} catch (Exception ex) {
String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
utils.log("DEBUG", exceptionMessage, isDebugEnabled)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
index 63ecb45e28..0fcc41c58e 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
@@ -239,11 +239,11 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor {
String resourceInstanceId = execution.getVariable("resourceInstanceId")
String resourceUuid = execution.getVariable("resourceUuid")
- String requestAction = execution.getVariable("operationType")
- JSONObject resourceRecipe = cutils.getResourceRecipe(execution, resourceUuid, requestAction)
+ String action = "deleteInstance"
+ JSONObject resourceRecipe = cutils.getResourceRecipe(execution, resourceUuid, action)
String recipeUri = resourceRecipe.getString("orchestrationUri")
int recipeTimeout = resourceRecipe.getInt("recipeTimeout")
- String recipeParamXsd = resourceRecipe.get("paramXSD")
+ String recipeParamXsd = resourceRecipe.isNull("paramXSD") ? "" : resourceRecipe.get("paramXSD")
Resource currentResource = execution.getVariable("currentResource")
@@ -255,7 +255,11 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor {
modelInfo.setModelCustomizationUuid(currentResource.getModelInfo().getModelCustomizationUuid())
modelInfo.setModelUuid(currentResource.getModelInfo().getModelCustomizationUuid())
modelInfo.setModelInvariantUuid(currentResource.getModelInfo().getModelInvariantUuid())
- resourceInput.setServiceModelInfo(modelInfo)
+ modelInfo.setModelName(currentResource.getModelInfo().getModelName())
+ modelInfo.setModelVersion(currentResource.getModelInfo().getModelVersion())
+ modelInfo.setModelType(currentResource.getModelInfo().getModelType())
+ modelInfo.setModelInstanceName(currentResource.getModelInfo().getModelInstanceName())
+ resourceInput.setResourceModelInfo(modelInfo)
resourceInput.setServiceType(serviceType)
String recipeURL = BPMNProperties.getProperty("bpelURL", "http://mso:8080") + recipeUri
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
index 0ad2da4a9a..a964a7e32a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
@@ -451,7 +451,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
updateServiceResp = """{"operationId":"${operationId}"}""".trim()
}
else {
- updateServiceResp = """{"OperationResult":"No Resource to Add or Delete"}"""
+ updateServiceResp = """{"OperationResult":"No Resource to Add or Delete or Service Instance not found in AAI."}"""
}
utils.log("INFO", " sendSyncResponse to APIH:" + "\n" + updateServiceResp, isDebugEnabled)
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 2bca17a9ca..0e7904c87c 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
@@ -67,7 +67,7 @@ public class SdncUnderlayVpnOperationClient {
NetworkRpcInputEntityBuilder builder = new NetworkRpcInputEntityBuilder();
RpcNetworkTopologyOperationInputEntity body = builder.build(null, inputs);
updateProgress(null, null, "50", "RequestBody build finished!");
- RpcNetworkTopologyOperationOutputEntity networkRpcOutputEntiy = null;
+ //RpcNetworkTopologyOperationOutputEntity networkRpcOutputEntiy = null;
try {
genericResourceApiClient.postNetworkTopologyOperation(HeaderUtil.DefaulAuth ,body).execute().body();
} catch (Exception e) {
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn
new file mode 100644
index 0000000000..514abb0d52
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn
@@ -0,0 +1,146 @@
+<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+ <bpmn:process id="DeleteVFCNSResource" name="DeleteVFCNSResource" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="Start Custom Delete E2E NS">
+ <bpmn:outgoing>SequenceFlow_0x2e9we</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0x2e9we" sourceRef="StartEvent_1" targetRef="Task_0yl3rau" />
+ <bpmn:sequenceFlow id="SequenceFlow_00vpfm3" sourceRef="Task_0yl3rau" targetRef="Task_14gmbq4" />
+ <bpmn:sequenceFlow id="SequenceFlow_1s4cyms" sourceRef="Task_14gmbq4" targetRef="Task_1e27uaw" />
+ <bpmn:endEvent id="EndEvent_07ew0rf" name="End Custom Delete E2E NS">
+ <bpmn:incoming>SequenceFlow_152xb4z</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_152xb4z" sourceRef="Task_1e27uaw" targetRef="EndEvent_07ew0rf" />
+ <bpmn:scriptTask id="Task_0yl3rau" name="DoCustomDeleteE2ENS prepare" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0x2e9we</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_00vpfm3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DeleteVFCNSResource()
+ddsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1e27uaw" name="Post delet NS resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1s4cyms</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_152xb4z</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DeleteVFCNSResource()
+ddsi.postProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_14gmbq4" name="Call Delete NS Instance" calledElement="DoDeleteVFCNetworkServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceTemplateId" target="resourceTemplateId" />
+ <camunda:in source="resourceInstanceId" target="resourceInstanceId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_00vpfm3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1s4cyms</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:subProcess id="SubProcess_11qmm22" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0zwedl6">
+ <bpmn:outgoing>SequenceFlow_0yro7o2</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_10tfowz">
+ <bpmn:incoming>SequenceFlow_0p0ayci</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0tdtqwh" name="Log / Print Unexpected Error">
+ <bpmn:incoming>SequenceFlow_0yro7o2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0p0ayci</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0yro7o2" sourceRef="StartEvent_0zwedl6" targetRef="ScriptTask_0tdtqwh" />
+ <bpmn:sequenceFlow id="SequenceFlow_0p0ayci" sourceRef="ScriptTask_0tdtqwh" targetRef="EndEvent_10tfowz" />
+ </bpmn:subProcess>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVFCNSResource">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="330" y="336" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="312" y="372" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x2e9we_di" bpmnElement="SequenceFlow_0x2e9we">
+ <di:waypoint xsi:type="dc:Point" x="366" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="448" y="333" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00vpfm3_di" bpmnElement="SequenceFlow_00vpfm3">
+ <di:waypoint xsi:type="dc:Point" x="630" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="774" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="702" y="333" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s4cyms_di" bpmnElement="SequenceFlow_1s4cyms">
+ <di:waypoint xsi:type="dc:Point" x="874" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="1018" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="946" y="333" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_07ew0rf_di" bpmnElement="EndEvent_07ew0rf">
+ <dc:Bounds x="1313" y="336" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1293" y="376" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_152xb4z_di" bpmnElement="SequenceFlow_152xb4z">
+ <di:waypoint xsi:type="dc:Point" x="1118" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="1313" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1215.5" y="333" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ssr09e_di" bpmnElement="Task_0yl3rau">
+ <dc:Bounds x="530" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_092ktxo_di" bpmnElement="Task_1e27uaw">
+ <dc:Bounds x="1018" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_00p99pt_di" bpmnElement="Task_14gmbq4">
+ <dc:Bounds x="774" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_11qmm22_di" bpmnElement="SubProcess_11qmm22" isExpanded="true">
+ <dc:Bounds x="636" y="539" width="350" height="200" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0zwedl6_di" bpmnElement="StartEvent_0zwedl6">
+ <dc:Bounds x="667" y="606" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639" y="644" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_10tfowz_di" bpmnElement="EndEvent_10tfowz">
+ <dc:Bounds x="931" y="606" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="904" y="645" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0tdtqwh_di" bpmnElement="ScriptTask_0tdtqwh">
+ <dc:Bounds x="763" y="584" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yro7o2_di" bpmnElement="SequenceFlow_0yro7o2">
+ <di:waypoint xsi:type="dc:Point" x="703" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="688" y="603" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p0ayci_di" bpmnElement="SequenceFlow_0p0ayci">
+ <di:waypoint xsi:type="dc:Point" x="863" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="931" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="852" y="603" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
index f74dab147b..2b9b87409d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
@@ -1,5 +1,5 @@
<?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.11.3">
+<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="DoDeleteResourcesV1" name="DoDeleteResourcesV1" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" name="Start Resource Delete">
<bpmn:outgoing>SequenceFlow_0stqur4</bpmn:outgoing>
@@ -9,9 +9,8 @@
<bpmn:incoming>SequenceFlow_13nyd1j</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1qm7owo</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-String resourceName = execution.getVariable("resourceType")
def ddrs = new DoDeleteResourcesV1()
-ddrs.preResourceDelete(execution, resourceName )]]></bpmn:script>
+ddrs.preResourceDelete(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_15zy0jf" name="Execute Delete Resource Recipe" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1qm7owo</bpmn:incoming>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
index 5e00358302..067012e675 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
@@ -244,6 +244,7 @@ dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
<camunda:in source="delResourceList" target="deleteResourceList" />
<camunda:in source="resourceInstanceIDs" target="resourceInstanceIDs" />
<camunda:in source="operationType" target="operationType" />
+ <camunda:in source="operationId" target="operationId" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0ur34hv</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0w4t4ao</bpmn2:outgoing>
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
index 95da5b6a95..01ca4df9f2 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
@@ -703,7 +703,7 @@ public class E2EServiceInstances {
return response;
}
- if (curStatus != null && curStatus.getResult() != null && curStatus.getResult().equalsIgnoreCase("processing")) {
+ if ("processing".equalsIgnoreCase("curStatus != null && curStatus.getResult() != null && curStatus.getResult()")) {
String chkMessage = "Error: Locked instance - This " + requestScope + " (" + serviceId + ") "
+ "now being worked with a status of " + curStatus.getResult()
+ ". The latest workflow of instance must be finished or cleaned up.";
@@ -1318,7 +1318,7 @@ public class E2EServiceInstances {
requestParameters.setSubscriptionServiceType("MOG");
// Userparams
- List<E2EUserParam> userParams;
+ //List<E2EUserParam> userParams;
// userParams =
// e2eSir.getService().getParameters().getRequestParameters().getUserParams();
List<Map<String, Object>> userParamList = new ArrayList<>();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
index 59c78b5439..2f2ef313f4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
@@ -913,9 +913,8 @@ public class MsoRequest {
}
public void updateFinalStatus (Status status) {
- int result = 0;
try {
- result = (RequestsDatabase.getInstance()).updateInfraFinalStatus (requestId,
+ (RequestsDatabase.getInstance()).updateInfraFinalStatus (requestId,
status.toString (),
this.errorMessage,
this.progress,