Merge "Adding Junit"
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
index 0000000..2729cf8
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/beans/DeploymentInfoTest.java
@@ -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
index 0000000..d4389bf
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/exceptions/MsoCloudifyExceptionTest.java
@@ -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
index 0000000..64b8823
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloudify/exceptions/MsoCloudifyTimeoutTest.java
@@ -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
index 0000000..14f0485
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/HostRouteTest.java
@@ -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
index 0000000..6e1f392
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantTest.java
@@ -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
index 0000000..ec0b917
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoTest.java
@@ -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
index 0000000..b6245f6
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackTest.java
@@ -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
index 0000000..9795c18
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/PoolTest.java
@@ -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
index 0000000..fd34f48
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/RouteTargetTest.java
@@ -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
index 0000000..b549b5f
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/StackInfoTest.java
@@ -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
index 0000000..42781c0
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/SubnetTest.java
@@ -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
index 0000000..9891811
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackTest.java
@@ -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
index 0000000..2e22e97
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/test/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRestTest.java
@@ -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
index 0000000..9ab6ce6
--- /dev/null
+++ b/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/BpelRestClientTest.java
@@ -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
index 0000000..12e2fa0
--- /dev/null
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/HealthCheckHandlerTest.java
@@ -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
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
index 0d737fb..b00b7a0 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.HashMap;
import java.util.Map;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java
index ade234e..d1c090d 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImplTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.HashMap;
import java.util.Map;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
index e9732d6..a773d13 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.HashMap;
import java.util.Map;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java
index deb1252..8ee9d7f 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/QueryTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import static org.junit.Assert.assertFalse;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java
index c4f3be4..a807aaf 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfCreateTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.HashMap;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java
index 8fbfda1..a820202 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfDeleteTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java
index 76d73cd..aca88f3 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/VnfQueryTest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnf.test;
+package org.openecomp.mso.adapters.vnf;
import java.util.Map;
diff --git a/aria/aria-rest-server/pom.xml b/aria/aria-rest-server/pom.xml
index 87c8f3e..d74ea93 100644
--- a/aria/aria-rest-server/pom.xml
+++ b/aria/aria-rest-server/pom.xml
@@ -86,7 +86,7 @@
</environmentVariables>
</configuration>
</execution>
- <execution>
+ <!--execution>
<id>deploy</id>
<phase>deploy</phase>
<goals><goal>exec</goal></goals>
@@ -105,7 +105,7 @@
<WHEEL_PATH>${project.build.directory}/${wheel.name}</WHEEL_PATH>
</environmentVariables>
</configuration>
- </execution>
+ </execution-->
</executions>
</plugin>
</plugins>
diff --git a/asdc-controller/pom.xml b/asdc-controller/pom.xml
index 66ecbd8..a06a16d 100644
--- a/asdc-controller/pom.xml
+++ b/asdc-controller/pom.xml
@@ -81,7 +81,6 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
- <version>4.5.5</version>
<scope>compile</scope>
<exclusions>
<exclusion>
diff --git a/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar b/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar
index 31fff49..f1a72f7 100644
--- a/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar
+++ b/asdc-controller/src/main/resources/resource-examples/service-MdnsPreload17100914-csar.csar
Binary files differ
diff --git a/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar b/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar
index 2686e4b..a189ed6 100644
--- a/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar
+++ b/asdc-controller/src/main/resources/resource-examples/service_Rg511NfmService.csar
Binary files differ
diff --git a/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar b/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar
index d2983ce..df4f4cb 100644
--- a/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar
+++ b/asdc-controller/src/main/resources/resource-examples/service_Rg516VmmscSrvc_csar.csar
Binary files differ
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
index 0a008d1..00e4ae7 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
@@ -19,6 +19,8 @@
*/
package org.openecomp.mso.bpmn.common.recipe;
+import org.openecomp.mso.bpmn.core.domain.ModelInfo;
+
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -35,7 +37,7 @@
* @author
* @version ONAP Beijing Release 2018-03-08
*/
-@JsonPropertyOrder({"resourceInstanceName", "resourceInstanceDes", "globalSubscriberId", "serviceType", "serviceId", "operationId", "resourceType","resourceCustomizationUuid"})
+@JsonPropertyOrder({"resourceInstanceName", "resourceInstanceDes", "globalSubscriberId", "serviceType", "serviceId", "operationId", "serviceModelInfo","resourceModelInfo", "resourceInstancenUuid","resourceParameters","operationType"})
@JsonRootName("variables")
public class ResourceInput {
@@ -57,17 +59,11 @@
@JsonProperty("operationId")
private String operationId;
- //for create resource
- @JsonProperty("resourceInvariantUuid")
- private String resourceInvariantUuid;
+ @JsonProperty("serviceModelInfo")
+ private ModelInfo serviceModelInfo;
- //for create resource
- @JsonProperty("resourceUuid")
- private String resourceUuid;
-
- //for create resource
- @JsonProperty("resourceCustomizationUuid")
- private String resourceCustomizationUuid;
+ @JsonProperty("resourceModelInfo")
+ private ModelInfo resourceModelInfo;
//for delete resource
@JsonProperty("resourceInstancenUuid")
@@ -186,67 +182,47 @@
public void setOperationId(String operationId) {
this.operationId = operationId;
}
-
-
/**
- * @return Returns the resourceInvariantUuid.
+ * @return Returns the serviceModelInfo.
*/
- @JsonProperty("resourceInvariantUuid")
- public String getResourceInvariantUuid() {
- return resourceInvariantUuid;
+ @JsonProperty("serviceModelInfo")
+ public ModelInfo getServiceModelInfo() {
+ return serviceModelInfo;
}
/**
- * @param resourceInvariantUuid The resourceInvariantUuid to set.
+ * @param serviceModelInfo The serviceModelInfo to set.
*/
- @JsonProperty("resourceInvariantUuid")
- public void setResourceInvariantUuid(String resourceInvariantUuid) {
- this.resourceInvariantUuid = resourceInvariantUuid;
+ @JsonProperty("serviceModelInfo")
+ public void setServiceModelInfo(ModelInfo serviceModelInfo) {
+ this.serviceModelInfo = serviceModelInfo;
}
/**
- * @return Returns the resourceUuid.
+ * @return Returns the resourceModelInfo.
*/
- @JsonProperty("resourceUuid")
- public String getResourceUuid() {
- return resourceUuid;
+ @JsonProperty("resourceModelInfo")
+ public ModelInfo getResourceModelInfo() {
+ return resourceModelInfo;
}
/**
- * @param resourceUuid The resourceUuid to set.
+ * @param resourceModelInfo The resourceModelInfo to set.
*/
- @JsonProperty("resourceUuid")
- public void setResourceUuid(String resourceUuid) {
- this.resourceUuid = resourceUuid;
+ @JsonProperty("resourceModelInfo")
+ public void setResourceModelInfo(ModelInfo resourceModelInfo) {
+ this.resourceModelInfo = resourceModelInfo;
}
/**
- * @return Returns the resourceCustomizationUuid.
- */
- @JsonProperty("resourceCustomizationUuid")
- public String getResourceCustomizationUuid() {
- return resourceCustomizationUuid;
- }
-
-
- /**
- * @param resourceCustomizationUuid The resourceCustomizationUuid to set.
- */
- @JsonProperty("resourceCustomizationUuid")
- public void setResourceCustomizationUuid(String resourceCustomizationUuid) {
- this.resourceCustomizationUuid = resourceCustomizationUuid;
- }
-
-
- /**
* @return Returns the resourceParameters.
*/
@JsonProperty("resourceParameters")
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd b/bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd
index e743dc7..0472e54 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd
+++ b/bpmn/MSOCommonBPMN/src/main/resources/xsd/MSOWorkflowSchemaV1.xsd
@@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- =========================================================================
- AT&T Proprietary (Internal Use Only) Not for use or disclosure outside
- the AT&T companies except under written agreement (c) 2015 AT&T
- Intellectual Property. All rights reserved. AT&T and the AT&T logo are
- trademarks of AT&T Intellectual Property.
- =======================================================================
- -->
- <!--
================================================================
Description: This is the schema for LPP Configuration Component
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd b/bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd
index ce92a49..c5fa26c 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd
+++ b/bpmn/MSOCommonBPMN/src/main/resources/xsd/MsoServiceRequestTypesV1.xsd
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- =========================================================================
- AT&T Proprietary (Internal Use Only) Not for use or disclosure outside
- the AT&T companies except under written agreement (c) 2015 AT&T
- Intellectual Property. All rights reserved. AT&T and the AT&T logo are
- trademarks of AT&T Intellectual Property.
- =======================================================================
- -->
+
<!--
================================================================
Description: This is the schema for MSO Request data
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
index fe1975f..466f4a1 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/recipe/ResourceInputTest.java
@@ -19,9 +19,10 @@
*/
package org.openecomp.mso.bpmn.common.recipe;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.openecomp.mso.bpmn.core.domain.ModelInfo;
public class ResourceInputTest {
@@ -34,9 +35,16 @@
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 @@
assertEquals(ri.getServiceType(), "serviceType");
assertEquals(ri.getServiceInstanceId(), "serviceId");
assertEquals(ri.getOperationId(), "operationId");
- assertEquals(ri.getResourceInvariantUuid(), "resourceInvariantUuid");
- assertEquals(ri.getResourceUuid(), "resourceUuid");
- assertEquals(ri.getResourceCustomizationUuid(), "resourceCustomizationUuid");
assertEquals(ri.getResourceInstancenUuid(), "resourceInstancenUuid");
assertEquals(ri.getResourceParameters(), "resourceParameters");
assertEquals(ri.getOperationType(), "operationType");
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/HealthCheckHandlerTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/HealthCheckHandlerTest.java
new file mode 100644
index 0000000..1086cc7
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/HealthCheckHandlerTest.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+
+public class HealthCheckHandlerTest {
+
+ HealthCheckHandler healthCheckHandler = new HealthCheckHandler();
+
+ @Test
+ public void nodeHealthcheck() throws Exception {
+ healthCheckHandler.nodeHealthcheck();
+ }
+
+ @Test
+ public void healthcheck() throws Exception {
+ healthCheckHandler.healthcheck("test-123");
+ }
+
+}
\ No newline at end of file
diff --git a/bpmn/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
index 0000000..09720be
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/AllottedResourceTest.java
@@ -0,0 +1,57 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class AllottedResourceTest {
+ private AllottedResource ar = new AllottedResource();
+ TunnelConnect tc = new TunnelConnect();
+
+ @Test
+ public void testAllottedResource() {
+ ar.setAllottedResourceType("allottedResourceType");
+ ar.setAllottedResourceRole("allottedResourceRole");
+ ar.setProvidingServiceModelName("providingServiceModelName");
+ ar.setProvidingServiceModelInvariantUuid("providingServiceModelInvariantUuid");
+ ar.setProvidingServiceModelUuid("providingServiceModelUuid");
+ ar.setNfFunction("nfFunction");
+ ar.setNfType("nfType");
+ ar.setNfRole("nfRole");
+ ar.setNfNamingCode("nfNamingCode");
+ ar.setOrchestrationStatus("orchestrationStatus");
+ ar.setTunnelConnect(tc);
+ assertEquals(ar.getAllottedResourceType(), "allottedResourceType");
+ assertEquals(ar.getAllottedResourceRole(), "allottedResourceRole");
+ assertEquals(ar.getProvidingServiceModelName(), "providingServiceModelName");
+ assertEquals(ar.getProvidingServiceModelInvariantUuid(), "providingServiceModelInvariantUuid");
+ assertEquals(ar.getProvidingServiceModelUuid(), "providingServiceModelUuid");
+ assertEquals(ar.getNfFunction(), "nfFunction");
+ assertEquals(ar.getNfType(), "nfType");
+ assertEquals(ar.getNfRole(), "nfRole");
+ assertEquals(ar.getNfNamingCode(), "nfNamingCode");
+ assertEquals(ar.getOrchestrationStatus(), "orchestrationStatus");
+ assertEquals(ar.getTunnelConnect(), tc);
+
+ }
+
+}
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
index 0000000..ecaf601
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ConfigResourceTest.java
@@ -0,0 +1,39 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ConfigResourceTest {
+ private ConfigResource configresource = new ConfigResource();{
+ configresource.resourceType = ResourceType.CONFIGURATION;
+ }
+
+ @Test
+ public void testConfigResource() {
+ configresource.setToscaNodeType("toscaNodeType");
+ assertEquals(configresource.getToscaNodeType(), "toscaNodeType");
+
+
+ }
+
+}
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
index 0000000..df8440a
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ConfigurationTest.java
@@ -0,0 +1,47 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ConfigurationTest {
+ private Configuration configuration = new Configuration();
+
+ @Test
+ public void testConfigurationTest() {
+ configuration.setId("id");
+ configuration.setName("name");
+ configuration.setType("type");
+ configuration.setOrchestrationStatus("orchestrationStatus");
+ configuration.setTunnelBandwidth("tunnelBandwidth");
+ configuration.setVendorAllowedMaxBandwidth("vendorAllowedMaxBandwidth");
+ configuration.setResourceVersion("resourceVersion");
+ assertEquals(configuration.getId(), "id");
+ assertEquals(configuration.getName(), "name");
+ assertEquals(configuration.getType(), "type");
+ assertEquals(configuration.getOrchestrationStatus(), "orchestrationStatus");
+ assertEquals(configuration.getTunnelBandwidth(), "tunnelBandwidth");
+ assertEquals(configuration.getVendorAllowedMaxBandwidth(), "vendorAllowedMaxBandwidth");
+ assertEquals(configuration.getResourceVersion(), "resourceVersion");
+ }
+
+}
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
index 0000000..1a4e089
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/CustomerTest.java
@@ -0,0 +1,38 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class CustomerTest {
+ private Customer customer = new Customer();
+
+ @Test
+ public void testCustomer() {
+ customer.setSubscriptionServiceType("subscriptionServiceType");
+ customer.setGlobalSubscriberId("globalSubscriberId");
+ assertEquals(customer.getSubscriptionServiceType(), "subscriptionServiceType");
+ assertEquals(customer.getGlobalSubscriberId(), "globalSubscriberId");
+
+ }
+
+}
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
index 0000000..e334348
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/HomingSolutionTest.java
@@ -0,0 +1,58 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class HomingSolutionTest {
+
+ private HomingSolution homingsolution = new HomingSolution();
+ InventoryType inventory = InventoryType.cloud;
+ VnfResource vnfresource = new VnfResource();
+ License license = new License();
+
+ @Test
+ public void testHomingSolution() {
+ homingsolution.setInventoryType(inventory);
+ homingsolution.setRehome(true);
+ homingsolution.setServiceInstanceId("serviceInstanceId");
+ homingsolution.setCloudOwner("cloudOwner");
+ homingsolution.setCloudRegionId("cloudRegionId");
+ homingsolution.setAicClli("aicClli");
+ homingsolution.setAicVersion("aicVersion");
+ homingsolution.setTenant("tenant");
+ homingsolution.setVnf(vnfresource);
+ homingsolution.setLicense(license);
+ assertEquals(homingsolution.getInventoryType(), inventory);
+ assertEquals(homingsolution.isRehome(), true);
+ assertEquals(homingsolution.getServiceInstanceId(), "serviceInstanceId");
+ assertEquals(homingsolution.getCloudOwner(), "cloudOwner");
+ assertEquals(homingsolution.getCloudRegionId(), "cloudRegionId");
+ assertEquals(homingsolution.getAicClli(), "aicClli");
+ assertEquals(homingsolution.getAicVersion(), "aicVersion");
+ assertEquals(homingsolution.getTenant(), "tenant");
+ assertEquals(homingsolution.getVnf(), vnfresource);
+ assertEquals(homingsolution.getLicense(), license);
+
+ }
+
+}
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
index 0000000..9ed194c
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/LicenseTest.java
@@ -0,0 +1,89 @@
+/*
+* ============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.bpmn.core.domain;
+
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.BDDMockito.Then;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+
+//@RunWith(PowerMockRunner.class)
+//@PrepareForTest({License.class})
+public class LicenseTest {
+
+ //@Mock
+ private License license= new License();
+ //@InjectMocks
+ //private LicenseTest licenceTest;
+ List<String> entitlementPoolList = new ArrayList<String>();
+ private List<String> licenseKeyGroupList = new ArrayList<String>();
+ //JSONArray array = new JSONArray(entitlementPoolList);
+ //JSONArray array1 = new JSONArray(licenseKeyGroupList);
+ //@PrepareForTest({License.class})
+ Long serialVersionUID = 333L;
+
+ @Test
+ public void testLicense() {
+ license.setEntitlementPoolList(entitlementPoolList);
+ license.setLicenseKeyGroupList(licenseKeyGroupList);
+ //license.addEntitlementPool("entitlementPoolUuid");
+ license.addLicenseKeyGroup("licenseKeyGroupUuid");
+ assertEquals(license.getEntitlementPoolList(), entitlementPoolList);
+ assertEquals(license.getLicenseKeyGroupList(), licenseKeyGroupList);
+ assert(license.getEntitlementPoolListAsString()!= null);
+ assert(license.getLicenseKeyGroupListAsString()!=null);
+ license.addEntitlementPool("entitlementPoolUuid");
+ //assertEquals(license.getSerialversionuid(), serialVersionUID);
+ //assertArrayEquals(license.getSerialversionuid(), serialVersionUID);
+ //assert
+
+ /*PowerMockito.mockStatic(License.class);
+ Mockito.when(License.getSerialversionuid()).thenReturn(getserial());
+ assertEquals(License.getSerialversionuid(),"abc");*/
+
+ }
+ // @Before
+ // public void mocksetUp() {
+// Long serialVersionUID = 333L;
+// PowerMockito.mockStatic(License.class);
+// expect (license.getSerialversionuid()).andReturn(serialVersionUID);
+// //PowerMockito.when(license.getSerialversionuid().
+// //PowerMockito.when(MathUtil.addInteger(2, 2)).thenReturn(1);
+// }
+
+ /*private Long getserial() {
+
+ return abc;
+ }*/
+
+}
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
index 0000000..90eb230
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ModelInfoTest.java
@@ -0,0 +1,47 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ModelInfoTest {
+ private ModelInfo modelinfo = new ModelInfo();
+
+ @Test
+ public void testModelInfo() {
+ modelinfo.setModelName("modelName");
+ modelinfo.setModelUuid("modelUuid");
+ modelinfo.setModelInvariantUuid("modelInvariantUuid");
+ modelinfo.setModelVersion("modelVersion");
+ modelinfo.setModelCustomizationUuid("modelCustomizationUuid");
+ modelinfo.setModelInstanceName("modelInstanceName");
+ modelinfo.setModelType("modelType");
+ assertEquals(modelinfo.getModelName(), "modelName");
+ assertEquals(modelinfo.getModelUuid(), "modelUuid");
+ assertEquals(modelinfo.getModelInvariantUuid(), "modelInvariantUuid");
+ assertEquals(modelinfo.getModelVersion(), "modelVersion");
+ assertEquals(modelinfo.getModelCustomizationUuid(), "modelCustomizationUuid");
+ assertEquals(modelinfo.getModelInstanceName(), "modelInstanceName");
+ assertEquals(modelinfo.getModelType(), "modelType");
+ }
+
+}
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
index 0000000..58cd45c
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ModuleResourceTest.java
@@ -0,0 +1,48 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ModuleResourceTest {
+ private ModuleResource moduleresource = new ModuleResource();
+
+ @Test
+ public void testModuleResource() {
+
+ moduleresource.setVfModuleName("vfModuleName");
+ moduleresource.setHeatStackId("heatStackId");
+ moduleresource.setIsBase(true);
+ moduleresource.setVfModuleLabel("vfModuleLabel");
+ moduleresource.setInitialCount(0);
+ moduleresource.setVfModuleType("vfModuleType");
+ moduleresource.setHasVolumeGroup(true);
+ assertEquals(moduleresource.getVfModuleName(), "vfModuleName");
+ assertEquals(moduleresource.getHeatStackId(), "heatStackId");
+ assertEquals(moduleresource.getIsBase(), true);
+ assertEquals(moduleresource.getVfModuleLabel(), "vfModuleLabel");
+ assertEquals(moduleresource.getInitialCount(), 0);
+ assertEquals(moduleresource.getVfModuleType(), "vfModuleType");
+ assertEquals(moduleresource.isHasVolumeGroup(), true);
+ }
+
+}
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
index 0000000..22e6266
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/NetworkResourceTest.java
@@ -0,0 +1,42 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class NetworkResourceTest {
+ private NetworkResource nr = new NetworkResource();
+
+ @Test
+ public void testNetworkResource() {
+ nr.setNetworkType("networkType");
+ nr.setNetworkRole("networkRole");
+ nr.setNetworkTechnology("networkTechnology");
+ nr.setNetworkScope("networkScope");
+ assertEquals(nr.getNetworkType(), "networkType");
+ assertEquals(nr.getNetworkRole(), "networkRole");
+ assertEquals(nr.getNetworkTechnology(), "networkTechnology");
+ assertEquals(nr.getNetworkScope(), "networkScope");
+
+ }
+
+}
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
index 0000000..215fa3c
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/OwningEntityTest.java
@@ -0,0 +1,39 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class OwningEntityTest {
+ private OwningEntity oe = new OwningEntity();
+
+ @Test
+ public void testOwingEntity() {
+ oe.setOwningEntityId("owningEntityId");
+ oe.setOwningEntityName("owningEntityName");
+ assertEquals(oe.getOwningEntityId(), "owningEntityId");
+ assertEquals(oe.getOwningEntityName(), "owningEntityName");
+
+ }
+
+}
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
index 0000000..3a9a53f
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ProjectTest.java
@@ -0,0 +1,36 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ProjectTest {
+
+ private Project project = new Project();
+
+ @Test
+ public void testProject() {
+ project.setProjectName("projectName");
+ assertEquals(project.getProjectName(), "projectName");
+ }
+
+}
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
index 0000000..9a9d415
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/RequestTest.java
@@ -0,0 +1,44 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class RequestTest {
+
+ private Request request = new Request();
+ ModelInfo model = new ModelInfo();
+
+ @Test
+ public void testRequest() {
+ request.setSdncRequestId("sdncRequestId");
+ request.setRequestId("requestId");
+ request.setModelInfo(model);
+ request.setProductFamilyId("productFamilyId");
+ assertEquals(request.getSdncRequestId(), "sdncRequestId");
+ assertEquals(request.getRequestId(), "requestId");
+ assertEquals(request.getModelInfo(), model);
+ assertEquals(request.getProductFamilyId(), "productFamilyId");
+
+ }
+
+}
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
index 0000000..5eaa602
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ResourceDecompositionTest.java
@@ -0,0 +1,50 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ResourceDecompositionTest {
+
+ private ResourceDecomposition rd = new ResourceDecomposition() {
+ private static final long serialVersionUID = 1L;
+ };
+ ModelInfo model = new ModelInfo();
+ ResourceInstance ri = new ResourceInstance();
+
+
+
+ @Test
+ public void testResourceDecomposition() {
+ rd.setModelInfo(model);
+ rd.setInstanceData(ri);
+ rd.setResourceType("resourceType");
+ rd.setResourceInstanceId("newInstanceId");
+ rd.setResourceInstanceName("newInstanceName");
+ assertEquals(rd.getResourceModel(), model);
+ assertEquals(rd.getModelInfo(), model);
+ assertEquals(rd.getInstanceData(), ri);
+ assertEquals(rd.getResourceInstanceId(), "newInstanceId");
+ assertEquals(rd.getResourceInstanceName(), "newInstanceName");
+ }
+
+}
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
index 0000000..8d6b61f
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ResourceTest.java
@@ -0,0 +1,68 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ResourceTest {
+ private Resource resource = new Resource() {
+ private static final long serialVersionUID = 1L;
+
+
+ };
+ ModelInfo model = new ModelInfo();
+ ResourceInstance ri = new ResourceInstance();
+ HomingSolution hs = new HomingSolution();
+ ResourceType rt = ResourceType.VNF;
+ public long concurrencyCounter = 1L;
+ long initval = resource.getConcurrencyCounter();
+
+ @Test
+ public void testResource() {
+ resource.setResourceId("resourceId");
+ resource.setModelInfo(model);
+ resource.setResourceInstance(ri);
+ resource.setHomingSolution(hs);
+ resource.setCurrentHomingSolution(hs);
+ resource.setResourceType(rt);
+ resource.setToscaNodeType("toscaNodeType");
+ resource.setResourceInstanceId("newInstanceId");
+ resource.setResourceInstanceName("newInstanceName");
+ resource.incrementConcurrencyCounter();
+ assertEquals(resource.getResourceId(), "resourceId");
+ assertEquals(resource.getModelInfo(), model);
+ assertEquals(resource.getResourceInstance(), ri);
+ assertEquals(resource.getHomingSolution(), hs);
+ assertEquals(resource.getCurrentHomingSolution(), hs);
+ assertEquals(resource.getResourceType(), rt);
+ assertEquals(resource.getToscaNodeType(), "toscaNodeType");
+ assertEquals(resource.getResourceInstanceId(), "newInstanceId");
+ assertEquals(resource.getResourceInstanceName(), "newInstanceName");
+ assertEquals(resource.getConcurrencyCounter(), initval+1);
+
+
+
+
+
+ }
+
+}
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
index 0000000..58548db
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ServiceDecompositionTest.java
@@ -0,0 +1,83 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class ServiceDecompositionTest {
+ private ServiceDecomposition sd = new ServiceDecomposition();
+ ModelInfo model= new ModelInfo();
+ ServiceInstance si= new ServiceInstance();
+ Project project= new Project();
+ OwningEntity oe= new OwningEntity();
+ //VnfResource vnf = new VnfResource();
+ List<VnfResource> vnfResources;
+ List<NetworkResource> networkResources;
+ List<ConfigResource> configResources;
+ List<AllottedResource> allottedResources;
+ Request request= new Request();
+ Customer customer= new Customer();
+
+
+ @Test
+ public void testServiceDecomposition() {
+ sd.setModelInfo(model);
+ sd.setServiceInstance(si);
+ sd.setProject(project);
+ sd.setOwningEntity(oe);
+ sd.setServiceVnfs(vnfResources);
+ sd.setServiceConfigs(configResources);
+ sd.setServiceNetworks(networkResources);
+ sd.setServiceAllottedResources(allottedResources);
+ sd.setServiceConfigResources(configResources);
+ sd.setServiceType("serviceType");
+ sd.setServiceRole("serviceRole");
+ sd.setRequest(request);
+ sd.setCustomer(customer);
+ sd.setCallbackURN("callbackURN");
+ sd.setSdncVersion("sdncVersion");
+ assertEquals(sd.getModelInfo(), model);
+ assertEquals(sd.getServiceInstance(), si);
+ assertEquals(sd.getProject(), project);
+ assertEquals(sd.getOwningEntity(), oe);
+ assertEquals(sd.getServiceVnfs(), vnfResources);
+ assertEquals(sd.getServiceConfigs(), configResources);
+ assertEquals(sd.getServiceNetworks(), networkResources);
+ assertEquals(sd.getServiceAllottedResources(), allottedResources);
+ assertEquals(sd.getServiceConfigResources(), configResources);
+ assertEquals(sd.getRequest(), request);
+ assertEquals(sd.getCustomer(), customer);
+ assertEquals(sd.getCallbackURN(), "callbackURN");
+ assertEquals(sd.getSdncVersion(), "sdncVersion");
+
+
+
+
+
+
+
+
+ }
+
+}
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
index 0000000..b600fef
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/ServiceInstanceTest.java
@@ -0,0 +1,61 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+public class ServiceInstanceTest {
+
+ private ServiceInstance si= new ServiceInstance();
+ Map serviceParams;
+ Configuration config= new Configuration();
+ ModelInfo model= new ModelInfo();
+
+ @Test
+ public void testServiceInstance() {
+ si.setServiceType("serviceType");
+ si.setServiceId("serviceId");
+ si.setServiceParams(serviceParams);
+ si.setInstanceId("instanceId");
+ si.setInstanceName("instanceName");
+ si.setOrchestrationStatus("orchestrationStatus");
+ si.setConfiguration(config);
+ si.setModelInfo(model);
+ si.setEnvironmentContext("environmentContext");
+ si.setWorkloadContext("workloadContext");
+ assertEquals(si.getServiceType(), "serviceType");
+ assertEquals(si.getServiceId(), "serviceId");
+ assertEquals(si.getServiceParams(), serviceParams);
+ assertEquals(si.getInstanceId(), "instanceId");
+ assertEquals(si.getInstanceName(), "instanceName");
+ assertEquals(si.getOrchestrationStatus(), "orchestrationStatus");
+ assertEquals(si.getConfiguration(), config);
+ assertEquals(si.getModelInfo(), model);
+ assertEquals(si.getEnvironmentContext(), "environmentContext");
+ assertEquals(si.getWorkloadContext(), "workloadContext");
+
+
+ }
+
+}
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
index 0000000..7e9aef2
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/SubscriberTest.java
@@ -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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class SubscriberTest {
+ Subscriber subscriber= new Subscriber("globalId", "name", "commonSiteId");
+
+ @Test
+ public void testSubscriber() {
+ subscriber.setGlobalId("globalId");
+ subscriber.setName("name");
+ subscriber.setCommonSiteId("commonSiteId");
+ assertEquals(subscriber.getGlobalId(), "globalId");
+ assertEquals(subscriber.getName(), "name");
+ assertEquals(subscriber.getCommonSiteId(), "commonSiteId");
+
+
+ }
+
+}
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
index 0000000..2a5639f
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/TunnelConnectTest.java
@@ -0,0 +1,44 @@
+/*
+* ============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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class TunnelConnectTest {
+ private TunnelConnect tc= new TunnelConnect();
+
+ @Test
+ public void testTunnelConnect() {
+ tc.setId("id");
+ tc.setUpBandwidth("upBandwidth");
+ tc.setDownBandwidth("downBandwidth");
+ tc.setUpBandwidth2("upBandwidth2");
+ tc.setDownBandwidth2("downBandwidth2");
+ assertEquals(tc.getId(), "id");
+ assertEquals(tc.getUpBandwidth(), "upBandwidth");
+ assertEquals(tc.getDownBandwidth(), "downBandwidth");
+ assertEquals(tc.getUpBandwidth2(), "upBandwidth2");
+ assertEquals(tc.getDownBandwidth2(), "downBandwidth2");
+
+ }
+
+}
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
index 0000000..e476ef9
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/domain/VnfResourceTest.java
@@ -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.bpmn.core.domain;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class VnfResourceTest {
+
+ private VnfResource vnf= new VnfResource();
+ List<ModuleResource> moduleResources;
+
+ @Test
+ public void testVnfResource() {
+ vnf.setModules(moduleResources);
+ vnf.setVnfHostname("vnfHostname");
+ vnf.setVnfType("vnfType");
+ vnf.setNfFunction("nfFunction");
+ vnf.setNfType("nfType");
+ vnf.setNfRole("nfRole");
+ vnf.setNfNamingCode("nfNamingCode");
+ vnf.setMultiStageDesign("multiStageDesign");
+ assertEquals(vnf.getVfModules(), moduleResources);
+ assertEquals(vnf.getVnfHostname(), "vnfHostname");
+ assertEquals(vnf.getVnfType(), "vnfType");
+ assertEquals(vnf.getNfFunction(), "nfFunction");
+ assertEquals(vnf.getNfType(), "nfType");
+ assertEquals(vnf.getNfRole(), "nfRole");
+ assertEquals(vnf.getNfNamingCode(), "nfNamingCode");
+ assertEquals(vnf.getMultiStageDesign(), "multiStageDesign");
+
+
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/pom.xml b/bpmn/MSOInfrastructureBPMN/pom.xml
index f7170ff..f7cb61a 100644
--- a/bpmn/MSOInfrastructureBPMN/pom.xml
+++ b/bpmn/MSOInfrastructureBPMN/pom.xml
@@ -367,6 +367,13 @@
<version>8.9.1</version>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+
<!--for yang tools-->
<!-- <dependency>
<groupId>org.onap.so</groupId>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index 072c381..933d450 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -133,11 +133,76 @@
String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+ String hdrRequestId = execution.getVariable("mso-request-id")
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+ String source = execution.getVariable("source")
+ String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String serviceType = resourceInputObj.getServiceType()
+ String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
+ String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
+ String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelName()
+ String serviceModelName = resourceInputObj.getServiceModelInfo().getModelVersion()
+ String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
+ String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
+ String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
+ String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+ String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
+ String resourceInputPrameters = resourceInputObj.getResourceParameters()
+ String netowrkInputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")
+ //here convert json string to xml string
+ String netowrkInputParameters = jsonUtil.json2xml(netowrkInputParametersJson)
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, sdnc_svcAction, sdnc_requestAction, null, null, null)
-
+ String content =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.openecomp.mso/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${sdnc_svcAction}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${hdrRequestId}</request-id>
+ <request-action>${sdnc_requestAction}</request-action>
+ <source>${source}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${sdnc_service_id}</service-id>
+ <subscription-service-type>${serviceType}</subscription-service-type>
+ <ecomp-model-information>
+ <model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid>
+ <model-uuid>${serviceModelUuid}</model-uuid>
+ <model-version>${serviceModelVersion}</model-version>
+ <model-name>${serviceModelName}</model-name>
+ </ecomp-model-information>
+ <service-instance-id>${serviceInstanceId}</service-instance-id>
+ <global-customer-id>${globalCustomerId}</global-customer-id>
+ </service-information>
+ <network-information>
+ <ecomp-model-information>
+ <model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid>
+ <model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid>
+ <model-uuid>${modelUuid}</model-uuid>
+ <model-version>${modelVersion}</model-version>
+ <model-name>${modelName}</model-name>
+ </ecomp-model-information>
+ </network-information>
+ <network-request-input>
+ <network-input-parameters>${netowrkInputParameters}</network-input-parameters>
+ </network-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
utils.logAudit(sndcTopologyCreateRequesAsString)
execution.setVariable(Prefix + "createSDNCRequest", sndcTopologyCreateRequesAsString)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
index 291df46..6d5249e 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
@@ -47,8 +47,6 @@
import java.util.List;
import java.util.UUID;
-import javax.mail.Quota.Resource;
-
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
import org.camunda.bpm.engine.delegate.DelegateExecution
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index 5eb3fd9..47ad795 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -50,8 +50,6 @@
import 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 @@
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
index 2d96ac7..0000000
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceV2.groovy
+++ /dev/null
@@ -1,1071 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.openecomp.mso.bpmn.infrastructure.scripts;
-
-import static org.apache.commons.lang3.StringUtils.*;
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.json.JSONArray;
-import org.json.JSONObject;
-import org.openecomp.mso.bpmn.common.scripts.AaiUtil
-import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.json.JsonUtils
-import org.springframework.web.util.UriUtils;
-
-import groovy.json.*
-
-/**
- * This groovy class supports the <class>DoCreateServiceInstance.bpmn</class> process.
- *
- * Inputs:
- * @param - msoRequestId
- * @param - globalSubscriberId
- * @param - subscriptionServiceType
- * @param - serviceInstanceId
- * @param - serviceInstanceName - O
- * @param - serviceModelInfo
- * @param - productFamilyId
- * @param - disableRollback
- * @param - failExists - TODO
- * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
- * @param - sdncVersion ("1610")
- * @param - serviceDecomposition - Decomposition for R1710
- * (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)
- *
- * Outputs:
- * @param - rollbackData (localRB->null)
- * @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
- * @param - WorkflowException
- * @param - serviceInstanceName - (GET from AAI if null in input)
- *
- */
-public class DoCreateE2EServiceInstanceV2 extends AbstractServiceTaskProcessor {
-
- String Prefix="DCRESI_"
- private static final String DebugFlag = "isDebugEnabled"
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- JsonUtils jsonUtil = new JsonUtils()
-
- public void preProcessRequest (DelegateExecution execution) {
- //only for dug
- execution.setVariable("isDebugLogEnabled","true")
- execution.setVariable("unit_test", "true")
- execution.setVariable("skipVFC", "true")
-
- def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- String msg = ""
- utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 preProcessRequest *****", isDebugEnabled)
-
- utils.log("INFO"," unit test : " + execution.getVariable("unit_test"), isDebugEnabled)
-
- try {
- execution.setVariable("prefix", Prefix)
- //Inputs
- //requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
- String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
- utils.log("INFO"," ***** globalSubscriberId *****" + globalSubscriberId, isDebugEnabled)
-
- //requestDetails.requestParameters. for AAI PUT & SDNC assignTopology
- String serviceType = execution.getVariable("serviceType")
- utils.log("INFO"," ***** serviceType *****" + serviceType, isDebugEnabled)
-
- //requestDetails.requestParameters. for SDNC assignTopology
- String productFamilyId = execution.getVariable("productFamilyId") //AAI productFamilyId
-
- if (isBlank(globalSubscriberId)) {
- msg = "Input globalSubscriberId is null"
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
-
- if (isBlank(serviceType)) {
- msg = "Input serviceType is null"
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
-
- if (productFamilyId == null) {
- execution.setVariable("productFamilyId", "")
- }
-
- String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
- if (isBlank(sdncCallbackUrl)) {
- msg = "URN_mso_workflow_sdncadapter_callback is null"
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
- execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
- utils.log("INFO","SDNC Callback URL: " + sdncCallbackUrl, isDebugEnabled)
-
- //requestDetails.modelInfo.for AAI PUT servieInstanceData
- //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- String uuiRequest = execution.getVariable("uuiRequest")
- utils.log("INFO","uuiRequest: " + uuiRequest, isDebugEnabled)
-
- String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceDefId")
- utils.log("INFO","modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
-
- String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.templateId")
- utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)
-
- String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")
- utils.log("INFO","serviceModelName: " + serviceModelName, isDebugEnabled)
- execution.setVariable("serviceModelName", serviceModelName)
-
- //aai serviceType and Role can be setted as fixed value now.
- String aaiServiceType = serviceType
- String aaiServiceRole = serviceType+"Role"
-
- execution.setVariable("modelInvariantUuid", modelInvariantUuid)
- execution.setVariable("modelUuid", modelUuid)
-
- //AAI PUT
- String oStatus = execution.getVariable("initialStatus") ?: ""
- utils.log("INFO","oStatus: " + oStatus, isDebugEnabled)
- if ("TRANSPORT".equalsIgnoreCase(serviceType))
- {
- oStatus = "Created"
- }
-
-
-
- String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${oStatus}</orchestration-status>"
- utils.log("INFO","statusLine: " + statusLine, isDebugEnabled)
- AaiUtil aaiUriUtil = new AaiUtil(this)
- utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled)
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- utils.log("INFO","aai_uri: " + aai_uri, isDebugEnabled)
- String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
- utils.log("INFO","namespace: " + namespace, isDebugEnabled)
- /*
- String serviceInstanceData =
- """<service-instance xmlns=\"${namespace}\">
- <service-instance-id>${serviceInstanceId}</service-instance-id>
- <service-instance-name>${serviceInstanceName}</service-instance-name>
- <service-type>${aaiServiceType}</service-type>
- <service-role>${aaiServiceRole}</service-role>
- ${statusLine}
- <model-invariant-id>${modelInvariantUuid}</model-invariant-id>
- <model-version-id>${modelUuid}</model-version-id>
- </service-instance>""".trim()
- */
- //begin only for test
- String serviceInstanceData =
- """<service-instance xmlns=\"${namespace}\">
- <service-instance-id>${serviceInstanceId}</service-instance-id>
- <service-instance-name>${serviceInstanceName}</service-instance-name>
- <service-type>${aaiServiceType}</service-type>
- <service-role>${aaiServiceRole}</service-role>
- ${statusLine}
- </service-instance>""".trim()
- //end only for test
- execution.setVariable("serviceInstanceData", serviceInstanceData)
- utils.log("INFO","serviceInstanceData: " + serviceInstanceData, isDebugEnabled)
- utils.logAudit(serviceInstanceData)
- utils.log("INFO", " aai_uri " + aai_uri + " namespace:" + namespace, isDebugEnabled)
- utils.log("INFO", " 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData, isDebugEnabled)
-
- execution.setVariable("serviceSDNCCreate", "false")
- execution.setVariable("operationStatus", "Waiting deploy resource...")
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex){
- msg = "Exception in preProcessRequest " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.postProcessAAIGET(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 postProcessAAIGET ***** ", isDebugEnabled)
- String msg = ""
-
- try {
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceName, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- else
- {
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI){
- utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
- msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoCreateServiceInstance.postProcessAAIGET. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- public void postProcessAAIPUT(DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.postProcessAAIPUT(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 postProcessAAIPUT ***** ", isDebugEnabled)
- String msg = ""
- try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- boolean succInAAI = execution.getVariable("GENPS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error putting Service-instance in AAI", + serviceInstanceId, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- }
- else
- {
- //start rollback set up
- RollbackData rollbackData = new RollbackData()
- def disableRollback = execution.getVariable("disableRollback")
- rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString())
- rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true")
- rollbackData.put("SERVICEINSTANCE", "serviceInstanceId", serviceInstanceId)
- rollbackData.put("SERVICEINSTANCE", "subscriptionServiceType", execution.getVariable("subscriptionServiceType"))
- rollbackData.put("SERVICEINSTANCE", "globalSubscriberId", execution.getVariable("globalSubscriberId"))
- execution.setVariable("rollbackData", rollbackData)
- }
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoCreateServiceInstance.postProcessAAIDEL. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- public void postProcessAAIGET2(DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.postProcessAAIGET2(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 postProcessAAIGET2 ***** ", isDebugEnabled)
- String msg = ""
-
- try {
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error getting Service-instance from AAI in postProcessAAIGET2", + serviceInstanceName, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET2 GENGS_SuccessIndicator:" + succInAAI
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- else
- {
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI){
- String aaiService = execution.getVariable("GENGS_service")
- if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "service-instance-name"))) {
- execution.setVariable("serviceInstanceName", utils.getNodeText1(aaiService, "service-instance-name"))
- utils.log("INFO","Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"), isDebugEnabled)
- }
- }
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoCreateServiceInstance.postProcessAAIGET2 " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- public void preProcessRollback (DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.preProcessRollback(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 preProcessRollback ***** ", isDebugEnabled)
- try {
-
- Object workflowException = execution.getVariable("WorkflowException");
-
- if (workflowException instanceof WorkflowException) {
- utils.log("INFO", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
- execution.setVariable("prevWorkflowException", workflowException);
- //execution.setVariable("WorkflowException", null);
- }
- } catch (BpmnError e) {
- utils.log("INFO", "BPMN Error during preProcessRollback", isDebugEnabled)
- } catch(Exception ex) {
- String msg = "Exception in preProcessRollback. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- public void postProcessRollback (DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.postProcessRollback(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO"," ***** Enter DoCreateE2EServiceInstanceV2 postProcessRollback ***** ", isDebugEnabled)
- String msg = ""
- try {
- Object workflowException = execution.getVariable("prevWorkflowException");
- if (workflowException instanceof WorkflowException) {
- utils.log("INFO", "Setting prevException to WorkflowException: ", isDebugEnabled)
- execution.setVariable("WorkflowException", workflowException);
- }
- execution.setVariable("rollbackData", null)
- } catch (BpmnError b) {
- utils.log("INFO", "BPMN Error during postProcessRollback", isDebugEnabled)
- throw b;
- } catch(Exception ex) {
- msg = "Exception in postProcessRollback. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- /**
- * Init the service Operation Status
- */
- public void preUpdateServiceOperationStatus(DelegateExecution execution){
- def method = getClass().getSimpleName() + '.preUpdateServiceOperationStatus(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
-
- try{
- String serviceId = execution.getVariable("serviceInstanceId")
- String operationId = execution.getVariable("operationId")
- String serviceName = execution.getVariable("serviceInstanceName")
- String operationType = "CREATE"
- String userId = ""
- String result = "processing"
- String progress = execution.getVariable("progress")
- utils.log("INFO", "progress: " + progress , isDebugEnabled)
- if ("100".equalsIgnoreCase(progress))
- {
- result = "finished"
- }
- String reason = ""
- String operationContent = "Prepare service creation : " + execution.getVariable("operationStatus")
-
- utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
- serviceId = UriUtils.encode(serviceId,"UTF-8")
- execution.setVariable("serviceInstanceId", serviceId)
- execution.setVariable("operationId", operationId)
- execution.setVariable("operationType", operationType)
-
- def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
- execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
- utils.log("INFO", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
-
- execution.setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
- String payload =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateServiceOperationStatus xmlns:ns="http://org.openecomp.mso/requestsdb">
- <serviceId>${serviceId}</serviceId>
- <operationId>${operationId}</operationId>
- <serviceName>${serviceName}</serviceName>
- <operationType>${operationType}</operationType>
- <userId>${userId}</userId>
- <result>${result}</result>
- <operationContent>${operationContent}</operationContent>
- <progress>${progress}</progress>
- <reason>${reason}</reason>
- </ns:updateServiceOperationStatus>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- payload = utils.formatXml(payload)
- execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
- utils.log("INFO", "Outgoing preUpdateServiceOperationStatus: \n" + payload, isDebugEnabled)
-
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing preUpdateServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)
- execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preUpdateServiceOperationStatus Method:\n" + e.getMessage())
- }
- utils.log("INFO", "======== COMPLETED preUpdateServiceOperationStatus Process ======== ", isDebugEnabled)
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
-
- public void preInitResourcesOperStatus(DelegateExecution execution){
- def method = getClass().getSimpleName() + '.preInitResourcesOperStatus(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
-
- utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 preInitResourcesOperStatus Process ======== ", isDebugEnabled)
- try{
- String serviceId = execution.getVariable("serviceInstanceId")
- String operationId = execution.getVariable("operationId")
- String operationType = execution.getVariable("operationType")
- String resourceTemplateUUIDs = ""
- String result = "processing"
- String progress = "0"
- String reason = ""
- String operationContent = "Prepare service creation"
- utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId + " operationType:" + operationType, isDebugEnabled)
- serviceId = UriUtils.encode(serviceId,"UTF-8")
- execution.setVariable("serviceInstanceId", serviceId)
- execution.setVariable("operationId", operationId)
- execution.setVariable("operationType", operationType)
- String incomingRequest = execution.getVariable("uuiRequest")
- String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")
- List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)
- for(String resource : resourceList){
- resourceTemplateUUIDs = resourceTemplateUUIDs + jsonUtil.getJsonValue(resource, "resourceId") + ":"
- }
-
- def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
- execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
- utils.log("INFO", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
-
- String payload =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:initResourceOperationStatus xmlns:ns="http://org.openecomp.mso/requestsdb">
- <serviceId>${serviceId}</serviceId>
- <operationId>${operationId}</operationId>
- <operationType>${operationType}</operationType>
- <resourceTemplateUUIDs>${resourceTemplateUUIDs}</resourceTemplateUUIDs>
- </ns:initResourceOperationStatus>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- payload = utils.formatXml(payload)
- execution.setVariable("CVFMI_initResOperStatusRequest", payload)
- utils.log("INFO", "Outgoing initResourceOperationStatus: \n" + payload, isDebugEnabled)
- utils.logAudit("DoCustomDeleteE2EServiceInstanceV2 Outgoing initResourceOperationStatus Request: " + payload)
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing preInitResourcesOperStatus. Exception is:\n" + e, isDebugEnabled)
- execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- /**
- * prepare resource create request
- */
- public void preResourceRequest(execution){
- def method = getClass().getSimpleName() + '.preResourceRequest(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
-
- utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 preResourceRequest Process ======== ", isDebugEnabled)
- try {
- String resourceType = execution.getVariable("resourceType")
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- String nsServiceName = resourceType + "_" + serviceInstanceName
- execution.setVariable("nsServiceName", nsServiceName)
- utils.log("INFO", "Prepare VFC Request nsServiceName:" + nsServiceName, isDebugEnabled)
- String globalSubscriberId = execution.getVariable("globalSubscriberId")
- String serviceType = execution.getVariable("serviceType")
- String serviceId = execution.getVariable("serviceInstanceId")
- execution.setVariable("serviceId", serviceId)
- String operationId = execution.getVariable("operationId")
- String incomingRequest = execution.getVariable("uuiRequest")
- String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")
- String nsServiceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")
- execution.setVariable("nsServiceDescription", nsServiceDescription)
- utils.log("INFO", "Prepare VFC Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
- List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)
- for(String resource : resourceList){
- String resourceName = jsonUtil.getJsonValue(resource, "resourceName")
- if(StringUtils.containsIgnoreCase(resourceName, resourceType)){
- String resourceUUID = jsonUtil.getJsonValue(resource, "resourceId")
- String resourceInvariantUUID = jsonUtil.getJsonValue(resource, "resourceDefId")
- String resourceParameters = jsonUtil.getJsonValue(resource, "nsParameters")
- execution.setVariable("resourceUUID", resourceUUID)
- execution.setVariable("resourceInvariantUUID", resourceInvariantUUID)
- execution.setVariable("resourceParameters", resourceParameters)
- utils.log("INFO", "Prepare VFC Request resourceType:" + resourceType, isDebugEnabled)
- utils.log("INFO", "Prepare VFC Request resourceUUID:" + resourceUUID, isDebugEnabled)
- utils.log("INFO", "Prepare VFC Request resourceParameters:" + resourceParameters, isDebugEnabled)
- }
- }
- } catch (BpmnError b) {
- utils.log("INFO", "BPMN Error during preResourceRequest", isDebugEnabled)
- throw b;
- } catch(Exception ex) {
- msg = "Exception in preResourceRequest. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- /**
- * post config request.
- */
- public void postConfigRequest(execution){
- //now do noting
- }
-
- /***********************************************************************************************/
-
- private void loadResourcesProperties(DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.loadResourcesProperties(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- String loadFilePath = "/etc/mso/config.d/reources.json"
- try{
- def jsonPayload = new File(loadFilePath).text
- utils.log("INFO","jsonPayload: " + jsonPayload, isDebugEnabled)
-
- String resourcesProperties = jsonUtil.prettyJson(jsonPayload.toString())
- utils.log("INFO","resourcesProperties: " + resourcesProperties, isDebugEnabled)
-
- String createResourceSort = jsonUtil.getJsonValue(resourcesProperties, "CreateResourceSort")
- //utils.log("INFO","createResourceSort: " + createResourceSort, isDebugEnabled)
- execution.setVariable("createResourceSort", createResourceSort)
-
- String deleteResourceSort = jsonUtil.getJsonValue(resourcesProperties, "DeleteResourceSort")
- //utils.log("INFO","deleteResourceSort: " + deleteResourceSort, isDebugEnabled)
- execution.setVariable("deleteResourceSort", deleteResourceSort)
-
-
- String resourceControllerType = jsonUtil.getJsonValue(resourcesProperties, "ResourceControllerType")
- //utils.log("INFO","resourceControllerType: " + resourceControllerType, isDebugEnabled)
- execution.setVariable("resourceControllerType", resourceControllerType)
-
-
- }catch(Exception ex){
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in " + method + " - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
- private sortCreateResource(DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.sortCreateResource(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- String createResourceSortDef = """[
- {
- "resourceType":"vEPC"
- },
- {
- "resourceType":"vIMS"
- },
- {
- "resourceType":"vCPE"
- },
- {
- "resourceType":"vFW"
- },
- {
- "resourceType":"Underlay"
- },
- {
- "resourceType":"Overlay"
- },
- {
- "resourceType":"GRE_AAR"
- },
- {
- "resourceType":"APN_AAR"
- },
- {
- "resourceType":"VPN_SAR"
- },
- {
- "resourceType":"GRE_SAR"
- }
-
- ]""".trim()
-
- try{
-
- loadResourcesProperties(execution)
- String createResourceSort = execution.getVariable("createResourceSort")
- if (isBlank(createResourceSort)) {
- createResourceSort = createResourceSortDef;
- }
-
- List<String> sortResourceList = jsonUtil.StringArrayToList(execution, createResourceSort)
- utils.log("INFO", "sortResourceList : " + sortResourceList, isDebugEnabled)
-
- JSONArray newResourceList = new JSONArray()
- int resSortCount = sortResourceList.size()
-
-
- for ( int currentResource = 0 ; currentResource < resSortCount ; currentResource++ ) {
- String sortResource = sortResourceList[currentResource]
- String resourceType = jsonUtil.getJsonValue(sortResource, "resourceType")
- List<String> resourceList = execution.getVariable(Prefix+"resourceList")
-
- for (String resource : resourceList) {
- //utils.log("INFO", "resource : " + resource, isDebugEnabled)
- String resourceName = jsonUtil.getJsonValue(resource, "resourceName")
- //utils.log("INFO", "resource Name : " + resourceName, isDebugEnabled)
- String[] split = resourceName.split("_")
-
- utils.log("INFO", "split : " + split, isDebugEnabled)
- int strLen = split.size()
- String allottedResourceType = ""
-
- if (strLen <2) {
- allottedResourceType = split[0]
- }
- else {
- allottedResourceType = split[0] + "_" + split[1]
- }
-
- if (StringUtils.containsIgnoreCase(allottedResourceType, resourceType)) {
- utils.log("INFO", "allottedResourceType : " + allottedResourceType + " resourceType : " + resourceType, isDebugEnabled)
- utils.log("INFO", "resource : " + resource , isDebugEnabled)
- JSONObject jsonObj = new JSONObject(resource)
- newResourceList.put(jsonObj)
-
- }
- utils.log("INFO", "Get next sort type " , isDebugEnabled)
- }
- }
- utils.log("INFO", "newResourceList : " + newResourceList, isDebugEnabled)
- String newResourceStr = newResourceList.toString()
- List<String> newResourceListStr = jsonUtil.StringArrayToList(execution, newResourceStr)
-
- execution.setVariable(Prefix+"resourceList", newResourceListStr)
- utils.log("INFO", "newResourceList : " + newResourceListStr, isDebugEnabled)
-
- }catch(Exception ex){
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in " + method + " - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
-
- }
- /**
- * get service resources
- */
- public void getServiceResources(DelegateExecution execution){
- def method = getClass().getSimpleName() + '.getServiceResources(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 getServiceResources Process ======== ", isDebugEnabled)
- try{
- execution.setVariable(Prefix+"resourceCount", 0)
- execution.setVariable(Prefix+"nextResource", 0)
-
- String incomingRequest = execution.getVariable("uuiRequest")
- String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")
- utils.log("INFO", "Resources String : " + resourcesStr, isDebugEnabled)
- if (!isBlank(resourcesStr)) {
- List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)
- utils.log("INFO", "Resource List : " + resourceList, isDebugEnabled)
- execution.setVariable(Prefix+"resourceList", resourceList)
- execution.setVariable(Prefix+"resourceCount", resourceList.size())
- execution.setVariable(Prefix+"nextResource", 0)
- }
-
- int resourceNum = execution.getVariable(Prefix+"nextResource")
- utils.log("DEBUG", "Current Resource count:"+ execution.getVariable(Prefix+"nextResource"), isDebugEnabled)
-
- int resourceCount = execution.getVariable(Prefix+"resourceCount")
- utils.log("DEBUG", "Total Resource count:"+ execution.getVariable(Prefix+"resourceCount"), isDebugEnabled)
-
- if (resourceNum < resourceCount) {
- execution.setVariable(Prefix+"resourceFinish", false)
- }
- else {
- execution.setVariable(Prefix+"resourceFinish", true)
- }
- sortCreateResource(execution)
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing getServiceResources. Exception is:\n" + e, isDebugEnabled)
- execution.setVariable(Prefix+"ErrorResponse", "Error Occurred during getServiceResources Method:\n" + e.getMessage())
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- /**
- * prepare Decompose next resource to create request
- */
- public void preProcessDecomposeNextResource(DelegateExecution execution){
- def method = getClass().getSimpleName() + '.preProcessDecomposeNextResource(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 preProcessDecomposeNextResource Process ======== ", isDebugEnabled)
- try{
- int resourceNum = execution.getVariable(Prefix+"nextResource")
- List<String> resourceList = execution.getVariable(Prefix+"resourceList")
- utils.log("INFO", "Resource List : " + resourceList, isDebugEnabled)
-
- String resource = resourceList[resourceNum]
- execution.setVariable(Prefix+"resource", resource)
- utils.log("INFO", "Current Resource : " + resource, isDebugEnabled)
-
- String resourceName = jsonUtil.getJsonValue(resource, "resourceName")
- execution.setVariable(Prefix+"resourceName", resourceName)
- utils.log("INFO", "resource Name : " + resourceName, isDebugEnabled)
-
- String resourceUUID = jsonUtil.getJsonValue(resource, "resourceId")
- execution.setVariable("resourceUUID", resourceUUID)
- utils.log("INFO", "resource UUID : " + resourceUUID, isDebugEnabled)
-
- String resourceInvariantUUID = jsonUtil.getJsonValue(resource, "resourceDefId")
- execution.setVariable("resourceInvariantUUID", resourceInvariantUUID)
-
-
- String resourceParameters = jsonUtil.getJsonValue(resource, "nsParameters")
- execution.setVariable("resourceParameters", resourceParameters)
- utils.log("INFO", "resource Parameters : " + resourceParameters, isDebugEnabled)
-
- execution.setVariable(Prefix+"nextResource", resourceNum + 1)
- utils.log("INFO", "next Resource num : " + execution.getVariable(Prefix+"nextResource"), isDebugEnabled)
-
- int resourceCount = execution.getVariable(Prefix+"resourceCount")
- if (resourceCount >0 ){
- int progress = (resourceNum*100) / resourceCount
- execution.setVariable("progress", progress.toString() )
- }
-
- execution.setVariable("operationStatus", resourceName )
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing preProcessDecomposeNextResource. Exception is:\n" + e, isDebugEnabled)
- execution.setVariable(Prefix+"ErrorResponse", "Error Occurred during preProcessDecomposeNextResource Method:\n" + e.getMessage())
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
- /**
- * post Decompose next resource to create request
- */
- public void postProcessDecomposeNextResource(DelegateExecution execution){
- def method = getClass().getSimpleName() + '.postProcessDecomposeNextResource(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO", " ======== STARTED DoCreateE2EServiceInstanceV2 postProcessDecomposeNextResource Process ======== ", isDebugEnabled)
- try{
- String resourceName = execution.getVariable(Prefix+"resourceName")
-
- int resourceNum = execution.getVariable(Prefix+"nextResource")
- utils.log("DEBUG", "Current Resource count:"+ execution.getVariable(Prefix+"nextResource"), isDebugEnabled)
-
- int resourceCount = execution.getVariable(Prefix+"resourceCount")
- utils.log("DEBUG", "Total Resource count:"+ execution.getVariable(Prefix+"resourceCount"), isDebugEnabled)
-
- if (resourceNum < resourceCount) {
- execution.setVariable(Prefix+"resourceFinish", false)
- }
- else {
- execution.setVariable(Prefix+"resourceFinish", true)
- }
-
- utils.log("DEBUG", "Resource Finished:"+ execution.getVariable(Prefix+"resourceFinish"), isDebugEnabled)
-
- if (resourceCount >0 ){
- int progress = (resourceNum*100) / resourceCount
- execution.setVariable("progress", progress.toString() )
- utils.log("DEBUG", "progress :"+ execution.getVariable("progress"), isDebugEnabled)
- }
- execution.setVariable("operationStatus", resourceName )
-
- }catch(Exception e){
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in "+method + "- " + e.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
- /**
- * prepare check Resource Type
- */
- public void checkResourceType(DelegateExecution execution){
- def method = getClass().getSimpleName() + '.checkResourceType(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- String resourceControllerTypeDef = """[
- {
- "resourceType":"vEPC",
- "controllerType":"VFC"
- },
- {
- "resourceType":"vIMS",
- "controllerType":"VFC"
- },
- {
- "resourceType":"vCPE",
- "controllerType":"VFC"
- },
- {
- "resourceType":"vFW",
- "controllerType":"VFC"
- },
- {
- "resourceType":"Underlay",
- "controllerType":"SDNC"
- },
- {
- "resourceType":"Overlay",
- "controllerType":"SDNC"
- },
- {
- "resourceType":"VPN_SAR",
- "controllerType":"SDNC"
- },
- {
- "resourceType":"GRE_AAR",
- "controllerType":"APPC"
- },
- {
- "resourceType":"GRE_SAR",
- "controllerType":"SDNC"
- } ,
- {
- "resourceType":"APN_AAR",
- "controllerType":"APPC"
- }
-
- ]""".trim()
-
- try{
-
- String resourceName = execution.getVariable(Prefix+"resourceName")
- utils.log("INFO", "resourceName : " + resourceName, isDebugEnabled)
- execution.setVariable("resourceName", resourceName)
-
- String[] split = resourceName.split("_")
-
- utils.log("INFO", "split : " + split, isDebugEnabled)
- int strLen = split.size()
- String allottedResourceType = ""
-
- if (strLen <2) {
- allottedResourceType = split[0]
- }
- else {
- allottedResourceType = split[0] + "_" + split[1]
- }
-
- loadResourcesProperties(execution)
- String resourceControllerType= execution.getVariable("resourceControllerType")
- if (isBlank(resourceControllerType)) {
- resourceControllerType = resourceControllerTypeDef;
- }
- utils.log("INFO", "resourceControllerType: " + resourceControllerType, isDebugEnabled)
-
- List<String> ResourceTypeList = jsonUtil.StringArrayToList(execution, resourceControllerType)
- utils.log("INFO", "ResourceTypeList : " + ResourceTypeList, isDebugEnabled)
- execution.setVariable("controllerType", "Other")
- execution.setVariable(Prefix+"resourceType", "")
- for (String resourceMap : ResourceTypeList) {
- String resourceType = jsonUtil.getJsonValue(resourceMap, "resourceType")
- String controllerType = jsonUtil.getJsonValue(resourceMap, "controllerType")
- //utils.log("INFO", "resourceMap.resourceType : " + resourceType, isDebugEnabled)
- //utils.log("INFO", "resourceMap.controllerType : " + controllerType, isDebugEnabled)
- //utils.log("INFO", "resourceName : " + resourceName, isDebugEnabled)
- //utils.log("INFO", "allottedResourceType : " + allottedResourceType, isDebugEnabled )
-
- if (StringUtils.containsIgnoreCase(allottedResourceType, resourceType)) {
- execution.setVariable("controllerType", controllerType)
- execution.setVariable(Prefix+"resourceType", resourceType)
- utils.log("INFO", "found controller type : " + controllerType, isDebugEnabled)
- break
- }
- }
- utils.log("INFO", "controller Type : " + execution.getVariable("controllerType"), isDebugEnabled)
- utils.log("INFO", "resource Type : " + execution.getVariable(Prefix+"resourceType"), isDebugEnabled)
-
- if (execution.getVariable("controllerType") == "") {
- String exceptionMessage = "Resource name can not find controller type,please check the resource Name: "+ resourceName
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- if (execution.getVariable(Prefix+"resourceType") == "vCPE") {
- execution.setVariable("skipVFC", "false")
- utils.log("INFO", "vCPE will deploy ", isDebugEnabled)
- }
-
- }catch(Exception e){
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in "+ method + " - " + e.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
- /**
- * prepare post Unkown Resource Type
- */
- public void postOtherControllerType(DelegateExecution execution){
- def method = getClass().getSimpleName() + '.postOtherControllerType(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
-
- utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 postOtherControllerType Process ======== ", isDebugEnabled)
- try{
-
- String resourceName = execution.getVariable(Prefix+"resourceName")
- String resourceType = execution.getVariable(Prefix+"resourceType")
- String controllerType = execution.getVariable("controllerType")
-
- String msg = "Resource name: "+ resourceName + " resource Type: " + resourceType+ " controller Type: " + controllerType + " can not be processed n the workflow"
- utils.log("DEBUG", msg, isDebugEnabled)
-
- }catch(Exception e){
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in "+ method + " - " + e.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
- /**
- * prepare Controller resource create request
- */
- public void preProcessResourceRequestForController(execution){
- def method = getClass().getSimpleName() + '.preProcessResourceRequestForController(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 preProcessResourceRequestForController Process ======== ", isDebugEnabled)
- try{
- String resourceName = execution.getVariable(Prefix+"resourceName")
- String resourceType = execution.getVariable(Prefix+"resourceType")
- String serviceInstanceName =execution.getVariable("serviceInstanceName")
- String nsServiceName = resourceType + "_" + serviceInstanceName
- execution.setVariable("nsServiceName", nsServiceName)
- utils.log("INFO", "Prepare Controller Request nsServiceName:" + nsServiceName, isDebugEnabled)
-
- String serviceId = execution.getVariable("serviceInstanceId")
- execution.setVariable("serviceId", serviceId)
- utils.log("INFO", "Prepare Controller Request serviceId:" + serviceId, isDebugEnabled)
-
- String globalSubscriberId = execution.getVariable("globalSubscriberId")
- utils.log("INFO", "Prepare Controller Request globalSubscriberId:" + globalSubscriberId, isDebugEnabled)
-
- String incomingRequest = execution.getVariable("uuiRequest")
- String nsServiceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")
- execution.setVariable("nsServiceDescription", nsServiceDescription)
- utils.log("INFO", "Prepare Controller Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
-
- String resourceUUID = execution.getVariable("resourceUUID")
-
- utils.log("INFO", "Prepare Controller Request resourceUUID:" + resourceUUID, isDebugEnabled)
-
- String resourceInvariantUUID = execution.getVariable("resourceInvariantUUID")
- utils.log("INFO", "Prepare Controller Request resourceInvariantUUID:" + resourceInvariantUUID, isDebugEnabled)
-
- String resourceParameters = execution.getVariable("resourceParameters")
- execution.setVariable("resourceParameters", resourceParameters)
- utils.log("INFO", "Prepare Controller Request resourceParameters:" + resourceParameters, isDebugEnabled)
-
-
-
- }catch(Exception e){
- String exceptionMessage = "Bpmn error encountered in "+ method + " - " + e.getMessage()
- utils.log("ERROR", exceptionMessage, isDebugEnabled)
- execution.setVariable(Prefix+"ErrorResponse", exceptionMessage)
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
- /**
- * post process VFC resource create request
- */
- public void postProcessResourceRequestForVFC(execution){
- def method = getClass().getSimpleName() + '.postProcessResourceRequestForVFC(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 postProcessResourceRequestForVFC Process ======== ", isDebugEnabled)
- try{
-
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing postProcessResourceRequestForVFC. Exception is:\n" + e, isDebugEnabled)
- execution.setVariable(Prefix+"ErrorResponse", "Error Occurred during postProcessResourceRequestForVFC Method:\n" + e.getMessage())
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
-
- /**
- * post process SDNC resource create request
- */
- public void postProcessResourceRequestForSDNC(execution){
- def method = getClass().getSimpleName() + '.postProcessResourceRequestForSDNC(' +'execution=' + execution.getId() +')'
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO","Entered " + method, isDebugEnabled)
- utils.log("INFO", " ======== Enter DoCreateE2EServiceInstanceV2 postProcessResourceRequestForSDNC Process ======== ", isDebugEnabled)
- try{
-
- execution.setVariable("serviceSDNCCreate", "true")
-
- }catch(Exception e){
- utils.log("ERROR", "Exception Occured Processing postProcessResourceRequestForSDNC. Exception is:\n" + e, isDebugEnabled)
- execution.setVariable(Prefix+"ErrorResponse", "Error Occurred during postProcessResourceRequestForSDNC Method:\n" + e.getMessage())
- }
- utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
-
-
-}
-
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy
index b3ac195..99248a9 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/RollbackVnf.groovy
@@ -25,7 +25,6 @@
import groovy.util.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.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
index 0db7616..b6af0a5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
@@ -25,7 +25,6 @@
import groovy.util.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.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy
index c588d38..39820dc 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfCmBase.groovy
@@ -28,7 +28,6 @@
import 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.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
index 33aaef0..13016a5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
@@ -25,7 +25,6 @@
import groovy.util.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.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.core.domain.ModelInfo
import org.openecomp.mso.bpmn.core.domain.ServiceDecomposition
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
index 2b336af..4a64ab0 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
@@ -25,7 +25,6 @@
import groovy.util.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.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
index 0000000..4f643e1
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/AAITasks/AAICreateOwningEntityTest.java
@@ -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
index 0000000..b9f3399
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/aai/AAIServiceInstanceTest.java
@@ -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
index 0000000..e2ec7e0
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilderTest.java
@@ -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
diff --git a/cloudify-client/pom.xml b/cloudify-client/pom.xml
index 9b2ca39..057a1ed 100644
--- a/cloudify-client/pom.xml
+++ b/cloudify-client/pom.xml
@@ -35,12 +35,10 @@
<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>
diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java b/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
index 6588995..45f2746 100644
--- a/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
+++ b/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
@@ -979,8 +979,7 @@
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 @@
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 @@
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
index 0000000..86adb5f
--- /dev/null
+++ b/common/src/test/java/org/openecomp/mso/client/aai/AAIUpdatorImplTest.java
@@ -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
index 0000000..3895230
--- /dev/null
+++ b/common/src/test/java/org/openecomp/mso/client/aai/exceptions/AAIPayloadExceptionTest.java
@@ -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
index 0000000..f512de8
--- /dev/null
+++ b/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIOperationalEnvironmentTest.java
@@ -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
index 0000000..bc2ae41
--- /dev/null
+++ b/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIOwningEntityTest.java
@@ -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
index 0000000..872b17a
--- /dev/null
+++ b/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIProjectTest.java
@@ -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
index 0000000..692e3bb
--- /dev/null
+++ b/common/src/test/java/org/openecomp/mso/client/aai/objects/AAIServiceInstanceTest.java
@@ -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
index 0000000..6490f52
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequestTest.java
@@ -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
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar
index 2686e4b..f052ef9 100644
--- a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar
+++ b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg511NfmService.csar
Binary files differ
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar
index d2983ce..eb83644 100644
--- a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar
+++ b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/service_Rg516VmmscSrvc_csar.csar
Binary files differ
diff --git a/pom.xml b/pom.xml
index 263a632..0ca4836 100644
--- a/pom.xml
+++ b/pom.xml
@@ -549,7 +549,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
- <version>4.4.1</version>
+ <version>4.4.4</version>
<scope>compile</scope>
</dependency>
<dependency>