Merge "Adding Junit"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Thu, 22 Mar 2018 06:01:25 +0000 (06:01 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 22 Mar 2018 06:01:25 +0000 (06:01 +0000)
76 files changed:
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/beans/DeploymentInfoTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/exceptions/MsoCloudifyExceptionTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/exceptions/MsoCloudifyTimeoutTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/HostRouteTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/PoolTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/RouteTargetTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/StackInfoTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/SubnetTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackTest.java [new file with mode: 0644]
adapters/mso-catalog-db-adapter/src/test/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRestTest.java [new file with mode: 0644]
adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/BpelRestClientTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/HealthCheckHandlerTest.java [new file with mode: 0644]
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
aria/aria-rest-server/pom.xml
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/pom.xml
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/DoCreateE2EServiceInstanceV2.groovy [deleted file]
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
bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/AAITasks/AAICreateOwningEntityTest.java [new file with mode: 0644]
bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/aai/AAIServiceInstanceTest.java [new file with mode: 0644]
bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilderTest.java [new file with mode: 0644]
cloudify-client/pom.xml
common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
common/src/test/java/org/openecomp/mso/client/aai/AAIUpdatorImplTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/client/aai/exceptions/AAIPayloadExceptionTest.java [new file with mode: 0644]
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]
mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequestTest.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

diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/beans/DeploymentInfoTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/beans/DeploymentInfoTest.java
new file mode 100644 (file)
index 0000000..2729cf8
--- /dev/null
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.cloudify.beans;
+
+import org.junit.Test;
+import org.openecomp.mso.cloudify.v3.model.Execution;
+
+import java.util.HashMap;
+
+public class DeploymentInfoTest {
+
+    DeploymentInfo deploymentInfo = new DeploymentInfo();
+
+    @Test
+    public void getId() throws Exception {
+        deploymentInfo.getId();
+    }
+
+    @Test
+    public void setId() throws Exception {
+        deploymentInfo.setId("test");
+    }
+
+    @Test
+    public void getStatus() throws Exception {
+        deploymentInfo.getStatus();
+    }
+
+    @Test
+    public void setStatus() throws Exception {
+        deploymentInfo.setStatus(DeploymentStatus.CREATED);
+    }
+
+    @Test
+    public void getOutputs() throws Exception {
+        deploymentInfo.getOutputs();
+    }
+
+    @Test
+    public void setOutputs() throws Exception {
+        deploymentInfo.setOutputs(new HashMap<>());
+    }
+
+    @Test
+    public void getInputs() throws Exception {
+        deploymentInfo.getInputs();
+    }
+
+    @Test
+    public void setInputs() throws Exception {
+        deploymentInfo.setInputs(new HashMap<>());
+    }
+
+    @Test
+    public void getActionStatus() throws Exception {
+        deploymentInfo.getActionStatus();
+    }
+
+    @Test
+    public void getErrorMessage() throws Exception {
+        deploymentInfo.getErrorMessage();
+    }
+
+    @Test
+    public void saveExecutionStatus() throws Exception {
+        deploymentInfo.saveExecutionStatus(new Execution());
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/exceptions/MsoCloudifyExceptionTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/exceptions/MsoCloudifyExceptionTest.java
new file mode 100644 (file)
index 0000000..d4389bf
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.cloudify.exceptions;
+
+import org.junit.Test;
+
+public class MsoCloudifyExceptionTest {
+
+    MsoCloudifyException msoCloudifyException = new MsoCloudifyException(0, "test", "test");
+
+    @Test
+    public void setPendingWorkflow() throws Exception {
+        msoCloudifyException.setPendingWorkflow(true);
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/exceptions/MsoCloudifyTimeoutTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/exceptions/MsoCloudifyTimeoutTest.java
new file mode 100644 (file)
index 0000000..64b8823
--- /dev/null
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.cloudify.exceptions;
+
+import org.junit.Test;
+import org.openecomp.mso.cloudify.v3.model.Execution;
+
+public class MsoCloudifyTimeoutTest {
+
+    MsoCloudifyTimeout msoCloudifyTimeout = new MsoCloudifyTimeout(new Execution());
+
+    @Test
+    public void getExecution() throws Exception {
+        msoCloudifyTimeout.getExecution();
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/HostRouteTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/HostRouteTest.java
new file mode 100644 (file)
index 0000000..14f0485
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============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.openstack.beans;
+
+import org.junit.Test;
+
+public class HostRouteTest {
+
+    HostRoute hostRoute = new HostRoute();
+
+    @Test
+    public void getPrefix() throws Exception {
+        hostRoute.getPrefix();
+    }
+
+    @Test
+    public void setPrefix() throws Exception {
+        hostRoute.setPrefix("192.168.21/0");
+    }
+
+    @Test
+    public void getNextHop() throws Exception {
+        hostRoute.setNextHop("127.0.0.1");
+    }
+
+    @Test
+    public void setNextHop() throws Exception {
+        hostRoute.setNextHop("127.0.0.1");
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantTest.java
new file mode 100644 (file)
index 0000000..6e1f392
--- /dev/null
@@ -0,0 +1,60 @@
+/*-
+ * ============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.openstack.beans;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+
+public class MsoTenantTest {
+
+    MsoTenant msoTenant = new MsoTenant();
+
+    @Test
+    public void getTenantId() throws Exception {
+        msoTenant.getTenantId();
+    }
+
+    @Test
+    public void setTenantId() throws Exception {
+        msoTenant.setTenantId("id-123");
+    }
+
+    @Test
+    public void getTenantName() throws Exception {
+        msoTenant.getTenantName();
+    }
+
+    @Test
+    public void setTenantName() throws Exception {
+        msoTenant.setTenantName("test");
+    }
+
+    @Test
+    public void getMetadata() throws Exception {
+        msoTenant.getMetadata();
+    }
+
+    @Test
+    public void setMetadata() throws Exception {
+        msoTenant.setMetadata(new HashMap<>());
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoTest.java
new file mode 100644 (file)
index 0000000..ec0b917
--- /dev/null
@@ -0,0 +1,86 @@
+/*-
+ * ============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.openstack.beans;
+
+import com.woorea.openstack.quantum.model.Network;
+import org.junit.Test;
+
+import java.util.Arrays;
+
+public class NetworkInfoTest {
+
+    NetworkInfo networkInfo = new NetworkInfo(new Network());
+
+    @Test
+    public void getName() throws Exception {
+        networkInfo.getName();
+    }
+
+    @Test
+    public void setName() throws Exception {
+        networkInfo.setName("test");
+    }
+
+    @Test
+    public void getId() throws Exception {
+        networkInfo.getId();
+    }
+
+    @Test
+    public void setId() throws Exception {
+        networkInfo.setId("test");
+    }
+
+    @Test
+    public void getStatus() throws Exception {
+        networkInfo.getStatus();
+    }
+
+    @Test
+    public void setStatus() throws Exception {
+        networkInfo.setStatus(null);
+    }
+
+    @Test
+    public void getProvider() throws Exception {
+        networkInfo.getProvider();
+    }
+
+    @Test
+    public void setProvider() throws Exception {
+        networkInfo.setProvider("provider");
+    }
+
+    @Test
+    public void getVlans() throws Exception {
+        networkInfo.getVlans();
+    }
+
+    @Test
+    public void setVlans() throws Exception {
+        networkInfo.setVlans(Arrays.asList(10, 20, 30));
+    }
+
+    @Test
+    public void getSubnets() throws Exception {
+        networkInfo.getSubnets();
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackTest.java
new file mode 100644 (file)
index 0000000..b6245f6
--- /dev/null
@@ -0,0 +1,151 @@
+/*-
+ * ============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.openstack.beans;
+
+import org.junit.Test;
+import org.openecomp.mso.entity.MsoRequest;
+
+import java.util.Arrays;
+
+public class NetworkRollbackTest {
+
+    NetworkRollback networkRollback = new NetworkRollback();
+
+    @Test
+    public void getNetworkId() throws Exception {
+        networkRollback.getNetworkId();
+    }
+
+    @Test
+    public void setNetworkId() throws Exception {
+        networkRollback.setNetworkId("255.255.255.0");
+    }
+
+    @Test
+    public void getNeutronNetworkId() throws Exception {
+        networkRollback.getNeutronNetworkId();
+    }
+
+    @Test
+    public void setNeutronNetworkId() throws Exception {
+        networkRollback.setNeutronNetworkId("192.168.0.0");
+    }
+
+    @Test
+    public void getNetworkStackId() throws Exception {
+        networkRollback.getNetworkStackId();
+    }
+
+    @Test
+    public void setNetworkStackId() throws Exception {
+        networkRollback.setNetworkStackId("id-123");
+    }
+
+    @Test
+    public void getTenantId() throws Exception {
+        networkRollback.getTenantId();
+    }
+
+    @Test
+    public void setTenantId() throws Exception {
+        networkRollback.setTenantId("id-123");
+    }
+
+    @Test
+    public void getCloudId() throws Exception {
+        networkRollback.getCloudId();
+    }
+
+    @Test
+    public void setCloudId() throws Exception {
+        networkRollback.setCloudId("id-123");
+    }
+
+    @Test
+    public void getNetworkType() throws Exception {
+        networkRollback.getNetworkType();
+    }
+
+    @Test
+    public void setNetworkType() throws Exception {
+        networkRollback.setNetworkType("type");
+    }
+
+    @Test
+    public void getModelCustomizationUuid() throws Exception {
+        networkRollback.getModelCustomizationUuid();
+    }
+
+    @Test
+    public void setModelCustomizationUuid() throws Exception {
+        networkRollback.setModelCustomizationUuid("id-123");
+    }
+
+    @Test
+    public void getNetworkCreated() throws Exception {
+        networkRollback.getNetworkCreated();
+    }
+
+    @Test
+    public void setNetworkCreated() throws Exception {
+        networkRollback.setNetworkCreated(true);
+    }
+
+    @Test
+    public void getNetworkName() throws Exception {
+        networkRollback.getNetworkName();
+    }
+
+    @Test
+    public void setNetworkName() throws Exception {
+        networkRollback.setNetworkName("test");
+    }
+
+    @Test
+    public void getPhysicalNetwork() throws Exception {
+        networkRollback.getPhysicalNetwork();
+    }
+
+    @Test
+    public void setPhysicalNetwork() throws Exception {
+        networkRollback.setPhysicalNetwork("test");
+    }
+
+    @Test
+    public void getVlans() throws Exception {
+        networkRollback.getVlans();
+    }
+
+    @Test
+    public void setVlans() throws Exception {
+        networkRollback.setVlans(Arrays.asList(10, 20));
+    }
+
+    @Test
+    public void getMsoRequest() throws Exception {
+        networkRollback.getMsoRequest();
+    }
+
+    @Test
+    public void setMsoRequest() throws Exception {
+        networkRollback.setMsoRequest(new MsoRequest());
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/PoolTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/PoolTest.java
new file mode 100644 (file)
index 0000000..9795c18
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============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.openstack.beans;
+
+import org.junit.Test;
+
+public class PoolTest {
+
+    Pool pool = new Pool();
+
+    @Test
+    public void getStart() throws Exception {
+        pool.getStart();
+    }
+
+    @Test
+    public void setStart() throws Exception {
+        pool.setStart("test");
+    }
+
+    @Test
+    public void getEnd() throws Exception {
+        pool.getEnd();
+    }
+
+    @Test
+    public void setEnd() throws Exception {
+        pool.setEnd("test");
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/RouteTargetTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/RouteTargetTest.java
new file mode 100644 (file)
index 0000000..fd34f48
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============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.openstack.beans;
+
+import org.junit.Test;
+
+public class RouteTargetTest {
+
+    RouteTarget routeTarget = new RouteTarget();
+
+    @Test
+    public void getRouteTarget() throws Exception {
+        routeTarget.getRouteTarget();
+    }
+
+    @Test
+    public void setRouteTarget() throws Exception {
+        routeTarget.setRouteTarget("1.1.1.1");
+    }
+
+    @Test
+    public void getRouteTargetRole() throws Exception {
+        routeTarget.getRouteTargetRole();
+    }
+
+    @Test
+    public void setRole() throws Exception {
+        routeTarget.setRole("test");
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/StackInfoTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/StackInfoTest.java
new file mode 100644 (file)
index 0000000..b549b5f
--- /dev/null
@@ -0,0 +1,90 @@
+/*-
+ * ============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.openstack.beans;
+
+import org.junit.Test;
+
+import java.util.HashMap;
+
+public class StackInfoTest {
+
+    StackInfo stackInfo = new StackInfo();
+
+    @Test
+    public void getName() throws Exception {
+        stackInfo.getName();
+    }
+
+    @Test
+    public void setName() throws Exception {
+        stackInfo.setName("test");
+    }
+
+    @Test
+    public void getCanonicalName() throws Exception {
+        stackInfo.getCanonicalName();
+    }
+
+    @Test
+    public void setCanonicalName() throws Exception {
+        stackInfo.setCanonicalName("test");
+    }
+
+    @Test
+    public void getStatus() throws Exception {
+        stackInfo.getStatus();
+    }
+
+    @Test
+    public void setStatus() throws Exception {
+        stackInfo.setStatus(HeatStatus.BUILDING);
+    }
+
+    @Test
+    public void getStatusMessage() throws Exception {
+        stackInfo.getStatusMessage();
+    }
+
+    @Test
+    public void setStatusMessage() throws Exception {
+        stackInfo.setStatusMessage("test");
+    }
+
+    @Test
+    public void getOutputs() throws Exception {
+        stackInfo.getOutputs();
+    }
+
+    @Test
+    public void setOutputs() throws Exception {
+        stackInfo.setOutputs(new HashMap<>());
+    }
+
+    @Test
+    public void getParameters() throws Exception {
+        stackInfo.getParameters();
+    }
+
+    @Test
+    public void setParameters() throws Exception {
+        stackInfo.setParameters(new HashMap<>());
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/SubnetTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/SubnetTest.java
new file mode 100644 (file)
index 0000000..42781c0
--- /dev/null
@@ -0,0 +1,141 @@
+/*-
+ * ============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.openstack.beans;
+
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+public class SubnetTest {
+
+    Subnet subnet = new Subnet();
+
+    @Test
+    public void getSubnetName() throws Exception {
+        subnet.getSubnetName();
+    }
+
+    @Test
+    public void setSubnetName() throws Exception {
+        subnet.setSubnetName("test");
+    }
+
+    @Test
+    public void getAllocationPools() throws Exception {
+        subnet.getAllocationPools();
+    }
+
+    @Test
+    public void getCidr() throws Exception {
+        subnet.getCidr();
+    }
+
+    @Test
+    public void getDnsNameServers() throws Exception {
+        subnet.getDnsNameServers();
+    }
+
+    @Test
+    public void getEnableDHCP() throws Exception {
+        subnet.getEnableDHCP();
+    }
+
+    @Test
+    public void getAddrFromStart() throws Exception {
+        subnet.getAddrFromStart();
+    }
+
+    @Test
+    public void setAddrFromStart() throws Exception {
+        subnet.setAddrFromStart(true);
+    }
+
+    @Test
+    public void getGatewayIp() throws Exception {
+        subnet.getGatewayIp();
+    }
+
+    @Test
+    public void getHostRoutes() throws Exception {
+        subnet.getHostRoutes();
+    }
+
+    @Test
+    public void getNeutronId() throws Exception {
+        subnet.getNeutronId();
+    }
+
+    @Test
+    public void getIpVersion() throws Exception {
+        subnet.getIpVersion();
+    }
+
+    @Test
+    public void getSubnetId() throws Exception {
+        subnet.getSubnetId();
+    }
+
+    @Test
+    public void setAllocationPools() throws Exception {
+        subnet.setAllocationPools(Arrays.asList());
+    }
+
+    @Test
+    public void setCidr() throws Exception {
+        subnet.setCidr("255.255.255.0");
+    }
+
+    @Test
+    public void setDnsNameServers() throws Exception {
+        subnet.setDnsNameServers(Arrays.asList());
+    }
+
+    @Test
+    public void setEnableDHCP() throws Exception {
+        subnet.setEnableDHCP(true);
+    }
+
+    @Test
+    public void setGatewayIp() throws Exception {
+        subnet.setGatewayIp("192.168.0.1");
+    }
+
+    @Test
+    public void setHostRoutes() throws Exception {
+        subnet.setHostRoutes(Collections.emptyList());
+    }
+
+    @Test
+    public void setNeutronId() throws Exception {
+        subnet.setNeutronId("test");
+    }
+
+    @Test
+    public void setIpVersion() throws Exception {
+        subnet.setIpVersion("ipv4");
+    }
+
+    @Test
+    public void setSubnetId() throws Exception {
+        subnet.setSubnetId("1.0.0.0");
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackTest.java
new file mode 100644 (file)
index 0000000..9891811
--- /dev/null
@@ -0,0 +1,179 @@
+/*-
+ * ============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.openstack.beans;
+
+import org.junit.Test;
+import org.openecomp.mso.entity.MsoRequest;
+
+public class VnfRollbackTest {
+
+    VnfRollback vnfRollback = new VnfRollback();
+
+    @Test
+    public void getVnfId() throws Exception {
+        vnfRollback.getVnfId();
+    }
+
+    @Test
+    public void setVnfId() throws Exception {
+        vnfRollback.setVnfId("test");
+    }
+
+    @Test
+    public void getTenantId() throws Exception {
+        vnfRollback.getTenantId();
+    }
+
+    @Test
+    public void setTenantId() throws Exception {
+        vnfRollback.setTenantId("test");
+    }
+
+    @Test
+    public void getCloudSiteId() throws Exception {
+        vnfRollback.getCloudSiteId();
+    }
+
+    @Test
+    public void setCloudSiteId() throws Exception {
+        vnfRollback.setCloudSiteId("test");
+    }
+
+    @Test
+    public void getTenantCreated() throws Exception {
+        vnfRollback.getTenantCreated();
+    }
+
+    @Test
+    public void setTenantCreated() throws Exception {
+        vnfRollback.setTenantCreated(true);
+    }
+
+    @Test
+    public void getVnfCreated() throws Exception {
+        vnfRollback.getVnfCreated();
+    }
+
+    @Test
+    public void setVnfCreated() throws Exception {
+        vnfRollback.setVnfCreated(true);
+    }
+
+    @Test
+    public void getMsoRequest() throws Exception {
+        vnfRollback.getMsoRequest();
+    }
+
+    @Test
+    public void setMsoRequest() throws Exception {
+        vnfRollback.setMsoRequest(new MsoRequest());
+    }
+
+    @Test
+    public void getVolumeGroupName() throws Exception {
+        vnfRollback.getVolumeGroupName();
+    }
+
+    @Test
+    public void setVolumeGroupName() throws Exception {
+        vnfRollback.setVolumeGroupName("test");
+    }
+
+    @Test
+    public void getVolumeGroupId() throws Exception {
+        vnfRollback.getVolumeGroupId();
+    }
+
+    @Test
+    public void setVolumeGroupId() throws Exception {
+        vnfRollback.setVolumeGroupId("test");
+    }
+
+    @Test
+    public void getRequestType() throws Exception {
+        vnfRollback.getRequestType();
+    }
+
+    @Test
+    public void setRequestType() throws Exception {
+        vnfRollback.setRequestType("test");
+    }
+
+    @Test
+    public void getVolumeGroupHeatStackId() throws Exception {
+        vnfRollback.getVolumeGroupHeatStackId();
+    }
+
+    @Test
+    public void setVolumeGroupHeatStackId() throws Exception {
+        vnfRollback.setVolumeGroupHeatStackId("test");
+    }
+
+    @Test
+    public void getBaseGroupHeatStackId() throws Exception {
+        vnfRollback.getBaseGroupHeatStackId();
+    }
+
+    @Test
+    public void setBaseGroupHeatStackId() throws Exception {
+        vnfRollback.setBaseGroupHeatStackId("test");
+    }
+
+    @Test
+    public void isBase() throws Exception {
+        vnfRollback.isBase();
+    }
+
+    @Test
+    public void setIsBase() throws Exception {
+        vnfRollback.setIsBase(true);
+    }
+
+    @Test
+    public void getVfModuleStackId() throws Exception {
+        vnfRollback.getVfModuleStackId();
+    }
+
+    @Test
+    public void setVfModuleStackId() throws Exception {
+        vnfRollback.setVfModuleStackId("test");
+    }
+
+    @Test
+    public void getModelCustomizationUuid() throws Exception {
+        vnfRollback.getModelCustomizationUuid();
+    }
+
+    @Test
+    public void setModelCustomizationUuid() throws Exception {
+        vnfRollback.setModelCustomizationUuid("test");
+    }
+
+    @Test
+    public void getMode() throws Exception {
+        vnfRollback.getMode();
+    }
+
+    @Test
+    public void setMode() throws Exception {
+        vnfRollback.setMode("test");
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRestTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRestTest.java
new file mode 100644 (file)
index 0000000..2e22e97
--- /dev/null
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.adapters.catalogdb;
+
+import org.junit.Test;
+
+public class CatalogDbAdapterRestTest {
+
+    CatalogDbAdapterRest catalogDbAdapterRest = new CatalogDbAdapterRest();
+
+    @Test(expected = NullPointerException.class)
+    public void respond() throws Exception {
+        catalogDbAdapterRest.respond(null, 0, true, null);
+    }
+
+    @Test
+    public void healthcheck() throws Exception {
+       catalogDbAdapterRest.healthcheck("test");
+    }
+
+    @Test
+    public void serviceVnfs() throws Exception {
+       catalogDbAdapterRest.serviceVnfs("test", "test");
+    }
+
+    @Test
+    public void serviceVnfs1() throws Exception {
+       catalogDbAdapterRest.serviceVnfs("test", "test", "test", "test", "test", "test");
+    }
+
+    @Test
+    public void serviceVnfsImpl() throws Exception {
+       catalogDbAdapterRest.serviceVnfsImpl("test", false, "test", "test", "test", "test", "test");
+    }
+
+    @Test
+    public void serviceNetworks() throws Exception {
+       catalogDbAdapterRest.serviceNetworks("test", "test");
+    }
+
+    @Test
+    public void serviceNetworks1() throws Exception {
+       catalogDbAdapterRest.serviceNetworks("test", "test", "test", "test", "test", "test", "test", "test");
+    }
+
+    @Test
+    public void serviceNetworksImpl() throws Exception {
+       catalogDbAdapterRest.serviceNetworksImpl("test", false, "test", "test", "test", "test", "test");
+    }
+
+    @Test
+    public void serviceResources() throws Exception {
+       catalogDbAdapterRest.serviceResources("test", "test", "test", "test");
+    }
+
+    @Test
+    public void serviceAllottedResources() throws Exception {
+       catalogDbAdapterRest.serviceAllottedResources("test", "test");
+    }
+
+    @Test
+    public void serviceAllottedResources1() throws Exception {
+       catalogDbAdapterRest.serviceAllottedResources("test", "test", "test", "test", "test");
+    }
+
+    @Test
+    public void serviceAllottedResourcesImpl() throws Exception {
+       catalogDbAdapterRest.serviceAllottedResourcesImpl("test", false, "test", "test", "test", "test");
+    }
+
+    @Test
+    public void vfModules() throws Exception {
+       catalogDbAdapterRest.vfModules("test");
+    }
+
+    @Test
+    public void serviceToscaCsar() throws Exception {
+       catalogDbAdapterRest.serviceToscaCsar("test");
+    }
+
+    @Test
+    public void resourceRecipe() throws Exception {
+       catalogDbAdapterRest.resourceRecipe("test", "test");
+    }
+
+}
\ No newline at end of file
diff --git a/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/BpelRestClientTest.java b/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/BpelRestClientTest.java
new file mode 100644 (file)
index 0000000..9ab6ce6
--- /dev/null
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.adapters.network;
+
+import org.junit.Test;
+
+public class BpelRestClientTest {
+
+    BpelRestClient bpelRestClient = new BpelRestClient();
+
+    @Test
+    public void getSocketTimeoutTest() throws Exception {
+        bpelRestClient.getSocketTimeout();
+    }
+
+    @Test
+    public void setSocketTimeoutTest() throws Exception {
+        bpelRestClient.setSocketTimeout(300);
+    }
+
+    @Test
+    public void getConnectTimeoutTest() throws Exception {
+        bpelRestClient.getConnectTimeout();
+    }
+
+    @Test
+    public void setConnectTimeoutTest() throws Exception {
+        bpelRestClient.setConnectTimeout(200);
+    }
+
+    @Test
+    public void getRetryCountTest() throws Exception {
+        bpelRestClient.getRetryCount();
+    }
+
+    @Test
+    public void setRetryCountTest() throws Exception {
+        bpelRestClient.setRetryCount(3);
+    }
+
+    @Test
+    public void getRetryIntervalTest() throws Exception {
+        bpelRestClient.getRetryInterval();
+    }
+
+    @Test
+    public void setRetryIntervalTest() throws Exception {
+        bpelRestClient.setRetryInterval(3);
+    }
+
+    @Test
+    public void getCredentialsTest() throws Exception {
+        bpelRestClient.getCredentials();
+    }
+
+    @Test
+    public void setCredentialsTest() throws Exception {
+        bpelRestClient.setCredentials("test");
+    }
+
+    @Test
+    public void getRetryListTest() throws Exception {
+        bpelRestClient.getRetryList();
+    }
+
+    @Test
+    public void setRetryListTest() throws Exception {
+        bpelRestClient.setRetryList("retry list");
+    }
+
+    @Test
+    public void getLastResponseCodeTest() throws Exception {
+        bpelRestClient.getLastResponseCode();
+    }
+
+    @Test
+    public void getLastResponseTest() throws Exception {
+        bpelRestClient.getLastResponse();
+    }
+}
\ No newline at end of file
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/HealthCheckHandlerTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/HealthCheckHandlerTest.java
new file mode 100644 (file)
index 0000000..12e2fa0
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============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.adapters.vnf;
+
+import org.junit.Test;
+
+public class HealthCheckHandlerTest {
+
+    HealthCheckHandler healthCheckHandler = new HealthCheckHandler();
+
+    @Test(expected = ClassFormatError.class)
+    public void healthcheckTest() throws Exception {
+        healthCheckHandler.healthcheck("req-123");
+    }
+
+}
\ No newline at end of file
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 87c8f3e..d74ea93 100644 (file)
@@ -86,7 +86,7 @@
               </environmentVariables>
            </configuration>
          </execution>
-          <execution>
+          <!--execution>
             <id>deploy</id>
            <phase>deploy</phase>
            <goals><goal>exec</goal></goals>
                <WHEEL_PATH>${project.build.directory}/${wheel.name}</WHEEL_PATH>
              </environmentVariables>
            </configuration>
-          </execution>   
+          </execution-->
         </executions>
       </plugin>
     </plugins>
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 f7170ff..f7cb61a 100644 (file)
                        <version>8.9.1</version>\r
                </dependency>\r
 \r
+               <dependency>\r
+                       <groupId>junit</groupId>\r
+                       <artifactId>junit</artifactId>\r
+                       <version>4.12</version>\r
+                       <scope>test</scope>\r
+               </dependency>\r
+\r
                <!--for yang tools-->\r
 <!--           <dependency>\r
                        <groupId>org.onap.so</groupId>\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
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceV2.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceV2.groovy
deleted file mode 100644 (file)
index 2d96ac7..0000000
+++ /dev/null
@@ -1,1071 +0,0 @@
-/*-\r
- * ============LICENSE_START=======================================================\r
- * ONAP - SO\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. \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.infrastructure.scripts;\r
-\r
-import static org.apache.commons.lang3.StringUtils.*;\r
-\r
-import org.apache.commons.lang3.*\r
-import org.camunda.bpm.engine.delegate.BpmnError\r
-import org.camunda.bpm.engine.delegate.DelegateExecution\r
-import org.json.JSONArray;\r
-import org.json.JSONObject;\r
-import org.openecomp.mso.bpmn.common.scripts.AaiUtil\r
-import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor\r
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil\r
-import org.openecomp.mso.bpmn.core.RollbackData\r
-import org.openecomp.mso.bpmn.core.WorkflowException\r
-import org.openecomp.mso.bpmn.core.json.JsonUtils\r
-import org.springframework.web.util.UriUtils;\r
-\r
-import groovy.json.*\r
-\r
-/**\r
- * This groovy class supports the <class>DoCreateServiceInstance.bpmn</class> process.\r
- *\r
- * Inputs:\r
- * @param - msoRequestId\r
- * @param - globalSubscriberId\r
- * @param - subscriptionServiceType\r
- * @param - serviceInstanceId\r
- * @param - serviceInstanceName - O\r
- * @param - serviceModelInfo\r
- * @param - productFamilyId\r
- * @param - disableRollback\r
- * @param - failExists - TODO\r
- * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)\r
- * @param - sdncVersion ("1610")\r
- * @param - serviceDecomposition - Decomposition for R1710 \r
- * (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)\r
- *\r
- * Outputs:\r
- * @param - rollbackData (localRB->null)\r
- * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)\r
- * @param - WorkflowException\r
- * @param - serviceInstanceName - (GET from AAI if null in input)\r
- *\r
- */\r
-public class DoCreateE2EServiceInstanceV2 extends AbstractServiceTaskProcessor {\r
-\r
-       String Prefix="DCRESI_"\r
-       private static final String DebugFlag = "isDebugEnabled"\r
-       \r
-       ExceptionUtil exceptionUtil = new ExceptionUtil()\r
-       JsonUtils jsonUtil = new JsonUtils()\r
-\r
-       public void preProcessRequest (DelegateExecution execution) {\r
-           //only for dug\r
-               execution.setVariable("isDebugLogEnabled","true")\r
-               execution.setVariable("unit_test", "true")\r
-               execution.setVariable("skipVFC", "true")\r
-               \r
-               def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               String msg = ""\r
-               utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 preProcessRequest *****",  isDebugEnabled)\r
-               \r
-               utils.log("INFO","  unit test : " + execution.getVariable("unit_test"),  isDebugEnabled)        \r
-\r
-               try {\r
-                       execution.setVariable("prefix", Prefix)\r
-                       //Inputs\r
-                       //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology\r
-                       String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId\r
-                       utils.log("INFO"," ***** globalSubscriberId *****" + globalSubscriberId,  isDebugEnabled)\r
-                       \r
-                       //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology\r
-                       String serviceType = execution.getVariable("serviceType")\r
-                       utils.log("INFO"," ***** serviceType *****" + serviceType,  isDebugEnabled)\r
-                       \r
-                       //requestDetails.requestParameters. for SDNC assignTopology\r
-                       String productFamilyId = execution.getVariable("productFamilyId") //AAI productFamilyId\r
-\r
-                       if (isBlank(globalSubscriberId)) {\r
-                               msg = "Input globalSubscriberId is null"\r
-                               utils.log("INFO", msg, isDebugEnabled)\r
-                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)\r
-                       }\r
-                       \r
-                       if (isBlank(serviceType)) {\r
-                               msg = "Input serviceType is null"\r
-                               utils.log("INFO", msg, isDebugEnabled)\r
-                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)\r
-                       }\r
-                       \r
-                       if (productFamilyId == null) {\r
-                               execution.setVariable("productFamilyId", "")\r
-                       }\r
-                       \r
-                       String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')\r
-                       if (isBlank(sdncCallbackUrl)) {\r
-                               msg = "URN_mso_workflow_sdncadapter_callback is null"\r
-                               utils.log("INFO", msg, isDebugEnabled)\r
-                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)\r
-                       }\r
-                       execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)\r
-                       utils.log("INFO","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)\r
-\r
-                       //requestDetails.modelInfo.for AAI PUT servieInstanceData                       \r
-                       //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData \r
-                       String serviceInstanceName = execution.getVariable("serviceInstanceName")\r
-                       String serviceInstanceId = execution.getVariable("serviceInstanceId")\r
-                       String uuiRequest = execution.getVariable("uuiRequest")\r
-                       utils.log("INFO","uuiRequest: " + uuiRequest, isDebugEnabled)\r
-                       \r
-                       String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceDefId")\r
-                       utils.log("INFO","modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)\r
-                       \r
-                       String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.templateId")\r
-                       utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)\r
-                       \r
-                       String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")\r
-                       utils.log("INFO","serviceModelName: " + serviceModelName, isDebugEnabled)\r
-                       execution.setVariable("serviceModelName", serviceModelName)\r
-                       \r
-            //aai serviceType and Role can be setted as fixed value now.\r
-                       String aaiServiceType = serviceType\r
-                       String aaiServiceRole = serviceType+"Role"\r
-                       \r
-                       execution.setVariable("modelInvariantUuid", modelInvariantUuid)\r
-                       execution.setVariable("modelUuid", modelUuid)\r
-\r
-                       //AAI PUT\r
-                       String oStatus = execution.getVariable("initialStatus") ?: ""\r
-                       utils.log("INFO","oStatus: " + oStatus, isDebugEnabled)\r
-                       if ("TRANSPORT".equalsIgnoreCase(serviceType))\r
-                       {\r
-                               oStatus = "Created"\r
-                       }\r
-                       \r
-                       \r
-\r
-                       String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${oStatus}</orchestration-status>"\r
-                       utils.log("INFO","statusLine: " + statusLine, isDebugEnabled)   \r
-                       AaiUtil aaiUriUtil = new AaiUtil(this)\r
-                       utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled) \r
-                       String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)\r
-                       utils.log("INFO","aai_uri: " + aai_uri, isDebugEnabled)\r
-                       String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)\r
-                       utils.log("INFO","namespace: " + namespace, isDebugEnabled)\r
-                       /*\r
-                       String serviceInstanceData =\r
-                                       """<service-instance xmlns=\"${namespace}\">\r
-                               <service-instance-id>${serviceInstanceId}</service-instance-id>\r
-                               <service-instance-name>${serviceInstanceName}</service-instance-name>\r
-                                       <service-type>${aaiServiceType}</service-type>\r
-                                       <service-role>${aaiServiceRole}</service-role>\r
-                                       ${statusLine}\r
-                                   <model-invariant-id>${modelInvariantUuid}</model-invariant-id>\r
-                                   <model-version-id>${modelUuid}</model-version-id>\r
-                                       </service-instance>""".trim()\r
-            */\r
-            //begin only for test\r
-                       String serviceInstanceData =\r
-                                       """<service-instance xmlns=\"${namespace}\">\r
-                               <service-instance-id>${serviceInstanceId}</service-instance-id>\r
-                               <service-instance-name>${serviceInstanceName}</service-instance-name>\r
-                                       <service-type>${aaiServiceType}</service-type>\r
-                                       <service-role>${aaiServiceRole}</service-role>\r
-                                       ${statusLine}\r
-                                       </service-instance>""".trim()\r
-                       //end only for test\r
-                       execution.setVariable("serviceInstanceData", serviceInstanceData)\r
-                       utils.log("INFO","serviceInstanceData: " + serviceInstanceData, isDebugEnabled)\r
-                       utils.logAudit(serviceInstanceData)\r
-                       utils.log("INFO", " aai_uri " + aai_uri + " namespace:" + namespace, isDebugEnabled)\r
-                       utils.log("INFO", " 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData, isDebugEnabled)\r
-                       \r
-                       execution.setVariable("serviceSDNCCreate", "false")\r
-                       execution.setVariable("operationStatus", "Waiting deploy resource...")                  \r
-\r
-               } catch (BpmnError e) {\r
-                       throw e;\r
-               } catch (Exception ex){\r
-                       msg = "Exception in preProcessRequest " + ex.getMessage()\r
-                       utils.log("INFO", msg, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)\r
-               }\r
-               utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-\r
-       public void postProcessAAIGET(DelegateExecution execution) {\r
-               def method = getClass().getSimpleName() + '.postProcessAAIGET(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 postProcessAAIGET ***** ", isDebugEnabled)\r
-               String msg = ""\r
-\r
-               try {\r
-                       String serviceInstanceName = execution.getVariable("serviceInstanceName")\r
-                       boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")\r
-                       if(!succInAAI){\r
-                               utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceName, isDebugEnabled)\r
-                               WorkflowException workflowException = execution.getVariable("WorkflowException")\r
-                               utils.logAudit("workflowException: " + workflowException)\r
-                               if(workflowException != null){\r
-                                       exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())\r
-                               }\r
-                               else\r
-                               {\r
-                                       msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI\r
-                                       utils.log("INFO", msg, isDebugEnabled)\r
-                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")\r
-                               if(foundInAAI){\r
-                                       utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)\r
-                                       msg = "ServiceInstance already exists in AAI:" + serviceInstanceName\r
-                                       utils.log("INFO", msg, isDebugEnabled)\r
-                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)\r
-                               }\r
-                       }\r
-               } catch (BpmnError e) {\r
-                       throw e;\r
-               } catch (Exception ex) {\r
-                       msg = "Exception in DoCreateServiceInstance.postProcessAAIGET. " + ex.getMessage()\r
-                       utils.log("INFO", msg, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)\r
-               }\r
-               utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-\r
-       public void postProcessAAIPUT(DelegateExecution execution) {\r
-               def method = getClass().getSimpleName() + '.postProcessAAIPUT(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 postProcessAAIPUT ***** ", isDebugEnabled)\r
-               String msg = ""\r
-               try {\r
-                       String serviceInstanceId = execution.getVariable("serviceInstanceId")\r
-                       boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")\r
-                       if(!succInAAI){\r
-                               utils.log("INFO","Error putting Service-instance in AAI", + serviceInstanceId, isDebugEnabled)\r
-                               WorkflowException workflowException = execution.getVariable("WorkflowException")\r
-                               utils.logAudit("workflowException: " + workflowException)\r
-                               if(workflowException != null){\r
-                                       exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               //start rollback set up\r
-                               RollbackData rollbackData = new RollbackData()\r
-                               def disableRollback = execution.getVariable("disableRollback")\r
-                               rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString())\r
-                               rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true")\r
-                               rollbackData.put("SERVICEINSTANCE", "serviceInstanceId", serviceInstanceId)\r
-                               rollbackData.put("SERVICEINSTANCE", "subscriptionServiceType", execution.getVariable("subscriptionServiceType"))\r
-                               rollbackData.put("SERVICEINSTANCE", "globalSubscriberId", execution.getVariable("globalSubscriberId"))\r
-                               execution.setVariable("rollbackData", rollbackData)\r
-                       }\r
-\r
-               } catch (BpmnError e) {\r
-                       throw e;\r
-               } catch (Exception ex) {\r
-                       msg = "Exception in DoCreateServiceInstance.postProcessAAIDEL. " + ex.getMessage()\r
-                       utils.log("INFO", msg, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)\r
-               }\r
-               utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-       \r
-       public void postProcessAAIGET2(DelegateExecution execution) {\r
-               def method = getClass().getSimpleName() + '.postProcessAAIGET2(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 postProcessAAIGET2 ***** ", isDebugEnabled)\r
-               String msg = ""\r
-\r
-               try {\r
-                       String serviceInstanceName = execution.getVariable("serviceInstanceName")\r
-                       boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")\r
-                       if(!succInAAI){\r
-                               utils.log("INFO","Error getting Service-instance from AAI in postProcessAAIGET2", + serviceInstanceName, isDebugEnabled)\r
-                               WorkflowException workflowException = execution.getVariable("WorkflowException")\r
-                               utils.logAudit("workflowException: " + workflowException)\r
-                               if(workflowException != null){\r
-                                       exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())\r
-                               }\r
-                               else\r
-                               {\r
-                                       msg = "Failure in postProcessAAIGET2 GENGS_SuccessIndicator:" + succInAAI\r
-                                       utils.log("INFO", msg, isDebugEnabled)\r
-                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")\r
-                               if(foundInAAI){\r
-                                       String aaiService = execution.getVariable("GENGS_service")\r
-                                       if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "service-instance-name"))) {\r
-                                               execution.setVariable("serviceInstanceName",  utils.getNodeText1(aaiService, "service-instance-name"))\r
-                                               utils.log("INFO","Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"), isDebugEnabled)\r
-                                       }\r
-                               }\r
-                       }\r
-               } catch (BpmnError e) {\r
-                       throw e;\r
-               } catch (Exception ex) {\r
-                       msg = "Exception in DoCreateServiceInstance.postProcessAAIGET2 " + ex.getMessage()\r
-                       utils.log("INFO", msg, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)\r
-               }\r
-               utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-\r
-       public void preProcessRollback (DelegateExecution execution) {\r
-               def method = getClass().getSimpleName() + '.preProcessRollback(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 preProcessRollback ***** ", isDebugEnabled)\r
-               try {\r
-                       \r
-                       Object workflowException = execution.getVariable("WorkflowException");\r
-\r
-                       if (workflowException instanceof WorkflowException) {\r
-                               utils.log("INFO", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)\r
-                               execution.setVariable("prevWorkflowException", workflowException);\r
-                               //execution.setVariable("WorkflowException", null);\r
-                       }\r
-               } catch (BpmnError e) {\r
-                       utils.log("INFO", "BPMN Error during preProcessRollback", isDebugEnabled)\r
-               } catch(Exception ex) {\r
-                       String msg = "Exception in preProcessRollback. " + ex.getMessage()\r
-                       utils.log("INFO", msg, isDebugEnabled)\r
-               }\r
-               utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-\r
-       public void postProcessRollback (DelegateExecution execution) {\r
-               def method = getClass().getSimpleName() + '.postProcessRollback(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 postProcessRollback ***** ", isDebugEnabled)\r
-               String msg = ""\r
-               try {\r
-                       Object workflowException = execution.getVariable("prevWorkflowException");\r
-                       if (workflowException instanceof WorkflowException) {\r
-                               utils.log("INFO", "Setting prevException to WorkflowException: ", isDebugEnabled)\r
-                               execution.setVariable("WorkflowException", workflowException);\r
-                       }\r
-                       execution.setVariable("rollbackData", null)\r
-               } catch (BpmnError b) {\r
-                       utils.log("INFO", "BPMN Error during postProcessRollback", isDebugEnabled)\r
-                       throw b;\r
-               } catch(Exception ex) {\r
-                       msg = "Exception in postProcessRollback. " + ex.getMessage()\r
-                       utils.log("INFO", msg, isDebugEnabled)\r
-               }\r
-               utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-       \r
-       /**\r
-        * Init the service Operation Status\r
-        */\r
-       public void preUpdateServiceOperationStatus(DelegateExecution execution){\r
-        def method = getClass().getSimpleName() + '.preUpdateServiceOperationStatus(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-        \r
-        try{\r
-            String serviceId = execution.getVariable("serviceInstanceId")\r
-            String operationId = execution.getVariable("operationId")\r
-            String serviceName = execution.getVariable("serviceInstanceName")\r
-            String operationType = "CREATE"\r
-            String userId = ""\r
-            String result = "processing"\r
-            String progress = execution.getVariable("progress")\r
-                       utils.log("INFO", "progress: " + progress , isDebugEnabled)\r
-                       if ("100".equalsIgnoreCase(progress))\r
-                       {\r
-                               result = "finished"\r
-                       }\r
-            String reason = ""\r
-            String operationContent = "Prepare service creation : " + execution.getVariable("operationStatus")\r
-                       \r
-            utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)\r
-            serviceId = UriUtils.encode(serviceId,"UTF-8")\r
-            execution.setVariable("serviceInstanceId", serviceId)\r
-            execution.setVariable("operationId", operationId)\r
-            execution.setVariable("operationType", operationType)\r
-\r
-            def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"\r
-            execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)\r
-            utils.log("INFO", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)\r
-\r
-            execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")\r
-                       String payload =\r
-                """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"\r
-                        xmlns:ns="http://org.openecomp.mso/requestsdb">\r
-                        <soapenv:Header/>\r
-                        <soapenv:Body>\r
-                            <ns:updateServiceOperationStatus xmlns:ns="http://org.openecomp.mso/requestsdb">\r
-                            <serviceId>${serviceId}</serviceId>\r
-                            <operationId>${operationId}</operationId>\r
-                            <serviceName>${serviceName}</serviceName>\r
-                            <operationType>${operationType}</operationType>\r
-                            <userId>${userId}</userId>\r
-                            <result>${result}</result>\r
-                            <operationContent>${operationContent}</operationContent>\r
-                            <progress>${progress}</progress>\r
-                            <reason>${reason}</reason>\r
-                        </ns:updateServiceOperationStatus>\r
-                    </soapenv:Body>\r
-                </soapenv:Envelope>"""\r
-\r
-            payload = utils.formatXml(payload)\r
-            execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)\r
-            utils.log("INFO", "Outgoing preUpdateServiceOperationStatus: \n" + payload, isDebugEnabled)\r
-           \r
-\r
-        }catch(Exception e){\r
-            utils.log("ERROR", "Exception Occured Processing preUpdateServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)\r
-            execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preUpdateServiceOperationStatus Method:\n" + e.getMessage())\r
-        }\r
-        utils.log("INFO", "======== COMPLETED preUpdateServiceOperationStatus Process ======== ", isDebugEnabled)  \r
-        utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-       \r
-\r
-       public void preInitResourcesOperStatus(DelegateExecution execution){\r
-        def method = getClass().getSimpleName() + '.preInitResourcesOperStatus(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-\r
-        utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 preInitResourcesOperStatus Process ======== ", isDebugEnabled)\r
-        try{\r
-            String serviceId = execution.getVariable("serviceInstanceId")\r
-            String operationId = execution.getVariable("operationId")\r
-            String operationType = execution.getVariable("operationType")\r
-            String resourceTemplateUUIDs = ""\r
-            String result = "processing"\r
-            String progress = "0"\r
-            String reason = ""\r
-            String operationContent = "Prepare service creation"\r
-            utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType, isDebugEnabled)\r
-            serviceId = UriUtils.encode(serviceId,"UTF-8")\r
-            execution.setVariable("serviceInstanceId", serviceId)\r
-            execution.setVariable("operationId", operationId)\r
-            execution.setVariable("operationType", operationType)\r
-            String incomingRequest = execution.getVariable("uuiRequest")\r
-            String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")  \r
-            List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)   \r
-            for(String resource : resourceList){\r
-                    resourceTemplateUUIDs  = resourceTemplateUUIDs + jsonUtil.getJsonValue(resource, "resourceId") + ":"\r
-            }           \r
-\r
-            def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"\r
-            execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)\r
-            utils.log("INFO", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)\r
-\r
-            String payload =\r
-                """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"\r
-                        xmlns:ns="http://org.openecomp.mso/requestsdb">\r
-                        <soapenv:Header/>\r
-                        <soapenv:Body>\r
-                            <ns:initResourceOperationStatus xmlns:ns="http://org.openecomp.mso/requestsdb">\r
-                            <serviceId>${serviceId}</serviceId>\r
-                            <operationId>${operationId}</operationId>\r
-                            <operationType>${operationType}</operationType>\r
-                            <resourceTemplateUUIDs>${resourceTemplateUUIDs}</resourceTemplateUUIDs>\r
-                        </ns:initResourceOperationStatus>\r
-                    </soapenv:Body>\r
-                </soapenv:Envelope>"""\r
-\r
-            payload = utils.formatXml(payload)\r
-            execution.setVariable("CVFMI_initResOperStatusRequest", payload)\r
-            utils.log("INFO", "Outgoing initResourceOperationStatus: \n" + payload, isDebugEnabled)\r
-            utils.logAudit("DoCustomDeleteE2EServiceInstanceV2 Outgoing initResourceOperationStatus Request: " + payload)\r
-\r
-        }catch(Exception e){\r
-            utils.log("ERROR", "Exception Occured Processing preInitResourcesOperStatus. Exception is:\n" + e, isDebugEnabled)\r
-            execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())\r
-        }\r
-        utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-       \r
-       /**\r
-        * prepare resource create request\r
-        */\r
-       public void preResourceRequest(execution){\r
-           def method = getClass().getSimpleName() + '.preResourceRequest(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               \r
-        utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 preResourceRequest Process ======== ", isDebugEnabled)\r
-               try {\r
-                       String resourceType = execution.getVariable("resourceType")\r
-               String serviceInstanceName = execution.getVariable("serviceInstanceName")\r
-               String nsServiceName = resourceType + "_" + serviceInstanceName\r
-               execution.setVariable("nsServiceName", nsServiceName)\r
-               utils.log("INFO", "Prepare VFC Request nsServiceName:" + nsServiceName, isDebugEnabled)\r
-               String globalSubscriberId = execution.getVariable("globalSubscriberId")\r
-               String serviceType = execution.getVariable("serviceType")\r
-               String serviceId = execution.getVariable("serviceInstanceId")\r
-               execution.setVariable("serviceId", serviceId)\r
-               String operationId = execution.getVariable("operationId")\r
-               String incomingRequest = execution.getVariable("uuiRequest")\r
-               String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")  \r
-               String nsServiceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")  \r
-               execution.setVariable("nsServiceDescription", nsServiceDescription)\r
-               utils.log("INFO", "Prepare VFC Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)\r
-               List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)   \r
-               for(String resource : resourceList){\r
-               String resourceName = jsonUtil.getJsonValue(resource, "resourceName")  \r
-               if(StringUtils.containsIgnoreCase(resourceName, resourceType)){\r
-                       String resourceUUID  = jsonUtil.getJsonValue(resource, "resourceId")\r
-                       String resourceInvariantUUID  = jsonUtil.getJsonValue(resource, "resourceDefId")\r
-                       String resourceParameters = jsonUtil.getJsonValue(resource, "nsParameters")                \r
-                       execution.setVariable("resourceUUID", resourceUUID)\r
-                       execution.setVariable("resourceInvariantUUID", resourceInvariantUUID)\r
-                       execution.setVariable("resourceParameters", resourceParameters)\r
-                       utils.log("INFO", "Prepare VFC Request resourceType:" + resourceType, isDebugEnabled)\r
-                       utils.log("INFO", "Prepare VFC Request resourceUUID:" + resourceUUID, isDebugEnabled)\r
-                       utils.log("INFO", "Prepare VFC Request resourceParameters:" + resourceParameters, isDebugEnabled)\r
-               } \r
-               }\r
-               } catch (BpmnError b) {\r
-                       utils.log("INFO", "BPMN Error during preResourceRequest", isDebugEnabled)\r
-                       throw b;\r
-               } catch(Exception ex) {\r
-                       msg = "Exception in preResourceRequest. " + ex.getMessage()\r
-                       utils.log("INFO", msg, isDebugEnabled)\r
-               }\r
-          utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-       \r
-        /**\r
-     * post config request.\r
-     */\r
-       public void postConfigRequest(execution){\r
-           //now do noting\r
-       }\r
-       \r
-    /***********************************************************************************************/\r
-\r
-       private void loadResourcesProperties(DelegateExecution execution) {\r
-               def method = getClass().getSimpleName() + '.loadResourcesProperties(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               String loadFilePath = "/etc/mso/config.d/reources.json"\r
-               try{\r
-                       def jsonPayload = new File(loadFilePath).text\r
-                       utils.log("INFO","jsonPayload: " + jsonPayload, isDebugEnabled)\r
-\r
-                       String resourcesProperties = jsonUtil.prettyJson(jsonPayload.toString())\r
-                       utils.log("INFO","resourcesProperties: " + resourcesProperties, isDebugEnabled)\r
-                       \r
-                       String createResourceSort = jsonUtil.getJsonValue(resourcesProperties, "CreateResourceSort")\r
-                       //utils.log("INFO","createResourceSort: " + createResourceSort, isDebugEnabled)\r
-                       execution.setVariable("createResourceSort", createResourceSort)\r
-                       \r
-                       String deleteResourceSort = jsonUtil.getJsonValue(resourcesProperties, "DeleteResourceSort")\r
-                       //utils.log("INFO","deleteResourceSort: " + deleteResourceSort, isDebugEnabled)\r
-                       execution.setVariable("deleteResourceSort", deleteResourceSort)\r
-                       \r
-                       \r
-                       String resourceControllerType = jsonUtil.getJsonValue(resourcesProperties, "ResourceControllerType")\r
-                       //utils.log("INFO","resourceControllerType: " + resourceControllerType, isDebugEnabled)\r
-                       execution.setVariable("resourceControllerType", resourceControllerType)                 \r
-                       \r
-                       \r
-               }catch(Exception ex){\r
-            // try error in method block\r
-                       String exceptionMessage = "Bpmn error encountered in " + method + " - " + ex.getMessage()\r
-                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-       private sortCreateResource(DelegateExecution execution) {\r
-               def method = getClass().getSimpleName() + '.sortCreateResource(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               String createResourceSortDef = """[\r
-                {\r
-                    "resourceType":"vEPC"\r
-                },\r
-                {\r
-                    "resourceType":"vIMS"\r
-                },\r
-                {\r
-                    "resourceType":"vCPE"\r
-                },\r
-                {\r
-                    "resourceType":"vFW"\r
-                },\r
-                               {\r
-                    "resourceType":"Underlay"\r
-                },\r
-                {\r
-                    "resourceType":"Overlay"\r
-                },\r
-                               {\r
-                    "resourceType":"GRE_AAR"\r
-                },\r
-                {\r
-                    "resourceType":"APN_AAR"\r
-                },\r
-                {\r
-                    "resourceType":"VPN_SAR"\r
-                },\r
-                {\r
-                    "resourceType":"GRE_SAR"\r
-                }             \r
-                \r
-            ]""".trim()\r
-               \r
-        try{\r
-\r
-                       loadResourcesProperties(execution)\r
-                       String createResourceSort = execution.getVariable("createResourceSort")\r
-                       if (isBlank(createResourceSort)) {\r
-                               createResourceSort = createResourceSortDef;\r
-                       }\r
-                       \r
-                       List<String> sortResourceList = jsonUtil.StringArrayToList(execution, createResourceSort)\r
-               utils.log("INFO", "sortResourceList : " + sortResourceList, isDebugEnabled)              \r
-\r
-                       JSONArray newResourceList      = new JSONArray()\r
-                       int resSortCount = sortResourceList.size()\r
-  \r
-                       \r
-                       for ( int currentResource = 0 ; currentResource < resSortCount ; currentResource++ ) { \r
-                               String sortResource = sortResourceList[currentResource]\r
-                               String resourceType = jsonUtil.getJsonValue(sortResource, "resourceType")                               \r
-                               List<String> resourceList = execution.getVariable(Prefix+"resourceList")\r
-\r
-                               for (String resource : resourceList) {\r
-                                       //utils.log("INFO", "resource : " + resource, isDebugEnabled)\r
-                                       String resourceName = jsonUtil.getJsonValue(resource, "resourceName")\r
-                                       //utils.log("INFO", "resource Name : " + resourceName, isDebugEnabled)\r
-                                       String[] split = resourceName.split("_")\r
-                                       \r
-                                       utils.log("INFO", "split : " + split, isDebugEnabled)\r
-                                       int strLen = split.size()\r
-                                       String allottedResourceType = ""\r
-                       \r
-                                       if (strLen <2) {\r
-                                               allottedResourceType = split[0]\r
-                                       }\r
-                                       else {\r
-                                               allottedResourceType = split[0] + "_" + split[1]\r
-                                       }\r
-                       \r
-                                       if (StringUtils.containsIgnoreCase(allottedResourceType, resourceType)) {\r
-                                               utils.log("INFO", "allottedResourceType : " + allottedResourceType + " resourceType : " + resourceType, isDebugEnabled)\r
-                                               utils.log("INFO", "resource : " + resource , isDebugEnabled)\r
-                                               JSONObject jsonObj = new JSONObject(resource)\r
-                                               newResourceList.put(jsonObj)\r
-                                               \r
-                                       }\r
-                                       utils.log("INFO", "Get next sort type " , isDebugEnabled)\r
-                               }\r
-                       } \r
-                       utils.log("INFO", "newResourceList : " + newResourceList, isDebugEnabled)\r
-            String newResourceStr = newResourceList.toString()         \r
-            List<String> newResourceListStr = jsonUtil.StringArrayToList(execution, newResourceStr)                    \r
-               \r
-                       execution.setVariable(Prefix+"resourceList", newResourceListStr)\r
-                       utils.log("INFO", "newResourceList : " + newResourceListStr, isDebugEnabled) \r
-                       \r
-               }catch(Exception ex){\r
-            // try error in method block\r
-                       String exceptionMessage = "Bpmn error encountered in " + method + " - " + ex.getMessage()\r
-                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-               \r
-       }\r
-       /**\r
-        * get service resources\r
-        */\r
-       public void getServiceResources(DelegateExecution execution){\r
-        def method = getClass().getSimpleName() + '.getServiceResources(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-        utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 getServiceResources Process ======== ", isDebugEnabled)\r
-        try{\r
-            execution.setVariable(Prefix+"resourceCount", 0)\r
-                       execution.setVariable(Prefix+"nextResource", 0)\r
-\r
-                       String incomingRequest = execution.getVariable("uuiRequest")\r
-            String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")  \r
-            utils.log("INFO", "Resources String : " + resourcesStr, isDebugEnabled)\r
-                       if (!isBlank(resourcesStr)) {\r
-                               List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)   \r
-               utils.log("INFO", "Resource List : " + resourceList, isDebugEnabled)\r
-                               execution.setVariable(Prefix+"resourceList", resourceList)\r
-                               execution.setVariable(Prefix+"resourceCount", resourceList.size())\r
-                               execution.setVariable(Prefix+"nextResource", 0)\r
-                       }\r
-                       \r
-                       int resourceNum = execution.getVariable(Prefix+"nextResource")\r
-                       utils.log("DEBUG", "Current Resource count:"+ execution.getVariable(Prefix+"nextResource"), isDebugEnabled)\r
-                       \r
-                       int resourceCount = execution.getVariable(Prefix+"resourceCount")\r
-                       utils.log("DEBUG", "Total Resource count:"+ execution.getVariable(Prefix+"resourceCount"), isDebugEnabled)\r
-\r
-            if (resourceNum < resourceCount) {\r
-                               execution.setVariable(Prefix+"resourceFinish", false)\r
-                       }\r
-                       else {\r
-                           execution.setVariable(Prefix+"resourceFinish", true)\r
-                       }\r
-                       sortCreateResource(execution)\r
-\r
-        }catch(Exception e){\r
-            utils.log("ERROR", "Exception Occured Processing getServiceResources. Exception is:\n" + e, isDebugEnabled)\r
-            execution.setVariable(Prefix+"ErrorResponse", "Error Occurred during getServiceResources Method:\n" + e.getMessage())\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)  \r
-       }\r
-       \r
-       /**\r
-        * prepare Decompose next resource to create request\r
-        */\r
-       public void preProcessDecomposeNextResource(DelegateExecution execution){\r
-        def method = getClass().getSimpleName() + '.preProcessDecomposeNextResource(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-        utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 preProcessDecomposeNextResource Process ======== ", isDebugEnabled)\r
-        try{\r
-            int resourceNum = execution.getVariable(Prefix+"nextResource")\r
-                       List<String> resourceList = execution.getVariable(Prefix+"resourceList")\r
-                       utils.log("INFO", "Resource List : " + resourceList, isDebugEnabled)\r
-                       \r
-                       String resource = resourceList[resourceNum]\r
-            execution.setVariable(Prefix+"resource", resource)\r
-                       utils.log("INFO", "Current Resource : " + resource, isDebugEnabled)\r
-\r
-            String resourceName = jsonUtil.getJsonValue(resource, "resourceName")  \r
-                       execution.setVariable(Prefix+"resourceName", resourceName)\r
-                       utils.log("INFO", "resource Name : " + resourceName, isDebugEnabled)\r
-                       \r
-            String resourceUUID  = jsonUtil.getJsonValue(resource, "resourceId")\r
-                       execution.setVariable("resourceUUID", resourceUUID)\r
-                       utils.log("INFO", "resource UUID : " + resourceUUID, isDebugEnabled)\r
-                       \r
-            String resourceInvariantUUID  = jsonUtil.getJsonValue(resource, "resourceDefId")\r
-                       execution.setVariable("resourceInvariantUUID", resourceInvariantUUID)\r
-                       \r
-                       \r
-            String resourceParameters = jsonUtil.getJsonValue(resource, "nsParameters")             \r
-            execution.setVariable("resourceParameters", resourceParameters)\r
-                       utils.log("INFO", "resource Parameters : " + resourceParameters, isDebugEnabled)\r
-\r
-                       execution.setVariable(Prefix+"nextResource", resourceNum + 1)\r
-                       utils.log("INFO", "next Resource num : " + execution.getVariable(Prefix+"nextResource"), isDebugEnabled)\r
-                       \r
-                       int resourceCount = execution.getVariable(Prefix+"resourceCount")\r
-                       if (resourceCount >0 ){\r
-                           int progress = (resourceNum*100) / resourceCount\r
-                               execution.setVariable("progress", progress.toString() )\r
-                       }\r
-                       \r
-                       execution.setVariable("operationStatus", resourceName )\r
-\r
-        }catch(Exception e){\r
-            utils.log("ERROR", "Exception Occured Processing preProcessDecomposeNextResource. Exception is:\n" + e, isDebugEnabled)\r
-            execution.setVariable(Prefix+"ErrorResponse", "Error Occurred during preProcessDecomposeNextResource Method:\n" + e.getMessage())\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)   \r
-       }\r
-       /**\r
-        * post Decompose next resource to create request\r
-        */\r
-       public void postProcessDecomposeNextResource(DelegateExecution execution){\r
-        def method = getClass().getSimpleName() + '.postProcessDecomposeNextResource(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-        utils.log("INFO", " ======== STARTED DoCreateE2EServiceInstanceV2 postProcessDecomposeNextResource Process ======== ", isDebugEnabled)\r
-        try{\r
-            String resourceName = execution.getVariable(Prefix+"resourceName")\r
-                       \r
-                       int resourceNum = execution.getVariable(Prefix+"nextResource")\r
-                       utils.log("DEBUG", "Current Resource count:"+ execution.getVariable(Prefix+"nextResource"), isDebugEnabled)\r
-                       \r
-                       int resourceCount = execution.getVariable(Prefix+"resourceCount")\r
-                       utils.log("DEBUG", "Total Resource count:"+ execution.getVariable(Prefix+"resourceCount"), isDebugEnabled)\r
-\r
-            if (resourceNum < resourceCount) {\r
-                               execution.setVariable(Prefix+"resourceFinish", false)\r
-                       }\r
-                       else {\r
-                           execution.setVariable(Prefix+"resourceFinish", true)\r
-                       }\r
-                       \r
-                       utils.log("DEBUG", "Resource Finished:"+ execution.getVariable(Prefix+"resourceFinish"), isDebugEnabled)\r
-                       \r
-                       if (resourceCount >0 ){\r
-                           int progress = (resourceNum*100) / resourceCount\r
-                               execution.setVariable("progress", progress.toString() )\r
-                               utils.log("DEBUG", "progress :"+ execution.getVariable("progress"), isDebugEnabled)\r
-                       }\r
-                       execution.setVariable("operationStatus", resourceName )\r
-\r
-        }catch(Exception e){\r
-            // try error in method block\r
-                       String exceptionMessage = "Bpmn error encountered in "+method + "- " + e.getMessage()\r
-                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)  \r
-       }\r
-       /**\r
-       * prepare check Resource Type \r
-       */\r
-       public void checkResourceType(DelegateExecution execution){\r
-        def method = getClass().getSimpleName() + '.checkResourceType(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               String resourceControllerTypeDef = """[\r
-                {\r
-                    "resourceType":"vEPC",\r
-                    "controllerType":"VFC"\r
-                },\r
-                {\r
-                    "resourceType":"vIMS",\r
-                    "controllerType":"VFC"\r
-                },\r
-                {\r
-                    "resourceType":"vCPE",\r
-                    "controllerType":"VFC"\r
-                },\r
-                {\r
-                    "resourceType":"vFW",\r
-                    "controllerType":"VFC"\r
-                },\r
-                {\r
-                    "resourceType":"Underlay",\r
-                    "controllerType":"SDNC"\r
-                },\r
-                {\r
-                    "resourceType":"Overlay",\r
-                    "controllerType":"SDNC"\r
-                },\r
-                {\r
-                    "resourceType":"VPN_SAR",\r
-                    "controllerType":"SDNC"\r
-                },\r
-                {\r
-                    "resourceType":"GRE_AAR",\r
-                    "controllerType":"APPC"\r
-                },\r
-                {\r
-                    "resourceType":"GRE_SAR",\r
-                    "controllerType":"SDNC"\r
-                }  ,\r
-                {\r
-                    "resourceType":"APN_AAR",\r
-                    "controllerType":"APPC"\r
-                }               \r
-                \r
-            ]""".trim()\r
-\r
-        try{\r
-\r
-            String resourceName = execution.getVariable(Prefix+"resourceName") \r
-                       utils.log("INFO", "resourceName : " + resourceName, isDebugEnabled)\r
-                       execution.setVariable("resourceName", resourceName)\r
-                       \r
-                       String[] split = resourceName.split("_")\r
-                       \r
-                       utils.log("INFO", "split : " + split, isDebugEnabled)\r
-                       int strLen = split.size()\r
-                       String allottedResourceType = ""\r
-                       \r
-                       if (strLen <2) {\r
-                               allottedResourceType = split[0]\r
-                       }\r
-                       else {\r
-                               allottedResourceType = split[0] + "_" + split[1]\r
-                       }\r
-\r
-                       loadResourcesProperties(execution)\r
-                       String resourceControllerType= execution.getVariable("resourceControllerType") \r
-                       if (isBlank(resourceControllerType)) {\r
-                               resourceControllerType = resourceControllerTypeDef;\r
-                       }\r
-                       utils.log("INFO", "resourceControllerType: " + resourceControllerType, isDebugEnabled)\r
-               \r
-                       List<String> ResourceTypeList = jsonUtil.StringArrayToList(execution, resourceControllerType)\r
-               utils.log("INFO", "ResourceTypeList : " + ResourceTypeList, isDebugEnabled)              \r
-                       execution.setVariable("controllerType", "Other") \r
-                       execution.setVariable(Prefix+"resourceType", "")\r
-                       for (String resourceMap : ResourceTypeList) {\r
-                               String resourceType = jsonUtil.getJsonValue(resourceMap, "resourceType")                                \r
-                               String controllerType = jsonUtil.getJsonValue(resourceMap, "controllerType")\r
-                               //utils.log("INFO", "resourceMap.resourceType   : " + resourceType, isDebugEnabled)\r
-                               //utils.log("INFO", "resourceMap.controllerType : " + controllerType, isDebugEnabled)\r
-                               //utils.log("INFO", "resourceName               : " + resourceName, isDebugEnabled)\r
-                               //utils.log("INFO", "allottedResourceType       : " + allottedResourceType, isDebugEnabled )\r
-                               \r
-                               if (StringUtils.containsIgnoreCase(allottedResourceType, resourceType)) {\r
-                                       execution.setVariable("controllerType", controllerType)\r
-                                       execution.setVariable(Prefix+"resourceType", resourceType)\r
-                                       utils.log("INFO", "found controller type : " + controllerType, isDebugEnabled)\r
-                                       break\r
-                               }\r
-                       }\r
-                       utils.log("INFO", "controller Type : " + execution.getVariable("controllerType"), isDebugEnabled)\r
-                       utils.log("INFO", "resource Type : " + execution.getVariable(Prefix+"resourceType"), isDebugEnabled)\r
-                       \r
-                       if (execution.getVariable("controllerType") == "") {\r
-                               String exceptionMessage = "Resource name can not find controller type,please check the resource Name: "+ resourceName\r
-                               utils.log("DEBUG", exceptionMessage, isDebugEnabled)\r
-                               exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)\r
-                       }\r
-                       if (execution.getVariable(Prefix+"resourceType") == "vCPE") {\r
-                               execution.setVariable("skipVFC", "false")\r
-                               utils.log("INFO", "vCPE will deploy ", isDebugEnabled)\r
-                       }\r
-\r
-        }catch(Exception e){\r
-            // try error in method block\r
-                       String exceptionMessage = "Bpmn error encountered in "+ method + " - " + e.getMessage()\r
-                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)  \r
-       }\r
-       /**\r
-       * prepare post Unkown Resource Type \r
-       */\r
-       public void postOtherControllerType(DelegateExecution execution){\r
-        def method = getClass().getSimpleName() + '.postOtherControllerType(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-               \r
-        utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 postOtherControllerType Process ======== ", isDebugEnabled)\r
-        try{\r
-\r
-            String resourceName = execution.getVariable(Prefix+"resourceName") \r
-                       String resourceType = execution.getVariable(Prefix+"resourceType") \r
-                       String controllerType = execution.getVariable("controllerType")\r
-                       \r
-                   String msg = "Resource name: "+ resourceName + " resource Type: " + resourceType+ " controller Type: " + controllerType + " can not be processed  n the workflow"\r
-                       utils.log("DEBUG", msg, isDebugEnabled)\r
-                       \r
-        }catch(Exception e){\r
-            // try error in method block\r
-                       String exceptionMessage = "Bpmn error encountered in "+ method + " - " + e.getMessage()\r
-                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)   \r
-       }\r
-       \r
-       /**\r
-        * prepare Controller resource create request\r
-        */\r
-       public void preProcessResourceRequestForController(execution){\r
-        def method = getClass().getSimpleName() + '.preProcessResourceRequestForController(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-        utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 preProcessResourceRequestForController Process ======== ", isDebugEnabled)\r
-        try{\r
-            String resourceName = execution.getVariable(Prefix+"resourceName") \r
-               String resourceType = execution.getVariable(Prefix+"resourceType")\r
-                       String serviceInstanceName =execution.getVariable("serviceInstanceName") \r
-                       String nsServiceName = resourceType + "_" + serviceInstanceName\r
-               execution.setVariable("nsServiceName", nsServiceName)\r
-               utils.log("INFO", "Prepare Controller Request nsServiceName:" + nsServiceName, isDebugEnabled)\r
-\r
-            String serviceId = execution.getVariable("serviceInstanceId")\r
-            execution.setVariable("serviceId", serviceId)\r
-               utils.log("INFO", "Prepare Controller Request serviceId:" + serviceId, isDebugEnabled) \r
-                       \r
-                       String globalSubscriberId = execution.getVariable("globalSubscriberId")\r
-                       utils.log("INFO", "Prepare Controller Request globalSubscriberId:" + globalSubscriberId, isDebugEnabled) \r
-                       \r
-                       String incomingRequest = execution.getVariable("uuiRequest")\r
-                       String nsServiceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")  \r
-            execution.setVariable("nsServiceDescription", nsServiceDescription)\r
-            utils.log("INFO", "Prepare Controller Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)\r
-\r
-            String resourceUUID  = execution.getVariable("resourceUUID")\r
-         \r
-            utils.log("INFO", "Prepare Controller Request resourceUUID:" + resourceUUID, isDebugEnabled)\r
-                       \r
-            String resourceInvariantUUID  = execution.getVariable("resourceInvariantUUID")\r
-                       utils.log("INFO", "Prepare Controller Request resourceInvariantUUID:" + resourceInvariantUUID, isDebugEnabled)\r
-\r
-            String resourceParameters = execution.getVariable("resourceParameters")              \r
-            execution.setVariable("resourceParameters", resourceParameters)\r
-            utils.log("INFO", "Prepare Controller Request resourceParameters:" + resourceParameters, isDebugEnabled)\r
-\r
-\r
-\r
-        }catch(Exception e){\r
-            String exceptionMessage = "Bpmn error encountered in "+ method + " - " + e.getMessage()\r
-                       utils.log("ERROR", exceptionMessage, isDebugEnabled)\r
-            execution.setVariable(Prefix+"ErrorResponse", exceptionMessage)\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)  \r
-       }\r
-       /**\r
-        * post process VFC resource create request\r
-        */\r
-       public void postProcessResourceRequestForVFC(execution){\r
-        def method = getClass().getSimpleName() + '.postProcessResourceRequestForVFC(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-        utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 postProcessResourceRequestForVFC Process ======== ", isDebugEnabled)\r
-        try{\r
-            \r
-\r
-        }catch(Exception e){\r
-            utils.log("ERROR", "Exception Occured Processing postProcessResourceRequestForVFC. Exception is:\n" + e, isDebugEnabled)\r
-            execution.setVariable(Prefix+"ErrorResponse", "Error Occurred during postProcessResourceRequestForVFC Method:\n" + e.getMessage())\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)  \r
-       }\r
-\r
-\r
-       /**\r
-        * post process SDNC resource create request\r
-        */\r
-       public void postProcessResourceRequestForSDNC(execution){\r
-        def method = getClass().getSimpleName() + '.postProcessResourceRequestForSDNC(' +'execution=' + execution.getId() +')'\r
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
-               utils.log("INFO","Entered " + method, isDebugEnabled)\r
-        utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 postProcessResourceRequestForSDNC Process ======== ", isDebugEnabled)\r
-        try{\r
-               \r
-          execution.setVariable("serviceSDNCCreate", "true")\r
-\r
-        }catch(Exception e){\r
-            utils.log("ERROR", "Exception Occured Processing postProcessResourceRequestForSDNC. Exception is:\n" + e, isDebugEnabled)\r
-            execution.setVariable(Prefix+"ErrorResponse", "Error Occurred during postProcessResourceRequestForSDNC Method:\n" + e.getMessage())\r
-        }\r
-           utils.log("INFO", "Exited " + method, isDebugEnabled)\r
-       }\r
-       \r
-\r
-       \r
-}\r
-       \r
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
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/AAITasks/AAICreateOwningEntityTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/AAITasks/AAICreateOwningEntityTest.java
new file mode 100644 (file)
index 0000000..4f643e1
--- /dev/null
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.AAITasks;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
+import org.junit.Test;
+
+public class AAICreateOwningEntityTest {
+
+    DelegateExecution delegateExecution = new ExecutionImpl();
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void executeTest() throws Exception {
+        new AAICreateServiceInstance().execute(delegateExecution);
+    }
+
+}
\ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/aai/AAIServiceInstanceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/aai/AAIServiceInstanceTest.java
new file mode 100644 (file)
index 0000000..b9f3399
--- /dev/null
@@ -0,0 +1,114 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.bpmn.infrastructure.aai;
+
+import org.junit.Test;
+
+
+public class AAIServiceInstanceTest {
+
+    AAIServiceInstance test = new AAIServiceInstance("serviceInstanceName","serviceType","serviceRole","orchestrationStatus","modelInvariantUuid","modelVersionId","environmentContext","workloadContext");
+
+    @Test
+    public void getServiceInstanceNameTest() throws Exception {
+        test.getServiceInstanceName();
+    }
+
+    @Test
+    public void setServiceInstanceNameTest() throws Exception {
+        test.setServiceInstanceName("serviceInstanceName");
+    }
+
+    @Test
+    public void getServiceTypeTest() throws Exception {
+        test.getServiceType();
+    }
+
+    @Test
+    public void setServiceTypeTest() throws Exception {
+        test.setServiceType("serviceType");
+    }
+
+
+    @Test
+    public void getServiceRoleTest() throws Exception {
+        test.getServiceRole();
+    }
+
+    @Test
+    public void setServiceRoleTest() throws Exception {
+        test.setServiceRole("serviceRole");
+    }
+
+    @Test
+    public void getOrchestrationStatusTest() throws Exception {
+        test.getOrchestrationStatus();
+    }
+
+    @Test
+    public void setOrchestrationStatusTest() throws Exception {
+        test.setOrchestrationStatus("status");
+    }
+
+    @Test
+    public void getModelInvariantUuidTest() throws Exception {
+        test.getModelInvariantUuid();
+    }
+
+    @Test
+    public void setModelInvariantUuidTest() throws Exception {
+        test.setModelInvariantUuid("uuid");
+    }
+
+    @Test
+    public void getModelVersionIdTest() throws Exception {
+        test.getModelVersionId();
+    }
+
+    @Test
+    public void setModelVersionIdTest() throws Exception {
+        test.setModelVersionId("versionId");
+    }
+
+    @Test
+    public void getEnvironmentContextTest() throws Exception {
+        test.getEnvironmentContext();
+    }
+
+    @Test
+    public void setEnvironmentContextTest() throws Exception {
+        test.setEnvironmentContext("context");
+    }
+
+    @Test
+    public void getWorkloadContextTest() throws Exception {
+        test.getWorkloadContext();
+    }
+
+    @Test
+    public void setWorkloadContextTest() throws Exception {
+        test.setWorkloadContext("context");
+    }
+
+}
+
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilderTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilderTest.java
new file mode 100644 (file)
index 0000000..e2ec7e0
--- /dev/null
@@ -0,0 +1,358 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.builder;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.runtime.Incident;
+import org.camunda.bpm.engine.variable.VariableMap;
+import org.camunda.bpm.engine.variable.value.TypedValue;
+import org.camunda.bpm.model.bpmn.BpmnModelInstance;
+import org.camunda.bpm.model.bpmn.instance.FlowElement;
+import org.junit.Test;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+public class AbstractBuilderTest {
+
+    AbstractBuilder abstractBuilder = new AbstractBuilder() {
+        @Override
+        Object build(DelegateExecution execution, Object input) throws Exception {
+            return null;
+        }
+    };
+
+    DelegateExecution delegateExecution = new DelegateExecution() {
+        @Override
+        public String getProcessInstanceId() {
+            return null;
+        }
+
+        @Override
+        public String getProcessBusinessKey() {
+            return null;
+        }
+
+        @Override
+        public String getProcessDefinitionId() {
+            return null;
+        }
+
+        @Override
+        public String getParentId() {
+            return null;
+        }
+
+        @Override
+        public String getCurrentActivityId() {
+            return null;
+        }
+
+        @Override
+        public String getCurrentActivityName() {
+            return null;
+        }
+
+        @Override
+        public String getActivityInstanceId() {
+            return null;
+        }
+
+        @Override
+        public String getParentActivityInstanceId() {
+            return null;
+        }
+
+        @Override
+        public String getCurrentTransitionId() {
+            return null;
+        }
+
+        @Override
+        public DelegateExecution getProcessInstance() {
+            return null;
+        }
+
+        @Override
+        public DelegateExecution getSuperExecution() {
+            return null;
+        }
+
+        @Override
+        public boolean isCanceled() {
+            return false;
+        }
+
+        @Override
+        public String getTenantId() {
+            return null;
+        }
+
+        @Override
+        public void setVariable(String s, Object o, String s1) {
+
+        }
+
+        @Override
+        public Incident createIncident(String s, String s1) {
+            return null;
+        }
+
+        @Override
+        public Incident createIncident(String s, String s1, String s2) {
+            return null;
+        }
+
+        @Override
+        public void resolveIncident(String s) {
+
+        }
+
+        @Override
+        public String getId() {
+            return null;
+        }
+
+        @Override
+        public String getEventName() {
+            return null;
+        }
+
+        @Override
+        public String getBusinessKey() {
+            return null;
+        }
+
+        @Override
+        public BpmnModelInstance getBpmnModelInstance() {
+            return null;
+        }
+
+        @Override
+        public FlowElement getBpmnModelElementInstance() {
+            return null;
+        }
+
+        @Override
+        public ProcessEngineServices getProcessEngineServices() {
+            return null;
+        }
+
+        @Override
+        public String getVariableScopeKey() {
+            return null;
+        }
+
+        @Override
+        public Map<String, Object> getVariables() {
+            return null;
+        }
+
+        @Override
+        public VariableMap getVariablesTyped() {
+            return null;
+        }
+
+        @Override
+        public VariableMap getVariablesTyped(boolean b) {
+            return null;
+        }
+
+        @Override
+        public Map<String, Object> getVariablesLocal() {
+            return null;
+        }
+
+        @Override
+        public VariableMap getVariablesLocalTyped() {
+            return null;
+        }
+
+        @Override
+        public VariableMap getVariablesLocalTyped(boolean b) {
+            return null;
+        }
+
+        @Override
+        public Object getVariable(String s) {
+            return null;
+        }
+
+        @Override
+        public Object getVariableLocal(String s) {
+            return null;
+        }
+
+        @Override
+        public <T extends TypedValue> T getVariableTyped(String s) {
+            return null;
+        }
+
+        @Override
+        public <T extends TypedValue> T getVariableTyped(String s, boolean b) {
+            return null;
+        }
+
+        @Override
+        public <T extends TypedValue> T getVariableLocalTyped(String s) {
+            return null;
+        }
+
+        @Override
+        public <T extends TypedValue> T getVariableLocalTyped(String s, boolean b) {
+            return null;
+        }
+
+        @Override
+        public Set<String> getVariableNames() {
+            return null;
+        }
+
+        @Override
+        public Set<String> getVariableNamesLocal() {
+            return null;
+        }
+
+        @Override
+        public void setVariable(String s, Object o) {
+
+        }
+
+        @Override
+        public void setVariableLocal(String s, Object o) {
+
+        }
+
+        @Override
+        public void setVariables(Map<String, ?> map) {
+
+        }
+
+        @Override
+        public void setVariablesLocal(Map<String, ?> map) {
+
+        }
+
+        @Override
+        public boolean hasVariables() {
+            return false;
+        }
+
+        @Override
+        public boolean hasVariablesLocal() {
+            return false;
+        }
+
+        @Override
+        public boolean hasVariable(String s) {
+            return false;
+        }
+
+        @Override
+        public boolean hasVariableLocal(String s) {
+            return false;
+        }
+
+        @Override
+        public void removeVariable(String s) {
+
+        }
+
+        @Override
+        public void removeVariableLocal(String s) {
+
+        }
+
+        @Override
+        public void removeVariables(Collection<String> collection) {
+
+        }
+
+        @Override
+        public void removeVariablesLocal(Collection<String> collection) {
+
+        }
+
+        @Override
+        public void removeVariables() {
+
+        }
+
+        @Override
+        public void removeVariablesLocal() {
+
+        }
+    };
+
+
+    @Test
+    public void buildTest() throws Exception {
+        abstractBuilder.build(null, null);
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void getRequestActoinTest() throws Exception {
+        abstractBuilder.getRequestActoin(delegateExecution);
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void getSvcActionTest() throws Exception {
+        abstractBuilder.getSvcAction(delegateExecution);
+    }
+
+    @Test
+    public void getRequestIdTest() throws Exception {
+        abstractBuilder.getRequestId(delegateExecution);
+    }
+
+    @Test
+    public void getOnapServiceModelInformationEntityTest() throws Exception {
+        abstractBuilder.getOnapServiceModelInformationEntity(delegateExecution);
+    }
+
+    @Test
+    public void getOnapNetworkModelInformationEntityTest() throws Exception {
+        abstractBuilder.getOnapNetworkModelInformationEntity(delegateExecution);
+    }
+
+    @Test
+    public void getParamEntitiesTest() throws Exception {
+        abstractBuilder.getParamEntities(new HashMap<>());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void getRequestInformationEntityTest() throws Exception {
+        abstractBuilder.getRequestInformationEntity(delegateExecution);
+    }
+
+    @Test
+    public void getServiceInformationEntityTest() throws Exception {
+        abstractBuilder.getServiceInformationEntity(delegateExecution);
+    }
+
+    @Test
+    public void getServiceInstanceNameTest() throws Exception {
+        abstractBuilder.getServiceInstanceName(delegateExecution);
+    }
+
+}
\ No newline at end of file
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/AAIUpdatorImplTest.java b/common/src/test/java/org/openecomp/mso/client/aai/AAIUpdatorImplTest.java
new file mode 100644 (file)
index 0000000..86adb5f
--- /dev/null
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import org.junit.Test;
+
+public class AAIUpdatorImplTest {
+
+    AAIUpdatorImpl test = new AAIUpdatorImpl();
+
+    protected AAIRestClientI client;
+
+    @Test
+    public void getClientTest() throws Exception {
+        test.getClient();
+    }
+
+    @Test
+    public void setClientTest() throws Exception {
+        test.setClient(client);
+    }
+
+
+    @Test(expected = NullPointerException.class)
+    public void updateVnfToLockedTest() throws Exception {
+        test.updateVnfToLocked("vnfId","uuId");
+    }
+
+
+    @Test(expected = NullPointerException.class)
+    public void updateVnfToUnLockedTest() throws Exception {
+        test.updateVnfToUnLocked("vnfId","uuId");
+    }
+
+}
diff --git a/common/src/test/java/org/openecomp/mso/client/aai/exceptions/AAIPayloadExceptionTest.java b/common/src/test/java/org/openecomp/mso/client/aai/exceptions/AAIPayloadExceptionTest.java
new file mode 100644 (file)
index 0000000..3895230
--- /dev/null
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.exceptions;
+
+import org.junit.Test;
+
+public class AAIPayloadExceptionTest {
+
+    Throwable t = new Throwable();
+
+    @Test
+    public void callConstructorTest() throws Exception {
+
+        AAIPayloadException test1 = new AAIPayloadException("testing");
+
+        AAIPayloadException test2 = new AAIPayloadException("testing", t);
+
+        AAIPayloadException test3 = new AAIPayloadException(t);
+    }
+
+}
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);
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequestTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequestTest.java
new file mode 100644 (file)
index 0000000..6490f52
--- /dev/null
@@ -0,0 +1,178 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.apihandler.camundabeans;
+
+import org.junit.Test;
+
+public class BpmnRequestTest {
+
+    BpmnRequest bpmnRequest = new BpmnRequest();
+
+    @Test
+    public void getHostTest() throws Exception {
+        bpmnRequest.getHost();
+    }
+
+    @Test
+    public void setHostTest() throws Exception {
+        bpmnRequest.setHost(new CamundaInput());
+    }
+
+    @Test
+    public void getRequestIdTest() throws Exception {
+        bpmnRequest.getRequestId();
+    }
+
+    @Test
+    public void setRequestIdTest() throws Exception {
+        bpmnRequest.setRequestId(new CamundaInput());
+    }
+
+    @Test
+    public void getIsBaseVfModuleTest() throws Exception {
+        bpmnRequest.getIsBaseVfModule();
+    }
+
+    @Test
+    public void setIsBaseVfModuleTest() throws Exception {
+        bpmnRequest.setIsBaseVfModule(new CamundaBooleanInput());
+    }
+
+    @Test
+    public void getRecipeTimeoutTest() throws Exception {
+        bpmnRequest.getRecipeTimeout();
+    }
+
+    @Test
+    public void setRecipeTimeoutTest() throws Exception {
+        bpmnRequest.setRecipeTimeout(new CamundaIntegerInput());
+    }
+
+    @Test
+    public void getRequestActionTest() throws Exception {
+        bpmnRequest.getRequestAction();
+    }
+
+    @Test
+    public void setRequestActionTest() throws Exception {
+        bpmnRequest.setRequestAction(new CamundaInput());
+    }
+
+    @Test
+    public void getServiceInstanceIdTest() throws Exception {
+        bpmnRequest.getServiceInstanceId();
+    }
+
+    @Test
+    public void setServiceInstanceIdTest() throws Exception {
+        bpmnRequest.setServiceInstanceId(new CamundaInput());
+    }
+
+    @Test
+    public void getVnfIdTest() throws Exception {
+        bpmnRequest.getVnfId();
+    }
+
+    @Test
+    public void setVnfIdTest() throws Exception {
+        bpmnRequest.setVnfId(new CamundaInput());
+    }
+
+    @Test
+    public void getVfModuleIdTest() throws Exception {
+        bpmnRequest.getVnfId();
+    }
+
+    @Test
+    public void setVfModuleIdTest() throws Exception {
+        bpmnRequest.setVfModuleId(new CamundaInput());
+    }
+
+    @Test
+    public void getVolumeGroupIdTest() throws Exception {
+        bpmnRequest.getVolumeGroupId();
+    }
+
+    @Test
+    public void setVolumeGroupIdTest() throws Exception {
+        bpmnRequest.setVolumeGroupId(new CamundaInput());
+    }
+
+    @Test
+    public void getNetworkIdTest() throws Exception {
+        bpmnRequest.getNetworkId();
+    }
+
+    @Test
+    public void setNetworkIdTest() throws Exception {
+        bpmnRequest.setNetworkId(new CamundaInput());
+    }
+
+    @Test
+    public void getServiceTypeTest() throws Exception {
+        bpmnRequest.getServiceType();
+    }
+
+    @Test
+    public void setServiceTypeTest() throws Exception {
+        bpmnRequest.setServiceType(new CamundaInput());
+    }
+
+    @Test
+    public void getVnfTypeTest() throws Exception {
+        bpmnRequest.getVnfType();
+    }
+
+    @Test
+    public void setVnfTypeTest() throws Exception {
+        bpmnRequest.setVnfType(new CamundaInput());
+    }
+
+    @Test
+    public void getVfModuleTypeTest() throws Exception {
+        bpmnRequest.getVfModuleType();
+    }
+
+    @Test
+    public void setVfModuleTypeTest() throws Exception {
+        bpmnRequest.setVfModuleType(new CamundaInput());
+    }
+
+    @Test
+    public void getNetworkTypeTest() throws Exception {
+        bpmnRequest.getNetworkType();
+    }
+
+    @Test
+    public void setNetworkTypeTest() throws Exception {
+        bpmnRequest.setNetworkType(new CamundaInput());
+    }
+
+    @Test
+    public void getRequestDetailsTest() throws Exception {
+        bpmnRequest.getRequestDetails();
+    }
+
+    @Test
+    public void setRequestDetailsTest() throws Exception {
+        bpmnRequest.setRequestDetails(new CamundaInput());
+    }
+
+}
\ No newline at end of file
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>