aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java2
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java2
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java2
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java2
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java2
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java2
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java2
-rw-r--r--asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csarbin53681 -> 53193 bytes
-rw-r--r--asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csarbin59733 -> 59296 bytes
-rw-r--r--asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csarbin275560 -> 274304 bytes
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java70
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd9
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java19
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/HealthCheckHandlerTest.java38
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy69
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy11
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy2
-rw-r--r--common/src/main/java/org/openecomp/mso/logger/MsoLogger.java24
-rw-r--r--packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csarbin59733 -> 59296 bytes
-rw-r--r--packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csarbin275560 -> 274304 bytes
26 files changed, 162 insertions, 112 deletions
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
index 0d737fb2ba..b00b7a0e36 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.HashMap;
import java.util.Map;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java
index ade234e14e..d1c090dc9e 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.HashMap;
import java.util.Map;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
index e9732d6f35..a773d13bb1 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.HashMap;
import java.util.Map;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java
index deb1252492..8ee9d7f8f1 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import static org.junit.Assert.assertFalse;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java
index c4f3be43f5..a807aafd24 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.HashMap;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java
index 8fbfda1b1e..a820202855 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java
index 76d73cd70b..aca88f3352 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.Map;
diff --git a/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar b/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar
index 31fff49889..f1a72f791a 100644
--- a/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar
+++ b/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar
Binary files differ
diff --git a/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar b/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar
index 2686e4ba57..a189ed6c04 100644
--- a/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar
+++ b/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar
Binary files differ
diff --git a/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar b/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar
index d2983ce609..df4f4cb5e2 100644
--- a/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar
+++ b/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar
Binary files differ
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
index 0a008d1044..00e4ae71d6 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
@@ -19,6 +19,8 @@
*/
package org.openecomp.mso.bpmn.common.recipe;
+import org.openecomp.mso.bpmn.core.domain.ModelInfo;
+
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -35,7 +37,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
* @author
* @version ONAP Beijing Release 2018-03-08
*/
-@JsonPropertyOrder({"resourceInstanceName", "resourceInstanceDes", "globalSubscriberId", "serviceType", "serviceId", "operationId", "resourceType","resourceCustomizationUuid"})
+@JsonPropertyOrder({"resourceInstanceName", "resourceInstanceDes", "globalSubscriberId", "serviceType", "serviceId", "operationId", "serviceModelInfo","resourceModelInfo", "resourceInstancenUuid","resourceParameters","operationType"})
@JsonRootName("variables")
public class ResourceInput {
@@ -57,17 +59,11 @@ public class ResourceInput {
@JsonProperty("operationId")
private String operationId;
- //for create resource
- @JsonProperty("resourceInvariantUuid")
- private String resourceInvariantUuid;
+ @JsonProperty("serviceModelInfo")
+ private ModelInfo serviceModelInfo;
- //for create resource
- @JsonProperty("resourceUuid")
- private String resourceUuid;
-
- //for create resource
- @JsonProperty("resourceCustomizationUuid")
- private String resourceCustomizationUuid;
+ @JsonProperty("resourceModelInfo")
+ private ModelInfo resourceModelInfo;
//for delete resource
@JsonProperty("resourceInstancenUuid")
@@ -186,66 +182,46 @@ public class ResourceInput {
public void setOperationId(String operationId) {
this.operationId = operationId;
}
-
-
/**
- * @return Returns the resourceInvariantUuid.
+ * @return Returns the serviceModelInfo.
*/
- @JsonProperty("resourceInvariantUuid")
- public String getResourceInvariantUuid() {
- return resourceInvariantUuid;
+ @JsonProperty("serviceModelInfo")
+ public ModelInfo getServiceModelInfo() {
+ return serviceModelInfo;
}
/**
- * @param resourceInvariantUuid The resourceInvariantUuid to set.
+ * @param serviceModelInfo The serviceModelInfo to set.
*/
- @JsonProperty("resourceInvariantUuid")
- public void setResourceInvariantUuid(String resourceInvariantUuid) {
- this.resourceInvariantUuid = resourceInvariantUuid;
+ @JsonProperty("serviceModelInfo")
+ public void setServiceModelInfo(ModelInfo serviceModelInfo) {
+ this.serviceModelInfo = serviceModelInfo;
}
/**
- * @return Returns the resourceUuid.
+ * @return Returns the resourceModelInfo.
*/
- @JsonProperty("resourceUuid")
- public String getResourceUuid() {
- return resourceUuid;
+ @JsonProperty("resourceModelInfo")
+ public ModelInfo getResourceModelInfo() {
+ return resourceModelInfo;
}
/**
- * @param resourceUuid The resourceUuid to set.
- */
- @JsonProperty("resourceUuid")
- public void setResourceUuid(String resourceUuid) {
- this.resourceUuid = resourceUuid;
- }
-
-
- /**
- * @return Returns the resourceCustomizationUuid.
+ * @param resourceModelInfo The resourceModelInfo to set.
*/
- @JsonProperty("resourceCustomizationUuid")
- public String getResourceCustomizationUuid() {
- return resourceCustomizationUuid;
+ @JsonProperty("resourceModelInfo")
+ public void setResourceModelInfo(ModelInfo resourceModelInfo) {
+ this.resourceModelInfo = resourceModelInfo;
}
-
- /**
- * @param resourceCustomizationUuid The resourceCustomizationUuid to set.
- */
- @JsonProperty("resourceCustomizationUuid")
- public void setResourceCustomizationUuid(String resourceCustomizationUuid) {
- this.resourceCustomizationUuid = resourceCustomizationUuid;
- }
-
/**
* @return Returns the resourceParameters.
*/
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd b/bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd
index e743dc754e..0472e54693 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd
+++ b/bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd
@@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- =========================================================================
- AT&T Proprietary (Internal Use Only) Not for use or disclosure outside
- the AT&T companies except under written agreement (c) 2015 AT&T
- Intellectual Property. All rights reserved. AT&T and the AT&T logo are
- trademarks of AT&T Intellectual Property.
- =======================================================================
- -->
- <!--
================================================================
Description: This is the schema for LPP Configuration Component
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd b/bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd
index ce92a4909b..c5fa26c998 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd
+++ b/bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- =========================================================================
- AT&T Proprietary (Internal Use Only) Not for use or disclosure outside
- the AT&T companies except under written agreement (c) 2015 AT&T
- Intellectual Property. All rights reserved. AT&T and the AT&T logo are
- trademarks of AT&T Intellectual Property.
- =======================================================================
- -->
+
<!--
================================================================
Description: This is the schema for MSO Request data
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
index fe1975faf9..466f4a1f3f 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
@@ -19,9 +19,10 @@
*/
package org.openecomp.mso.bpmn.common.recipe;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.openecomp.mso.bpmn.core.domain.ModelInfo;
public class ResourceInputTest {
@@ -34,9 +35,16 @@ public class ResourceInputTest {
ri.setServiceType("serviceType");
ri.setServiceInstanceId("serviceId");
ri.setOperationId("operationId");
- ri.setResourceInvariantUuid("resourceInvariantUuid");
- ri.setResourceUuid("resourceUuid");
- ri.setResourceCustomizationUuid("resourceCustomizationUuid");
+ ModelInfo serviceModelInfo = new ModelInfo();
+ serviceModelInfo.setModelCustomizationUuid("modelCustomizationUuid");
+ serviceModelInfo.setModelInvariantUuid("modelInvariantUuid");
+ serviceModelInfo.setModelUuid("modelUuid");
+ ri.setServiceModelInfo(serviceModelInfo);
+ ModelInfo resourceModelInfo = new ModelInfo();
+ resourceModelInfo.setModelCustomizationUuid("modelCustomizationUuid");
+ resourceModelInfo.setModelInvariantUuid("modelInvariantUuid");
+ resourceModelInfo.setModelUuid("modelUuid");
+ ri.setResourceModelInfo(resourceModelInfo);
ri.setResourceInstancenUuid("resourceInstancenUuid");
ri.setResourceParameters("resourceParameters");
ri.setOperationType("operationType");
@@ -46,9 +54,6 @@ public class ResourceInputTest {
assertEquals(ri.getServiceType(), "serviceType");
assertEquals(ri.getServiceInstanceId(), "serviceId");
assertEquals(ri.getOperationId(), "operationId");
- assertEquals(ri.getResourceInvariantUuid(), "resourceInvariantUuid");
- assertEquals(ri.getResourceUuid(), "resourceUuid");
- assertEquals(ri.getResourceCustomizationUuid(), "resourceCustomizationUuid");
assertEquals(ri.getResourceInstancenUuid(), "resourceInstancenUuid");
assertEquals(ri.getResourceParameters(), "resourceParameters");
assertEquals(ri.getOperationType(), "operationType");
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/HealthCheckHandlerTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/HealthCheckHandlerTest.java
new file mode 100644
index 0000000000..1086cc75ef
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/HealthCheckHandlerTest.java
@@ -0,0 +1,38 @@
+/*-
+ * ============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.core;
+
+import org.junit.Test;
+
+public class HealthCheckHandlerTest {
+
+ HealthCheckHandler healthCheckHandler = new HealthCheckHandler();
+
+ @Test
+ public void nodeHealthcheck() throws Exception {
+ healthCheckHandler.nodeHealthcheck();
+ }
+
+ @Test
+ public void healthcheck() throws Exception {
+ healthCheckHandler.healthcheck("test-123");
+ }
+
+} \ No newline at end of file
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 072c3810c2..933d45066a 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
@@ -133,11 +133,76 @@ public class CreateSDNCCNetworkResource extends AbstractServiceTaskProcessor {
String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String hdrRequestId = execution.getVariable("mso-request-id")
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+ String source = execution.getVariable("source")
+ String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String serviceType = resourceInputObj.getServiceType()
+ String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
+ String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
+ String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelName()
+ String serviceModelName = resourceInputObj.getServiceModelInfo().getModelVersion()
+ String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
+ String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
+ String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
+ String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+ String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
+ String resourceInputPrameters = resourceInputObj.getResourceParameters()
+ String netowrkInputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")
+ //here convert json string to xml string
+ String netowrkInputParameters = jsonUtil.json2xml(netowrkInputParametersJson)
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, sdnc_svcAction, sdnc_requestAction, null, null, null)
-
+ String content =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp.mso/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${sdnc_svcAction}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${hdrRequestId}</request-id>
+ <request-action>${sdnc_requestAction}</request-action>
+ <source>${source}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${sdnc_service_id}</service-id>
+ <subscription-service-type>${serviceType}</subscription-service-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid>
+ <model-uuid>${serviceModelUuid}</model-uuid>
+ <model-version>${serviceModelVersion}</model-version>
+ <model-name>${serviceModelName}</model-name>
+ </ecomp-model-information>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <global-customer-id>${globalCustomerId}</global-customer-id>
+ </service-information>
+ <network-information>
+ <ecomp-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>
+ </network-information>
+ <network-request-input>
+ <network-input-parameters>${netowrkInputParameters}</network-input-parameters>
+ </network-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
utils.logAudit(sndcTopologyCreateRequesAsString)
execution.setVariable(Prefix + "createSDNCRequest", sndcTopologyCreateRequesAsString)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
index 291df4608d..6d5249e4d6 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
@@ -47,8 +47,6 @@ import org.openecomp.mso.rest.RESTConfig
import java.util.List;
import java.util.UUID;
-import javax.mail.Quota.Resource;
-
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
import org.camunda.bpm.engine.delegate.DelegateExecution
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index 5eb3fd9f41..47ad795e25 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -50,8 +50,6 @@ import org.openecomp.mso.rest.RESTConfig
import java.util.List;
import java.util.UUID;
-import javax.mail.Quota.Resource;
-
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.json.JSONObject;
@@ -548,12 +546,9 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
def currentIndex = execution.getVariable("currentResourceIndex")
List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
Resource currentResource = sequencedResourceList.get(currentIndex)
- String resourceCustomizationUuid = currentResource.getModelInfo().getModelCustomizationUuid()
- resourceInput.setResourceCustomizationUuid(resourceCustomizationUuid);
- String resourceInvariantUuid = currentResource.getModelInfo().getModelInvariantUuid()
- resourceInput.setResourceInvariantUuid(resourceInvariantUuid)
- String resourceUuid = currentResource.getModelInfo().getModelUuid()
- resourceInput.setResourceUuid(resourceUuid)
+ resourceInput.setResourceModelInfo(currentResource.getModelInfo());
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo());
String incomingRequest = execution.getVariable("uuiRequest")
//set the requestInputs from tempalte To Be Done
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy
index b3ac195c7d..99248a92ad 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy
@@ -25,7 +25,6 @@ import groovy.util.Node
import groovy.util.XmlParser;
import groovy.xml.QName
-import java.beans.MetaData.java_lang_Class_PersistenceDelegate
import java.io.Serializable;
import java.util.UUID;
import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
@@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
index 0db7616d3d..b6af0a5a6b 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
@@ -25,7 +25,6 @@ import groovy.util.Node
import groovy.util.XmlParser;
import groovy.xml.QName
-import java.beans.MetaData.java_lang_Class_PersistenceDelegate
import java.io.Serializable;
import java.util.UUID;
import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
@@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy
index c588d38946..39820dc2e1 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy
@@ -28,7 +28,6 @@ import groovy.xml.QName
import org.json.JSONArray
import org.json.JSONObject
-import java.beans.MetaData.java_lang_Class_PersistenceDelegate
import java.io.Serializable;
import java.util.List
import java.util.UUID;
@@ -43,7 +42,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
index 33aaef084c..13016a5ae4 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
@@ -25,7 +25,6 @@ import groovy.util.Node
import groovy.util.XmlParser;
import groovy.xml.QName
-import java.beans.MetaData.java_lang_Class_PersistenceDelegate
import java.io.Serializable;
import java.util.UUID;
import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
@@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
index 2b336afa1e..4a64ab058b 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
@@ -25,7 +25,6 @@ import groovy.util.Node
import groovy.util.XmlParser;
import groovy.xml.QName
-import java.beans.MetaData.java_lang_Class_PersistenceDelegate
import java.io.Serializable;
import java.util.UUID;
import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
@@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java b/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
index 6588995308..45f2746f0b 100644
--- a/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
+++ b/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
@@ -979,8 +979,7 @@ public class MsoLogger {
File configFile = new File(CONFIG_FILE);
String uuid = "";
BufferedReader in = null;
- BufferedWriter bw = null;
- try {
+ try{
// Verify whether instanceUUID file exist,
// If yes, read the content; if not, generate the instanceUUID and
// write to the file
@@ -990,10 +989,11 @@ public class MsoLogger {
if ((uuid = in.readLine()) == null) {
// the file is empty, regenerate the file
uuid = UUID.randomUUID().toString();
- FileWriter fw = new FileWriter(configFile.getAbsoluteFile());
- bw = new BufferedWriter(fw);
+ try(BufferedWriter bw = new BufferedWriter(new FileWriter(configFile.getAbsoluteFile()))) {
bw.write(uuid);
- bw.close();
+ } catch (IOException e) {
+ LOGGER.log(Level.SEVERE, "Error trying to write UUID file", e);
+ }
}
in.close();
} else {
@@ -1002,21 +1002,19 @@ public class MsoLogger {
uuid = UUID.randomUUID().toString();
configFile.getParentFile().mkdirs();
configFile.createNewFile();
- FileWriter fw = new FileWriter(configFile.getAbsoluteFile());
- bw = new BufferedWriter(fw);
- bw.write(uuid);
- bw.close();
+ try(BufferedWriter bw1 = new BufferedWriter(new FileWriter(configFile.getAbsoluteFile()))){
+ bw1.write(uuid);
+ } catch (IOException e) {
+ LOGGER.log(Level.SEVERE, "Error trying to write UUID file", e);
+ }
}
} catch (IOException e) {
- LOGGER.log(Level.SEVERE, "Error trying to read UUID file", e);
+ LOGGER.log(Level.SEVERE, "Error trying to read UUID file", e);
} finally {
try {
if (in != null) {
in.close();
}
- if (bw != null) {
- bw.close();
- }
} catch (IOException ex) {
LOGGER.log(Level.SEVERE, "Error trying to close UUID file", ex);
}
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar
index 2686e4ba57..f052ef9130 100644
--- a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar
+++ b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar
Binary files differ
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar
index d2983ce609..eb83644213 100644
--- a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar
+++ b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar
Binary files differ