Merge "Disable the deploy phase"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Wed, 21 Mar 2018 10:41:30 +0000 (10:41 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 21 Mar 2018 10:41:30 +0000 (10:41 +0000)
52 files changed:
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java
asdc-controller/pom.xml
asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar
asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar
asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd
bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/HealthCheckHandlerTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/AllottedResourceTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ConfigResourceTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ConfigurationTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/CustomerTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/HomingSolutionTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/LicenseTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ModelInfoTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ModuleResourceTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/NetworkResourceTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/OwningEntityTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ProjectTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/RequestTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ResourceDecompositionTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ResourceTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ServiceDecompositionTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ServiceInstanceTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/SubscriberTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/TunnelConnectTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/VnfResourceTest.java [new file with mode: 0644]
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
cloudify-client/pom.xml
common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
common/src/test/java/org/openecomp/mso/client/aai/objects/AAIOperationalEnvironmentTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/client/aai/objects/AAIOwningEntityTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/client/aai/objects/AAIProjectTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/client/aai/objects/AAIServiceInstanceTest.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar
pom.xml

index 0d737fb..b00b7a0 100644 (file)
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================\r
  */\r
 \r
-package org.openecomp.mso.adapters.vnf.test;\r
+package org.openecomp.mso.adapters.vnf;\r
 \r
 import java.util.HashMap;\r
 import java.util.Map;\r
index ade234e..d1c090d 100644 (file)
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================\r
  */\r
 \r
-package org.openecomp.mso.adapters.vnf.test;\r
+package org.openecomp.mso.adapters.vnf;\r
 \r
 import java.util.HashMap;\r
 import java.util.Map;\r
index e9732d6..a773d13 100644 (file)
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================\r
  */\r
 \r
-package org.openecomp.mso.adapters.vnf.test;\r
+package org.openecomp.mso.adapters.vnf;\r
 \r
 import java.util.HashMap;\r
 import java.util.Map;\r
index deb1252..8ee9d7f 100644 (file)
@@ -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;
index c4f3be4..a807aaf 100644 (file)
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
 
 
 import java.util.HashMap;
index 8fbfda1..a820202 100644 (file)
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
 
 
 
index 76d73cd..aca88f3 100644 (file)
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
 
 
 import java.util.Map;
index 66ecbd8..a06a16d 100644 (file)
@@ -81,7 +81,6 @@
                <dependency>
                                <groupId>org.apache.httpcomponents</groupId>
                                <artifactId>httpclient</artifactId>
-                               <version>4.5.5</version>
                                <scope>compile</scope>
                                <exclusions>
                                        <exclusion>  
index 31fff49..f1a72f7 100644 (file)
Binary files a/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar and b/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar differ
index 2686e4b..a189ed6 100644 (file)
Binary files a/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar and b/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar differ
index d2983ce..df4f4cb 100644 (file)
Binary files a/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar and b/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar differ
index 0a008d1..00e4ae7 100644 (file)
@@ -19,6 +19,8 @@
  */\r
 package org.openecomp.mso.bpmn.common.recipe;\r
 \r
+import org.openecomp.mso.bpmn.core.domain.ModelInfo;\r
+\r
 import com.fasterxml.jackson.annotation.JsonProperty;\r
 import com.fasterxml.jackson.annotation.JsonPropertyOrder;\r
 import com.fasterxml.jackson.annotation.JsonRootName;\r
@@ -35,7 +37,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
  * @author\r
  * @version     ONAP Beijing Release  2018-03-08\r
  */\r
-@JsonPropertyOrder({"resourceInstanceName", "resourceInstanceDes", "globalSubscriberId", "serviceType", "serviceId", "operationId", "resourceType","resourceCustomizationUuid"})\r
+@JsonPropertyOrder({"resourceInstanceName", "resourceInstanceDes", "globalSubscriberId", "serviceType", "serviceId", "operationId", "serviceModelInfo","resourceModelInfo", "resourceInstancenUuid","resourceParameters","operationType"})\r
 @JsonRootName("variables")\r
 public class ResourceInput {\r
 \r
@@ -57,17 +59,11 @@ public class ResourceInput {
     @JsonProperty("operationId")\r
     private String operationId;\r
     \r
-    //for create resource\r
-    @JsonProperty("resourceInvariantUuid")\r
-    private String resourceInvariantUuid;\r
+    @JsonProperty("serviceModelInfo")\r
+    private ModelInfo serviceModelInfo;\r
     \r
-    //for create resource\r
-    @JsonProperty("resourceUuid")\r
-    private String resourceUuid;\r
-\r
-    //for create resource\r
-    @JsonProperty("resourceCustomizationUuid")\r
-    private String resourceCustomizationUuid;\r
+    @JsonProperty("resourceModelInfo")\r
+    private ModelInfo resourceModelInfo;\r
     \r
     //for delete resource\r
     @JsonProperty("resourceInstancenUuid")\r
@@ -186,66 +182,46 @@ public class ResourceInput {
     public void setOperationId(String operationId) {\r
         this.operationId = operationId;\r
     }\r
-        \r
-   \r
     \r
     /**\r
-     * @return Returns the resourceInvariantUuid.\r
+     * @return Returns the serviceModelInfo.\r
      */\r
-    @JsonProperty("resourceInvariantUuid")\r
-    public String getResourceInvariantUuid() {\r
-        return resourceInvariantUuid;\r
+    @JsonProperty("serviceModelInfo")\r
+    public ModelInfo getServiceModelInfo() {\r
+        return serviceModelInfo;\r
     }\r
 \r
 \r
     \r
     /**\r
-     * @param resourceInvariantUuid The resourceInvariantUuid to set.\r
+     * @param serviceModelInfo The serviceModelInfo to set.\r
      */\r
-    @JsonProperty("resourceInvariantUuid")\r
-    public void setResourceInvariantUuid(String resourceInvariantUuid) {\r
-        this.resourceInvariantUuid = resourceInvariantUuid;\r
+    @JsonProperty("serviceModelInfo")\r
+    public void setServiceModelInfo(ModelInfo serviceModelInfo) {\r
+        this.serviceModelInfo = serviceModelInfo;\r
     }\r
 \r
 \r
     \r
     /**\r
-     * @return Returns the resourceUuid.\r
+     * @return Returns the resourceModelInfo.\r
      */\r
-    @JsonProperty("resourceUuid")\r
-    public String getResourceUuid() {\r
-        return resourceUuid;\r
+    @JsonProperty("resourceModelInfo")\r
+    public ModelInfo getResourceModelInfo() {\r
+        return resourceModelInfo;\r
     }\r
 \r
 \r
     \r
     /**\r
-     * @param resourceUuid The resourceUuid to set.\r
-     */\r
-    @JsonProperty("resourceUuid")\r
-    public void setResourceUuid(String resourceUuid) {\r
-        this.resourceUuid = resourceUuid;\r
-    }\r
-\r
-\r
-    /**\r
-     * @return Returns the resourceCustomizationUuid.\r
+     * @param resourceModelInfo The resourceModelInfo to set.\r
      */\r
-    @JsonProperty("resourceCustomizationUuid")\r
-    public String getResourceCustomizationUuid() {\r
-        return resourceCustomizationUuid;\r
+    @JsonProperty("resourceModelInfo")\r
+    public void setResourceModelInfo(ModelInfo resourceModelInfo) {\r
+        this.resourceModelInfo = resourceModelInfo;\r
     }\r
 \r
-    \r
-    /**\r
-     * @param resourceCustomizationUuid The resourceCustomizationUuid to set.\r
-     */\r
-    @JsonProperty("resourceCustomizationUuid")\r
-    public void setResourceCustomizationUuid(String resourceCustomizationUuid) {\r
-        this.resourceCustomizationUuid = resourceCustomizationUuid;\r
-    }\r
 \r
-    \r
     /**\r
      * @return Returns the resourceParameters.\r
      */\r
index e743dc7..0472e54 100644 (file)
@@ -1,12 +1,4 @@
 <?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
index ce92a49..c5fa26c 100644 (file)
@@ -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
index fe1975f..466f4a1 100644 (file)
 */
 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 (file)
index 0000000..1086cc7
--- /dev/null
@@ -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/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/AllottedResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/AllottedResourceTest.java
new file mode 100644 (file)
index 0000000..09720be
--- /dev/null
@@ -0,0 +1,57 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class AllottedResourceTest {\r
+       private AllottedResource ar = new AllottedResource();\r
+       TunnelConnect tc = new TunnelConnect();\r
+\r
+       @Test\r
+       public void testAllottedResource() {\r
+               ar.setAllottedResourceType("allottedResourceType");\r
+               ar.setAllottedResourceRole("allottedResourceRole");\r
+               ar.setProvidingServiceModelName("providingServiceModelName");\r
+               ar.setProvidingServiceModelInvariantUuid("providingServiceModelInvariantUuid");\r
+               ar.setProvidingServiceModelUuid("providingServiceModelUuid");\r
+               ar.setNfFunction("nfFunction");\r
+               ar.setNfType("nfType");\r
+               ar.setNfRole("nfRole");\r
+               ar.setNfNamingCode("nfNamingCode");\r
+               ar.setOrchestrationStatus("orchestrationStatus");\r
+               ar.setTunnelConnect(tc);\r
+               assertEquals(ar.getAllottedResourceType(), "allottedResourceType");\r
+               assertEquals(ar.getAllottedResourceRole(), "allottedResourceRole");\r
+               assertEquals(ar.getProvidingServiceModelName(), "providingServiceModelName");\r
+               assertEquals(ar.getProvidingServiceModelInvariantUuid(), "providingServiceModelInvariantUuid");\r
+               assertEquals(ar.getProvidingServiceModelUuid(), "providingServiceModelUuid");\r
+               assertEquals(ar.getNfFunction(), "nfFunction");\r
+               assertEquals(ar.getNfType(), "nfType");\r
+               assertEquals(ar.getNfRole(), "nfRole");\r
+               assertEquals(ar.getNfNamingCode(), "nfNamingCode");\r
+               assertEquals(ar.getOrchestrationStatus(), "orchestrationStatus");\r
+               assertEquals(ar.getTunnelConnect(), tc);\r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ConfigResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ConfigResourceTest.java
new file mode 100644 (file)
index 0000000..ecaf601
--- /dev/null
@@ -0,0 +1,39 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class ConfigResourceTest {\r
+       private ConfigResource configresource = new ConfigResource();{\r
+       configresource.resourceType = ResourceType.CONFIGURATION;\r
+       }\r
+\r
+       @Test\r
+       public void testConfigResource() {\r
+               configresource.setToscaNodeType("toscaNodeType");\r
+               assertEquals(configresource.getToscaNodeType(), "toscaNodeType");\r
+               \r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ConfigurationTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ConfigurationTest.java
new file mode 100644 (file)
index 0000000..df8440a
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class ConfigurationTest {\r
+       private Configuration configuration = new Configuration();\r
+\r
+       @Test\r
+       public void testConfigurationTest() {\r
+               configuration.setId("id");\r
+               configuration.setName("name");\r
+               configuration.setType("type");\r
+               configuration.setOrchestrationStatus("orchestrationStatus");\r
+               configuration.setTunnelBandwidth("tunnelBandwidth");\r
+               configuration.setVendorAllowedMaxBandwidth("vendorAllowedMaxBandwidth");\r
+               configuration.setResourceVersion("resourceVersion");\r
+               assertEquals(configuration.getId(), "id");\r
+               assertEquals(configuration.getName(), "name");\r
+               assertEquals(configuration.getType(), "type");\r
+               assertEquals(configuration.getOrchestrationStatus(), "orchestrationStatus");\r
+               assertEquals(configuration.getTunnelBandwidth(), "tunnelBandwidth");\r
+               assertEquals(configuration.getVendorAllowedMaxBandwidth(), "vendorAllowedMaxBandwidth");\r
+               assertEquals(configuration.getResourceVersion(), "resourceVersion");\r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/CustomerTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/CustomerTest.java
new file mode 100644 (file)
index 0000000..1a4e089
--- /dev/null
@@ -0,0 +1,38 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class CustomerTest {\r
+       private Customer customer = new Customer();\r
+\r
+       @Test\r
+       public void testCustomer() {\r
+               customer.setSubscriptionServiceType("subscriptionServiceType");\r
+               customer.setGlobalSubscriberId("globalSubscriberId");\r
+               assertEquals(customer.getSubscriptionServiceType(), "subscriptionServiceType");\r
+               assertEquals(customer.getGlobalSubscriberId(), "globalSubscriberId");\r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/HomingSolutionTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/HomingSolutionTest.java
new file mode 100644 (file)
index 0000000..e334348
--- /dev/null
@@ -0,0 +1,58 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class HomingSolutionTest {\r
+       \r
+       private HomingSolution homingsolution = new HomingSolution();\r
+       InventoryType inventory = InventoryType.cloud;\r
+       VnfResource vnfresource = new VnfResource();\r
+       License license = new License();\r
+\r
+       @Test\r
+       public void testHomingSolution() {\r
+               homingsolution.setInventoryType(inventory);\r
+               homingsolution.setRehome(true);\r
+               homingsolution.setServiceInstanceId("serviceInstanceId");\r
+               homingsolution.setCloudOwner("cloudOwner");\r
+               homingsolution.setCloudRegionId("cloudRegionId");\r
+               homingsolution.setAicClli("aicClli");\r
+               homingsolution.setAicVersion("aicVersion");\r
+               homingsolution.setTenant("tenant");\r
+               homingsolution.setVnf(vnfresource);\r
+               homingsolution.setLicense(license);\r
+               assertEquals(homingsolution.getInventoryType(), inventory);\r
+               assertEquals(homingsolution.isRehome(), true);\r
+               assertEquals(homingsolution.getServiceInstanceId(), "serviceInstanceId");\r
+               assertEquals(homingsolution.getCloudOwner(), "cloudOwner");\r
+               assertEquals(homingsolution.getCloudRegionId(), "cloudRegionId");\r
+               assertEquals(homingsolution.getAicClli(), "aicClli");\r
+               assertEquals(homingsolution.getAicVersion(), "aicVersion");\r
+               assertEquals(homingsolution.getTenant(), "tenant");\r
+               assertEquals(homingsolution.getVnf(), vnfresource);\r
+               assertEquals(homingsolution.getLicense(), license);\r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/LicenseTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/LicenseTest.java
new file mode 100644 (file)
index 0000000..9ed194c
--- /dev/null
@@ -0,0 +1,89 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+\r
+import static org.junit.Assert.assertArrayEquals;\r
+import static org.junit.Assert.assertEquals;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.junit.Before;\r
+import org.junit.Test;\r
+import org.junit.runner.RunWith;\r
+import org.mockito.BDDMockito.Then;\r
+import org.mockito.InjectMocks;\r
+import org.mockito.Mock;\r
+import org.powermock.api.mockito.PowerMockito;\r
+import org.powermock.core.classloader.annotations.PrepareForTest;\r
+import org.powermock.modules.junit4.PowerMockRunner;\r
+\r
+\r
+//@RunWith(PowerMockRunner.class)\r
+//@PrepareForTest({License.class})\r
+public class LicenseTest {\r
+       \r
+       //@Mock\r
+       private License license= new License();\r
+       //@InjectMocks\r
+       //private LicenseTest licenceTest;\r
+       List<String> entitlementPoolList = new ArrayList<String>();\r
+       private List<String> licenseKeyGroupList = new ArrayList<String>();\r
+       //JSONArray array = new JSONArray(entitlementPoolList);\r
+       //JSONArray array1 = new JSONArray(licenseKeyGroupList);\r
+       //@PrepareForTest({License.class})\r
+       Long serialVersionUID = 333L;\r
+       \r
+       @Test\r
+       public void testLicense() {\r
+               license.setEntitlementPoolList(entitlementPoolList);\r
+               license.setLicenseKeyGroupList(licenseKeyGroupList);\r
+               //license.addEntitlementPool("entitlementPoolUuid");\r
+               license.addLicenseKeyGroup("licenseKeyGroupUuid");\r
+               assertEquals(license.getEntitlementPoolList(), entitlementPoolList);\r
+               assertEquals(license.getLicenseKeyGroupList(), licenseKeyGroupList);\r
+               assert(license.getEntitlementPoolListAsString()!= null);\r
+               assert(license.getLicenseKeyGroupListAsString()!=null);\r
+               license.addEntitlementPool("entitlementPoolUuid");\r
+               //assertEquals(license.getSerialversionuid(), serialVersionUID);\r
+               //assertArrayEquals(license.getSerialversionuid(), serialVersionUID);\r
+               //assert\r
+       \r
+               /*PowerMockito.mockStatic(License.class);\r
+               Mockito.when(License.getSerialversionuid()).thenReturn(getserial());\r
+               assertEquals(License.getSerialversionuid(),"abc");*/\r
+               \r
+       }\r
+       // @Before \r
+       // public void mocksetUp() {\r
+//      Long serialVersionUID = 333L;\r
+//           PowerMockito.mockStatic(License.class);\r
+//           expect (license.getSerialversionuid()).andReturn(serialVersionUID);\r
+//           //PowerMockito.when(license.getSerialversionuid().\r
+//           //PowerMockito.when(MathUtil.addInteger(2, 2)).thenReturn(1);\r
+//        }\r
+       \r
+       /*private Long getserial() {\r
+               \r
+               return abc;\r
+       }*/\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ModelInfoTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ModelInfoTest.java
new file mode 100644 (file)
index 0000000..90eb230
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class ModelInfoTest {\r
+       private ModelInfo modelinfo = new ModelInfo();\r
+\r
+       @Test\r
+       public void testModelInfo() {\r
+               modelinfo.setModelName("modelName");\r
+               modelinfo.setModelUuid("modelUuid");\r
+               modelinfo.setModelInvariantUuid("modelInvariantUuid");\r
+               modelinfo.setModelVersion("modelVersion");\r
+               modelinfo.setModelCustomizationUuid("modelCustomizationUuid");\r
+               modelinfo.setModelInstanceName("modelInstanceName");\r
+               modelinfo.setModelType("modelType");\r
+               assertEquals(modelinfo.getModelName(), "modelName");\r
+               assertEquals(modelinfo.getModelUuid(), "modelUuid");\r
+               assertEquals(modelinfo.getModelInvariantUuid(), "modelInvariantUuid");\r
+               assertEquals(modelinfo.getModelVersion(), "modelVersion");\r
+               assertEquals(modelinfo.getModelCustomizationUuid(), "modelCustomizationUuid");\r
+               assertEquals(modelinfo.getModelInstanceName(), "modelInstanceName");\r
+               assertEquals(modelinfo.getModelType(), "modelType");\r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ModuleResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ModuleResourceTest.java
new file mode 100644 (file)
index 0000000..58cd45c
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class ModuleResourceTest {\r
+       private ModuleResource moduleresource = new ModuleResource();\r
+\r
+       @Test\r
+       public void testModuleResource() {\r
+               \r
+               moduleresource.setVfModuleName("vfModuleName");\r
+               moduleresource.setHeatStackId("heatStackId");\r
+               moduleresource.setIsBase(true);\r
+               moduleresource.setVfModuleLabel("vfModuleLabel");\r
+               moduleresource.setInitialCount(0);\r
+               moduleresource.setVfModuleType("vfModuleType");\r
+               moduleresource.setHasVolumeGroup(true);\r
+               assertEquals(moduleresource.getVfModuleName(), "vfModuleName");\r
+               assertEquals(moduleresource.getHeatStackId(), "heatStackId");\r
+               assertEquals(moduleresource.getIsBase(), true);\r
+               assertEquals(moduleresource.getVfModuleLabel(), "vfModuleLabel");\r
+               assertEquals(moduleresource.getInitialCount(), 0);\r
+               assertEquals(moduleresource.getVfModuleType(), "vfModuleType");\r
+               assertEquals(moduleresource.isHasVolumeGroup(), true);\r
+                       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/NetworkResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/NetworkResourceTest.java
new file mode 100644 (file)
index 0000000..22e6266
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class NetworkResourceTest {\r
+       private NetworkResource nr = new NetworkResource();\r
+\r
+       @Test\r
+       public void testNetworkResource() {\r
+               nr.setNetworkType("networkType");\r
+               nr.setNetworkRole("networkRole");\r
+               nr.setNetworkTechnology("networkTechnology");\r
+               nr.setNetworkScope("networkScope");\r
+               assertEquals(nr.getNetworkType(), "networkType");\r
+               assertEquals(nr.getNetworkRole(), "networkRole");\r
+               assertEquals(nr.getNetworkTechnology(), "networkTechnology");\r
+               assertEquals(nr.getNetworkScope(), "networkScope");\r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/OwningEntityTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/OwningEntityTest.java
new file mode 100644 (file)
index 0000000..215fa3c
--- /dev/null
@@ -0,0 +1,39 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class OwningEntityTest {\r
+       private OwningEntity oe = new OwningEntity();\r
+\r
+       @Test\r
+       public void testOwingEntity() {\r
+               oe.setOwningEntityId("owningEntityId");\r
+               oe.setOwningEntityName("owningEntityName");\r
+               assertEquals(oe.getOwningEntityId(), "owningEntityId");\r
+               assertEquals(oe.getOwningEntityName(), "owningEntityName");\r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ProjectTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ProjectTest.java
new file mode 100644 (file)
index 0000000..3a9a53f
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class ProjectTest {\r
+       \r
+       private Project project = new Project();\r
+\r
+       @Test\r
+       public void testProject() {\r
+               project.setProjectName("projectName");\r
+               assertEquals(project.getProjectName(), "projectName");\r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/RequestTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/RequestTest.java
new file mode 100644 (file)
index 0000000..9a9d415
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class RequestTest {\r
+       \r
+       private Request request = new Request();\r
+       ModelInfo model = new ModelInfo();\r
+\r
+       @Test\r
+       public void testRequest() {\r
+               request.setSdncRequestId("sdncRequestId");\r
+               request.setRequestId("requestId");\r
+               request.setModelInfo(model);\r
+               request.setProductFamilyId("productFamilyId");\r
+               assertEquals(request.getSdncRequestId(), "sdncRequestId");\r
+               assertEquals(request.getRequestId(), "requestId");\r
+               assertEquals(request.getModelInfo(), model);\r
+               assertEquals(request.getProductFamilyId(), "productFamilyId");\r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ResourceDecompositionTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ResourceDecompositionTest.java
new file mode 100644 (file)
index 0000000..5eaa602
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class ResourceDecompositionTest {\r
+       \r
+       private ResourceDecomposition rd = new ResourceDecomposition() {\r
+               private static final long serialVersionUID = 1L;\r
+       };\r
+       ModelInfo model = new ModelInfo();\r
+       ResourceInstance ri = new ResourceInstance();\r
+       \r
+       \r
+\r
+       @Test\r
+       public void testResourceDecomposition() {\r
+               rd.setModelInfo(model);\r
+               rd.setInstanceData(ri);\r
+               rd.setResourceType("resourceType");\r
+               rd.setResourceInstanceId("newInstanceId");\r
+               rd.setResourceInstanceName("newInstanceName");\r
+               assertEquals(rd.getResourceModel(), model);\r
+               assertEquals(rd.getModelInfo(), model);\r
+               assertEquals(rd.getInstanceData(), ri);\r
+               assertEquals(rd.getResourceInstanceId(), "newInstanceId");\r
+               assertEquals(rd.getResourceInstanceName(), "newInstanceName");\r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ResourceTest.java
new file mode 100644 (file)
index 0000000..8d6b61f
--- /dev/null
@@ -0,0 +1,68 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class ResourceTest {\r
+       private Resource resource = new Resource() {\r
+               private static final long serialVersionUID = 1L;\r
+                \r
+               \r
+       };\r
+       ModelInfo model = new ModelInfo();\r
+       ResourceInstance ri = new ResourceInstance();\r
+       HomingSolution hs = new HomingSolution();\r
+       ResourceType rt = ResourceType.VNF;\r
+       public long concurrencyCounter = 1L;\r
+       long initval = resource.getConcurrencyCounter();\r
+\r
+       @Test\r
+       public void testResource() {\r
+               resource.setResourceId("resourceId");\r
+               resource.setModelInfo(model);\r
+               resource.setResourceInstance(ri);\r
+               resource.setHomingSolution(hs);\r
+               resource.setCurrentHomingSolution(hs);\r
+               resource.setResourceType(rt);\r
+               resource.setToscaNodeType("toscaNodeType");\r
+               resource.setResourceInstanceId("newInstanceId");\r
+               resource.setResourceInstanceName("newInstanceName");\r
+               resource.incrementConcurrencyCounter();\r
+               assertEquals(resource.getResourceId(), "resourceId");\r
+               assertEquals(resource.getModelInfo(), model);\r
+               assertEquals(resource.getResourceInstance(), ri);\r
+               assertEquals(resource.getHomingSolution(), hs);\r
+               assertEquals(resource.getCurrentHomingSolution(), hs);\r
+               assertEquals(resource.getResourceType(), rt);\r
+               assertEquals(resource.getToscaNodeType(), "toscaNodeType");\r
+               assertEquals(resource.getResourceInstanceId(), "newInstanceId");\r
+               assertEquals(resource.getResourceInstanceName(), "newInstanceName");\r
+               assertEquals(resource.getConcurrencyCounter(), initval+1);\r
+       \r
+               \r
+               \r
+               \r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ServiceDecompositionTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ServiceDecompositionTest.java
new file mode 100644 (file)
index 0000000..58548db
--- /dev/null
@@ -0,0 +1,83 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import java.util.List;\r
+\r
+import org.junit.Test;\r
+\r
+public class ServiceDecompositionTest {\r
+       private ServiceDecomposition sd = new ServiceDecomposition();\r
+       ModelInfo model= new ModelInfo();\r
+       ServiceInstance si= new ServiceInstance();\r
+       Project project= new Project();\r
+       OwningEntity oe= new OwningEntity();\r
+       //VnfResource vnf = new VnfResource();\r
+       List<VnfResource> vnfResources;\r
+       List<NetworkResource> networkResources;\r
+       List<ConfigResource> configResources;\r
+       List<AllottedResource> allottedResources;\r
+       Request request= new Request();\r
+       Customer customer= new Customer();\r
+       \r
+\r
+       @Test\r
+       public void testServiceDecomposition() {\r
+               sd.setModelInfo(model);\r
+               sd.setServiceInstance(si);\r
+               sd.setProject(project);\r
+               sd.setOwningEntity(oe);\r
+               sd.setServiceVnfs(vnfResources);\r
+               sd.setServiceConfigs(configResources);\r
+               sd.setServiceNetworks(networkResources);\r
+               sd.setServiceAllottedResources(allottedResources);\r
+               sd.setServiceConfigResources(configResources);\r
+               sd.setServiceType("serviceType");\r
+               sd.setServiceRole("serviceRole");\r
+               sd.setRequest(request);\r
+               sd.setCustomer(customer);\r
+               sd.setCallbackURN("callbackURN");\r
+               sd.setSdncVersion("sdncVersion");\r
+               assertEquals(sd.getModelInfo(), model);\r
+               assertEquals(sd.getServiceInstance(), si);\r
+               assertEquals(sd.getProject(), project);\r
+               assertEquals(sd.getOwningEntity(), oe);\r
+               assertEquals(sd.getServiceVnfs(), vnfResources);\r
+               assertEquals(sd.getServiceConfigs(), configResources);\r
+               assertEquals(sd.getServiceNetworks(), networkResources);\r
+               assertEquals(sd.getServiceAllottedResources(), allottedResources);\r
+               assertEquals(sd.getServiceConfigResources(), configResources);\r
+               assertEquals(sd.getRequest(), request);\r
+               assertEquals(sd.getCustomer(), customer);\r
+               assertEquals(sd.getCallbackURN(), "callbackURN");\r
+               assertEquals(sd.getSdncVersion(), "sdncVersion");\r
+               \r
+               \r
+               \r
+               \r
+               \r
+               \r
+               \r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ServiceInstanceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ServiceInstanceTest.java
new file mode 100644 (file)
index 0000000..b600fef
--- /dev/null
@@ -0,0 +1,61 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import java.util.Map;\r
+\r
+import org.junit.Test;\r
+\r
+public class ServiceInstanceTest {\r
+       \r
+       private ServiceInstance si= new ServiceInstance();\r
+       Map serviceParams;\r
+       Configuration config= new Configuration();\r
+       ModelInfo model= new ModelInfo();\r
+\r
+       @Test\r
+       public void testServiceInstance() {\r
+               si.setServiceType("serviceType");\r
+               si.setServiceId("serviceId");\r
+               si.setServiceParams(serviceParams);\r
+               si.setInstanceId("instanceId");\r
+               si.setInstanceName("instanceName");\r
+               si.setOrchestrationStatus("orchestrationStatus");\r
+               si.setConfiguration(config);\r
+               si.setModelInfo(model);\r
+               si.setEnvironmentContext("environmentContext");\r
+               si.setWorkloadContext("workloadContext");\r
+               assertEquals(si.getServiceType(), "serviceType");\r
+               assertEquals(si.getServiceId(), "serviceId");\r
+               assertEquals(si.getServiceParams(), serviceParams);\r
+               assertEquals(si.getInstanceId(), "instanceId");\r
+               assertEquals(si.getInstanceName(), "instanceName");\r
+               assertEquals(si.getOrchestrationStatus(), "orchestrationStatus");\r
+               assertEquals(si.getConfiguration(), config);\r
+               assertEquals(si.getModelInfo(), model);\r
+               assertEquals(si.getEnvironmentContext(), "environmentContext");\r
+               assertEquals(si.getWorkloadContext(), "workloadContext");\r
+               \r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/SubscriberTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/SubscriberTest.java
new file mode 100644 (file)
index 0000000..7e9aef2
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class SubscriberTest {\r
+       Subscriber subscriber= new Subscriber("globalId", "name", "commonSiteId");\r
+\r
+       @Test\r
+       public void testSubscriber() {\r
+               subscriber.setGlobalId("globalId");\r
+               subscriber.setName("name");\r
+               subscriber.setCommonSiteId("commonSiteId");\r
+               assertEquals(subscriber.getGlobalId(), "globalId");\r
+               assertEquals(subscriber.getName(), "name");\r
+               assertEquals(subscriber.getCommonSiteId(), "commonSiteId");\r
+               \r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/TunnelConnectTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/TunnelConnectTest.java
new file mode 100644 (file)
index 0000000..2a5639f
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class TunnelConnectTest {\r
+       private TunnelConnect tc= new TunnelConnect();\r
+\r
+       @Test\r
+       public void testTunnelConnect() {\r
+               tc.setId("id");\r
+               tc.setUpBandwidth("upBandwidth");\r
+               tc.setDownBandwidth("downBandwidth");\r
+               tc.setUpBandwidth2("upBandwidth2");\r
+               tc.setDownBandwidth2("downBandwidth2");\r
+               assertEquals(tc.getId(), "id");\r
+               assertEquals(tc.getUpBandwidth(), "upBandwidth");\r
+               assertEquals(tc.getDownBandwidth(), "downBandwidth");\r
+               assertEquals(tc.getUpBandwidth2(), "upBandwidth2");\r
+               assertEquals(tc.getDownBandwidth2(), "downBandwidth2");\r
+               \r
+       }\r
+\r
+}\r
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/VnfResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/VnfResourceTest.java
new file mode 100644 (file)
index 0000000..e476ef9
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.bpmn.core.domain;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import java.util.List;\r
+\r
+import org.junit.Test;\r
+\r
+public class VnfResourceTest {\r
+       \r
+       private VnfResource vnf= new VnfResource();\r
+       List<ModuleResource> moduleResources;\r
+\r
+       @Test\r
+       public void testVnfResource() {\r
+               vnf.setModules(moduleResources);\r
+               vnf.setVnfHostname("vnfHostname");\r
+               vnf.setVnfType("vnfType");\r
+               vnf.setNfFunction("nfFunction");\r
+               vnf.setNfType("nfType");\r
+               vnf.setNfRole("nfRole");\r
+               vnf.setNfNamingCode("nfNamingCode");\r
+               vnf.setMultiStageDesign("multiStageDesign");\r
+               assertEquals(vnf.getVfModules(), moduleResources);\r
+               assertEquals(vnf.getVnfHostname(), "vnfHostname");\r
+               assertEquals(vnf.getVnfType(), "vnfType");\r
+               assertEquals(vnf.getNfFunction(), "nfFunction");\r
+               assertEquals(vnf.getNfType(), "nfType");\r
+               assertEquals(vnf.getNfRole(), "nfRole");\r
+               assertEquals(vnf.getNfNamingCode(), "nfNamingCode");\r
+               assertEquals(vnf.getMultiStageDesign(), "multiStageDesign");\r
+               \r
+               \r
+       }\r
+\r
+}\r
index 072c381..933d450 100644 (file)
@@ -133,11 +133,76 @@ public class CreateSDNCCNetworkResource extends AbstractServiceTaskProcessor {
             String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")\r
             String createNetworkInput = execution.getVariable(Prefix + "networkRequest")\r
 \r
+            String hdrRequestId = execution.getVariable("mso-request-id")\r
             String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")\r
-            \r
+            String source = execution.getVariable("source")\r
+            String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")\r
+            ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")\r
+            String serviceType = resourceInputObj.getServiceType()\r
+            String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()\r
+            String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()\r
+            String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelName()\r
+            String serviceModelName = resourceInputObj.getServiceModelInfo().getModelVersion()\r
+            String globalCustomerId = resourceInputObj.getGlobalSubscriberId()\r
+            String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();\r
+            String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()\r
+            String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()\r
+            String modelName = resourceInputObj.getResourceModelInfo().getModelName()\r
+            String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()\r
+            String resourceInputPrameters = resourceInputObj.getResourceParameters()\r
+            String netowrkInputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")\r
+            //here convert json string to xml string\r
+            String netowrkInputParameters = jsonUtil.json2xml(netowrkInputParametersJson)\r
             // 1. prepare assign topology via SDNC Adapter SUBFLOW call\r
             String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, sdnc_svcAction, sdnc_requestAction, null, null, null)\r
-\r
+                    String content =\r
+                    """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"\r
+                                                              xmlns:sdncadapter="http://org.openecomp.mso/workflow/sdnc/adapter/schema/v1" \r
+                                                              xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">\r
+                                 <sdncadapter:RequestHeader>\r
+                                    <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId>\r
+                                    <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>\r
+                                    <sdncadapter:SvcAction>${sdnc_svcAction}</sdncadapter:SvcAction>\r
+                                    <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>\r
+                                    <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>\r
+                                    <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>\r
+                                 </sdncadapter:RequestHeader>\r
+                                 <sdncadapterworkflow:SDNCRequestData>\r
+                                     <request-information>\r
+                                        <request-id>${hdrRequestId}</request-id>\r
+                                        <request-action>${sdnc_requestAction}</request-action>\r
+                                        <source>${source}</source>\r
+                                        <notification-url></notification-url>\r
+                                        <order-number></order-number>\r
+                                        <order-version></order-version>\r
+                                     </request-information>\r
+                                     <service-information>\r
+                                        <service-id>${sdnc_service_id}</service-id>\r
+                                        <subscription-service-type>${serviceType}</subscription-service-type>\r
+                                        <ecomp-model-information>\r
+                                             <model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid>\r
+                                             <model-uuid>${serviceModelUuid}</model-uuid>\r
+                                             <model-version>${serviceModelVersion}</model-version>\r
+                                             <model-name>${serviceModelName}</model-name>\r
+                                        </ecomp-model-information>\r
+                                        <service-instance-id>${serviceInstanceId}</service-instance-id>\r
+                                        <global-customer-id>${globalCustomerId}</global-customer-id>\r
+                                     </service-information>\r
+                                     <network-information>\r
+                                        <ecomp-model-information>\r
+                                             <model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid>\r
+                                             <model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid>\r
+                                             <model-uuid>${modelUuid}</model-uuid>\r
+                                             <model-version>${modelVersion}</model-version>\r
+                                             <model-name>${modelName}</model-name>\r
+                                        </ecomp-model-information>\r
+                                     </network-information>\r
+                                     <network-request-input>\r
+                                       <network-input-parameters>${netowrkInputParameters}</network-input-parameters>\r
+                                     </network-request-input>\r
+                                </sdncadapterworkflow:SDNCRequestData>\r
+                             </aetgt:SDNCAdapterWorkflowRequest>""".trim()\r
+            \r
             String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)\r
             utils.logAudit(sndcTopologyCreateRequesAsString)\r
             execution.setVariable(Prefix + "createSDNCRequest", sndcTopologyCreateRequesAsString)\r
index 291df46..6d5249e 100644 (file)
@@ -47,8 +47,6 @@ import org.openecomp.mso.rest.RESTConfig
 import java.util.List;\r
 import java.util.UUID;\r
 \r
-import javax.mail.Quota.Resource;\r
-\r
 import org.camunda.bpm.engine.delegate.BpmnError\r
 import org.camunda.bpm.engine.runtime.Execution\r
 import org.camunda.bpm.engine.delegate.DelegateExecution\r
index 5eb3fd9..47ad795 100644 (file)
@@ -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
index b3ac195..99248a9 100644 (file)
@@ -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
index 0db7616..b6af0a5 100644 (file)
@@ -25,7 +25,6 @@ import groovy.util.Node
 import groovy.util.XmlParser;\r
 import groovy.xml.QName\r
 \r
-import java.beans.MetaData.java_lang_Class_PersistenceDelegate\r
 import java.io.Serializable;\r
 import java.util.UUID;\r
 import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil\r
@@ -39,7 +38,6 @@ import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
 import org.openecomp.mso.bpmn.common.scripts.VidUtils;\r
 import org.openecomp.mso.bpmn.core.RollbackData\r
 import org.openecomp.mso.bpmn.core.WorkflowException\r
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil\r
 import org.openecomp.mso.bpmn.core.json.JsonUtils\r
 import org.openecomp.mso.bpmn.core.domain.ModelInfo\r
 import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition\r
index c588d38..39820dc 100644 (file)
@@ -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
index 33aaef0..13016a5 100644 (file)
@@ -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
index 2b336af..4a64ab0 100644 (file)
@@ -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
index 9b2ca39..057a1ed 100644 (file)
                <dependency>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpcore</artifactId>
-<!--                   <version>4.3.1</version> -->
                </dependency>
                <dependency>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
-<!--                   <version>4.5.5</version> -->
                </dependency>
                <dependency>
                        <groupId>org.hamcrest</groupId>
index 6588995..45f2746 100644 (file)
@@ -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/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIOperationalEnvironmentTest.java b/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIOperationalEnvironmentTest.java
new file mode 100644 (file)
index 0000000..f512de8
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.client.aai.objects;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class AAIOperationalEnvironmentTest {
+
+       AAIOperationalEnvironment aaiOE =new AAIOperationalEnvironment();
+       
+       @Test
+       public void test() {
+               aaiOE.setOperationalEnvironmentId("operationalEnvironmentId");
+               aaiOE.setOperationalEnvironmentName("operationalEnvironmentName");
+               aaiOE.setOperationalEnvironmentStatus("operationalEnvironmentStatus");
+               aaiOE.setOperationalEnvironmentType("operationalEnvironmentType");
+               aaiOE.setResourceVersion("resourceVersion");
+               aaiOE.setTenantContext("tenantContext");
+               aaiOE.setWorkloadContext("workloadContext");
+               assertEquals(aaiOE.getOperationalEnvironmentId(),"operationalEnvironmentId");
+               assertEquals(aaiOE.getOperationalEnvironmentName(),"operationalEnvironmentName");
+               assertEquals(aaiOE.getOperationalEnvironmentStatus(),"operationalEnvironmentStatus");
+               assertEquals(aaiOE.getOperationalEnvironmentType(),"operationalEnvironmentType");
+               assertEquals(aaiOE.getResourceVersion(),"resourceVersion");
+               assertEquals(aaiOE.getTenantContext(),"tenantContext");
+               assertEquals(aaiOE.getWorkloadContext(),"workloadContext");
+               aaiOE.withOperationalEnvironmentId("operationalEnvironmentId");
+               aaiOE.withOperationalEnvironmentName("operationalEnvironmentName");
+               aaiOE.withOperationalEnvironmentStatus("operationalEnvironmentStatus");
+               aaiOE.withOperationalEnvironmentType("operationalEnvironmentType");
+               aaiOE.withResourceVersion("resourceVersion");
+               aaiOE.withTenantContext("tenantContext");
+               aaiOE.withWorkloadContext("workloadContext");
+       }
+
+}
diff --git a/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIOwningEntityTest.java b/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIOwningEntityTest.java
new file mode 100644 (file)
index 0000000..bc2ae41
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.client.aai.objects;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+
+public class AAIOwningEntityTest {
+       AAIOwningEntity aaiOE= new AAIOwningEntity();
+       @Test
+       public void test() {
+               aaiOE.setOwningEntityId("OwningEntityId");
+               aaiOE.setOwningEntityName("OwningEntityName");
+               assertEquals(aaiOE.getOwningEntityId(), "OwningEntityId");
+               assertEquals(aaiOE.getOwningEntityName(), "OwningEntityName");
+               aaiOE.withOwningEntity("OwningEntityId1", "OwningEntityName1");
+               assert(aaiOE.getUri()!=null);
+               }
+}
diff --git a/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIProjectTest.java b/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIProjectTest.java
new file mode 100644 (file)
index 0000000..872b17a
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.client.aai.objects;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+
+public class AAIProjectTest {
+
+       
+       @Test
+       public void test() {
+               AAIProject aaiP =new AAIProject();
+               aaiP.setProjectName("projectName");
+               assertEquals(aaiP.getProjectName(),"projectName");
+               aaiP.withProjectName("projectName");
+               assert(aaiP.getUri()!=null);
+
+               }
+}
diff --git a/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIServiceInstanceTest.java b/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIServiceInstanceTest.java
new file mode 100644 (file)
index 0000000..692e3bb
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.client.aai.objects;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class AAIServiceInstanceTest {
+
+       @Test
+       public void test() {
+               AAIServiceInstance aaiSI= new AAIServiceInstance();
+               aaiSI.setEnvironmentContext("environmentContext");
+               aaiSI.setModelInvariantUuid("modelInvariantUuid");
+               aaiSI.setModelUuid("modelUuid");
+               aaiSI.setoStatus("oStatus");
+               aaiSI.setServiceInstanceId("serviceInstanceId");
+               aaiSI.setServiceInstanceName("serviceInstanceName");
+               aaiSI.setServiceRole("serviceRole");
+               aaiSI.setServiceType("serviceType");
+               aaiSI.setWorkloadContext("workloadContext");
+               assertEquals(aaiSI.getEnvironmentContext(), "environmentContext");
+               assertEquals(aaiSI.getModelInvariantUuid(), "modelInvariantUuid");
+               assertEquals(aaiSI.getModelUuid(), "modelUuid");
+               assertEquals(aaiSI.getoStatus(), "oStatus");
+               assertEquals(aaiSI.getServiceInstanceId(), "serviceInstanceId");
+               assertEquals(aaiSI.getServiceInstanceName(), "serviceInstanceName");
+               assertEquals(aaiSI.getServiceRole(), "serviceRole");
+               assertEquals(aaiSI.getServiceType(), "serviceType");
+               assertEquals(aaiSI.getWorkloadContext(), "workloadContext");
+               aaiSI.withServiceInstance("serviceInstanceId");
+               assert(aaiSI.getUri()!=null);
+       }
+
+}
index 2686e4b..f052ef9 100644 (file)
Binary files a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar and b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar differ
index d2983ce..eb83644 100644 (file)
Binary files a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar and b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar differ
diff --git a/pom.xml b/pom.xml
index 263a632..0ca4836 100644 (file)
--- a/pom.xml
+++ b/pom.xml
       <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpcore</artifactId>
-        <version>4.4.1</version>
+        <version>4.4.4</version>
         <scope>compile</scope>
       </dependency>
       <dependency>