aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/test')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy436
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy6149
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy186
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java492
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java1156
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java317
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java299
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java1110
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java231
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java289
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml40
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml40
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml124
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml148
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml124
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml146
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml188
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml40
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml38
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml38
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml90
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml74
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml98
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml62
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml98
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml10
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml82
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml50
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml50
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml74
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml98
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml98
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml86
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml56
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml48
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml122
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties168
39 files changed, 6479 insertions, 6494 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy
index cf95ed3..e9c27b0 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV1Test.groovy
@@ -1,218 +1,218 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure.scripts;
-
-import static org.junit.Assert.*
-import static org.mockito.Mockito.*
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.MockitoAnnotations
-import org.mockito.runners.MockitoJUnitRunner
-import org.openecomp.mso.bpmn.common.scripts.MsoGroovyTest
-
-
-@RunWith(MockitoJUnitRunner.class)
-class DoCreateVfModuleVolumeV1Test extends MsoGroovyTest {
-
- def volumeRequest =
-"""<volume-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <request-info>
- <test-data-only>123abc</test-data-only> <!-- don't remove this tag. Its used for junit test -->
- <request-id>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</request-id>
- <action>CREATE_VF_MODULE_VOL</action>
- <source>SoapUI-bns-create-base-vol-1001-1</source>
- </request-info>
- <volume-inputs>
- <vnf-type>Test/vSAMP12</vnf-type>
- <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
- <backout-on-failure>true</backout-on-failure>
- <asdc-service-model-version>2.0</asdc-service-model-version>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <aic-cloud-region>MDTWNJ21</aic-cloud-region>
- <tenant-id>897deadc2b954a6bac6d3c197fb3525e</tenant-id>
- <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
- <volume-group-id/>
- </volume-inputs>
- <volume-params>
- <param name="param1">value1</param>"
- <param name="param2">value2</param>"
- <param name="param3">value3</param>"
- </volume-params>
-</volume-request>"""
-
- def genericVnfResponseXml = """
-<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
- <vnf-id>TEST-VNF-ID-0123</vnf-id>
- <vnf-name>STMTN5MMSC20</vnf-name>
- <vnf-type>pcrf-capacity</vnf-type>
- <service-id>SDN-MOBILITY</service-id>
- <equipment-role>vPCRF</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <in-maint>false</in-maint>
- <is-closed-loop-disabled>false</is-closed-loop-disabled>
- <persona-model-id>introvert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <resource-version>0000020</resource-version>
- <vf-modules>
- <vf-module>
- <vf-module-id>lukewarm</vf-module-id>
- <vf-module-name>PCRF::module-0-0</vf-module-name>
- <persona-model-id>introvert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <is-base-vf-module>true</is-base-vf-module>
- <heat-stack-id>fastburn</heat-stack-id>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>0000074</resource-version>
- </vf-module>
- <vf-module>
- <vf-module-id>supercool</vf-module-id>
- <vf-module-name>PCRF::module-1-0</vf-module-name>
- <persona-model-id>extrovert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <is-base-vf-module>false</is-base-vf-module>
- <heat-stack-id>slowburn</heat-stack-id>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>0000075</resource-version>
- </vf-module>
- </vf-modules>
- <relationship-list/>
- <l-interfaces/>
- <lag-interfaces/>
-</generic-vnf>
-"""
- def String expectedCreateVnfRequestXml = """<createVolumeGroupRequest>
- <cloudSiteId>MDTWNJ21</cloudSiteId>
- <tenantId>897deadc2b954a6bac6d3c197fb3525e</tenantId>
- <vnfId>TEST-VNF-ID-0123</vnfId>
- <vnfName>STMTN5MMSC20</vnfName>
- <volumeGroupId>test-vol-group-id-123</volumeGroupId>
- <volumeGroupName>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volumeGroupName>
- <vnfType>Test/vSAMP12</vnfType>
- <vnfVersion>2.0</vnfVersion>
- <vfModuleType>vSAMP12::base::module-0</vfModuleType>
- <modelCustomizationUuid/>
- <volumeGroupParams>
- <entry>
- <key>vnf_id</key>
- <value>TEST-VNF-ID-0123</value>
- </entry>
- <entry>
- <key>vnf_name</key>
- <value>STMTN5MMSC20</value>
- </entry>
- <entry>
- <key>vf_module_id</key>
- <value>test-vol-group-id-123</value>
- </entry>
- <entry>
- <key>vf_module_name</key>
- <value>MSOTESTVOL101a-vSAMP12_base_vol_module-0</value>
- </entry>
- <entry>
- <key>param1</key>
- <value>value1</value>
- </entry>
- <entry>
- <key>param2</key>
- <value>value2</value>
- </entry>
- <entry>
- <key>param3</key>
- <value>value3</value>
- </entry>
- </volumeGroupParams>
- <skipAAI>true</skipAAI>
- <backout>true</backout>
- <failIfExists>true</failIfExists>
- <msoRequest>
- <requestId>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</requestId>
- <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
- </msoRequest>
- <messageId>111</messageId>
- <notificationUrl>http://localhost:28080/mso/WorkflowMessage/12345678</notificationUrl>
-</createVolumeGroupRequest>
-"""
-
- @Before
- public void init()
- {
- MockitoAnnotations.initMocks(this)
-
- }
-
- @Test
- public void TestPreProcessRequest() {
-
- ExecutionEntity mockExecution = setupMock('DoCreateVfModuleVolumeV1')
-
- when(mockExecution.getVariable("DoCreateVfModuleVolumeV1Request")).thenReturn(volumeRequest)
- when(mockExecution.getVariable("vnf-id")).thenReturn('test-vnf-id-123')
- when(mockExecution.getVariable("volume-group-id")).thenReturn('test-volume-group-id-123')
- when(mockExecution.getVariable("mso-request-id")).thenReturn('test-request-id-123')
-
- DoCreateVfModuleVolumeV1 myprocess = new DoCreateVfModuleVolumeV1()
- myprocess.preProcessRequest(mockExecution, 'true')
-
- verify(mockExecution).setVariable('DCVFMODVOLV1_serviceId', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb')
- verify(mockExecution).setVariable('DCVFMODVOLV1_source', 'SoapUI-bns-create-base-vol-1001-1')
- verify(mockExecution, times(7)).setVariable(anyString(), anyString())
- }
-
- @Test
- public void TestPrepareVnfAdapterCreateRequest() {
-
- ExecutionEntity mockExecution = setupMock('DoCreateVfModuleVolumeV1')
-
- when(mockExecution.getVariable("DCVFMODVOLV1_Request")).thenReturn(volumeRequest)
- when(mockExecution.getVariable("DCVFMODVOLV1_requestId")).thenReturn('d8d4fcfa-fd7e-4413-b19d-c95aa67291b8')
- when(mockExecution.getVariable("DCVFMODVOLV1_serviceId")).thenReturn('a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb')
- when(mockExecution.getVariable("DCVFMODVOLV1_AAIQueryGenericVfnResponse")).thenReturn(genericVnfResponseXml)
- when(mockExecution.getVariable("DCVFMODVOLV1_rollbackEnabled")).thenReturn(true)
- when(mockExecution.getVariable("volume-group-id")).thenReturn('test-vol-group-id-123')
- when(mockExecution.getVariable("URN_mso_workflow_message_endpoint")).thenReturn('http://localhost:28080/mso/WorkflowMessage')
- when(mockExecution.getVariable("URN_mso_use_qualified_host")).thenReturn(true)
-
- DoCreateVfModuleVolumeV1 myprocess = new DoCreateVfModuleVolumeV1()
- myprocess.prepareVnfAdapterCreateRequest(mockExecution, 'true')
-
- // Capture the arguments to setVariable
- ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
- ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
-
- verify(mockExecution, times(2)).setVariable(captor1.capture(), captor2.capture())
-
- List<String> arg2List = captor2.getAllValues()
- String createVnfRequestXml = arg2List.get(0)
-
- //replace messageID value because it is random generated
- createVnfRequestXml = createVnfRequestXml.replaceAll("<messageId>(.+?)</messageId>", "<messageId>111</messageId>")
- .replaceAll("<notificationUrl>(.+?)</notificationUrl>", "<notificationUrl>http://localhost:28080/mso/WorkflowMessage/12345678</notificationUrl>")
-
- Assert.assertEquals(expectedCreateVnfRequestXml.trim(), createVnfRequestXml.trim())
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.junit.Assert.*
+import static org.mockito.Mockito.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.common.scripts.MsoGroovyTest
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVfModuleVolumeV1Test extends MsoGroovyTest {
+
+ def volumeRequest =
+"""<volume-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <test-data-only>123abc</test-data-only> <!-- don't remove this tag. Its used for junit test -->
+ <request-id>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</request-id>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>SoapUI-bns-create-base-vol-1001-1</source>
+ </request-info>
+ <volume-inputs>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <backout-on-failure>true</backout-on-failure>
+ <asdc-service-model-version>2.0</asdc-service-model-version>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>897deadc2b954a6bac6d3c197fb3525e</tenant-id>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <volume-group-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="param1">value1</param>"
+ <param name="param2">value2</param>"
+ <param name="param3">value3</param>"
+ </volume-params>
+</volume-request>"""
+
+ def genericVnfResponseXml = """
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
+ <vnf-id>TEST-VNF-ID-0123</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <persona-model-id>extrovert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf>
+"""
+ def String expectedCreateVnfRequestXml = """<createVolumeGroupRequest>
+ <cloudSiteId>MDTWNJ21</cloudSiteId>
+ <tenantId>897deadc2b954a6bac6d3c197fb3525e</tenantId>
+ <vnfId>TEST-VNF-ID-0123</vnfId>
+ <vnfName>STMTN5MMSC20</vnfName>
+ <volumeGroupId>test-vol-group-id-123</volumeGroupId>
+ <volumeGroupName>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volumeGroupName>
+ <vnfType>Test/vSAMP12</vnfType>
+ <vnfVersion>2.0</vnfVersion>
+ <vfModuleType>vSAMP12::base::module-0</vfModuleType>
+ <modelCustomizationUuid/>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>TEST-VNF-ID-0123</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>STMTN5MMSC20</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>test-vol-group-id-123</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>MSOTESTVOL101a-vSAMP12_base_vol_module-0</value>
+ </entry>
+ <entry>
+ <key>param1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>param2</key>
+ <value>value2</value>
+ </entry>
+ <entry>
+ <key>param3</key>
+ <value>value3</value>
+ </entry>
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>true</failIfExists>
+ <msoRequest>
+ <requestId>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</requestId>
+ <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
+ </msoRequest>
+ <messageId>111</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMessage/12345678</notificationUrl>
+</createVolumeGroupRequest>
+"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ @Test
+ public void TestPreProcessRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DoCreateVfModuleVolumeV1')
+
+ when(mockExecution.getVariable("DoCreateVfModuleVolumeV1Request")).thenReturn(volumeRequest)
+ when(mockExecution.getVariable("vnf-id")).thenReturn('test-vnf-id-123')
+ when(mockExecution.getVariable("volume-group-id")).thenReturn('test-volume-group-id-123')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('test-request-id-123')
+
+ DoCreateVfModuleVolumeV1 myprocess = new DoCreateVfModuleVolumeV1()
+ myprocess.preProcessRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable('DCVFMODVOLV1_serviceId', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb')
+ verify(mockExecution).setVariable('DCVFMODVOLV1_source', 'SoapUI-bns-create-base-vol-1001-1')
+ verify(mockExecution, times(7)).setVariable(anyString(), anyString())
+ }
+
+ @Test
+ public void TestPrepareVnfAdapterCreateRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DoCreateVfModuleVolumeV1')
+
+ when(mockExecution.getVariable("DCVFMODVOLV1_Request")).thenReturn(volumeRequest)
+ when(mockExecution.getVariable("DCVFMODVOLV1_requestId")).thenReturn('d8d4fcfa-fd7e-4413-b19d-c95aa67291b8')
+ when(mockExecution.getVariable("DCVFMODVOLV1_serviceId")).thenReturn('a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb')
+ when(mockExecution.getVariable("DCVFMODVOLV1_AAIQueryGenericVfnResponse")).thenReturn(genericVnfResponseXml)
+ when(mockExecution.getVariable("DCVFMODVOLV1_rollbackEnabled")).thenReturn(true)
+ when(mockExecution.getVariable("volume-group-id")).thenReturn('test-vol-group-id-123')
+ when(mockExecution.getVariable("URN_mso_workflow_message_endpoint")).thenReturn('http://localhost:28080/mso/WorkflowMessage')
+ when(mockExecution.getVariable("URN_mso_use_qualified_host")).thenReturn(true)
+
+ DoCreateVfModuleVolumeV1 myprocess = new DoCreateVfModuleVolumeV1()
+ myprocess.prepareVnfAdapterCreateRequest(mockExecution, 'true')
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(2)).setVariable(captor1.capture(), captor2.capture())
+
+ List<String> arg2List = captor2.getAllValues()
+ String createVnfRequestXml = arg2List.get(0)
+
+ //replace messageID value because it is random generated
+ createVnfRequestXml = createVnfRequestXml.replaceAll("<messageId>(.+?)</messageId>", "<messageId>111</messageId>")
+ .replaceAll("<notificationUrl>(.+?)</notificationUrl>", "<notificationUrl>http://localhost:28080/mso/WorkflowMessage/12345678</notificationUrl>")
+
+ Assert.assertEquals(expectedCreateVnfRequestXml.trim(), createVnfRequestXml.trim())
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy
index d19081c..a90cf12 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateNetworkInstanceInfraTest.groovy
@@ -1,3094 +1,3055 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure.scripts;
-
-import static org.junit.Assert.*
-import static org.mockito.Mockito.*
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetCloudRegion
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetwork
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkPolicy
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkRouteTable
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkVpnBinding
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.ProcessEngineServices
-import org.camunda.bpm.engine.RepositoryService
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.engine.repository.ProcessDefinition
-import org.camunda.bpm.engine.runtime.Execution
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.MockitoAnnotations
-import org.mockito.runners.MockitoJUnitRunner
-import org.openecomp.mso.bpmn.common.scripts.MsoUtils
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-import com.github.tomakehurst.wiremock.client.WireMock
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-
-
-@RunWith(MockitoJUnitRunner.class)
-class UpdateNetworkInstanceInfraTest {
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(28090);
-
- def utils = new MsoUtils()
-
- String jsonIncomingRequest =
- """{ "requestDetails": {
- "modelInfo": {
- "modelType": "networkTyp",
- "modelId": "modelId",
- "modelNameVersionId": "modelNameVersionId",
- "modelName": "CONTRAIL_EXTERNAL",
- "modelVersion": "1"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "RDM2WAGPLCP",
- "tenantId": "7dd5365547234ee8937416c65507d266"
- },
- "requestInfo": {
- "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
- "source": "VID",
- "callbackUrl": "",
- "suppressRollback": true,
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
- "modelInfo": {
- "modelType": "serviceT",
- "modelId": "modelI",
- "modelNameVersionId": "modelNameVersionI",
- "modelName": "modleNam",
- "modelVersion": "1"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": [
- {
- "name": "someUserParam1",
- "value": "someValue1"
- }
- ]
- }
- }}"""
-
- String jsonIncomingRequest_Missingname =
- """{ "requestDetails": {
- "modelInfo": {
- "modelType": "networkTyp",
- "modelId": "modelId",
- "modelNameVersionId": "modelNameVersionId",
- "modelName": "CONTRAIL_EXTERNAL",
- "modelVersion": "1"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "RDM2WAGPLCP",
- "tenantId": "7dd5365547234ee8937416c65507d266"
- },
- "requestInfo": {
- "source": "VID",
- "callbackUrl": "",
- "suppressRollback": true,
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
- "modelInfo": {
- "modelType": "serviceT",
- "modelId": "modelI",
- "modelNameVersionId": "modelNameVersionI",
- "modelName": "modleNam",
- "modelVersion": "1"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- }
- }}"""
-
- String jsonIncomingRequest_MissingCloudRegion =
- """{ "requestDetails": {
- "modelInfo": {
- "modelType": "networkTyp",
- "modelId": "modelId",
- "modelNameVersionId": "modelNameVersionId",
- "modelName": "CONTRAIL_EXTERNAL",
- "modelVersion": "1"
- },
- "cloudConfiguration": {
- "tenantId": "7dd5365547234ee8937416c65507d266"
- },
- "requestInfo": {
- "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
- "source": "VID",
- "callbackUrl": "",
- "suppressRollback": true,
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
- "modelInfo": {
- "modelType": "serviceT",
- "modelId": "modelI",
- "modelNameVersionId": "modelNameVersionI",
- "modelName": "modleNam",
- "modelVersion": "1"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- }
- }}"""
-
-
-
- String expectedNetworkRequestMissingNetworkId =
- """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
- <request-info>
- <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
- <action>UPDATE</action>
- <source>VID</source>
- <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
- </request-info>
- <network-inputs>
- <network-id/>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
- <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <backout-on-failure>true</backout-on-failure>
- </network-inputs>
- <network-params>
- <param name="some_user_param1">someValue1</param>
- </network-params>
-</network-request>
-"""
-
-
-String expectedNetworkRequestMissingCloudRegion =
-"""<network-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-info>
- <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
- <action>UPDATE</action>
- <source>PORTAL</source>
- </request-info>
- <network-inputs>
- <network-name>HSL_direct_net_2</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <aic-cloud-region/>
- <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
- </network-inputs>
- <network-params>
- <param name="shared">1</param>
- </network-params>
-</network-request>"""
-
- // vnfRESTRequest
- String networkRESTRequest =
-"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
- statusCode="200">
- <rest:payload contentType="text/xml">
- <vnfreq:network-request>
- <vnfreq:request-info>
- <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
- <vnfreq:action>UPDATE</vnfreq:action>
- <vnfreq:source>PORTAL</vnfreq:source>
- </vnfreq:request-info>
- <vnfreq:network-inputs>
- <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
- <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
- <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
- <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
- <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
- <vnfreq:physicalNetworkName>dvs-slcp3-01</vnfreq:physicalNetworkName>
- <vnfreq:vlans>3008</vnfreq:vlans>
- </vnfreq:network-inputs>
- <vnfreq:network-params>
- <param name="shared">1</param>
- <param name="external">0</param>
- </vnfreq:network-params>
- </vnfreq:network-request>
- </rest:payload>
- </rest:RESTResponse>"""
-
- String networkInputsMissingName =
- """<network-inputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <network-name/>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
- <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
- </network-inputs>"""
-
-String networkInputsMissingCloudRegion =
-"""<network-inputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <network-name>HSL_direct_net_2</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <aic-cloud-region/>
- <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
-</network-inputs>"""
-
- String expectedUpdateNetworkInstanceInfraRequest =
- """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
- contentType="text/xml">
- <vnfreq:network-request>
- <vnfreq:request-info>
- <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
- <vnfreq:action>UPDATE</vnfreq:action>
- <vnfreq:source>PORTAL</vnfreq:source>
- </vnfreq:request-info>
- <vnfreq:network-inputs>
- <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
- <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
- <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
- <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
- <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
- <vnfreq:physicalNetworkName>dvs-slcp3-01</vnfreq:physicalNetworkName>
- <vnfreq:vlans>3008</vnfreq:vlans>
- </vnfreq:network-inputs>
- <vnfreq:network-params>
- <param name="shared">1</param>
- <param name="external">0</param>
- </vnfreq:network-params>
- </vnfreq:network-request>
-</rest:payload>"""
-
- String expectedUpdateNetworkInstanceInfraRequest_Output =
- """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
- contentType="text/xml">
- <vnfreq:network-request>
- <vnfreq:request-info>
- <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
- <vnfreq:action>UPDATE</vnfreq:action>
- <vnfreq:source>PORTAL</vnfreq:source>
- </vnfreq:request-info>
- <vnfreq:network-inputs>
- <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
- <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
- <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
- <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
- <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
- </vnfreq:network-inputs>
- <vnfreq:network-outputs>
- <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
- <vnfreq:network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</vnfreq:network-id>
- </vnfreq:network-outputs>
- <vnfreq:network-params>
- <param name="shared">1</param>
- <param name="external">0</param>
- </vnfreq:network-params>
- </vnfreq:network-request>
-</rest:payload>"""
-
- // expectedNetworkRequest
- String expectedNetworkRequest =
- """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
- <request-info>
- <action>UPDATE</action>
- <source>VID</source>
- <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
- </request-info>
- <network-inputs>
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
- <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <backout-on-failure>true</backout-on-failure>
- </network-inputs>
- <network-params>
- <param name="dhcp-enabled">true</param>
- <param name="serviceId">a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</param>
- <param name="cidr-mask">true</param>
- <param name="backoutOnFailure">true</param>
- <param name="gateway-address">10.10.125.1</param>
- </network-params>
-</network-request>"""
-
-String expectedNetworkInputs =
-"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
- <network-id/>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
- <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <backout-on-failure>true</backout-on-failure>
-</network-inputs>"""
-
-
- String NetworkRequest_noPhysicalName =
- """<vnfreq:network-request xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1">
- <vnfreq:request-info>
- <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
- <vnfreq:action>UPDATE</vnfreq:action>
- <vnfreq:source>PORTAL</vnfreq:source>
- </vnfreq:request-info>
- <vnfreq:network-inputs>
- <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
- <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
- <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
- <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
- <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
- <vnfreq:vlans>3008</vnfreq:vlans>
- </vnfreq:network-inputs>
- <vnfreq:network-params>
- <network-params>
- <param name="dhcp-enabled">true</param>
- <param name="serviceId">a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</param>
- <param name="cidr-mask">true</param>
- <param name="backoutOnFailure">true</param>
- <param name="gateway-address">10.10.125.1</param>
- </network-params>
- </vnfreq:network-params>
-</vnfreq:network-request>"""
-
- String vnfRequestFakeRegion =
- """<vnfreq:network-request xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1">
- <vnfreq:request-info>
- <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
- <vnfreq:action>UPDATE</vnfreq:action>
- <vnfreq:source>PORTAL</vnfreq:source>
- </vnfreq:request-info>
- <vnfreq:network-inputs>
- <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
- <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
- <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
- <vnfreq:aic-cloud-region>MDTWNJ21</vnfreq:aic-cloud-region>
- <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
- </vnfreq:network-inputs>
- <vnfreq:network-params>
- <param name="shared">1</param>
- <param name="external">0</param>
- </vnfreq:network-params>
-</vnfreq:network-request>"""
-
- // expectedNetworkRequest
- String expectedNetworkRequest_Outputs =
- """<vnfreq:network-request xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1">
- <vnfreq:request-info>
- <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
- <vnfreq:action>UPDATE</vnfreq:action>
- <vnfreq:source>PORTAL</vnfreq:source>
- </vnfreq:request-info>
- <vnfreq:network-inputs>
- <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
- <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
- <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
- <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
- <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
- </vnfreq:network-inputs>
- <vnfreq:network-outputs>
- <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
- <vnfreq:network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</vnfreq:network-id>
- </vnfreq:network-outputs>
- <vnfreq:network-params>
- <param name="shared">1</param>
- <param name="external">0</param>
- </vnfreq:network-params>
-</vnfreq:network-request>"""
-
-
- // expectedNetworkRequest
- String networkInputs_404 =
- """<network-inputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <network-name>myOwn_Network</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
- <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
- </network-inputs>"""
-
- String networkInputs =
- """<network-inputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
- <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
-</network-inputs>"""
-
- String networkOutputs =
- """<network-outputs>
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- </network-outputs>"""
-
- String queryAAIResponse =
- """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
- <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
- <network-name>HSL_direct_net_2</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>pending-delete</orchestration-status>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-delete</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <relationship-list/>
- </subnet>
- </subnets>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </l3-network>
- </rest:payload>
-</rest:RESTResponse>"""
-
- String queryIdAIIResponse =
- """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <resource-version>l3-version</resource-version>
- <orchestration-status>pending-delete</orchestration-status>
- <heat-stack-id>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</heat-stack-id>
- <physical-network-name>networkName</physical-network-name>
- <is-provider-network>false</is-provider-network>
- <is-shared-network>true</is-shared-network>
- <is-external-network>false</is-external-network>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-delete</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <subnet-name>subnetName</subnet-name>
- <relationship-list/>
- </subnet>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-delete</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <subnet-name>subnetName</subnet-name>
- <relationship-list/>
- </subnet>
- </subnets>
- <segmentation-assignments>
- <segmentation-id>414</segmentation-id>
- <resource-version>4132176</resource-version>
- </segmentation-assignments>
- <segmentation-assignments>
- <segmentation-id>415</segmentation-id>
- <resource-version>4132176</resource-version>
- </segmentation-assignments>
- <ctag-assignments>
- <ctag-assignment>
- <vlan-id-inner>inner</vlan-id-inner>
- <resource-version>ctag-version</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>MSOTest1</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>vpn-binding.vpn-name</property-key>
- <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>vpn-binding.vpn-name</property-key>
- <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
- </ctag-assignment>
- </ctag-assignments>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>network-policy</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
- <relationship-data>
- <relationship-key>network-policy.network-policy-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </l3-network>
- </rest:payload>
-</rest:RESTResponse>"""
-
- String queryIdAIIResponseTestScenario01 =
- """<?xml version="1.0" encoding="UTF-8"?>
-<l3-network xmlns="http://org.openecomp.aai.inventory/v7">
- <network-id>4da55fe4-7a9e-478c-a434-8a98d62265ab</network-id>
- <network-name>GN_EVPN_direct_net_0_ST1</network-name>
- <network-type>CONTRAIL30_BASIC</network-type>
- <network-role>GN_EVPN_direct</network-role>
- <network-technology>contrail</network-technology>
- <is-bound-to-vpn>false</is-bound-to-vpn>
- <service-id>9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <resource-version>1465398611</resource-version>
- <orchestration-status>pending-delete</orchestration-status>
- <physical-network-name>networkName</physical-network-name>
- <is-provider-network>false</is-provider-network>
- <is-shared-network>true</is-shared-network>
- <is-external-network>false</is-external-network>
- <subnets>
- <subnet>
- <subnet-id>cb1a7b47-5428-44c9-89c2-8b17541c3228</subnet-id>
- <gateway-address>108.239.40.1</gateway-address>
- <network-start-address>108.239.40.0</network-start-address>
- <cidr-mask>28</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-delete</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <dhcp-start>108.239.40.0</dhcp-start>
- <dhcp-end>108.239.40.0</dhcp-end>
- <resource-version>1465398611</resource-version>
- <subnet-name>subnetName</subnet-name>
- <relationship-list />
- </subnet>
- <subnet>
- <subnet-id>e2cc7c14-90f0-4205-840d-b4e07f04e621</subnet-id>
- <gateway-address>2606:ae00:2e01:604::1</gateway-address>
- <network-start-address>2606:ae00:2e01:604::</network-start-address>
- <cidr-mask>64</cidr-mask>
- <ip-version>6</ip-version>
- <orchestration-status>pending-delete</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <dhcp-start>2606:ae00:2e01:604::</dhcp-start>
- <dhcp-end>2606:ae00:2e01:604::</dhcp-end>
- <resource-version>1465398611</resource-version>
- <subnet-name>subnetName</subnet-name>
- <relationship-list />
- </subnet>
- </subnets>
- <ctag-assignments />
- <segmentation-assignments>
- <segmentation-id>416</segmentation-id>
- <resource-version>4132176</resource-version>
- </segmentation-assignments>
- <relationship-list>
- <relationship>
- <related-to>cloud-region</related-to>
- <related-link>https://mtanjv9aaas03.aic.cip.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/
- </related-link>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>AAIAIC25</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>cloud-region.owner-defined-type</property-key>
- <property-value></property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://mtanjv9aaas03.aic.cip.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/4ae1d3446a4c48b2bec44b6cfba06d68/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>4ae1d3446a4c48b2bec44b6cfba06d68
- </relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>AAIAIC25</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>Ruchira Contrail 3.0 test</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://mtanjv9aaas03.aic.cip.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>vpn-binding.vpn-name</property-key>
- <property-value>GN_EVPN_direct_net_0_ST1</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
-</l3-network>"""
-
- String queryIdAIIResponseVpnNotPresent =
- """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>pending-delete</orchestration-status>
- <physical-network-name>networkName</physical-network-name>
- <is-provider-network>false</is-provider-network>
- <is-shared-network>true</is-shared-network>
- <is-external-network>false</is-external-network>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-delete</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <subnet-name>subnetName</subnet-name>
- <relationship-list/>
- </subnet>
- </subnets>
- <relationship-list/>
- </l3-network>
- </rest:payload>
-</rest:RESTResponse>"""
-
- String queryNameAIIResponse =
- """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>pending-delete</orchestration-status>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-delete</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <relationship-list/>
- </subnet>
- </subnets>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </l3-network>
- </rest:payload>
- </rest:RESTResponse>"""
-
- String queryNameAIIResponseVpnNotPresent =
- """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v6>
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>pending-delete</orchestration-status>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-delete</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <relationship-list/>
- </subnet>
- </subnets>
- </l3-network>
- </rest:payload>
- </rest:RESTResponse>"""
-
- String aaiVpnResponseStub =
- """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- xmlns="http://org.openecomp.aai.inventory/v8"
- contentType="text/xml">
- <vpn-binding>
- <global-route-target/>
- </vpn-binding>
-</rest:payload>"""
-
- String queryVpnBindingAAIResponse =
- """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID"
- value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <vpn-binding xmlns="http://org.openecomp.aai.inventory/v6">
- <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
- <vpn-name>GN_EVPN_Test</vpn-name>
- <global-route-target>13979:105757</global-route-target>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </vpn-binding>
- </rest:payload>
-</rest:RESTResponse>"""
-
- String updateDBRequest_Active =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest>
- <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>Network MNS-25180-L-01-dmz_direct_net_1 already exists. Silent success.</statusMessage>
- <responseBody/>
- <requestStatus>COMPLETED</requestStatus>
- <progress>100</progress>
- <vnfOutputs>&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;network-name&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/network-names&gt;</vnfOutputs>
- <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
- </ns:updateInfraRequest>
- </soapenv:Body>
-</soapenv:Envelope>"""
-
- String updateDBRequest =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest>
- <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>Network successfully updated.</statusMessage>
- <responseBody/>
- <requestStatus>COMPLETED</requestStatus>
- <progress>100</progress>
- <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
- <networkId/>
- </ns:updateInfraRequest>
- </soapenv:Body>
-</soapenv:Envelope>"""
-
- String updateDBRequestError =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
- <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
- <responseBody></responseBody>
- <requestStatus>FAILED</requestStatus>
- <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- String updateDBRequestError01 =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
- <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>Received error unexpectedly from SDN-C.</statusMessage>
- <responseBody></responseBody>
- <requestStatus>FAILED</requestStatus>
- <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
- </ns:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>"""
-
- String updateDBRequest_Outputs =
- """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateInfraRequest>
- <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
- <lastModifiedBy>BPMN</lastModifiedBy>
- <statusMessage>Network successfully updated.</statusMessage>
- <responseBody/>
- <requestStatus>COMPLETED</requestStatus>
- <progress>100</progress>
- <vnfOutputs>&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;network-name&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/network-names&gt;</vnfOutputs>
- <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
- </ns:updateInfraRequest>
- </soapenv:Body>
-</soapenv:Envelope>"""
-
- String updateNetworkRequest =
- """<updateNetworkRequest>
- <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
- <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
- <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
- <networkStackId>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</networkStackId>
- <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
- <networkType>CONTRAIL_EXTERNAL</networkType>
- <networkTypeVersion/>
- <networkTechnology>CONTRAIL</networkTechnology>
- <providerVlanNetwork>
- <physicalNetworkName>networkName</physicalNetworkName>
- <vlans>414,415</vlans>
- </providerVlanNetwork>
- <contrailNetwork>
- <shared>true</shared>
- <external>false</external>
- <routeTargets>13979:105757</routeTargets>
- <routeTargets>13979:105757</routeTargets>
- <policyFqdns>GN_EVPN_Test</policyFqdns>
- <routeTableFqdns>refFQDN1</routeTableFqdns>
- <routeTableFqdns>refFQDN2</routeTableFqdns>
- </contrailNetwork>
- <subnets>
- <allocationPools>
- <start/>
- <end/>
- </allocationPools>
- <cidr>107.239.52.0/24</cidr>
- <enableDHCP>true</enableDHCP>
- <gatewayIp>107.239.52.1</gatewayIp>
- <ipVersion>4</ipVersion>
- <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
- <subnetName>subnetName</subnetName>
- </subnets>
- <subnets>
- <allocationPools>
- <start/>
- <end/>
- </allocationPools>
- <cidr>107.239.52.0/24</cidr>
- <enableDHCP>true</enableDHCP>
- <gatewayIp>107.239.52.1</gatewayIp>
- <ipVersion>4</ipVersion>
- <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
- <subnetName>subnetName</subnetName>
- </subnets>
- <skipAAI>true</skipAAI>
- <backout>true</backout>
- <failIfExists>false</failIfExists>
- <networkParams>
- <dhcp-enabled>true</dhcp-enabled>
- <serviceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceId>
- <cidr-mask>true</cidr-mask>
- <backoutOnFailure>true</backoutOnFailure>
- <gateway-address>10.10.125.1</gateway-address>
- </networkParams>
- <msoRequest>
- <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
- <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
- </msoRequest>
- <messageId>messageId_generated</messageId>
- <notificationUrl/>
-</updateNetworkRequest>"""
-
-
- String updateNetworkRequest_noPhysicalName =
- """<updateNetworkRequest>
- <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
- <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
- <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
- <networkStackId>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</networkStackId>
- <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
- <networkType>CONTRAIL_EXTERNAL</networkType>
- <networkTypeVersion/>
- <networkTechnology>CONTRAIL</networkTechnology>
- <providerVlanNetwork>
- <physicalNetworkName>networkName</physicalNetworkName>
- <vlans>414,415</vlans>
- </providerVlanNetwork>
- <contrailNetwork>
- <shared>true</shared>
- <external>false</external>
- <routeTargets>13979:105757</routeTargets>
- <routeTargets>13979:105757</routeTargets>
- <policyFqdns>GN_EVPN_Test</policyFqdns>
- </contrailNetwork>
- <subnets>
- <allocationPools>
- <start/>
- <end/>
- </allocationPools>
- <cidr>107.239.52.0/24</cidr>
- <enableDHCP>true</enableDHCP>
- <gatewayIp>107.239.52.1</gatewayIp>
- <ipVersion>4</ipVersion>
- <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
- <subnetName>subnetName</subnetName>
- </subnets>
- <subnets>
- <allocationPools>
- <start/>
- <end/>
- </allocationPools>
- <cidr>107.239.52.0/24</cidr>
- <enableDHCP>true</enableDHCP>
- <gatewayIp>107.239.52.1</gatewayIp>
- <ipVersion>4</ipVersion>
- <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
- <subnetName>subnetName</subnetName>
- </subnets>
- <skipAAI>true</skipAAI>
- <backout>true</backout>
- <failIfExists>false</failIfExists>
- <networkParams>
- <dhcp-enabled>true</dhcp-enabled>
- <serviceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceId>
- <cidr-mask>true</cidr-mask>
- <backoutOnFailure>true</backoutOnFailure>
- <gateway-address>10.10.125.1</gateway-address>
- </networkParams>
- <msoRequest>
- <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
- <serviceInstanceId>null</serviceInstanceId>
- </msoRequest>
- <messageId>messageId_generated</messageId>
- <notificationUrl/>
-</updateNetworkRequest>"""
-
- String updateNetworkResponseREST =
- """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.openecomp.mso/network">
- <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
- <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
- <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
- <networkStackId></networkStackId>
- <subnetMap>
- <entry>
- <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
- <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
- </entry>
- <entry>
- <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
- <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
- </entry>
- </subnetMap>
- <rollback>
- <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
- <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
- <networkStackId></networkStackId>
- <networkType>CONTRAIL_EXTERNAL</networkType>
- <networkUpdated>true</networkUpdated>
- <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
- <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
- <msoRequest>
- <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
- <serviceInstanceId></serviceInstanceId>
- </msoRequest>
- </rollback>
- <messageId>messageId_generated</messageId>
-</ns2:updateNetworkContrailResponse>"""
-
- String updateRollbackNetworkRequest =
- """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network">
- <rollback>
- <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
- <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
- <networkStackId/>
- <networkType>CONTRAIL_EXTERNAL</networkType>
- <networkUpdated>true</networkUpdated>
- <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
- <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
- <msoRequest>
- <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
- <serviceInstanceId/>
- </msoRequest>
- </rollback>
-</NetworkAdapter:rollbackNetwork>"""
-
- String updateNetworkResponse =
- """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.openecomp.mso/network"
- xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
- <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
- <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
- <networkStackId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkStackId>
- <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
- <subnetIdMap>
- <entry>
- <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
- <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
- </entry>
- </subnetIdMap>
- <rollback>
- <cloudId>RDM2WAGPLCP</cloudId>
- <msoRequest>
- <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
- <serviceInstanceId/>
- </msoRequest>
- <networkUpdated>true</networkUpdated>
- <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
- <networkType>CONTRAIL_EXTERNAL</networkType>
- <networkUpdated>false</networkUpdated>
- <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
- <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
- </rollback>
-</ns2:updateNetworkContrailResponse>"""
-
- String updateContrailAAIPayloadRequest =
- """<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <neutron-network-id>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutron-network-id>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <resource-version>l3-version</resource-version>
- <orchestration-status>active</orchestration-status>
- <heat-stack-id>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</heat-stack-id>
- <contrail-network-fqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</contrail-network-fqdn>
- <physical-network-name>networkName</physical-network-name>
- <is-provider-network>false</is-provider-network>
- <is-shared-network>true</is-shared-network>
- <is-external-network>false</is-external-network>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>active</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <subnet-name>subnetName</subnet-name>
- </subnet>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>active</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <subnet-name>subnetName</subnet-name>
- </subnet>
- </subnets>
- <segmentation-assignments>
- <segmentation-id>414</segmentation-id>
- </segmentation-assignments>
- <segmentation-assignments>
- <segmentation-id>415</segmentation-id>
- </segmentation-assignments>
- <ctag-assignments>
- <ctag-assignment>
- <vlan-id-inner>inner</vlan-id-inner>
- <resource-version>ctag-version</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>MSOTest1</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>vpn-binding.vpn-name</property-key>
- <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>vpn-binding.vpn-name</property-key>
- <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
- </ctag-assignment>
- </ctag-assignments>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>network-policy</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
- <relationship-data>
- <relationship-key>network-policy.network-policy-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
-</l3-network>"""
-
- String updateContrailAAIResponse =
- """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Content-Length" value="0"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
-</rest:RESTResponse>"""
-
- String updateNetworkErrorResponse =
- """<updateNetworkError>
- <messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
- <message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
- <rolledBack>true</rolledBack>
- </updateNetworkError>"""
-
-
- String networkException500 =
- """<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"http://org.openecomp.mso/network", the namespace on the "updateNetworkContrail" element, is not a valid SOAP version.</faultstring></soap:Fault></soap:Body></soap:Envelope>"""
-
- String aaiResponse =
- """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID"
- value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160130-20:09:24:814-165843"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
- <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
- <network-name>HSL_direct_net_2</network-name>
- <network-type>CONTRAIL_BASIC</network-type>
- <network-role>HSL_direct</network-role>
- <network-technology>contrail</network-technology>
- <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <orchestration-status>active</orchestration-status>
- <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
- <subnets>
- <subnet>
- <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
- <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
- <gateway-address>172.16.34.1</gateway-address>
- <network-start-address>172.16.34.0</network-start-address>
- <cidr-mask>28</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>active</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <relationship-list/>
- </subnet>
- </subnets>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </l3-network>
- </rest:payload>
- </rest:RESTResponse>"""
-
- String changeAssignSDNCRequest =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://openecomp.com/mso/workflow/schema/v1"
- xmlns:ns5="http://openecomp.com/mso/request/types/v1"
- xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
- </sdncadapter:RequestHeader>
- <aetgt:SDNCRequestData>
- <request-information>
- <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
- <request-action>NetworkActivateRequest</request-action>
- <source>VID</source>
- <notification-url/>
- <order-number/>
- <order-version/>
- </request-information>
- <service-information>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <service-type>MSO-dev-service-type</service-type>
- <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
- <subscriber-name>MSO_1610_dev</subscriber-name>
- </service-information>
- <network-request-information>
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <tenant>7dd5365547234ee8937416c65507d266</tenant>
- <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
- </network-request-information>
- </aetgt:SDNCRequestData>
-</aetgt:SDNCAdapterWorkflowRequest>"""
-
-String assignResponse =
-"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sdncadapterworkflow:response-data> <tag0:CallbackHeader> <tag0:RequestId>006927ca-f5a3-47fd-880c-dfcbcd81a093</tag0:RequestId> <tag0:ResponseCode>200</tag0:ResponseCode> <tag0:ResponseMessage>OK</tag0:ResponseMessage> </tag0:CallbackHeader> <tag0:RequestData xsi:type="xs:string"><output xmlns="org:openecomp:sdnctl:vnf"><response-code>200</response-code><svc-request-id>006927ca-f5a3-47fd-880c-dfcbcd81a093</svc-request-id><ack-final-indicator>Y</ack-final-indicator><service-information><subscriber-name>notsurewecare</subscriber-name><service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id><service-instance-id>GN_EVPN_direct_net_0_ST_noGW</service-instance-id></service-information><network-information><network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id></network-information></output></tag0:RequestData> </sdncadapterworkflow:response-data> </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
-
- String sdncRollbackRequest =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://openecomp.com/mso/workflow/schema/v1"
- xmlns:ns5="http://openecomp.com/mso/request/types/v1"
- xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
- </sdncadapter:RequestHeader>
- <aetgt:SDNCRequestData>
- <request-information>
- <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
- <request-action>NetworkActivateRequest</request-action>
- <source>VID</source>
- <notification-url/>
- <order-number/>
- <order-version/>
- </request-information>
- <service-information>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <service-type>MSO-dev-service-type</service-type>
- <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
- <subscriber-name>MSO_1610_dev</subscriber-name>
- </service-information>
- <network-request-information>
- <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <tenant>7dd5365547234ee8937416c65507d266</tenant>
- <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
- </network-request-information>
- </aetgt:SDNCRequestData>
-</aetgt:SDNCAdapterWorkflowRequest>"""
-
- String sdncAdapterWorkflowResponse =
- """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
- <sdncadapterworkflow:response-data>
-<tag0:CallbackHeader xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
- <tag0:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</tag0:RequestId>
- <tag0:ResponseCode>200</tag0:ResponseCode>
- <tag0:ResponseMessage>OK</tag0:ResponseMessage>
-</tag0:CallbackHeader>
- <tag0:RequestData xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:type="xs:string">&lt;output xmlns="org:openecomp:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</tag0:RequestData>
- </sdncadapterworkflow:response-data>
-</aetgt:SDNCAdapterWorkflowResponse>"""
-
-
- String sdncAdapterWorkflowResponse_Error =
- """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="org:openecomp:sdnctl:vnf">
- <sdncadapterworkflow:response-data>
- <tag0:RequestData xsi:type="xs:string">
- <output>
- <response-code>400</response-code>
- <response-message>Error writing to l3-netework</response-message>
- <ack-final-indicator>Y</ack-final-indicator>
- <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
- </output>
- </tag0:RequestData>
- </sdncadapterworkflow:response-data>
-</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
-
- String expected_sdncAdapterWorkflowResponse_Error =
- """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns="org:openecomp:sdnctl:vnf"
- xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <sdncadapterworkflow:response-data>
- <tag0:RequestData xsi:type="xs:string">
- <output>
- <response-code>400</response-code>
- <response-message>Error writing to l3-netework</response-message>
- <ack-final-indicator>Y</ack-final-indicator>
- <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
- </output>
- </tag0:RequestData>
- </sdncadapterworkflow:response-data>
-</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
-
- String sdncAdapterWorkflowFormattedResponse =
- """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns="org:openecomp:sdnctl:vnf">
- <aetgt:response-data>
- <output>
- <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
- <response-code>200</response-code>
- <ack-final-indicator>Y</ack-final-indicator>
- <network-information>
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- </network-information>
- <service-information>
- <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
- <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
- <subscriber-name>notsurewecare</subscriber-name>
- </service-information>
- </output>
- </aetgt:response-data>
-</aetgt:SDNCAdapterWorkflowResponse>"""
-
- String falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
- <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
- <action>UPDATE</action>
- <source>PORTAL</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available.</aetgt:ErrorMessage>
- <aetgt:ErrorCode>5300</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- String falloutHandlerRequestObject =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
- <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
- <action>UPDATE</action>
- <source>VID</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7000</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
-
- String falloutHandlerRequest_Scenario01 =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
- <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
- <action>UPDATE</action>
- <source>VID</source>
- </request-info>
- <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>Unexpected Response from AAI - 400</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7020</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- String completeMsoProcessRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-info>
- <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
- <action>UPDATE</action>
- <source>PORTAL</source>
- </request-info>
- <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>
-</aetgt:MsoCompletionRequest>"""
-
-// - - - - - - - -
-
-
- @Before
- public void init()
- {
- MockitoAnnotations.initMocks(this)
-
- }
-
- public void initializeVariables (Execution mockExecution) {
-
- verify(mockExecution).setVariable("UPDNETI_messageId", "")
- verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "")
- verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "")
- verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", "")
- verify(mockExecution).setVariable("UPDNETI_networkRequest", "")
- verify(mockExecution).setVariable("UPDNETI_networkInputs", "")
- verify(mockExecution).setVariable("UPDNETI_networkOutputs", "")
- verify(mockExecution).setVariable("UPDNETI_requestId", "")
- verify(mockExecution).setVariable("UPDNETI_source", "")
- verify(mockExecution).setVariable("UPDNETI_networkId", "")
-
- verify(mockExecution).setVariable("UPDNETI_CompleteMsoProcessRequest", "")
- verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", "")
- verify(mockExecution).setVariable("UPDNETI_isSilentSuccess", false)
- verify(mockExecution).setVariable("UPDNETI_isPONR", false)
-
- // AAI query Cloud Region
- verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest","")
- verify(mockExecution).setVariable("UPDNETI_queryCloudRegionReturnCode","")
- verify(mockExecution).setVariable("UPDNETI_queryCloudRegionResponse","")
- verify(mockExecution).setVariable("UPDNETI_cloudRegionPo","")
- verify(mockExecution).setVariable("UPDNETI_cloudRegionSdnc","")
- verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", false)
-
- // AAI query Id
- verify(mockExecution).setVariable("UPDNETI_queryIdAAIRequest","")
- verify(mockExecution).setVariable("UPDNETI_queryIdAAIResponse", "")
- verify(mockExecution).setVariable("UPDNETI_aaiIdReturnCode", "")
-
- // AAI query vpn binding
- verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest","")
- verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIResponse", "")
- verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "")
- verify(mockExecution).setVariable("UPDNETI_vpnBindings", null)
- verify(mockExecution).setVariable("UPDNETI_vpnCount", 0)
- verify(mockExecution).setVariable("UPDNETI_routeCollection", "")
-
- // AAI query network policy
- verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIRequest","")
- verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIResponse", "")
- verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "")
- verify(mockExecution).setVariable("UPDNETI_networkPolicyUriList", null)
- verify(mockExecution).setVariable("UPDNETI_networkPolicyCount", 0)
- verify(mockExecution).setVariable("UPDNETI_networkCollection", "")
-
- // AAI query route table reference
- verify(mockExecution).setVariable("UPDNETI_queryNetworkTableRefAAIRequest","")
- verify(mockExecution).setVariable("UPDNETI_queryNetworkTableRefAAIResponse", "")
- verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "")
- verify(mockExecution).setVariable("UPDNETI_networkTableRefUriList", null)
- verify(mockExecution).setVariable("UPDNETI_networkTableRefCount", 0)
- verify(mockExecution).setVariable("UPDNETI_tableRefCollection", "")
-
-
- // AAI requery Id
- verify(mockExecution).setVariable("UPDNETI_requeryIdAAIRequest","")
- verify(mockExecution).setVariable("UPDNETI_requeryIdAAIResponse", "")
- verify(mockExecution).setVariable("UPDNETI_aaiRequeryIdReturnCode", "")
-
- // AAI update contrail
- verify(mockExecution).setVariable("UPDNETI_updateContrailAAIUrlRequest","")
- verify(mockExecution).setVariable("UPDNETI_updateContrailAAIPayloadRequest","")
- verify(mockExecution).setVariable("UPDNETI_updateContrailAAIResponse", "")
- verify(mockExecution).setVariable("UPDNETI_aaiUpdateContrailReturnCode", "")
-
- verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", "")
- verify(mockExecution).setVariable("UPDNETI_updateNetworkResponse", "")
- verify(mockExecution).setVariable("UPDNETI_rollbackNetworkRequest", "")
- verify(mockExecution).setVariable("UPDNETI_rollbackNetworkResponse", "")
- verify(mockExecution).setVariable("UPDNETI_networkReturnCode", "")
- verify(mockExecution).setVariable("UPDNETI_rollbackNetworkReturnCode", "")
- verify(mockExecution).setVariable("UPDNETI_isNetworkRollbackNeeded", false)
-
- verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCRequest", "")
- verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCResponse", "")
- verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", "")
- verify(mockExecution).setVariable("UPDNETI_rollbackSDNCResponse", "")
- verify(mockExecution).setVariable("UPDNETI_sdncReturnCode", "")
- verify(mockExecution).setVariable("UPDNETI_rollbackSDNCReturnCode", "")
- verify(mockExecution).setVariable("UPDNETI_isSdncRollbackNeeded", false)
- verify(mockExecution).setVariable("UPDNETI_sdncResponseSuccess", false)
-
- verify(mockExecution).setVariable("UPDNETI_updateDBRequest", "")
- verify(mockExecution).setVariable("UPDNETI_updateDBResponse", "")
- verify(mockExecution).setVariable("UPDNETI_dbReturnCode", "")
-
- verify(mockExecution).setVariable("UPDNETI_isVnfBindingPresent", false)
- verify(mockExecution).setVariable("UPDNETI_Success", false)
- verify(mockExecution).setVariable("UPDNETI_serviceInstanceId", "")
- verify(mockExecution).setVariable("GENGS_type", "service-instance") // Setting for Generic Sub Flow use
-
-
- }
-
- @Test
- //@Ignore
- public void preProcessRequest_NetworkRequest() {
-
- println "************ preProcessRequest_Payload ************* "
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
- when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
- when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
- when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("vnfId")).thenReturn("")
- when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
- when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
- when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
- when(mockExecution.getVariable("networkType")).thenReturn("modelName")
- when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
-
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
- when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.preProcessRequest(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).getVariable("isDebugLogEnabled")
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
-
- //verify variable initialization
- initializeVariables(mockExecution)
-
- // Authentications
- verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
- verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
-
- verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest)
- //verify(mockExecution).setVariable("UPDNETI_networkRequest", expectedNetworkRequest)
- //verify(mockExecution).setVariable("UPDNETI_networkInputs", expectedNetworkInputs)
- //verify(mockExecution, atLeast(3)).setVariable("UPDNETI_networkOutputs", "")
-
- //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- //verify(mockExecution).setVariable("UPDNETI_source", "VID")
- //verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- //verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
-
- }
-
-
- @Test
- //@Ignore
- public void preProcessRequest_MissingNetworkId() {
-
- println "************ preProcessRequest_MissingName() ************* "
-
- WorkflowException missingNameWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "Variable 'network-id' value/element is missing.")
-
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
- when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
- when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
- when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("vnfId")).thenReturn("")
- when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
- //when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
- when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
- when(mockExecution.getVariable("networkType")).thenReturn("modelName")
- when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
-
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
- when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- try {
- UpdateNetworkInstanceInfra.preProcessRequest(mockExecution)
- } catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
-
- //verify variable initialization
- initializeVariables(mockExecution)
-
- // Authentications
- verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
- verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
-
- verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest)
- //verify(mockExecution, atLeast(1)).setVariable("UPDNETI_networkOutputs", networkOutputs)
- //verify(mockExecution).setVariable("UPDNETI_networkRequest", expectedNetworkRequestMissingNetworkId)
- //verify(mockExecution).setVariable("UPDNETI_networkInputs", expectedNetworkInputs)
-
- //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- //verify(mockExecution).setVariable("UPDNETI_source", "VID")
- //verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
-
- verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingNameWorkflowException))
-
- }
-
- @Test
- //@Ignore
- public void preProcessRequest_MissingCloudRegion() {
-
- println "************ preProcessRequest_MissingCloudRegion() ************* "
-
- WorkflowException missingCloudRegionWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "requestDetails has missing 'aic-cloud-region' value/element.")
-
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
- when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
- when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
- when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("vnfId")).thenReturn("")
- when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
- when(mockExecution.getVariable("networkId")).thenReturn("networkId")
- when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
- when(mockExecution.getVariable("networkType")).thenReturn("modelName")
-
- when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest_MissingCloudRegion)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
- when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
-
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- try {
- UpdateNetworkInstanceInfra.preProcessRequest(mockExecution)
- } catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
-
- //verify variable initialization
- initializeVariables(mockExecution)
-
- verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- // Authentications
- verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
- verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
-
- verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest_MissingCloudRegion)
- //verify(mockExecution).setVariable("UPDNETI_networkRequest", "")
- //verify(mockExecution).setVariable("UPDNETI_networkInputs", "")
- //verify(mockExecution, atLeast(1)).setVariable("UPDNETI_networkOutputs", "")
-
- //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- //verify(mockExecution).setVariable("UPDNETI_source", "VID")
-
- verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingCloudRegionWorkflowException))
-
- }
-
- @Test
- //@Ignore
- public void sendSyncResponse() {
-
- println "************ sendSyncResponse ************* "
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
- when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- //when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.sendSyncResponse(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UpdateNetworkInstanceInfraResponseCode", "202")
-
-
- }
-
- @Test
- //@Ignore
- public void sendSyncError() {
-
- println "************ sendSyncError ************* "
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
- when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- //when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.sendSyncError(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UpdateNetworkInstanceInfraResponseCode", "500")
-
- }
-
-
- @Test
- //@Ignore
- public void prepareDBRequest() {
-
- println "************ prepareDBRequest ************* "
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.prepareDBRequest(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequest)
-
- }
-
- @Test
- //@Ignore
- public void prepareDBRequestErro_ExceptionObject() {
-
- println "************ prepareDBRequest ************* "
-
- WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 500, "Received error from SDN-C: No availability zone available")
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
- when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.prepareDBRequestError(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequestError)
-
- }
-
- @Test
- //@Ignore
- public void prepareDBRequest_Outputs() {
-
- println "************ prepareDBRequest ************* "
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn(networkOutputs)
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.prepareDBRequest(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequest_Outputs)
-
- }
-
- @Test
- //@Ignore
- public void prepareUpdateNetworkRequest() {
-
- println "************ prepareNetworkRequest ************* "
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
- when(mockExecution.getVariable("UPDNETI_cloudRegionPo")).thenReturn("RDM2WAGPLCP")
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("messageId_generated")
- when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
- //when(mockExecution.getVariable("UPDNETI_queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
- when(mockExecution.getVariable("UPDNETI_routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
- when(mockExecution.getVariable("UPDNETI_networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
- when(mockExecution.getVariable("UPDNETI_tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_rollbackEnabled")).thenReturn("true")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
-
- verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", updateNetworkRequest)
-
- }
-
-
- @Test
- //@Ignore
- public void prepareUpdateNetworkRequest_NoPhysicalname() {
-
- println "************ prepareNetworkRequest ************* "
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(NetworkRequest_noPhysicalName)
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
- when(mockExecution.getVariable("UPDNETI_cloudRegionPo")).thenReturn("RDM2WAGPLCP")
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("messageId_generated")
- when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
- //when(mockExecution.getVariable("UPDNETI_queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
- when(mockExecution.getVariable("UPDNETI_routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
- when(mockExecution.getVariable("UPDNETI_networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
- when(mockExecution.getVariable("UPDNETI_tableRefCollection")).thenReturn("")
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_rollbackEnabled")).thenReturn("true")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
-
- verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", updateNetworkRequest_noPhysicalName)
-
- }
-
- @Test
- //@Ignore
- public void prepareSDNCRequest() {
-
- println "************ prepareSDNCRequest ************* "
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
- when(mockExecution.getVariable("UPDNETI_cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
- when(mockExecution.getVariable("UPDNETI_serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("openecomp-mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("http://localhost:28090/SDNCAdapterCallback")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
-
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.prepareSDNCRequest(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCRequest", changeAssignSDNCRequest)
-
- }
-
- @Test
- //@Ignore
- public void prepareSDNCRollbackRequest() {
-
- println "************ prepareSDNCRollbackRequest ************* "
-
-
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
- when(mockExecution.getVariable("UPDNETI_cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
- when(mockExecution.getVariable("UPDNETI_serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(assignResponse)
- when(mockExecution.getVariable("openecomp-mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("http://localhost:28090/SDNCAdapterCallback")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", sdncRollbackRequest)
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAINetworkId_200() {
-
- println "************ callRESTQueryAAINetworkId ************* "
-
- WireMock.reset();
-
- MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_queryIdAAIRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
- verify(mockExecution).setVariable("UPDNETI_aaiIdReturnCode", "200")
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAICloudRegion30_200() {
-
- println "************ callRESTQueryAAICloudRegion30_200 ************* "
-
- WireMock.reset();
- MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml")
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
- when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(expectedNetworkRequest)
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP")
- verify(mockExecution, atLeast(2)).setVariable("UPDNETI_queryCloudRegionReturnCode", "200")
- verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAICloudRegion25_200() {
-
- println "************ callRESTQueryAAICloudRegion25_200 ************* "
-
- WireMock.reset();
- MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml")
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
- when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(expectedNetworkRequest)
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP")
- verify(mockExecution, atLeast(2)).setVariable("UPDNETI_queryCloudRegionReturnCode", "200")
- verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAICloudRegion_NotFound() {
-
- println "************ callRESTQueryAAICloudRegionFake ************* "
-
- WireMock.reset();
- MockGetCloudRegion("MDTWNJ21", 404, "")
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
- when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(vnfRequestFakeRegion)
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/MDTWNJ21")
- verify(mockExecution, atLeast(1)).setVariable("UPDNETI_queryCloudRegionReturnCode", "404")
- verify(mockExecution).setVariable("UPDNETI_cloudRegionPo", "MDTWNJ21")
- verify(mockExecution).setVariable("UPDNETI_cloudRegionSdnc", "AAIAIC25")
- verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAINetworkVpnBinding_200() {
-
- println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
-
- WireMock.reset();
- MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
- MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
-// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_vpn-binding_uri")).thenReturn("")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_vpnCount", 2)
- verify(mockExecution).setVariable("UPDNETI_vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
- // the last vpnBinding value is saved.
- verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
- verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAINetworkVpnBinding_TestScenario01_200() {
-
- println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
-
- WireMock.reset();
- MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponseTestScenario01)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
-// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_vpn-binding_uri")).thenReturn("")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_vpnCount", 1)
- verify(mockExecution).setVariable("UPDNETI_vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/'])
- // the last vpnBinding value is saved.
- verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
- verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAINetworkVpnBinding_200_URN_Uri() {
-
- println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
-
- WireMock.reset();
- MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
- MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_vpnCount", 2)
- verify(mockExecution).setVariable("UPDNETI_vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
- // the last vpnBinding value is saved.
- verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
- verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAINetworkVpnBinding_NotPresent() {
-
- println "************ callRESTQueryAAINetworkVpnBinding_NotPresent ************* "
-
- WireMock.reset();
- MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
-
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
-
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponseVpnNotPresent)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
- verify(mockExecution).setVariable("UPDNETI_vpnCount", 0)
- verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIResponse", aaiVpnResponseStub)
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAINetworkTableRef_200() {
-
- println "************ callRESTQueryAAINetworkTableRef_200 ************* "
-
- WireMock.reset();
- MockGetNetworkRouteTable("refFQDN1", "CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200)
- MockGetNetworkRouteTable("refFQDN2", "CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200)
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_route_table_reference_uri")).thenReturn("/aai/v8/network/route-table-references/route-table-reference")
-// when(mockExecution.getVariable("URN_mso_workflow_CreateNetworkInstanceInfra_aai_network_table_reference_uri")).thenReturn("")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_networkTableRefCount", 2)
- verify(mockExecution).setVariable("UPDNETI_networkTableRefUriList", ['/aai/v8/network/route-table-references/route-table-reference/refFQDN1','/aai/v8/network/route-table-references/route-table-reference/refFQDN2'])
- // the last vpnBinding value is saved.
- verify(mockExecution).setVariable("UPDNETI_queryNetworkTableRefAAIRequest", "http://localhost:28090/aai/v8/network/route-table-references/route-table-reference/refFQDN1")
- verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "200")
-
- }
-
- @Test
- //@Ignore
- public void callRESTQueryAAINetworkPolicy_200() {
-
- println "************ callRESTQueryAAINetworkPolicy_200 ************* "
-
- WireMock.reset();
- MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200)
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_network_policy_uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
-// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_policy_uri")).thenReturn("")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_networkPolicyCount", 1)
- verify(mockExecution).setVariable("UPDNETI_networkPolicyUriList", ['/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg'])
- // the last vpnBinding value is saved.
- verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIRequest", "http://localhost:28090/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg")
- verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "200")
-
- }
-
-
- @Test
- //@Ignore
- public void callRESTReQueryAAINetworkId_200() {
-
- println "************ callRESTReQueryAAINetworkId ************* "
-
- WireMock.reset();
- MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200)
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_requeryIdAAIRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
- verify(mockExecution).setVariable("UPDNETI_aaiRequeryIdReturnCode", "200")
-
- }
-
-
- @Test
- //@Ignore
- public void callRESTUpdateContrailAAINetworkREST_200() {
-
- println "************ callRESTUpdateContrailAAINetwork ************* "
-
- WireMock.reset();
- MockPutNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", 200, "UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml")
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
- when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
- when(mockExecution.getVariable("UPDNETI_updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
- when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
- when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
- when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
- when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
-
- // preProcessRequest(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(mockExecution)
-
- // Capture the arguments to setVariable
- ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
- ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
-
- verify(mockExecution, times(6)).setVariable(captor1.capture(), captor2.capture())
- List<String> arg2List = captor2.getAllValues()
- String payloadResponseActual = arg2List.get(4)
-
- assertEquals(updateContrailAAIResponse.replaceAll("\\s+", ""), payloadResponseActual.replaceAll("\\s+", ""))
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_updateContrailAAIUrlRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
- verify(mockExecution).setVariable("UPDNETI_updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest)
- verify(mockExecution).setVariable("UPDNETI_aaiUpdateContrailReturnCode", "200")
- verify(mockExecution).setVariable("UPDNETI_isPONR", true)
-
- }
-
-
-
- @Test
- //@Ignore
- public void validateUpdateNetworkResponseREST() {
-
- println "************ validateNetworkResponse ************* "
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
- when(mockExecution.getVariable("UPDNETI_networkReturnCode")).thenReturn('200')
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(mockExecution)
-
- //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
- //debugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_updateNetworkResponse", updateNetworkResponseREST)
- verify(mockExecution).setVariable("UPDNETI_isNetworkRollbackNeeded", true)
- verify(mockExecution).setVariable("UPDNETI_rollbackNetworkRequest", updateRollbackNetworkRequest)
-
- }
-
- @Test
- //@Ignore
- public void validateUpdateNetworkResponseREST_Error() {
-
- println "************ validateNetworkResponse ************* "
-
- WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
-
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_updateNetworkResponse")).thenReturn(networkException500)
- when(mockExecution.getVariable("UPDNETI_networkReturnCode")).thenReturn('500')
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- try {
- UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(mockExecution)
- } catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(workflowException, any(WorkflowException.class)))
-
- }
-
- @Test
- //@Ignore
- public void validateSDNCResponse() {
-
- println "************ validateSDNCResponse ************* "
-
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
- when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_sdncReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_isResponseGood")).thenReturn(true)
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- try {
- UpdateNetworkInstanceInfra.validateSDNCResponse(mockExecution)
- verify(mockExecution).setVariable("UPDNETI_isSdncRollbackNeeded", true)
- verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", "")
-
- } catch (Exception ex) {
- println " Graceful Exit - " + ex.getMessage()
- }
- //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
- //debugger.printInvocations(mockExecution)
-
- //verify(mockExecution).setVariable("UPDNETI_isSdncRollbackNeeded", true)
-
- }
-
- @Test
- //@Ignore
- public void validateSDNCResponse_Error() {
-
- println "************ validateSDNCResponse ************* "
- //ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse_Error)
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
- when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
- when(mockExecution.getVariable("UPDNETI_sdncReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_isResponseGood")).thenReturn(true)
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- try {
- UpdateNetworkInstanceInfra.validateSDNCResponse(mockExecution)
- } catch (Exception ex) {
- println " Graceful Exit! - " + ex.getMessage()
- }
- //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
- //debugger.printInvocations(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- //verify(mockExecution).setVariable("UPDNETI_sdncResponseSuccess", false)
-
- }
-
-
-
- @Test
- //@Ignore
- public void postProcessResponse() {
-
- println "************ postProcessResponse ************* "
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_source")).thenReturn("PORTAL")
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
- when(mockExecution.getVariable("UPDNETI_dbReturnCode")).thenReturn("200")
-
- // postProcessResponse(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.postProcessResponse(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_Success", true)
- verify(mockExecution).setVariable("UPDNETI_CompleteMsoProcessRequest", completeMsoProcessRequest)
-
- }
-
- @Test
- //@Ignore
- public void validateRollbackResponses_Good() {
-
- WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "AAI Update Contrail Failed. Error 404.")
- WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SNDC rollback completed.")
-
- println "************ validateRollbackResponses_Good() ************* "
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
-
- when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
- when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
-
- }
-
- @Test
- //@Ignore
- public void validateRollbackResponses_Failed() {
-
- WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
- WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SDNC rollback failed. ")
-
- println "************ validateRollbackResponses_Failed() ************* "
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
-
- when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("404")
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("BadResponse")
- when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("500")
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("BadResponse")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
-
- }
-
- @Test
- //@Ignore
- public void validateRollbackResponses_NetworkFailed() {
-
- WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
- WorkflowException expectedWorkflowExceptionFailed = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SNDC rollback completed.")
-
- println "************ validateRollbackResponses_NetworkFailed() ************* "
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
-
- when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("404")
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("BadResponse")
- when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowExceptionFailed , any(WorkflowException.class)))
-
- }
-
- @Test
- //@Ignore
- public void validateRollbackResponses_SdncFailed() {
-
- WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
- WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SDNC rollback failed. ")
-
- println "************ validateRollbackResponses_SdncFailed() ************* "
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
-
- when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
- when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("<response-code>400</response-code>")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException , any(WorkflowException.class)))
-
- }
-
- @Test
- //@Ignore
- public void validateRollbackResponses_NoRollbacks() {
-
- WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, " AAI Update Contrail Failed. Error 404")
- WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, " AAI Update Contrail Failed. Error 404")
-
- println "************ validateRollbackResponses_NoRollbacks() ************* "
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
-
- when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(false)
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
- when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(false)
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
-
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- //verify(mockExecution, atLeast(1)).setVariable("WorkflowException", any(expectedWorkflowException))
- verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
-
- }
-
-
- @Test
- //@Ignore
- public void buildErrorResponse() {
-
- println "************ buildErrorResponse ************* "
-
-
- WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 5300, "Received error from SDN-C: No availability zone available.")
-
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
- when(mockExecution.getVariable("UPDNETI_source")).thenReturn("PORTAL")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
-
- // buildErrorResponse(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_Success", false)
- verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest)
-
- //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
- //debugger.printInvocations(mockExecution)
-
- }
-
- @Test
- //@Ignore
- public void buildErrorResponse_WorkflowExceptionObject() {
-
- println "************ buildErrorResponse ************* "
-
- WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7000, "Received error from SDN-C: No availability zone available")
-
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
- when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
-
- // buildErrorResponse(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_Success", false)
- verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequestObject)
-
- //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
- //debugger.printInvocations(mockExecution)
-
- }
-
- @Test
- //@Ignore
- public void buildErrorResponse_Scenario01() {
-
- WorkflowException aaiWorkflowException_Secnario01 = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "Unexpected Response from AAI - 400")
-
- println "************ buildErrorResponse ************* "
- ExecutionEntity mockExecution = setupMock()
- // Initialize prerequisite variables
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
- when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
- when(mockExecution.getVariable("WorkflowException")).thenReturn(aaiWorkflowException_Secnario01)
- when(mockExecution.getVariable("UPDNETI_dbReturnCode")).thenReturn("200")
- when(mockExecution.getVariable("UPDNETI_updateDBResponse")).thenReturn("<GoodResponse>")
-
- when(mockExecution.getVariable("UPDNETI_aaiRequeryIdReturnCode")).thenReturn("400")
-
- // buildErrorResponse(Execution execution)
- UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
- UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
-
- // verify set prefix = "UPDNETI_"
- verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
- verify(mockExecution).setVariable("UPDNETI_Success", false)
- verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest_Scenario01)
-
- //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
- //debugger.printInvocations(mockExecution)
-
- }
-
-
- private ExecutionEntity setupMock() {
-
- ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
- when(mockProcessDefinition.getKey()).thenReturn("UpdateNetworkInstanceInfra")
- RepositoryService mockRepositoryService = mock(RepositoryService.class)
- when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
- when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("UpdateNetworkInstanceInfra")
- when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
- ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
- when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
-
- when(mockExecution.getId()).thenReturn("100")
- when(mockExecution.getProcessDefinitionId()).thenReturn("UpdateNetworkInstanceInfra")
- when(mockExecution.getProcessInstanceId()).thenReturn("UpdateNetworkInstanceInfra")
- when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
- when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
-
- return mockExecution
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.junit.Assert.*
+import static org.mockito.Mockito.*
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetCloudRegion
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetwork
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkPolicy
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkRouteTable
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkVpnBinding
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.runtime.Execution
+import org.junit.Before
+import org.junit.Ignore;
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.openecomp.mso.bpmn.common.scripts.MsoUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.client.WireMock
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+
+@RunWith(MockitoJUnitRunner.class)
+class UpdateNetworkInstanceInfraTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ def utils = new MsoUtils()
+
+ String jsonIncomingRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+ String jsonIncomingRequest_Missingname =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }}"""
+
+ String jsonIncomingRequest_MissingCloudRegion =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }}"""
+
+
+
+ String expectedNetworkRequestMissingNetworkId =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id/>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>true</backout-on-failure>
+ </network-inputs>
+ <network-params>
+ <param name="some_user_param1">someValue1</param>
+ </network-params>
+</network-request>
+"""
+
+
+String expectedNetworkRequestMissingCloudRegion =
+"""<network-request xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region/>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">1</param>
+ </network-params>
+</network-request>"""
+
+ // vnfRESTRequest
+ String networkRESTRequest =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
+ statusCode="200">
+ <rest:payload contentType="text/xml">
+ <vnfreq:network-request>
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ <vnfreq:physicalNetworkName>dvs-slcp3-01</vnfreq:physicalNetworkName>
+ <vnfreq:vlans>3008</vnfreq:vlans>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+ </vnfreq:network-request>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String networkInputsMissingName =
+ """<network-inputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <network-name/>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>"""
+
+String networkInputsMissingCloudRegion =
+"""<network-inputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region/>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+ String expectedUpdateNetworkInstanceInfraRequest =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
+ contentType="text/xml">
+ <vnfreq:network-request>
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ <vnfreq:physicalNetworkName>dvs-slcp3-01</vnfreq:physicalNetworkName>
+ <vnfreq:vlans>3008</vnfreq:vlans>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+ </vnfreq:network-request>
+</rest:payload>"""
+
+ String expectedUpdateNetworkInstanceInfraRequest_Output =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1"
+ contentType="text/xml">
+ <vnfreq:network-request>
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-outputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</vnfreq:network-id>
+ </vnfreq:network-outputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+ </vnfreq:network-request>
+</rest:payload>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>true</backout-on-failure>
+ </network-inputs>
+ <network-params>
+ <param name="dhcp-enabled">true</param>
+ <param name="serviceId">a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</param>
+ <param name="cidr-mask">true</param>
+ <param name="backoutOnFailure">true</param>
+ <param name="gateway-address">10.10.125.1</param>
+ </network-params>
+</network-request>"""
+
+String expectedNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id/>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>true</backout-on-failure>
+</network-inputs>"""
+
+
+ String NetworkRequest_noPhysicalName =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ <vnfreq:vlans>3008</vnfreq:vlans>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <network-params>
+ <param name="dhcp-enabled">true</param>
+ <param name="serviceId">a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</param>
+ <param name="cidr-mask">true</param>
+ <param name="backoutOnFailure">true</param>
+ <param name="gateway-address">10.10.125.1</param>
+ </network-params>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+ String vnfRequestFakeRegion =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>MDTWNJ21</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest_Outputs =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.openecomp/mso/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-outputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</vnfreq:network-id>
+ </vnfreq:network-outputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+
+ // expectedNetworkRequest
+ String networkInputs_404 =
+ """<network-inputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <network-name>myOwn_Network</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>"""
+
+ String networkInputs =
+ """<network-inputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ </network-outputs>"""
+
+ String queryAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryIdAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <heat-stack-id>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</heat-stack-id>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryIdAIIResponseTestScenario01 =
+ """<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v7">
+ <network-id>4da55fe4-7a9e-478c-a434-8a98d62265ab</network-id>
+ <network-name>GN_EVPN_direct_net_0_ST1</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <is-bound-to-vpn>false</is-bound-to-vpn>
+ <service-id>9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1465398611</resource-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>cb1a7b47-5428-44c9-89c2-8b17541c3228</subnet-id>
+ <gateway-address>108.239.40.1</gateway-address>
+ <network-start-address>108.239.40.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>108.239.40.0</dhcp-start>
+ <dhcp-end>108.239.40.0</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ <subnet>
+ <subnet-id>e2cc7c14-90f0-4205-840d-b4e07f04e621</subnet-id>
+ <gateway-address>2606:ae00:2e01:604::1</gateway-address>
+ <network-start-address>2606:ae00:2e01:604::</network-start-address>
+ <cidr-mask>64</cidr-mask>
+ <ip-version>6</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>2606:ae00:2e01:604::</dhcp-start>
+ <dhcp-end>2606:ae00:2e01:604::</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ </subnets>
+ <ctag-assignments />
+ <segmentation-assignments>
+ <segmentation-id>416</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>https://mtanjv9aaas03.aic.cip.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/
+ </related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value></property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://mtanjv9aaas03.aic.cip.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/4ae1d3446a4c48b2bec44b6cfba06d68/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>4ae1d3446a4c48b2bec44b6cfba06d68
+ </relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>Ruchira Contrail 3.0 test</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://mtanjv9aaas03.aic.cip.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>GN_EVPN_direct_net_0_ST1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String queryIdAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list/>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryNameAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String queryNameAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String aaiVpnResponseStub =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns="http://org.openecomp.aai.inventory/v8"
+ contentType="text/xml">
+ <vpn-binding>
+ <global-route-target/>
+ </vpn-binding>
+</rest:payload>"""
+
+ String queryVpnBindingAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v6">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String updateDBRequest_Active =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network MNS-25180-L-01-dmz_direct_net_1 already exists. Silent success.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;network-name&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/network-names&gt;</vnfOutputs>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ String updateDBRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network successfully updated.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ <networkId/>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ String updateDBRequestError =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String updateDBRequestError01 =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error unexpectedly from SDN-C.</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String updateDBRequest_Outputs =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network successfully updated.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;network-name&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/network-names&gt;</vnfOutputs>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ String updateNetworkRequest =
+ """<updateNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkStackId>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</networkStackId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid/>
+ <networkTypeVersion/>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <networkParams>
+ <dhcp-enabled>true</dhcp-enabled>
+ <serviceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceId>
+ <cidr-mask>true</cidr-mask>
+ <backoutOnFailure>true</backoutOnFailure>
+ <gateway-address>10.10.125.1</gateway-address>
+ </networkParams>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</updateNetworkRequest>"""
+
+
+ String updateNetworkRequest_noPhysicalName =
+ """<updateNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkStackId>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</networkStackId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid/>
+ <networkTypeVersion/>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ </contrailNetwork>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <networkParams>
+ <dhcp-enabled>true</dhcp-enabled>
+ <serviceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceId>
+ <cidr-mask>true</cidr-mask>
+ <backoutOnFailure>true</backoutOnFailure>
+ <gateway-address>10.10.125.1</gateway-address>
+ </networkParams>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>null</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</updateNetworkRequest>"""
+
+ String updateNetworkResponseREST =
+ """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.openecomp.mso/network">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <networkStackId></networkStackId>
+ <subnetMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetMap>
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId></networkStackId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>true</networkUpdated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId></serviceInstanceId>
+ </msoRequest>
+ </rollback>
+ <messageId>messageId_generated</messageId>
+</ns2:updateNetworkContrailResponse>"""
+
+ String updateRollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.openecomp.mso/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>true</networkUpdated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String updateNetworkResponse =
+ """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.openecomp.mso/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkStackId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkUpdated>true</networkUpdated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:updateNetworkContrailResponse>"""
+
+ String updateContrailAAIPayloadRequest =
+ """<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</heat-stack-id>
+ <contrail-network-fqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</contrail-network-fqdn>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String updateContrailAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+</rest:RESTResponse>"""
+
+ String updateNetworkErrorResponse =
+ """<updateNetworkError>
+ <messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+ <message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+ <rolledBack>true</rolledBack>
+ </updateNetworkError>"""
+
+
+ String networkException500 =
+ """<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"http://org.openecomp.mso/network", the namespace on the "updateNetworkContrail" element, is not a valid SOAP version.</faultstring></soap:Fault></soap:Body></soap:Envelope>"""
+
+ String aaiResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String changeAssignSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:ns5="http://openecomp.com/mso/request/types/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignResponse =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1" xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sdncadapterworkflow:response-data> <tag0:CallbackHeader> <tag0:RequestId>006927ca-f5a3-47fd-880c-dfcbcd81a093</tag0:RequestId> <tag0:ResponseCode>200</tag0:ResponseCode> <tag0:ResponseMessage>OK</tag0:ResponseMessage> </tag0:CallbackHeader> <tag0:RequestData xsi:type="xs:string"><output xmlns="org:openecomp:sdnctltl:vnf"><response-code>200</response-code><svc-request-id>006927ca-f5a3-47fd-880c-dfcbcd81a093</svc-request-id><ack-final-indicator>Y</ack-final-indicator><service-information><subscriber-name>notsurewecare</subscriber-name><service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id><service-instance-id>GN_EVPN_direct_net_0_ST_noGW</service-instance-id></service-information><network-information><network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id></network-information></output></tag0:RequestData> </sdncadapterworkflow:response-data> </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncRollbackRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://openecomp.com/mso/workflow/schema/v1"
+ xmlns:ns5="http://openecomp.com/mso/request/types/v1"
+ xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String sdncAdapterWorkflowResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1">
+ <tag0:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+</tag0:CallbackHeader>
+ <tag0:RequestData xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;output xmlns="org:openecomp:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+
+ String sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="org:openecomp:sdnctl:vnf">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String expected_sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns="org:openecomp:sdnctl:vnf"
+ xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowFormattedResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns="org:openecomp:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>200</response-code>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>UPDATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available.</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String falloutHandlerRequestObject =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+
+ String falloutHandlerRequest_Scenario01 =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Unexpected Response from AAI - 400</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7020</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ public void initializeVariables (Execution mockExecution) {
+
+ verify(mockExecution).setVariable("UPDNETI_messageId", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "")
+ verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_networkRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_networkInputs", "")
+ verify(mockExecution).setVariable("UPDNETI_networkOutputs", "")
+ verify(mockExecution).setVariable("UPDNETI_requestId", "")
+ verify(mockExecution).setVariable("UPDNETI_source", "")
+ verify(mockExecution).setVariable("UPDNETI_networkId", "")
+
+ verify(mockExecution).setVariable("UPDNETI_CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_isSilentSuccess", false)
+ verify(mockExecution).setVariable("UPDNETI_isPONR", false)
+
+ // AAI query Cloud Region
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionReturnCode","")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionResponse","")
+ verify(mockExecution).setVariable("UPDNETI_cloudRegionPo","")
+ verify(mockExecution).setVariable("UPDNETI_cloudRegionSdnc","")
+ verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", false)
+
+ // AAI query Id
+ verify(mockExecution).setVariable("UPDNETI_queryIdAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryIdAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_vpnBindings", null)
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 0)
+ verify(mockExecution).setVariable("UPDNETI_routeCollection", "")
+
+ // AAI query network policy
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_networkPolicyUriList", null)
+ verify(mockExecution).setVariable("UPDNETI_networkPolicyCount", 0)
+ verify(mockExecution).setVariable("UPDNETI_networkCollection", "")
+
+ // AAI query route table reference
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkTableRefAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkTableRefAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_networkTableRefUriList", null)
+ verify(mockExecution).setVariable("UPDNETI_networkTableRefCount", 0)
+ verify(mockExecution).setVariable("UPDNETI_tableRefCollection", "")
+
+
+ // AAI requery Id
+ verify(mockExecution).setVariable("UPDNETI_requeryIdAAIRequest","")
+ verify(mockExecution).setVariable("UPDNETI_requeryIdAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIUrlRequest","")
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIPayloadRequest","")
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_aaiUpdateContrailReturnCode", "")
+
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackNetworkRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_networkReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackNetworkReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_isNetworkRollbackNeeded", false)
+
+ verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_sdncReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCReturnCode", "")
+ verify(mockExecution).setVariable("UPDNETI_isSdncRollbackNeeded", false)
+ verify(mockExecution).setVariable("UPDNETI_sdncResponseSuccess", false)
+
+ verify(mockExecution).setVariable("UPDNETI_updateDBRequest", "")
+ verify(mockExecution).setVariable("UPDNETI_updateDBResponse", "")
+ verify(mockExecution).setVariable("UPDNETI_dbReturnCode", "")
+
+ verify(mockExecution).setVariable("UPDNETI_isVnfBindingPresent", false)
+ verify(mockExecution).setVariable("UPDNETI_Success", false)
+ verify(mockExecution).setVariable("UPDNETI_serviceInstanceId", "")
+ verify(mockExecution).setVariable("GENGS_type", "service-instance") // Setting for Generic Sub Flow use
+
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.preProcessRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+ verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest)
+ //verify(mockExecution).setVariable("UPDNETI_networkRequest", expectedNetworkRequest)
+ //verify(mockExecution).setVariable("UPDNETI_networkInputs", expectedNetworkInputs)
+ //verify(mockExecution, atLeast(3)).setVariable("UPDNETI_networkOutputs", "")
+
+ //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("UPDNETI_source", "VID")
+ //verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_MissingNetworkId() {
+
+ println "************ preProcessRequest_MissingName() ************* "
+
+ WorkflowException missingNameWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "Variable 'network-id' value/element is missing.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.preProcessRequest(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+ verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest)
+ //verify(mockExecution, atLeast(1)).setVariable("UPDNETI_networkOutputs", networkOutputs)
+ //verify(mockExecution).setVariable("UPDNETI_networkRequest", expectedNetworkRequestMissingNetworkId)
+ //verify(mockExecution).setVariable("UPDNETI_networkInputs", expectedNetworkInputs)
+
+ //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("UPDNETI_source", "VID")
+ //verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingNameWorkflowException))
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_MissingCloudRegion() {
+
+ println "************ preProcessRequest_MissingCloudRegion() ************* "
+
+ WorkflowException missingCloudRegionWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "requestDetails has missing 'aic-cloud-region' value/element.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ when(mockExecution.getVariable("networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest_MissingCloudRegion)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_adapters_po_auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")
+
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.preProcessRequest(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("UPDNETI_messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+ verify(mockExecution).setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", jsonIncomingRequest_MissingCloudRegion)
+ //verify(mockExecution).setVariable("UPDNETI_networkRequest", "")
+ //verify(mockExecution).setVariable("UPDNETI_networkInputs", "")
+ //verify(mockExecution, atLeast(1)).setVariable("UPDNETI_networkOutputs", "")
+
+ //verify(mockExecution).setVariable("UPDNETI_requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("UPDNETI_source", "VID")
+
+ verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingCloudRegionWorkflowException))
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ //when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UpdateNetworkInstanceInfraResponseCode", "202")
+
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ //when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UpdateNetworkInstanceInfraResponseCode", "500")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareDBRequest() {
+
+ println "************ prepareDBRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareDBRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareDBRequestErro_ExceptionObject() {
+
+ println "************ prepareDBRequest ************* "
+
+ WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 500, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn("")
+ when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareDBRequestError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequestError)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareDBRequest_Outputs() {
+
+ println "************ prepareDBRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkOutputs")).thenReturn(networkOutputs)
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("UPDNETI_orchestrationStatus")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareDBRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateDBRequest", updateDBRequest_Outputs)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareUpdateNetworkRequest() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
+ //when(mockExecution.getVariable("UPDNETI_queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable("UPDNETI_routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable("UPDNETI_networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable("UPDNETI_tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_rollbackEnabled")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", updateNetworkRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareUpdateNetworkRequest_NoPhysicalname() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(NetworkRequest_noPhysicalName)
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
+ //when(mockExecution.getVariable("UPDNETI_queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable("UPDNETI_routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable("UPDNETI_networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable("UPDNETI_tableRefCollection")).thenReturn("")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_rollbackEnabled")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkRequest", updateNetworkRequest_noPhysicalName)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("UPDNETI_cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("UPDNETI_serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("http://localhost:28090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareSDNCRequest(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_changeAssignSDNCRequest", changeAssignSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRollbackRequest() {
+
+ println "************ prepareSDNCRollbackRequest ************* "
+
+
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("UPDNETI_cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("UPDNETI_serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("http://localhost:28090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", sdncRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkId_200() {
+
+ println "************ callRESTQueryAAINetworkId ************* "
+
+ WireMock.reset();
+
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200);
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_queryIdAAIRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ verify(mockExecution).setVariable("UPDNETI_aaiIdReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion30_200() {
+
+ println "************ callRESTQueryAAICloudRegion30_200 ************* "
+
+ WireMock.reset();
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion25_200() {
+
+ println "************ callRESTQueryAAICloudRegion25_200 ************* "
+
+ WireMock.reset();
+ MockGetCloudRegion("RDM2WAGPLCP", 200, "CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion_NotFound() {
+
+ println "************ callRESTQueryAAICloudRegionFake ************* "
+
+ WireMock.reset();
+ MockGetCloudRegion("MDTWNJ21", 404, "")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("UPDNETI_networkInputs")).thenReturn(vnfRequestFakeRegion)
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/MDTWNJ21")
+ verify(mockExecution, atLeast(1)).setVariable("UPDNETI_queryCloudRegionReturnCode", "404")
+ verify(mockExecution).setVariable("UPDNETI_cloudRegionPo", "MDTWNJ21")
+ verify(mockExecution).setVariable("UPDNETI_cloudRegionSdnc", "AAIAIC25")
+ verify(mockExecution).setVariable("UPDNETI_isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_vpn-binding_uri")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 2)
+ verify(mockExecution).setVariable("UPDNETI_vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_TestScenario01_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponseTestScenario01)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_vpn-binding_uri")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 1)
+ verify(mockExecution).setVariable("UPDNETI_vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200_URN_Uri() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
+ MockGetNetworkVpnBinding("c980a6ef-3b88-49f0-9751-dbad8608d0a6", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200);
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 2)
+ verify(mockExecution).setVariable("UPDNETI_vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIRequest", "http://localhost:28090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_NotPresent() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_NotPresent ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("85f015d0-2e32-4c30-96d2-87a1a27f8017", "UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponseVpnNotPresent)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+ verify(mockExecution).setVariable("UPDNETI_vpnCount", 0)
+ verify(mockExecution).setVariable("UPDNETI_queryVpnBindingAAIResponse", aaiVpnResponseStub)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkTableRef_200() {
+
+ println "************ callRESTQueryAAINetworkTableRef_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkRouteTable("refFQDN1", "CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", 200)
+ MockGetNetworkRouteTable("refFQDN2", "CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_route_table_reference_uri")).thenReturn("/aai/v8/network/route-table-references/route-table-reference")
+// when(mockExecution.getVariable("URN_mso_workflow_CreateNetworkInstanceInfra_aai_network_table_reference_uri")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_networkTableRefCount", 2)
+ verify(mockExecution).setVariable("UPDNETI_networkTableRefUriList", ['/aai/v8/network/route-table-references/route-table-reference/refFQDN1','/aai/v8/network/route-table-references/route-table-reference/refFQDN2'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkTableRefAAIRequest", "http://localhost:28090/aai/v8/network/route-table-references/route-table-reference/refFQDN1")
+ verify(mockExecution, atLeast(2)).setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkPolicy_200() {
+
+ println "************ callRESTQueryAAINetworkPolicy_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkPolicy("cee6d136-e378-4678-a024-2cd15f0ee0cg", "UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_network_policy_uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+// when(mockExecution.getVariable("URN_mso_workflow_UpdateNetworkInstanceInfra_aai_network_policy_uri")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_networkPolicyCount", 1)
+ verify(mockExecution).setVariable("UPDNETI_networkPolicyUriList", ['/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable("UPDNETI_queryNetworkPolicyAAIRequest", "http://localhost:28090/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg")
+ verify(mockExecution).setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTReQueryAAINetworkId_200() {
+
+ println "************ callRESTReQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", 200)
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_requeryIdAAIRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ verify(mockExecution).setVariable("UPDNETI_aaiRequeryIdReturnCode", "200")
+
+ }
+
+
+ @Test
+ @Ignore
+ public void callRESTUpdateContrailAAINetworkREST_200() {
+
+ println "************ callRESTUpdateContrailAAINetwork ************* "
+
+ WireMock.reset();
+ MockPutNetwork("49c86598-f766-46f8-84f8-8d1c1b10f9b4", 200, "UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+ when(mockExecution.getVariable("UPDNETI_requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable("UPDNETI_updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
+ when(mockExecution.getVariable("UPDNETI_messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")
+ when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(mockExecution)
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(6)).setVariable(captor1.capture(), captor2.capture())
+ List<String> arg2List = captor2.getAllValues()
+ String payloadResponseActual = arg2List.get(4)
+
+ assertEquals(updateContrailAAIResponse.replaceAll("\\s+", ""), payloadResponseActual.replaceAll("\\s+", ""))
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIUrlRequest", "http://localhost:28090/aai/v8/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ verify(mockExecution).setVariable("UPDNETI_updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest)
+ verify(mockExecution).setVariable("UPDNETI_aaiUpdateContrailReturnCode", "200")
+ verify(mockExecution).setVariable("UPDNETI_isPONR", true)
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void validateUpdateNetworkResponseREST() {
+
+ println "************ validateNetworkResponse ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
+ when(mockExecution.getVariable("UPDNETI_networkReturnCode")).thenReturn('200')
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(mockExecution)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_updateNetworkResponse", updateNetworkResponseREST)
+ verify(mockExecution).setVariable("UPDNETI_isNetworkRollbackNeeded", true)
+ verify(mockExecution).setVariable("UPDNETI_rollbackNetworkRequest", updateRollbackNetworkRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateUpdateNetworkResponseREST_Error() {
+
+ println "************ validateNetworkResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_updateNetworkResponse")).thenReturn(networkException500)
+ when(mockExecution.getVariable("UPDNETI_networkReturnCode")).thenReturn('500')
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(workflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse() {
+
+ println "************ validateSDNCResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_isResponseGood")).thenReturn(true)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.validateSDNCResponse(mockExecution)
+ verify(mockExecution).setVariable("UPDNETI_isSdncRollbackNeeded", true)
+ verify(mockExecution).setVariable("UPDNETI_rollbackSDNCRequest", "")
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable("UPDNETI_isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_Error() {
+
+ println "************ validateSDNCResponse ************* "
+ //ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse_Error)
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
+ when(mockExecution.getVariable("UPDNETI_sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_isResponseGood")).thenReturn(true)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ try {
+ UpdateNetworkInstanceInfra.validateSDNCResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Graceful Exit! - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ //verify(mockExecution).setVariable("UPDNETI_sdncResponseSuccess", false)
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("PORTAL")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("UPDNETI_dbReturnCode")).thenReturn("200")
+
+ // postProcessResponse(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.postProcessResponse(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_Success", true)
+ verify(mockExecution).setVariable("UPDNETI_CompleteMsoProcessRequest", completeMsoProcessRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_Good() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SNDC rollback completed.")
+
+ println "************ validateRollbackResponses_Good() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_Failed() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SDNC rollback failed. ")
+
+ println "************ validateRollbackResponses_Failed() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("404")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("BadResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("500")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("BadResponse")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_NetworkFailed() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowExceptionFailed = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SNDC rollback completed.")
+
+ println "************ validateRollbackResponses_NetworkFailed() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("404")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("BadResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowExceptionFailed , any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_SdncFailed() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "AAI Update Contrail Failed. Error 404. + PO Network rollback is not supported for Update. Submit another Update to restore/rollback. + SDNC rollback failed. ")
+
+ println "************ validateRollbackResponses_SdncFailed() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(true)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("<response-code>400</response-code>")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException , any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_NoRollbacks() {
+
+ WorkflowException workflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, " AAI Update Contrail Failed. Error 404")
+ WorkflowException expectedWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 2500, " AAI Update Contrail Failed. Error 404")
+
+ println "************ validateRollbackResponses_NoRollbacks() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn("UPDNETI_")
+
+ when(mockExecution.getVariable("UPDNETI_isNetworkRollbackNeeded")).thenReturn(false)
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("UPDNETI_isSdncRollbackNeeded")).thenReturn(false)
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ //verify(mockExecution, atLeast(1)).setVariable("WorkflowException", any(expectedWorkflowException))
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse() {
+
+ println "************ buildErrorResponse ************* "
+
+
+ WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 5300, "Received error from SDN-C: No availability zone available.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("PORTAL")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+
+ // buildErrorResponse(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_Success", false)
+ verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse_WorkflowExceptionObject() {
+
+ println "************ buildErrorResponse ************* "
+
+ WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstanceInfra", 7000, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+
+ // buildErrorResponse(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_Success", false)
+ verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequestObject)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse_Scenario01() {
+
+ WorkflowException aaiWorkflowException_Secnario01 = new WorkflowException("UpdateNetworkInstanceInfra", 7020, "Unexpected Response from AAI - 400")
+
+ println "************ buildErrorResponse ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDNETI_requestId")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ when(mockExecution.getVariable("UPDNETI_source")).thenReturn("VID")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(aaiWorkflowException_Secnario01)
+ when(mockExecution.getVariable("UPDNETI_dbReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("UPDNETI_updateDBResponse")).thenReturn("<GoodResponse>")
+
+ when(mockExecution.getVariable("UPDNETI_aaiRequeryIdReturnCode")).thenReturn("400")
+
+ // buildErrorResponse(Execution execution)
+ UpdateNetworkInstanceInfra UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+ UpdateNetworkInstanceInfra.buildErrorResponse(mockExecution)
+
+ // verify set prefix = "UPDNETI_"
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "UPDNETI_")
+ verify(mockExecution).setVariable("UPDNETI_Success", false)
+ verify(mockExecution).setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest_Scenario01)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("UpdateNetworkInstanceInfra")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("UpdateNetworkInstanceInfra")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("UpdateNetworkInstanceInfra")
+ when(mockExecution.getProcessInstanceId()).thenReturn("UpdateNetworkInstanceInfra")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
index 2e9efad..4ca68f3 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
@@ -1,93 +1,93 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure.scripts;
-
-import static org.junit.Assert.*
-import static org.mockito.Mockito.*
-
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.runner.RunWith
-import org.mockito.MockitoAnnotations
-import org.mockito.runners.MockitoJUnitRunner
-
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-
-@RunWith(MockitoJUnitRunner.class)
-@Ignore // No Junits exists in this class to run
-class UpdateVfModuleVolumeInfraV1Test {
-
- String xml = """
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>mdt1</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>ECOMP_MDT1</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>vf-module</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
- <relationship-data>
- <relationship-key>vf-module.vf-module-ids</relationship-key>
- <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>mdt1</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>vf-module.vf-module-name</property-key>
- <property-value>ECOMP_MDT1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
-"""
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(28090);
-
- @Before
- public void init()
- {
- MockitoAnnotations.initMocks(this)
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure.scripts;
+
+import static org.junit.Assert.*
+import static org.mockito.Mockito.*
+
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+@RunWith(MockitoJUnitRunner.class)
+@Ignore // No Junits exists in this class to run
+class UpdateVfModuleVolumeInfraV1Test {
+
+ String xml = """
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-ids</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vf-module.vf-module-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+"""
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
index 7a9864c..4f987f0 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
@@ -1,243 +1,249 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure;
-
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetCloudRegion;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkPolicyfqdn;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
-import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
-import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
-import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.camunda.bpm.engine.test.Deployment;
-import org.junit.Test;
-import org.openecomp.mso.bpmn.common.WorkflowTest;
-import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
-import org.openecomp.mso.bpmn.mock.FileUtil;
-
-/**
- * Unit test cases for CreateVfModuleInfra.bpmn
- */
-public class CreateVfModuleInfraTest extends WorkflowTest {
-
- private final CallbackSet callbacks = new CallbackSet();
-
- public CreateVfModuleInfraTest() throws IOException {
- callbacks.put("assign", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyAssignCallback.xml"));
- callbacks.put("query", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml"));
- callbacks.put("activate", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
- callbacks.put("vnfCreate", FileUtil.readResourceFile(
- "__files/VfModularity/VNFAdapterRestCreateCallback.xml"));
- }
-
-
- /**
- * Sunny day VID scenario.
- *
- * @throws Exception
- */
- @Test
- @Deployment(resources = {
- "process/CreateVfModuleInfra.bpmn",
- "subprocess/DoCreateVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn",
- "subprocess/ConfirmVolumeGroupTenant.bpmn",
- "subprocess/ConfirmVolumeGroupName.bpmn",
- "subprocess/CreateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/CompleteMsoProcess.bpmn",
- "subprocess/FalloutHandler.bpmn"
- })
- public void sunnyDayVID() throws Exception {
-
- logStart();
-
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
- MockGetGenericVnfById("skask", "VfModularity/GenericVnf.xml", 200);
- MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
- MockPutNetwork(".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
- MockPutGenericVnf("skask");
- mockVNFPost("", 202, "skask");
- mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
-
- String businessKey = UUID.randomUUID().toString();
- String createVfModuleRequest =
- FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json");
-
- Map<String, Object> variables = setupVariablesSunnyDayVID();
-
- TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleInfra",
- "v1", businessKey, createVfModuleRequest, variables);
-
- WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
-
- String responseBody = response.getResponse();
- System.out.println("Workflow (Synch) Response:\n" + responseBody);
-
- injectSDNCCallbacks(callbacks, "assign, query");
- injectVNFRestCallbacks(callbacks, "vnfCreate");
- injectSDNCCallbacks(callbacks, "activate");
-
- // TODO add appropriate assertions
-
- waitForProcessEnd(businessKey, 10000);
- checkVariable(businessKey, "CreateVfModuleSuccessIndicator", true);
-
- logEnd();
- }
-
- // Active Scenario
- private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
- //try {
- // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
- //}
- //catch (Exception e) {
-
- //}
- //variables.put("mso-request-id", "testRequestId");
- variables.put("requestId", "testRequestId");
- variables.put("isBaseVfModule", false);
- variables.put("isDebugLogEnabled", "true");
- variables.put("recipeTimeout", "0");
- variables.put("requestAction", "CREATE_VF_MODULE");
- variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
- variables.put("vnfId", "skask");
- variables.put("vnfType", "vSAMP12");
- variables.put("vfModuleId", "");
- variables.put("volumeGroupId", "");
- variables.put("serviceType", "MOG");
- variables.put("vfModuleType", "");
- return variables;
-
- }
-
- /**
- * Sunny day VID with volume attach scenario.
- *
- * @throws Exception
- */
- @Test
- @Deployment(resources = {
- "process/CreateVfModuleInfra.bpmn",
- "subprocess/DoCreateVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn",
- "subprocess/ConfirmVolumeGroupTenant.bpmn",
- "subprocess/ConfirmVolumeGroupName.bpmn",
- "subprocess/CreateAAIVfModule.bpmn",
- "subprocess/CreateAAIVfModuleVolumeGroup.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/CompleteMsoProcess.bpmn",
- "subprocess/FalloutHandler.bpmn"
- })
- public void sunnyDayVIDWithVolumeGroupAttach() throws Exception {
-
- logStart();
-
- MockGetVolumeGroupById("AAIAIC25", "78987", "VfModularity/VolumeGroup.xml");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockGetCloudRegion("MDTWNJ21", 200, "CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml");
- MockGetVolumeGroupById("RDM2WAGPLCP", "78987", "DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml");
- MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
- mockVNFPost("", 202, "skask");
- MockGetNetworkPolicyfqdn(".*", "VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml", 200);
- MockPutGenericVnf("skask");
- MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
- mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockVNFPost("", 202, "skask");
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
-
- String businessKey = UUID.randomUUID().toString();
- String createVfModuleRequest =
- FileUtil.readResourceFile("__files/CreateVfModuleVolumeGroup_VID_request.json");
-
- Map<String, Object> variables = setupVariablesSunnyDayVIDWVolumeAttach();
-
- TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleInfra",
- "v1", businessKey, createVfModuleRequest, variables);
-
- WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
-
- String responseBody = response.getResponse();
- System.out.println("Workflow (Synch) Response:\n" + responseBody);
-
- injectSDNCCallbacks(callbacks, "assign, query");
- injectVNFRestCallbacks(callbacks, "vnfCreate");
- injectSDNCCallbacks(callbacks, "activate");
-
- // TODO add appropriate assertions
-
- waitForProcessEnd(businessKey, 10000);
- checkVariable(businessKey, "CreateVfModuleSuccessIndicator", true);
-
- logEnd();
- }
-
- // Active Scenario
- private Map<String, Object> setupVariablesSunnyDayVIDWVolumeAttach() {
- Map<String, Object> variables = new HashMap<String, Object>();
- //try {
- // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
- //}
- //catch (Exception e) {
-
- //}
- //variables.put("mso-request-id", "testRequestId");
- variables.put("requestId", "testRequestId");
- variables.put("isBaseVfModule", false);
- variables.put("isDebugLogEnabled", "true");
- variables.put("recipeTimeout", "0");
- variables.put("requestAction", "CREATE_VF_MODULE");
- variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
- variables.put("vnfId", "skask");
- variables.put("vnfType", "vSAMP12");
- variables.put("vfModuleId", "");
- variables.put("volumeGroupId", "78987");
- variables.put("serviceType", "MOG");
- variables.put("vfModuleType", "");
- return variables;
-
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetCloudRegion;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetNetworkPolicyfqdn;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit test cases for CreateVfModuleInfra.bpmn
+ */
+public class CreateVfModuleInfraTest extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public CreateVfModuleInfraTest() throws IOException {
+ callbacks.put("assign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+ callbacks.put("query", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ callbacks.put("vnfCreate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestCreateCallback.xml"));
+ }
+
+
+ /**
+ * Sunny day VID scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {
+ "process/CreateVfModuleInfra.bpmn",
+ "subprocess/DoCreateVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/ConfirmVolumeGroupName.bpmn",
+ "subprocess/CreateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ public void sunnyDayVID() throws Exception {
+
+ logStart();
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
+ MockGetGenericVnfById("skask", "VfModularity/GenericVnf.xml", 200);
+ MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
+ MockPutNetwork(".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockPutGenericVnf("skask");
+ mockVNFPost("", 202, "skask");
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockPatchGenericVnf("skask");
+ MockPatchVfModuleId("skask", ".*");
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleRequest =
+ FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json");
+
+ Map<String, Object> variables = setupVariablesSunnyDayVID();
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleInfra",
+ "v1", businessKey, createVfModuleRequest, variables);
+
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectSDNCCallbacks(callbacks, "assign, query");
+ injectVNFRestCallbacks(callbacks, "vnfCreate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ // TODO add appropriate assertions
+
+ waitForProcessEnd(businessKey, 10000);
+ checkVariable(businessKey, "CreateVfModuleSuccessIndicator", true);
+
+ logEnd();
+ }
+
+ // Active Scenario
+ private Map<String, Object> setupVariablesSunnyDayVID() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ //try {
+ // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
+ //}
+ //catch (Exception e) {
+
+ //}
+ //variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", false);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "CREATE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "skask");
+ variables.put("vnfType", "vSAMP12");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ return variables;
+
+ }
+
+ /**
+ * Sunny day VID with volume attach scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Deployment(resources = {
+ "process/CreateVfModuleInfra.bpmn",
+ "subprocess/DoCreateVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/ConfirmVolumeGroupName.bpmn",
+ "subprocess/CreateAAIVfModule.bpmn",
+ "subprocess/CreateAAIVfModuleVolumeGroup.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ public void sunnyDayVIDWithVolumeGroupAttach() throws Exception {
+
+ logStart();
+
+ MockGetVolumeGroupById("AAIAIC25", "78987", "VfModularity/VolumeGroup.xml");
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetCloudRegion("MDTWNJ21", 200, "CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml");
+ MockGetVolumeGroupById("RDM2WAGPLCP", "78987", "DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml");
+ MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
+ mockVNFPost("", 202, "skask");
+ MockGetNetworkPolicyfqdn(".*", "VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockPutGenericVnf("skask");
+ MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockVNFPost("", 202, "skask");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockPatchGenericVnf("skask");
+ MockPatchVfModuleId("skask", ".*");
+
+ String businessKey = UUID.randomUUID().toString();
+ String createVfModuleRequest =
+ FileUtil.readResourceFile("__files/CreateVfModuleVolumeGroup_VID_request.json");
+
+ Map<String, Object> variables = setupVariablesSunnyDayVIDWVolumeAttach();
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVfModuleInfra",
+ "v1", businessKey, createVfModuleRequest, variables);
+
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectSDNCCallbacks(callbacks, "assign, query");
+ injectVNFRestCallbacks(callbacks, "vnfCreate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ // TODO add appropriate assertions
+
+ waitForProcessEnd(businessKey, 10000);
+ checkVariable(businessKey, "CreateVfModuleSuccessIndicator", true);
+
+ logEnd();
+ }
+
+ // Active Scenario
+ private Map<String, Object> setupVariablesSunnyDayVIDWVolumeAttach() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ //try {
+ // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
+ //}
+ //catch (Exception e) {
+
+ //}
+ //variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", false);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "CREATE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "skask");
+ variables.put("vnfType", "vSAMP12");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "78987");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ return variables;
+
+ }
+
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java
index a6ae368..9a3ffe9 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java
@@ -1,579 +1,579 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.containing;
-import static com.github.tomakehurst.wiremock.client.WireMock.delete;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.put;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
-import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
-import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFDelete;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.camunda.bpm.engine.test.Deployment;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.openecomp.mso.bpmn.common.WorkflowTest;
-import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
-import org.openecomp.mso.bpmn.core.WorkflowException;
-import org.openecomp.mso.bpmn.mock.FileUtil;
-
-import com.github.tomakehurst.wiremock.client.WireMock;
-/**
- * Unit test for DoDeleteVfModule.bpmn.
- */
-public class DeleteVfModuleInfraTest extends WorkflowTest {
- private final CallbackSet callbacks = new CallbackSet();
-
- private static final String EOL = "\n";
-
- private final String vnfAdapterDeleteCallback =
- "<deleteVfModuleResponse>" + EOL +
- " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
- " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
- " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
- " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
- " <vfModuleOutputs>" + EOL +
- " <entry>" + EOL +
- " <key>policyKey1_contrail_network_policy_fqdn</key>" + EOL +
- " <value>MSOTest:DefaultPolicyFQDN1</value>" + EOL +
- "</entry>" + EOL +
- "<entry>" + EOL +
- "<key>policyKey2_contrail_network_policy_fqdn</key>" + EOL +
- "<value>MSOTest:DefaultPolicyFQDN2</value>" + EOL +
- "</entry>" + EOL +
- " <entry>" + EOL +
- " <key>oam_management_v4_address</key>" + EOL +
- " <value>1234</value>" + EOL +
- "</entry>" + EOL +
- " <entry>" + EOL +
- " <key>oam_management_v6_address</key>" + EOL +
- " <value>1234</value>" + EOL +
- "</entry>" + EOL +
- "</vfModuleOutputs>" + EOL +
- "</deleteVfModuleResponse>" + EOL;
-
- private final String vnfAdapterDeleteCallbackFail =
- "<vfModuleException>" + EOL +
- " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
- " <category>INTERNAL</category>" + EOL +
- " <rolledBack>false</rolledBack>" + EOL +
- " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
- "</vfModuleException>" + EOL;
-
- private final String sdncAdapterDeleteCallback =
- "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
- " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
- " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
- "</output>" + EOL;
-
- public DeleteVfModuleInfraTest() throws IOException {
- callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
- callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
- callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
- callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
- }
-
- @Test
- @Deployment(resources = {
- "process/Infrastructure/DeleteVfModuleInfra.bpmn",
- "subprocess/DoDeleteVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/DeleteAAIVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn",
- "subprocess/CompleteMsoProcess.bpmn",
- "subprocess/FalloutHandler.bpmn"
- })
- @Ignore
- public void TestDeleteVfModuleSuccess() throws Exception {
- // delete the Base Module
- // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
- String request =
- "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
- " <request-info>" + EOL +
- " <request-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</request-id>" + EOL +
- " <action>DELETE_VF_MODULE</action>" + EOL +
- " <source>PORTAL</source>" + EOL +
- " </request-info>" + EOL +
- " <vnf-inputs>" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>asc_heat-int</vnf-type>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
- " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
- " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
- " <orchestration-status>pending-delete</orchestration-status>" + EOL +
- " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
- " </vnf-inputs>" + EOL +
- " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
- "</vnf-request>" + EOL;
- logStart();
- WireMock.reset();
-
- stubFor(post(urlEqualTo("/SDNCAdapter"))
- .withRequestBody(containing("SvcAction>changedelete"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
- stubFor(post(urlEqualTo("/SDNCAdapter"))
- .withRequestBody(containing("SvcAction>delete"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
-
- mockVNFDelete(".*", "/.*", 202);
-// MockAAIGenericVnfSearch();
-// MockAAIVfModulePUT(false);
-// MockAAIDeleteGenericVnf();
-// MockAAIDeleteVfModule();
- mockUpdateRequestDB(200, "VfModularity/DBUpdateResponse.xml");
-
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73/[?]resource-version=0000073"))
- .willReturn(aResponse()
- .withStatus(200)));
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a75/[?]resource-version=0000075"))
- .willReturn(aResponse()
- .withStatus(200)));
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a78/[?]resource-version=0000078"))
- .willReturn(aResponse()
- .withStatus(200)));
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a77/[?]resource-version=0000077"))
- .willReturn(aResponse()
- .withStatus(500)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("aaiFault.xml")));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")));
-
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
- .willReturn(aResponse()
- .withStatus(200)));
-
-
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/[?]resource-version=0000021"))
- .willReturn(aResponse()
- .withStatus(200)));
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/[?]resource-version=0000018"))
- .willReturn(aResponse()
- .withStatus(500)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("aaiFault.xml")));
-
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
- .withRequestBody(containing("MMSC"))
- .willReturn(aResponse()
- .withStatus(200)));
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
- .withRequestBody(containing("PCRF"))
- .willReturn(aResponse()
- .withStatus(500)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("aaiFault.xml")));
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
- .willReturn(aResponse()
- .withStatus(200)));
-
- String body;
-
- // The following stubs are for CreateAAIVfModule and UpdateAAIVfModule
-
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC23&depth=1"))
- .willReturn(aResponse()
- .withStatus(500)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("aaiFault.xml")));
-
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC22&depth=1"))
- .willReturn(aResponse()
- .withStatus(404)
- .withHeader("Content-Type", "text/xml")
- .withBody("Generic VNF Not Found")));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/768073c7-f41f-4822-9323-b75962763d74[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(404)
- .withHeader("Content-Type", "text/xml")
- .withBody("Generic VNF Not Found")));
-
- body =
- "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
- " <service-id>SDN-MOBILITY</service-id>" + EOL +
- " <equipment-role>vMMSC</equipment-role>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <in-maint>false</in-maint>" + EOL +
- " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
- " <resource-version>1508691</resource-version>" + EOL +
- " <vf-modules>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>true</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>1508692</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " </vf-modules>" + EOL +
- " <relationship-list/>" + EOL +
- " <l-interfaces/>" + EOL +
- " <lag-interfaces/>" + EOL +
- "</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC21&depth=1"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
-
- body =
- "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
- " <vnf-id>2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
- " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
- " <service-id>SDN-MOBILITY</service-id>" + EOL +
- " <equipment-role>vMMSC</equipment-role>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <in-maint>false</in-maint>" + EOL +
- " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
- " <resource-version>1508691</resource-version>" + EOL +
- " <vf-modules>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>true</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>1508692</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>false</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>1508692</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " </vf-modules>" + EOL +
- " <relationship-list/>" + EOL +
- " <l-interfaces/>" + EOL +
- " <lag-interfaces/>" + EOL +
- "</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC20&depth=1"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
-
- // The following stubs are for DeleteAAIVfModule
-
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c723[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(500)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("aaiFault.xml")));
-
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c722[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(404)
- .withHeader("Content-Type", "text/xml")
- .withBody("Generic VNF Not Found")));
-
- body =
- "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
- " <service-id>SDN-MOBILITY</service-id>" + EOL +
- " <equipment-role>vMMSC</equipment-role>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <in-maint>false</in-maint>" + EOL +
- " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
- " <resource-version>0000021</resource-version>" + EOL +
- " <vf-modules>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>true</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>0000073</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " </vf-modules>" + EOL +
- " <relationship-list/>" + EOL +
- " <l-interfaces/>" + EOL +
- " <lag-interfaces/>" + EOL +
- "</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
-
- body =
- "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
- " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
- " <service-id>SDN-MOBILITY</service-id>" + EOL +
- " <equipment-role>vMMSC</equipment-role>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <in-maint>false</in-maint>" + EOL +
- " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
- " <resource-version>0000020</resource-version>" + EOL +
- " <vf-modules>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>true</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>0000074</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>false</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>0000075</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " </vf-modules>" + EOL +
- " <relationship-list/>" + EOL +
- " <l-interfaces/>" + EOL +
- " <lag-interfaces/>" + EOL +
- "</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
-
- body =
- "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c719</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC19</vnf-name>" + EOL +
- " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
- " <service-id>SDN-MOBILITY</service-id>" + EOL +
- " <equipment-role>vMMSC</equipment-role>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <in-maint>false</in-maint>" + EOL +
- " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
- " <resource-version>0000019</resource-version>" + EOL +
- " <vf-modules>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC19-MMSC::module-0-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>true</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>0000076</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC19-MMSC::module-1-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>false</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>0000077</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " </vf-modules>" + EOL +
- " <relationship-list/>" + EOL +
- " <l-interfaces/>" + EOL +
- " <lag-interfaces/>" + EOL +
- "</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
-
- body =
- "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c718</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC18</vnf-name>" + EOL +
- " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
- " <service-id>SDN-MOBILITY</service-id>" + EOL +
- " <equipment-role>vMMSC</equipment-role>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <in-maint>false</in-maint>" + EOL +
- " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
- " <resource-version>0000018</resource-version>" + EOL +
- " <vf-modules>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC18-MMSC::module-0-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>true</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>0000078</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " </vf-modules>" + EOL +
- " <relationship-list/>" + EOL +
- " <l-interfaces/>" + EOL +
- " <lag-interfaces/>" + EOL +
- "</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718[?]depth=1"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
-
- body =
- "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
- " <service-id>SDN-MOBILITY</service-id>" + EOL +
- " <equipment-role>vMMSC</equipment-role>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <in-maint>false</in-maint>" + EOL +
- " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
- " <resource-version>0000021</resource-version>" + EOL +
- " <vf-modules>" + EOL +
- " <vf-module>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
- " <persona-model-version>1.0</persona-model-version>" + EOL +
- " <is-base-vf-module>true</is-base-vf-module>" + EOL +
- " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
- " <orchestration-status>pending-create</orchestration-status>" + EOL +
- " <resource-version>0000073</resource-version>" + EOL +
- " </vf-module>" + EOL +
- " </vf-modules>" + EOL +
- " <relationship-list/>" + EOL +
- " <l-interfaces/>" + EOL +
- " <lag-interfaces/>" + EOL +
- "</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBody(body)));
-
- String businessKey = UUID.randomUUID().toString();
- String deleteVfModuleRequest =
- FileUtil.readResourceFile("__files/DeleteVfModule_VID_request.json");
- //Map<String, Object> variables = new HashMap<String, Object>();
-
- //variables.put("isDebugLogEnabled","true");
-// variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
-// variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
-
- Map<String, Object> variables = setupVariablesSunnyDayVID();
-
- TestAsyncResponse asyncResponse = invokeAsyncProcess("DeleteVfModuleInfra",
- "v1", businessKey, deleteVfModuleRequest, variables);
- WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
- String responseBody = response.getResponse();
- System.out.println("Workflow (Synch) Response:\n" + responseBody);
-
- // "changedelete" operation not required for deleting a Vf Module
-// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
- injectVNFRestCallbacks(callbacks, "vnfDelete");
- waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
- injectSDNCCallbacks(callbacks, "sdncDelete");
-
- waitForProcessEnd(businessKey, 10000);
- WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
- checkVariable(businessKey, "DeleteVfModuleInfraSuccessIndicator", true);
- checkVariable(businessKey, "WorkflowException", null);
- if (wfe != null) {
- System.out.println("TestDeleteVfModuleInfraSuccess: ErrorCode=" + wfe.getErrorCode() +
- ", ErrorMessage=" + wfe.getErrorMessage());
- }
- logEnd();
- }
-
- // Active Scenario
- private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
- //try {
- // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
- //}
- //catch (Exception e) {
-
- //}
- //variables.put("mso-request-id", "testRequestId");
- variables.put("requestId", "testRequestId");
- variables.put("isBaseVfModule", "true");
- variables.put("isDebugLogEnabled", "true");
- variables.put("recipeTimeout", "0");
- variables.put("requestAction", "DELETE_VF_MODULE");
- variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
- variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("vfModuleId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
- variables.put("volumeGroupId", "");
- variables.put("serviceType", "MOG");
- variables.put("vfModuleType", "");
- return variables;
-
- }
-
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFDelete;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+/**
+ * Unit test for DoDeleteVfModule.bpmn.
+ */
+public class DeleteVfModuleInfraTest extends WorkflowTest {
+ private final CallbackSet callbacks = new CallbackSet();
+
+ private static final String EOL = "\n";
+
+ private final String vnfAdapterDeleteCallback =
+ "<deleteVfModuleResponse>" + EOL +
+ " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
+ " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
+ " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ " <vfModuleOutputs>" + EOL +
+ " <entry>" + EOL +
+ " <key>policyKey1_contrail_network_policy_fqdn</key>" + EOL +
+ " <value>MSOTest:DefaultPolicyFQDN1</value>" + EOL +
+ "</entry>" + EOL +
+ "<entry>" + EOL +
+ "<key>policyKey2_contrail_network_policy_fqdn</key>" + EOL +
+ "<value>MSOTest:DefaultPolicyFQDN2</value>" + EOL +
+ "</entry>" + EOL +
+ " <entry>" + EOL +
+ " <key>oam_management_v4_address</key>" + EOL +
+ " <value>1234</value>" + EOL +
+ "</entry>" + EOL +
+ " <entry>" + EOL +
+ " <key>oam_management_v6_address</key>" + EOL +
+ " <value>1234</value>" + EOL +
+ "</entry>" + EOL +
+ "</vfModuleOutputs>" + EOL +
+ "</deleteVfModuleResponse>" + EOL;
+
+ private final String vnfAdapterDeleteCallbackFail =
+ "<vfModuleException>" + EOL +
+ " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
+ " <category>INTERNAL</category>" + EOL +
+ " <rolledBack>false</rolledBack>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</vfModuleException>" + EOL;
+
+ private final String sdncAdapterDeleteCallback =
+ "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
+ " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
+ " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
+ "</output>" + EOL;
+
+ public DeleteVfModuleInfraTest() throws IOException {
+ callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
+ callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
+ callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
+ callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
+ }
+
+ @Test
+ @Deployment(resources = {
+ "process/Infrastructure/DeleteVfModuleInfra.bpmn",
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ @Ignore
+ public void TestDeleteVfModuleSuccess() throws Exception {
+ // delete the Base Module
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <request-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</request-id>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ logStart();
+ WireMock.reset();
+
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>changedelete"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>delete"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
+
+ mockVNFDelete(".*", "/.*", 202);
+// MockAAIGenericVnfSearch();
+// MockAAIVfModulePUT(false);
+// MockAAIDeleteGenericVnf();
+// MockAAIDeleteVfModule();
+ mockUpdateRequestDB(200, "VfModularity/DBUpdateResponse.xml");
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73/[?]resource-version=0000073"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a75/[?]resource-version=0000075"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a78/[?]resource-version=0000078"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a77/[?]resource-version=0000077"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")));
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/[?]resource-version=0000021"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/[?]resource-version=0000018"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("MMSC"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("PCRF"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+
+ String body;
+
+ // The following stubs are for CreateAAIVfModule and UpdateAAIVfModule
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC23&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC22&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/768073c7-f41f-4822-9323-b75962763d74[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>1508691</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC21&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>1508691</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>1508692</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC20&depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ // The following stubs are for DeleteAAIVfModule
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c723[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c722[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(404)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("Generic VNF Not Found")));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000021</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000073</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000020</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000074</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000075</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c719</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC19</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000019</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC19-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000076</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC19-MMSC::module-1-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>false</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000077</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c718</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC18</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000018</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC18-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000078</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ body =
+ "<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+ " <service-id>SDN-MOBILITY</service-id>" + EOL +
+ " <equipment-role>vMMSC</equipment-role>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <in-maint>false</in-maint>" + EOL +
+ " <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+ " <resource-version>0000021</resource-version>" + EOL +
+ " <vf-modules>" + EOL +
+ " <vf-module>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+ " <persona-model-version>1.0</persona-model-version>" + EOL +
+ " <is-base-vf-module>true</is-base-vf-module>" + EOL +
+ " <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+ " <orchestration-status>pending-create</orchestration-status>" + EOL +
+ " <resource-version>0000073</resource-version>" + EOL +
+ " </vf-module>" + EOL +
+ " </vf-modules>" + EOL +
+ " <relationship-list/>" + EOL +
+ " <l-interfaces/>" + EOL +
+ " <lag-interfaces/>" + EOL +
+ "</generic-vnf>" + EOL;
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody(body)));
+
+ String businessKey = UUID.randomUUID().toString();
+ String deleteVfModuleRequest =
+ FileUtil.readResourceFile("__files/DeleteVfModule_VID_request.json");
+ //Map<String, Object> variables = new HashMap<String, Object>();
+
+ //variables.put("isDebugLogEnabled","true");
+// variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+// variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+
+ Map<String, Object> variables = setupVariablesSunnyDayVID();
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("DeleteVfModuleInfra",
+ "v1", businessKey, deleteVfModuleRequest, variables);
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ checkVariable(businessKey, "DeleteVfModuleInfraSuccessIndicator", true);
+ checkVariable(businessKey, "WorkflowException", null);
+ if (wfe != null) {
+ System.out.println("TestDeleteVfModuleInfraSuccess: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ }
+ logEnd();
+ }
+
+ // Active Scenario
+ private Map<String, Object> setupVariablesSunnyDayVID() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ //try {
+ // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
+ //}
+ //catch (Exception e) {
+
+ //}
+ //variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", "true");
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "DELETE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("vfModuleId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("volumeGroupId", "");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ return variables;
+
+ }
+
+
} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java
index 7a9345f..5b0d4c7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java
@@ -1,157 +1,160 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure;
-
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteGenericVnf;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteVfModuleId;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVfModuleId;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
-import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
-import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFDelete;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.camunda.bpm.engine.test.Deployment;
-import org.junit.Test;
-import org.openecomp.mso.bpmn.common.WorkflowTest;
-import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
-import org.openecomp.mso.bpmn.core.RollbackData;
-import org.openecomp.mso.bpmn.core.WorkflowException;
-
-/**
- * Unit test for DoDeleteVfModule.bpmn.
- */
-public class DoCreateVfModuleRollbackTest extends WorkflowTest {
- private final CallbackSet callbacks = new CallbackSet();
-
- private static final String EOL = "\n";
-
- private final String vnfAdapterDeleteCallback =
- "<deleteVfModuleResponse>" + EOL +
- " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
- " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
- " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
- " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
- "</deleteVfModuleResponse>" + EOL;
-
- private final String vnfAdapterDeleteCallbackFail =
- "<vfModuleException>" + EOL +
- " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
- " <category>INTERNAL</category>" + EOL +
- " <rolledBack>false</rolledBack>" + EOL +
- " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
- "</vfModuleException>" + EOL;
-
- private final String sdncAdapterDeleteCallback =
- "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
- " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
- " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
- "</output>" + EOL;
-
- public DoCreateVfModuleRollbackTest() throws IOException {
- callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
- callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
- callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
- callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
- }
-
- @Test
-
- @Deployment(resources = {
- "subprocess/DoCreateVfModuleRollback.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/DeleteAAIVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn"
- })
- public void TestCreateVfModuleRollbackSuccess() {
- logStart();
-
- mockSDNCAdapter("/SDNCAdapter", "SvcAction>delete", 200, "DeleteGenericVNFV1/sdncAdapterResponse.xml");
- mockVNFDelete("a27ce5a9-29c4-4c22-a017-6615ac73c721", "/973ed047-d251-4fb9-bf1a-65b8949e0a73", 202);
- MockDeleteGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721", "0000021", 200);
- MockDeleteVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73", "0000073", 200);
- MockPutVfModuleIdNoResponse("a27ce5a9-29c4-4c22-a017-6615ac73c721", "MMSC", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
- MockPutGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721");
- MockGetGenericVnfByIdWithDepth("a27ce5a9-29c4-4c22-a017-6615ac73c721", 1, "DoCreateVfModuleRollback/GenericVnf.xml");
- MockGetVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73", "DoCreateVfModuleRollback/GenericVnfVfModule.xml", 200);
-
- String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
- RollbackData rollbackData = new RollbackData();
- rollbackData.put("VFMODULE", "source", "PORTAL");
- rollbackData.put("VFMODULE", "vnfid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- rollbackData.put("VFMODULE", "vnfname", "STMTN5MMSC21");
- rollbackData.put("VFMODULE", "vnftype", "asc_heat-int");
- rollbackData.put("VFMODULE", "vfmoduleid", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
- rollbackData.put("VFMODULE", "vfmodulename", "STMTN5MMSC21-MMSC::module-0-0");
- rollbackData.put("VFMODULE", "tenantid", "fba1bd1e195a404cacb9ce17a9b2b421");
- rollbackData.put("VFMODULE", "aiccloudregion", "RDM2WAGPLCP");
- rollbackData.put("VFMODULE", "heatstackid", "thisisaheatstack");
- rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn0", "MSOTest:DefaultPolicyFQDN1");
- rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn1", "MSOTest:DefaultPolicyFQDN2");
- rollbackData.put("VFMODULE", "oamManagementV6Address", "2000:abc:bce:1111");
- rollbackData.put("VFMODULE", "oamManagementV4Address", "127.0.0.1");
-
- rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "true");
- rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "true");
- rollbackData.put("VFMODULE", "rollbackUpdateAAIVfModule", "true");
- rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "true");
- rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true");
- rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "true");
- rollbackData.put("VFMODULE", "rollbackUpdateVnfAAI", "true");
-
-
-
- variables.put("isDebugLogEnabled","true");
- variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- rollbackData.put("VFMODULE", "msorequestid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- rollbackData.put("VFMODULE", "serviceinstanceid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("RollbackData", rollbackData);
- invokeSubProcess("DoCreateVfModuleRollback", businessKey, variables);
-
- // "changedelete" operation not required for deleting a Vf Module
-// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
- injectVNFRestCallbacks(callbacks, "vnfDelete");
- waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
- injectSDNCCallbacks(callbacks, "sdncDelete");
-
- waitForProcessEnd(businessKey, 10000);
- WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
- checkVariable(businessKey, "WorkflowException", null);
- if (wfe != null) {
- System.out.println("TestCreateVfModuleSuccess: ErrorCode=" + wfe.getErrorCode() +
- ", ErrorMessage=" + wfe.getErrorMessage());
- }
- logEnd();
- }
-
-
-}
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFDelete;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.core.RollbackData;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * Unit test for DoDeleteVfModule.bpmn.
+ */
+public class DoCreateVfModuleRollbackTest extends WorkflowTest {
+ private final CallbackSet callbacks = new CallbackSet();
+
+ private static final String EOL = "\n";
+
+ private final String vnfAdapterDeleteCallback =
+ "<deleteVfModuleResponse>" + EOL +
+ " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
+ " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
+ " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</deleteVfModuleResponse>" + EOL;
+
+ private final String vnfAdapterDeleteCallbackFail =
+ "<vfModuleException>" + EOL +
+ " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
+ " <category>INTERNAL</category>" + EOL +
+ " <rolledBack>false</rolledBack>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</vfModuleException>" + EOL;
+
+ private final String sdncAdapterDeleteCallback =
+ "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
+ " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
+ " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
+ "</output>" + EOL;
+
+ public DoCreateVfModuleRollbackTest() throws IOException {
+ callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
+ callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
+ callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
+ callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
+ }
+
+ @Test
+
+ @Deployment(resources = {
+ "subprocess/DoCreateVfModuleRollback.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestCreateVfModuleRollbackSuccess() {
+ logStart();
+
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>delete", 200, "DeleteGenericVNFV1/sdncAdapterResponse.xml");
+ mockVNFDelete("a27ce5a9-29c4-4c22-a017-6615ac73c721", "/973ed047-d251-4fb9-bf1a-65b8949e0a73", 202);
+ MockDeleteGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721", "0000021", 200);
+ MockDeleteVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73", "0000073", 200);
+ MockPutVfModuleIdNoResponse("a27ce5a9-29c4-4c22-a017-6615ac73c721", "MMSC", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ MockPutGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ MockGetGenericVnfByIdWithDepth("a27ce5a9-29c4-4c22-a017-6615ac73c721", 1, "DoCreateVfModuleRollback/GenericVnf.xml");
+ MockGetVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73", "DoCreateVfModuleRollback/GenericVnfVfModule.xml", 200);
+ MockPatchGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ RollbackData rollbackData = new RollbackData();
+ rollbackData.put("VFMODULE", "source", "PORTAL");
+ rollbackData.put("VFMODULE", "vnfid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ rollbackData.put("VFMODULE", "vnfname", "STMTN5MMSC21");
+ rollbackData.put("VFMODULE", "vnftype", "asc_heat-int");
+ rollbackData.put("VFMODULE", "vfmoduleid", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ rollbackData.put("VFMODULE", "vfmodulename", "STMTN5MMSC21-MMSC::module-0-0");
+ rollbackData.put("VFMODULE", "tenantid", "fba1bd1e195a404cacb9ce17a9b2b421");
+ rollbackData.put("VFMODULE", "aiccloudregion", "RDM2WAGPLCP");
+ rollbackData.put("VFMODULE", "heatstackid", "thisisaheatstack");
+ rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn0", "MSOTest:DefaultPolicyFQDN1");
+ rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn1", "MSOTest:DefaultPolicyFQDN2");
+ rollbackData.put("VFMODULE", "oamManagementV6Address", "2000:abc:bce:1111");
+ rollbackData.put("VFMODULE", "oamManagementV4Address", "127.0.0.1");
+
+ rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "true");
+ rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "true");
+ rollbackData.put("VFMODULE", "rollbackUpdateAAIVfModule", "true");
+ rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "true");
+ rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true");
+ rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "true");
+ rollbackData.put("VFMODULE", "rollbackUpdateVnfAAI", "true");
+
+
+
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ rollbackData.put("VFMODULE", "msorequestid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ rollbackData.put("VFMODULE", "serviceinstanceid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("RollbackData", rollbackData);
+ invokeSubProcess("DoCreateVfModuleRollback", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+ checkVariable(businessKey, "WorkflowException", null);
+ if (wfe != null) {
+ System.out.println("TestCreateVfModuleSuccess: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ }
+ logEnd();
+ }
+
+
+}
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java
index 235deb8..fc4816c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java
@@ -1,149 +1,150 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure;
-
-
-import static org.openecomp.mso.bpmn.common.BPMNUtil.getRawVariable;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
-import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
-import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
-import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.camunda.bpm.engine.test.Deployment;
-import org.junit.Assert;
-import org.junit.Test;
-import org.openecomp.mso.bpmn.common.WorkflowTest;
-import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
-import org.openecomp.mso.bpmn.mock.FileUtil;
-
-/**
- * Unit tests for DoCreateVfModuleTest.bpmn.
- */
-public class DoCreateVfModuleTest extends WorkflowTest {
-
- private final CallbackSet callbacks = new CallbackSet();
-
- public DoCreateVfModuleTest() throws IOException {
- callbacks.put("assign", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyAssignCallback.xml"));
- callbacks.put("query", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
- callbacks.put("activate", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
- callbacks.put("vnfCreate", FileUtil.readResourceFile(
- "__files/VfModularity/VNFAdapterRestCreateCallback.xml"));
- }
-
- /**
- * Test the sunny day scenario.
- */
- @Test
-
- @Deployment(resources = {
- "subprocess/DoCreateVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn",
- "subprocess/ConfirmVolumeGroupTenant.bpmn",
- "subprocess/ConfirmVolumeGroupName.bpmn",
- "subprocess/CreateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/CreateAAIVfModuleVolumeGroup.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn"
- })
- public void sunnyDay() throws IOException {
-
- logStart();
-
- MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
- MockPutNetwork(".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
- MockPutGenericVnf("skask");
- mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockVNFPost("", 202, "skask");
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
-
- String businessKey = UUID.randomUUID().toString();
- //RuntimeService runtimeService = processEngineRule.getRuntimeService();
-
- Map<String, Object> variables = setupVariablesSunnyDayBuildingBlocks();
- //runtimeService.startProcessInstanceByKey("DoCreateVfModule", variables);
- invokeSubProcess("DoCreateVfModule", businessKey, variables);
-
- injectSDNCCallbacks(callbacks, "assign, query");
- injectVNFRestCallbacks(callbacks, "vnfCreate");
- injectSDNCCallbacks(callbacks, "activate");
-
- waitForProcessEnd(businessKey, 10000);
-
- Assert.assertTrue(isProcessEnded(businessKey));
- Assert.assertTrue((boolean) getRawVariable(processEngineRule, "DoCreateVfModule", "DCVFM_SuccessIndicator"));
-
- logEnd();
- }
-
- private Map<String, Object> setupVariablesSunnyDayBuildingBlocks() {
- Map<String, Object> variables = new HashMap<String, Object>();
-
- variables.put("mso-request-id", "testRequestId");
- variables.put("requestId", "testRequestId");
- variables.put("isBaseVfModule", false);
- variables.put("isDebugLogEnabled", "true");
- variables.put("disableRollback", "true");
- //variables.put("recipeTimeout", "0");
- //variables.put("requestAction", "CREATE_VF_MODULE");
- variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
- variables.put("vnfId", "skask");
- variables.put("vfModuleName", "PCRF::module-0-2");
- variables.put("vnfType", "vSAMP12");
- variables.put("vfModuleId", "");
- variables.put("volumeGroupId", "");
- variables.put("serviceType", "MOG");
- variables.put("vfModuleType", "");
- variables.put("isVidRequest", "true");
- variables.put("asdcServiceModelVersion", "1.0");
-
- String vfModuleModelInfo = "{" + "\"modelInfo\": { "+ "\"modelType\": \"vfModule\"," +
- "\"modelInvariantId\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
- "\"modelNameVersionId\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
- "\"modelName\": \"STMTN5MMSC21-MMSC::model-1-0\"," +
- "\"modelVersion\": \"1\"," +
- "\"modelCustomizationId\": \"MODEL-123\"" + "}}";
- variables.put("vfModuleModelInfo", vfModuleModelInfo);
-
- String cloudConfiguration = "{" + "\"cloudConfiguration\": { " +
- "\"lcpCloudRegionId\": \"MDTWNJ21\"," +
- "\"tenantId\": \"fba1bd1e195a404cacb9ce17a9b2b421\"" + "}}";
- variables.put("cloudConfiguration", cloudConfiguration);
- return variables;
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+
+import static org.openecomp.mso.bpmn.common.BPMNUtil.getRawVariable;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutNetwork;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit tests for DoCreateVfModuleTest.bpmn.
+ */
+public class DoCreateVfModuleTest extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public DoCreateVfModuleTest() throws IOException {
+ callbacks.put("assign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+ callbacks.put("query", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ callbacks.put("vnfCreate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestCreateCallback.xml"));
+ }
+
+ /**
+ * Test the sunny day scenario.
+ */
+ @Test
+ @Ignore
+ @Deployment(resources = {
+ "subprocess/DoCreateVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/ConfirmVolumeGroupName.bpmn",
+ "subprocess/CreateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/CreateAAIVfModuleVolumeGroup.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn"
+ })
+ public void sunnyDay() throws IOException {
+
+ logStart();
+
+ MockGetGenericVnfByIdWithPriority("skask", ".*", 200, "VfModularity/VfModule-new.xml", 5);
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutVfModuleIdNoResponse("skask", "PCRF", ".*");
+ MockPutNetwork(".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
+ MockPutGenericVnf("skask");
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockVNFPost("", 202, "skask");
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ //RuntimeService runtimeService = processEngineRule.getRuntimeService();
+
+ Map<String, Object> variables = setupVariablesSunnyDayBuildingBlocks();
+ //runtimeService.startProcessInstanceByKey("DoCreateVfModule", variables);
+ invokeSubProcess("DoCreateVfModule", businessKey, variables);
+
+ injectSDNCCallbacks(callbacks, "assign, query");
+ injectVNFRestCallbacks(callbacks, "vnfCreate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ waitForProcessEnd(businessKey, 10000);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ Assert.assertTrue((boolean) getRawVariable(processEngineRule, "DoCreateVfModule", "DCVFM_SuccessIndicator"));
+
+ logEnd();
+ }
+
+ private Map<String, Object> setupVariablesSunnyDayBuildingBlocks() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+
+ variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", false);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("disableRollback", "true");
+ //variables.put("recipeTimeout", "0");
+ //variables.put("requestAction", "CREATE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "skask");
+ variables.put("vfModuleName", "PCRF::module-0-2");
+ variables.put("vnfType", "vSAMP12");
+ variables.put("vfModuleId", "");
+ variables.put("volumeGroupId", "");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ variables.put("isVidRequest", "true");
+ variables.put("asdcServiceModelVersion", "1.0");
+
+ String vfModuleModelInfo = "{" + "\"modelInfo\": { "+ "\"modelType\": \"vfModule\"," +
+ "\"modelInvariantId\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
+ "\"modelNameVersionId\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
+ "\"modelName\": \"STMTN5MMSC21-MMSC::model-1-0\"," +
+ "\"modelVersion\": \"1\"," +
+ "\"modelCustomizationId\": \"MODEL-123\"" + "}}";
+ variables.put("vfModuleModelInfo", vfModuleModelInfo);
+
+ String cloudConfiguration = "{" + "\"cloudConfiguration\": { " +
+ "\"lcpCloudRegionId\": \"MDTWNJ21\"," +
+ "\"tenantId\": \"fba1bd1e195a404cacb9ce17a9b2b421\"" + "}}";
+ variables.put("cloudConfiguration", cloudConfiguration);
+ return variables;
+
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java
index a04ed17..a3165f7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java
@@ -1,549 +1,561 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.containing;
-import static com.github.tomakehurst.wiremock.client.WireMock.delete;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.put;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
-import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIDeleteGenericVnf;
-import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIDeleteVfModule;
-import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIGenericVnfSearch;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.camunda.bpm.engine.test.Deployment;
-import org.junit.Assert;
-import org.junit.Test;
-import org.openecomp.mso.bpmn.common.WorkflowTest;
-import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
-import org.openecomp.mso.bpmn.core.WorkflowException;
-
-/**
- * Unit test for DoDeleteVfModule.bpmn.
- */
-public class DoDeleteVfModuleTest extends WorkflowTest {
- private final CallbackSet callbacks = new CallbackSet();
-
- private static final String EOL = "\n";
-
- private final String vnfAdapterDeleteCallback =
- "<deleteVfModuleResponse>" + EOL +
- " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
- " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
- " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
- " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
- "</deleteVfModuleResponse>" + EOL;
-
- private final String vnfAdapterDeleteCallbackFail =
- "<vfModuleException>" + EOL +
- " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
- " <category>INTERNAL</category>" + EOL +
- " <rolledBack>false</rolledBack>" + EOL +
- " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
- "</vfModuleException>" + EOL;
-
- private final String sdncAdapterDeleteCallback =
- "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
- " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
- " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
- "</output>" + EOL;
-
- public DoDeleteVfModuleTest() throws IOException {
- callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
- callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
- callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
- callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
- }
-
- private final String wfeString = "WorkflowException";
-
- @Test
- @Deployment(resources = {
- "subprocess/DoDeleteVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/DeleteAAIVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn"
- })
- public void TestDoDeleteVfModuleSuccess() {
- // delete the Base Module and Generic Vnf
- // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
- String request =
- "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
- " <request-info>" + EOL +
- " <action>DELETE_VF_MODULE</action>" + EOL +
- " <source>PORTAL</source>" + EOL +
- " </request-info>" + EOL +
- " <vnf-inputs>" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>asc_heat-int</vnf-type>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
- " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
- " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
- " <orchestration-status>pending-delete</orchestration-status>" + EOL +
- " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
- " </vnf-inputs>" + EOL +
- " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
- "</vnf-request>" + EOL;
- logStart();
- MockDoDeleteVfModule_SDNCSuccess();
- MockDoDeleteVfModule_DeleteVNFSuccess();
- MockAAIGenericVnfSearch();
- MockAAIVfModulePUT(false);
- MockAAIDeleteGenericVnf();
- MockAAIDeleteVfModule();
- String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
- variables.put("isDebugLogEnabled","true");
- variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("DoDeleteVfModuleRequest",request);
- variables.put("isVidRequest", "true");
- invokeSubProcess("DoDeleteVfModule", businessKey, variables);
-
- // "changedelete" operation not required for deleting a Vf Module
-// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
- injectVNFRestCallbacks(callbacks, "vnfDelete");
- waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
- injectSDNCCallbacks(callbacks, "sdncDelete");
-
- waitForProcessEnd(businessKey, 10000);
- WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
- checkVariable(businessKey, wfeString, null);
- if (wfe != null) {
- System.out.println("TestDoDeleteVfModuleSuccess: ErrorCode=" + wfe.getErrorCode() +
- ", ErrorMessage=" + wfe.getErrorMessage());
- }
- logEnd();
- }
-
- @Test
- @Deployment(resources = {
- "subprocess/DoDeleteVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/DeleteAAIVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn"
- })
- public void TestDoDeleteVfModule_Building_Block_Success() {
- logStart();
- MockDoDeleteVfModule_SDNCSuccess();
- MockDoDeleteVfModule_DeleteVNFSuccess();
- MockAAIGenericVnfSearch();
- MockAAIVfModulePUT(false);
- MockAAIDeleteGenericVnf();
- MockAAIDeleteVfModule();
- String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
-
- variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("requestId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("isDebugLogEnabled","true");
- variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("vfModuleId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
- variables.put("serviceInstanceId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("vfModuleName", "STMTN5MMSC21-MMSC::module-0-0");
- variables.put("sdncVersion", "1610");
- variables.put("isVidRequest", "true");
- String vfModuleModelInfo = "{" + "\"modelType\": \"vnf\"," +
- "\"modelInvariantId\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
- "\"modelNameVersionId\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
- "\"modelName\": \"vSAMP12\"," +
- "\"modelVersion\": \"1.0\"," +
- "\"modelCustomizationId\": \"MODEL-ID-1234\"," +
- "}";
- variables.put("vfModuleModelInfo", vfModuleModelInfo);
-
- String cloudConfiguration = "{" +
- "\"lcpCloudRegionId\": \"RDM2WAGPLCP\"," +
- "\"tenantId\": \"fba1bd1e195a404cacb9ce17a9b2b421\"" + "}";
- variables.put("cloudConfiguration", cloudConfiguration);
-
-
- invokeSubProcess("DoDeleteVfModule", businessKey, variables);
-
- // "changedelete" operation not required for deleting a Vf Module
-// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
- injectVNFRestCallbacks(callbacks, "vnfDelete");
- waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
- injectSDNCCallbacks(callbacks, "sdncDelete");
-
- waitForProcessEnd(businessKey, 10000);
- WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
- checkVariable(businessKey, wfeString, null);
- if (wfe != null) {
- System.out.println("TestDoDeleteVfModule_Building_Block_Success: ErrorCode=" + wfe.getErrorCode() +
- ", ErrorMessage=" + wfe.getErrorMessage());
- }
- logEnd();
- }
-
-
- @Test
- @Deployment(resources = {
- "subprocess/DoDeleteVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/DeleteAAIVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn"
- })
- public void TestDoDeleteVfModuleSDNCFailure() {
- // delete the Base Module and Generic Vnf - SDNCAdapter failure
- // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
- String request =
- "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
- " <request-info>" + EOL +
- " <action>DELETE_VF_MODULE</action>" + EOL +
- " <source>PORTAL</source>" + EOL +
- " </request-info>" + EOL +
- " <vnf-inputs>" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>asc_heat-int</vnf-type>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
- " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
- " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
- " <orchestration-status>pending-delete</orchestration-status>" + EOL +
- " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
- " </vnf-inputs>" + EOL +
- " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
- "</vnf-request>" + EOL;
-
- logStart();
- MockDoDeleteVfModule_SDNCFailure();
- MockDoDeleteVfModule_DeleteVNFSuccess();
- MockAAIGenericVnfSearch();
- MockAAIVfModulePUT(false);
- MockAAIDeleteGenericVnf();
- MockAAIDeleteVfModule();
- String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
- variables.put("isDebugLogEnabled","true");
- variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("DoDeleteVfModuleRequest", request);
- variables.put("isVidRequest", "true");
- invokeSubProcess("DoDeleteVfModule", businessKey, variables);
-
- // "changedelete" operation not required for deleting a Vf Module
-// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
- injectVNFRestCallbacks(callbacks, "vnfDelete");
- waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
- // cause a failure by not injecting a callback
-// injectSDNCCallbacks(callbacks, "sdncDelete");
-
- waitForProcessEnd(businessKey, 10000);
- WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
- Assert.assertNotNull(wfe);
- if (wfe != null) {
- System.out.println("TestDoDeleteVfModuleSDNCFailure: ErrorCode=" + wfe.getErrorCode() +
- ", ErrorMessage=" + wfe.getErrorMessage());
- Assert.assertTrue(wfe.getErrorCode() == 7000);
- Assert.assertTrue(wfe.getErrorMessage().startsWith("Could not communicate"));
- }
- logEnd();
- }
-
- @Test
- @Deployment(resources = {
- "subprocess/DoDeleteVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/DeleteAAIVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn"
- })
- public void TestDoDeleteVfModuleSDNCCallbackFailure() {
- // delete the Base Module and Generic Vnf - SDNCAdapter Callback failure
- // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
- String request =
- "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
- " <request-info>" + EOL +
- " <action>DELETE_VF_MODULE</action>" + EOL +
- " <source>PORTAL</source>" + EOL +
- " </request-info>" + EOL +
- " <vnf-inputs>" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>asc_heat-int</vnf-type>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
- " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
- " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
- " <orchestration-status>pending-delete</orchestration-status>" + EOL +
- " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
- " </vnf-inputs>" + EOL +
- " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
- "</vnf-request>" + EOL;
-
- logStart();
- MockDoDeleteVfModule_SDNCSuccess();
- MockDoDeleteVfModule_DeleteVNFSuccess();
- MockAAIGenericVnfSearch();
- MockAAIVfModulePUT(false);
- MockAAIDeleteGenericVnf();
- MockAAIDeleteVfModule();
- String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
- variables.put("isDebugLogEnabled","true");
- variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("DoDeleteVfModuleRequest",request);
- variables.put("isVidRequest", "true");
- invokeSubProcess("DoDeleteVfModule", businessKey, variables);
-
- // "changedelete" operation not required for deleting a Vf Module
-// injectSDNCCallbacks(callbacks, "sdncChangeDelete:ERR");
- injectVNFRestCallbacks(callbacks, "vnfDelete");
- waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
- // return a failure in the callback
- injectSDNCCallbacks(callbacks, "sdncDelete:ERR");
-
- waitForProcessEnd(businessKey, 10000);
- WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
- Assert.assertNotNull(wfe);
- if (wfe != null) {
- System.out.println("TestDoDeleteVfModuleSDNCCallbackFailure: ErrorCode=" + wfe.getErrorCode() +
- ", ErrorMessage=" + wfe.getErrorMessage());
- Assert.assertTrue(wfe.getErrorCode() == 5310);
- Assert.assertTrue(wfe.getErrorMessage().startsWith("Received error from SDN-C"));
- }
- logEnd();
- }
-
- @Test
- @Deployment(resources = {
- "subprocess/DoDeleteVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/DeleteAAIVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn"
- })
- public void TestDoDeleteVfModuleVNFFailure() {
- // delete the Base Module and Generic Vnf - VNFAdapter failure
- // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
- String request =
- "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
- " <request-info>" + EOL +
- " <action>DELETE_VF_MODULE</action>" + EOL +
- " <source>PORTAL</source>" + EOL +
- " </request-info>" + EOL +
- " <vnf-inputs>" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>asc_heat-int</vnf-type>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
- " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
- " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
- " <orchestration-status>pending-delete</orchestration-status>" + EOL +
- " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
- " </vnf-inputs>" + EOL +
- " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
- "</vnf-request>" + EOL;
-
- logStart();
- MockDoDeleteVfModule_SDNCSuccess();
- MockDoDeleteVfModule_DeleteVNFFailure();
- MockAAIGenericVnfSearch();
- MockAAIVfModulePUT(false);
- MockAAIDeleteGenericVnf();
- MockAAIDeleteVfModule();
- String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
- variables.put("isDebugLogEnabled","true");
- variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("DoDeleteVfModuleRequest",request);
- invokeSubProcess("DoDeleteVfModule", businessKey, variables);
-
- // "changedelete" operation not required for deleting a Vf Module
-// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
- // cause a failure by not injecting a callback
-// injectVNFRestCallbacks(callbacks, "vnfDelete");
-// waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
-// injectSDNCCallbacks(callbacks, "sdncDelete");
-
- waitForProcessEnd(businessKey, 10000);
- WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
- Assert.assertNotNull(wfe);
- if (wfe != null) {
- System.out.println("TestDoDeleteVfModuleVNFFailure: ErrorCode=" + wfe.getErrorCode() +
- ", ErrorMessage=" + wfe.getErrorMessage());
- Assert.assertTrue(wfe.getErrorCode() == 7020);
- Assert.assertTrue(wfe.getErrorMessage().startsWith("Received error from VnfAdapter"));
- }
- logEnd();
- }
-
- @Test
- @Deployment(resources = {
- "subprocess/DoDeleteVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/DeleteAAIVfModule.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn"
- })
- public void TestDoDeleteVfModuleVNFCallbackFailure() {
- // delete the Base Module and Generic Vnf - VNFAdapter Callback failure
- // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
- String request =
- "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
- " <request-info>" + EOL +
- " <action>DELETE_VF_MODULE</action>" + EOL +
- " <source>PORTAL</source>" + EOL +
- " </request-info>" + EOL +
- " <vnf-inputs>" + EOL +
- " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
- " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
- " <vnf-type>asc_heat-int</vnf-type>" + EOL +
- " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
- " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
- " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
- " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
- " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
- " <orchestration-status>pending-delete</orchestration-status>" + EOL +
- " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
- " </vnf-inputs>" + EOL +
- " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
- "</vnf-request>" + EOL;
-
- logStart();
- MockDoDeleteVfModule_SDNCSuccess();
- MockDoDeleteVfModule_DeleteVNFSuccess();
- MockAAIGenericVnfSearch();
- MockAAIVfModulePUT(false);
- MockAAIDeleteGenericVnf();
- MockAAIDeleteVfModule();
- String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
- variables.put("isDebugLogEnabled","true");
- variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
- variables.put("DoDeleteVfModuleRequest",request);
- invokeSubProcess("DoDeleteVfModule", businessKey, variables);
-
- // "changedelete" operation not required for deleting a Vf Module
-// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
- injectVNFRestCallbacks(callbacks, "vnfDeleteFail");
- waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
-// injectSDNCCallbacks(callbacks, "sdncDelete");
-
- waitForProcessEnd(businessKey, 10000);
- WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
- Assert.assertNotNull(wfe);
- if (wfe != null) {
- System.out.println("TestDoDeleteVfModuleVNFCallbackFailure: ErrorCode=" + wfe.getErrorCode() +
- ", ErrorMessage=" + wfe.getErrorMessage());
- Assert.assertTrue(wfe.getErrorCode() == 7020);
- Assert.assertTrue(wfe.getErrorMessage().startsWith("Received vfModuleException from VnfAdapter"));
- }
- logEnd();
- }
-
- // start of mocks used locally and by other VF Module unit tests
- public static void MockAAIVfModulePUT(boolean isCreate){
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
- .withRequestBody(containing("MMSC"))
- .willReturn(aResponse()
- .withStatus(isCreate ? 201 : 200)));
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
- .withRequestBody(containing("PCRF"))
- .willReturn(aResponse()
- .withStatus(500)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("aaiFault.xml")));
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
- .willReturn(aResponse()
- .withStatus(200)));
- }
-
- public static void MockDoDeleteVfModule_SDNCSuccess() {
- stubFor(post(urlEqualTo("/SDNCAdapter"))
- .withRequestBody(containing("SvcAction>changedelete"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
- stubFor(post(urlEqualTo("/SDNCAdapter"))
- .withRequestBody(containing("SvcAction>delete"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
- }
-
- public static void MockDoDeleteVfModule_SDNCFailure() {
- stubFor(post(urlEqualTo("/SDNCAdapter"))
- .withRequestBody(containing("SvcAction>changedelete"))
- .willReturn(aResponse()
- .withStatus(500)));
- stubFor(post(urlEqualTo("/SDNCAdapter"))
- .withRequestBody(containing("SvcAction>delete"))
- .willReturn(aResponse()
- .withStatus(500)));
- }
-
- public static void MockDoDeleteVfModule_DeleteVNFSuccess() {
- stubFor(delete(urlMatching("/vnfs/v1/vnfs/.*/vf-modules/.*"))
- .willReturn(aResponse()
- .withStatus(202)
- .withHeader("Content-Type", "application/xml")));
- stubFor(delete(urlMatching("/vnfs/v1/volume-groups/78987"))
- .willReturn(aResponse()
- .withStatus(202)
- .withHeader("Content-Type", "application/xml")));
- }
-
- public static void MockDoDeleteVfModule_DeleteVNFFailure() {
- stubFor(delete(urlMatching("/vnfs/v1/vnfs/.*/vf-modules/.*"))
- .willReturn(aResponse()
- .withStatus(500)
- .withHeader("Content-Type", "application/xml")));
- }
-}
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIDeleteGenericVnf;
+import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIDeleteVfModule;
+import static org.openecomp.mso.bpmn.common.DeleteAAIVfModuleTest.MockAAIGenericVnfSearch;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * Unit test for DoDeleteVfModule.bpmn.
+ */
+public class DoDeleteVfModuleTest extends WorkflowTest {
+ private final CallbackSet callbacks = new CallbackSet();
+
+ private static final String EOL = "\n";
+
+ private final String vnfAdapterDeleteCallback =
+ "<deleteVfModuleResponse>" + EOL +
+ " <vnfId>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnfId>" + EOL +
+ " <vfModuleId>973ed047-d251-4fb9-bf1a-65b8949e0a73</vfModuleId>" + EOL +
+ " <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</deleteVfModuleResponse>" + EOL;
+
+ private final String vnfAdapterDeleteCallbackFail =
+ "<vfModuleException>" + EOL +
+ " <message>Error processing request to VNF-Async. Not Found.</message>" + EOL +
+ " <category>INTERNAL</category>" + EOL +
+ " <rolledBack>false</rolledBack>" + EOL +
+ " <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+ "</vfModuleException>" + EOL;
+
+ private final String sdncAdapterDeleteCallback =
+ "<output xmlns=\"org:openecomp:sdnctl:l3api\">" + EOL +
+ " <svc-request-id>{{REQUEST-ID}}</svc-request-id>" + EOL +
+ " <ack-final-indicator>Y</ack-final-indicator>" + EOL +
+ "</output>" + EOL;
+
+ public DoDeleteVfModuleTest() throws IOException {
+ callbacks.put("sdncChangeDelete", sdncAdapterDeleteCallback);
+ callbacks.put("sdncDelete", sdncAdapterDeleteCallback);
+ callbacks.put("vnfDelete", vnfAdapterDeleteCallback);
+ callbacks.put("vnfDeleteFail", vnfAdapterDeleteCallbackFail);
+ }
+
+ private final String wfeString = "WorkflowException";
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleSuccess() {
+ // delete the Base Module and Generic Vnf
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest",request);
+ variables.put("isVidRequest", "true");
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ checkVariable(businessKey, wfeString, null);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleSuccess: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ }
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModule_Building_Block_Success() {
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("requestId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("vfModuleId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+ variables.put("serviceInstanceId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("vfModuleName", "STMTN5MMSC21-MMSC::module-0-0");
+ variables.put("sdncVersion", "1610");
+ variables.put("isVidRequest", "true");
+ String vfModuleModelInfo = "{" + "\"modelType\": \"vnf\"," +
+ "\"modelInvariantId\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
+ "\"modelNameVersionId\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
+ "\"modelName\": \"vSAMP12\"," +
+ "\"modelVersion\": \"1.0\"," +
+ "\"modelCustomizationId\": \"MODEL-ID-1234\"," +
+ "}";
+ variables.put("vfModuleModelInfo", vfModuleModelInfo);
+
+ String cloudConfiguration = "{" +
+ "\"lcpCloudRegionId\": \"RDM2WAGPLCP\"," +
+ "\"tenantId\": \"fba1bd1e195a404cacb9ce17a9b2b421\"" + "}";
+ variables.put("cloudConfiguration", cloudConfiguration);
+
+
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ checkVariable(businessKey, wfeString, null);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModule_Building_Block_Success: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ }
+ logEnd();
+ }
+
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleSDNCFailure() {
+ // delete the Base Module and Generic Vnf - SDNCAdapter failure
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ logStart();
+ MockDoDeleteVfModule_SDNCFailure();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest", request);
+ variables.put("isVidRequest", "true");
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ // cause a failure by not injecting a callback
+// injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ Assert.assertNotNull(wfe);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleSDNCFailure: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ Assert.assertTrue(wfe.getErrorCode() == 7000);
+ Assert.assertTrue(wfe.getErrorMessage().startsWith("Could not communicate"));
+ }
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleSDNCCallbackFailure() {
+ // delete the Base Module and Generic Vnf - SDNCAdapter Callback failure
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest",request);
+ variables.put("isVidRequest", "true");
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete:ERR");
+ injectVNFRestCallbacks(callbacks, "vnfDelete");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+ // return a failure in the callback
+ injectSDNCCallbacks(callbacks, "sdncDelete:ERR");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ Assert.assertNotNull(wfe);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleSDNCCallbackFailure: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ Assert.assertTrue(wfe.getErrorCode() == 5310);
+ Assert.assertTrue(wfe.getErrorMessage().startsWith("Received error from SDN-C"));
+ }
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleVNFFailure() {
+ // delete the Base Module and Generic Vnf - VNFAdapter failure
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFFailure();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest",request);
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ // cause a failure by not injecting a callback
+// injectVNFRestCallbacks(callbacks, "vnfDelete");
+// waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+// injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ Assert.assertNotNull(wfe);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleVNFFailure: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ Assert.assertTrue(wfe.getErrorCode() == 7020);
+ Assert.assertTrue(wfe.getErrorMessage().startsWith("Received error from VnfAdapter"));
+ }
+ logEnd();
+ }
+
+ @Test
+ @Deployment(resources = {
+ "subprocess/DoDeleteVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/DeleteAAIVfModule.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn"
+ })
+ public void TestDoDeleteVfModuleVNFCallbackFailure() {
+ // delete the Base Module and Generic Vnf - VNFAdapter Callback failure
+ // vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+ String request =
+ "<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+ " <request-info>" + EOL +
+ " <action>DELETE_VF_MODULE</action>" + EOL +
+ " <source>PORTAL</source>" + EOL +
+ " </request-info>" + EOL +
+ " <vnf-inputs>" + EOL +
+ " <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+ " <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+ " <vnf-type>asc_heat-int</vnf-type>" + EOL +
+ " <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+ " <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+ " <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+ " <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+ " <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+ " <orchestration-status>pending-delete</orchestration-status>" + EOL +
+ " <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+ " </vnf-inputs>" + EOL +
+ " <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+ "</vnf-request>" + EOL;
+
+ logStart();
+ MockDoDeleteVfModule_SDNCSuccess();
+ MockDoDeleteVfModule_DeleteVNFSuccess();
+ MockAAIGenericVnfSearch();
+ MockAAIVfModulePUT(false);
+ MockAAIDeleteGenericVnf();
+ MockAAIDeleteVfModule();
+ MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("isDebugLogEnabled","true");
+ variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+ variables.put("DoDeleteVfModuleRequest",request);
+ invokeSubProcess("DoDeleteVfModule", businessKey, variables);
+
+ // "changedelete" operation not required for deleting a Vf Module
+// injectSDNCCallbacks(callbacks, "sdncChangeDelete");
+ injectVNFRestCallbacks(callbacks, "vnfDeleteFail");
+ waitForRunningProcessCount("vnfAdapterDeleteV1", 0, 120000);
+// injectSDNCCallbacks(callbacks, "sdncDelete");
+
+ waitForProcessEnd(businessKey, 10000);
+ WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, wfeString);
+ Assert.assertNotNull(wfe);
+ if (wfe != null) {
+ System.out.println("TestDoDeleteVfModuleVNFCallbackFailure: ErrorCode=" + wfe.getErrorCode() +
+ ", ErrorMessage=" + wfe.getErrorMessage());
+ Assert.assertTrue(wfe.getErrorCode() == 7020);
+ Assert.assertTrue(wfe.getErrorMessage().startsWith("Received vfModuleException from VnfAdapter"));
+ }
+ logEnd();
+ }
+
+ // start of mocks used locally and by other VF Module unit tests
+ public static void MockAAIVfModulePUT(boolean isCreate){
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("MMSC"))
+ .willReturn(aResponse()
+ .withStatus(isCreate ? 201 : 200)));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ .withRequestBody(containing("PCRF"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("aaiFault.xml")));
+ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+ }
+
+ public static void MockDoDeleteVfModule_SDNCSuccess() {
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>changedelete"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>delete"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("DeleteGenericVNFV1/sdncAdapterResponse.xml")));
+ }
+
+ public static void MockDoDeleteVfModule_SDNCFailure() {
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>changedelete"))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ stubFor(post(urlEqualTo("/SDNCAdapter"))
+ .withRequestBody(containing("SvcAction>delete"))
+ .willReturn(aResponse()
+ .withStatus(500)));
+ }
+
+ public static void MockDoDeleteVfModule_DeleteVNFSuccess() {
+ stubFor(delete(urlMatching("/vnfs/v1/vnfs/.*/vf-modules/.*"))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/xml")));
+ stubFor(delete(urlMatching("/vnfs/v1/volume-groups/78987"))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/xml")));
+ }
+
+ public static void MockDoDeleteVfModule_DeleteVNFFailure() {
+ stubFor(delete(urlMatching("/vnfs/v1/vnfs/.*/vf-modules/.*"))
+ .willReturn(aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "application/xml")));
+ }
+}
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java
index e202b03..bba6f62 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java
@@ -1,115 +1,116 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure;
-
-
-
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVfModuleIdNoResponse;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
-import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
-import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPut;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.camunda.bpm.engine.test.Deployment;
-import org.junit.Assert;
-import org.junit.Test;
-import org.openecomp.mso.bpmn.common.WorkflowTest;
-import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
-import org.openecomp.mso.bpmn.mock.FileUtil;
-
-/**
- * Unit tests for DoUpdateVfModule.bpmn.
- */
-public class DoUpdateVfModuleTest extends WorkflowTest {
-
- private final CallbackSet callbacks = new CallbackSet();
-
- public DoUpdateVfModuleTest() throws IOException {
- callbacks.put("changeassign", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyChangeAssignCallback.xml"));
- callbacks.put("query", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
- callbacks.put("activate", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
- callbacks.put("vnfUpdate", FileUtil.readResourceFile(
- "__files/VfModularity/VNFAdapterRestUpdateCallback.xml"));
- }
-
- /**
- * Test the happy path through the flow.
- */
- @Test
-
- @Deployment(resources = {
- "subprocess/DoUpdateVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/ConfirmVolumeGroupTenant.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn"
- })
- public void happyPath() throws IOException {
-
- logStart();
-
- String doUpdateVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/DoUpdateVfModuleRequest.xml");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockGetVfModuleIdNoResponse("skask", "PCRF", "supercool");
- MockPutVfModuleIdNoResponse("skask", "PCRF", "supercool");
- MockGetVolumeGroupById("MDTWNJ21", "78987", "VfModularity/VolumeGroup.xml");
- mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockSDNCAdapter("/SDNCAdapter", "SvcInstanceId><", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockVNFPut("skask", "/supercool", 202);
- MockPutGenericVnf("skask");
- MockGetGenericVnfByIdWithPriority("skask", "supercool", 200, "VfModularity/VfModule-supercool.xml", 1);
-
- String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
- variables.put("mso-request-id", "DEV-VF-0011");
- variables.put("isDebugLogEnabled","true");
- variables.put("DoUpdateVfModuleRequest", doUpdateVfModuleRequest);
- invokeSubProcess("DoUpdateVfModule", businessKey, variables);
-
- injectSDNCCallbacks(callbacks, "changeassign, query");
- injectVNFRestCallbacks(callbacks, "vnfUpdate");
- injectSDNCCallbacks(callbacks, "activate");
-
- waitForProcessEnd(businessKey, 10000);
-
- Assert.assertTrue(isProcessEnded(businessKey));
- checkVariable(businessKey, "DoUpdateVfModuleSuccessIndicator", true);
-
- String heatStackId = (String) getVariableFromHistory(businessKey, "DOUPVfMod_heatStackId");
- System.out.println("Heat stack Id from AAI: " + heatStackId);
-
- logEnd();
- }
-}
-
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPut;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.WorkflowTest.CallbackSet;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit tests for DoUpdateVfModule.bpmn.
+ */
+public class DoUpdateVfModuleTest extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public DoUpdateVfModuleTest() throws IOException {
+ callbacks.put("changeassign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyChangeAssignCallback.xml"));
+ callbacks.put("query", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ callbacks.put("vnfUpdate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestUpdateCallback.xml"));
+ }
+
+ /**
+ * Test the happy path through the flow.
+ */
+ @Test
+ @Ignore
+ @Deployment(resources = {
+ "subprocess/DoUpdateVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn"
+ })
+ public void happyPath() throws IOException {
+
+ logStart();
+
+ String doUpdateVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/DoUpdateVfModuleRequest.xml");
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetVfModuleIdNoResponse("skask", "PCRF", "supercool");
+ MockPutVfModuleIdNoResponse("skask", "PCRF", "supercool");
+ MockGetVolumeGroupById("MDTWNJ21", "78987", "VfModularity/VolumeGroup.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcInstanceId><", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockVNFPut("skask", "/supercool", 202);
+ MockPutGenericVnf("skask");
+ MockGetGenericVnfByIdWithPriority("skask", "supercool", 200, "VfModularity/VfModule-supercool.xml", 1);
+
+ String businessKey = UUID.randomUUID().toString();
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("mso-request-id", "DEV-VF-0011");
+ variables.put("isDebugLogEnabled","true");
+ variables.put("DoUpdateVfModuleRequest", doUpdateVfModuleRequest);
+ invokeSubProcess("DoUpdateVfModule", businessKey, variables);
+
+ injectSDNCCallbacks(callbacks, "changeassign, query");
+ injectVNFRestCallbacks(callbacks, "vnfUpdate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ waitForProcessEnd(businessKey, 10000);
+
+ Assert.assertTrue(isProcessEnded(businessKey));
+ checkVariable(businessKey, "DoUpdateVfModuleSuccessIndicator", true);
+
+ String heatStackId = (String) getVariableFromHistory(businessKey, "DOUPVfMod_heatStackId");
+ System.out.println("Heat stack Id from AAI: " + heatStackId);
+
+ logEnd();
+ }
+}
+
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java
index cadca4c..cbf91bf 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java
@@ -1,144 +1,145 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure;
-
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
-import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
-import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
-import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
-import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPut;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.camunda.bpm.engine.test.Deployment;
-import org.junit.Test;
-import org.openecomp.mso.bpmn.common.WorkflowTest;
-import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
-import org.openecomp.mso.bpmn.mock.FileUtil;
-
-/**
- * Unit test cases for UpdateVfModule.bpmn
- */
-public class UpdateVfModuleInfraTest extends WorkflowTest {
-
- private final CallbackSet callbacks = new CallbackSet();
-
- public UpdateVfModuleInfraTest() throws IOException {
- callbacks.put("changeassign", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyChangeAssignCallback.xml"));
- callbacks.put("query", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
- callbacks.put("activate", FileUtil.readResourceFile(
- "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
- callbacks.put("vnfUpdate", FileUtil.readResourceFile(
- "__files/VfModularity/VNFAdapterRestUpdateCallback.xml"));
- }
-
- /**
- * Sunny day scenario.
- *
- * @throws Exception
- */
- @Test
-
- @Deployment(resources = {
- "process/UpdateVfModuleInfra.bpmn",
- "subprocess/DoUpdateVfModule.bpmn",
- "subprocess/PrepareUpdateAAIVfModule.bpmn",
- "subprocess/ConfirmVolumeGroupTenant.bpmn",
- "subprocess/SDNCAdapterV1.bpmn",
- "subprocess/VnfAdapterRestV1.bpmn",
- "subprocess/UpdateAAIGenericVnf.bpmn",
- "subprocess/UpdateAAIVfModule.bpmn",
- "subprocess/CompleteMsoProcess.bpmn",
- "subprocess/FalloutHandler.bpmn"
- })
- public void sunnyDay() throws Exception {
-
- logStart();
-
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockPutVfModuleIdNoResponse("skask", "PCRF", "supercool");
- MockGetGenericVnfByIdWithPriority("skask", "supercool", 200, "VfModularity/VfModule-supercool.xml", 1);
- mockSDNCAdapter("/SDNCAdapter", "SvcInstanceId><", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
- mockVNFPut("skask", "/supercool", 202);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
-
- String businessKey = UUID.randomUUID().toString();
- String updaetVfModuleRequest =
- FileUtil.readResourceFile("__files/InfrastructureFlows/UpdateVfModule_VID_request.json");
-
- Map<String, Object> variables = setupVariablesSunnyDayVID();
-
-
- TestAsyncResponse asyncResponse = invokeAsyncProcess("UpdateVfModuleInfra",
- "v1", businessKey, updaetVfModuleRequest, variables);
-
- WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
-
- String responseBody = response.getResponse();
- System.out.println("Workflow (Synch) Response:\n" + responseBody);
-
- injectSDNCCallbacks(callbacks, "changeassign, query");
- injectVNFRestCallbacks(callbacks, "vnfUpdate");
- injectSDNCCallbacks(callbacks, "activate");
-
- // TODO add appropriate assertions
-
- waitForProcessEnd(businessKey, 10000);
- checkVariable(businessKey, "UpdateVfModuleInfraSuccessIndicator", true);
-
- logEnd();
- }
-
- // Active Scenario
- private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
- //try {
- // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
- //}
- //catch (Exception e) {
-
- //}
- //variables.put("mso-request-id", "testRequestId");
- variables.put("requestId", "testRequestId");
- variables.put("isBaseVfModule", false);
- variables.put("isDebugLogEnabled", "true");
- variables.put("recipeTimeout", "0");
- variables.put("requestAction", "UPDATE_VF_MODULE");
- variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
- variables.put("vnfId", "skask");
- variables.put("vnfType", "vSAMP12");
- variables.put("vfModuleId", "supercool");
- variables.put("volumeGroupId", "");
- variables.put("serviceType", "MOG");
- variables.put("vfModuleType", "");
- return variables;
-
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.infrastructure;
+
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.openecomp.mso.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.openecomp.mso.bpmn.mock.StubResponseVNFAdapter.mockVNFPut;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openecomp.mso.bpmn.common.WorkflowTest;
+import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse;
+import org.openecomp.mso.bpmn.mock.FileUtil;
+
+/**
+ * Unit test cases for UpdateVfModule.bpmn
+ */
+public class UpdateVfModuleInfraTest extends WorkflowTest {
+
+ private final CallbackSet callbacks = new CallbackSet();
+
+ public UpdateVfModuleInfraTest() throws IOException {
+ callbacks.put("changeassign", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyChangeAssignCallback.xml"));
+ callbacks.put("query", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyQueryCallback.xml"));
+ callbacks.put("activate", FileUtil.readResourceFile(
+ "__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+ callbacks.put("vnfUpdate", FileUtil.readResourceFile(
+ "__files/VfModularity/VNFAdapterRestUpdateCallback.xml"));
+ }
+
+ /**
+ * Sunny day scenario.
+ *
+ * @throws Exception
+ */
+ @Test
+ @Ignore
+ @Deployment(resources = {
+ "process/UpdateVfModuleInfra.bpmn",
+ "subprocess/DoUpdateVfModule.bpmn",
+ "subprocess/PrepareUpdateAAIVfModule.bpmn",
+ "subprocess/ConfirmVolumeGroupTenant.bpmn",
+ "subprocess/SDNCAdapterV1.bpmn",
+ "subprocess/VnfAdapterRestV1.bpmn",
+ "subprocess/UpdateAAIGenericVnf.bpmn",
+ "subprocess/UpdateAAIVfModule.bpmn",
+ "subprocess/CompleteMsoProcess.bpmn",
+ "subprocess/FalloutHandler.bpmn"
+ })
+ public void sunnyDay() throws Exception {
+
+ logStart();
+
+ MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutVfModuleIdNoResponse("skask", "PCRF", "supercool");
+ MockGetGenericVnfByIdWithPriority("skask", "supercool", 200, "VfModularity/VfModule-supercool.xml", 1);
+ mockSDNCAdapter("/SDNCAdapter", "SvcInstanceId><", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "vnf-type>STMTN", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockSDNCAdapter("/SDNCAdapter", "SvcAction>query", 200, "VfModularity/StandardSDNCSynchResponse.xml");
+ mockVNFPut("skask", "/supercool", 202);
+ mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+ String businessKey = UUID.randomUUID().toString();
+ String updaetVfModuleRequest =
+ FileUtil.readResourceFile("__files/InfrastructureFlows/UpdateVfModule_VID_request.json");
+
+ Map<String, Object> variables = setupVariablesSunnyDayVID();
+
+
+ TestAsyncResponse asyncResponse = invokeAsyncProcess("UpdateVfModuleInfra",
+ "v1", businessKey, updaetVfModuleRequest, variables);
+
+ WorkflowResponse response = receiveResponse(businessKey, asyncResponse, 10000);
+
+ String responseBody = response.getResponse();
+ System.out.println("Workflow (Synch) Response:\n" + responseBody);
+
+ injectSDNCCallbacks(callbacks, "changeassign, query");
+ injectVNFRestCallbacks(callbacks, "vnfUpdate");
+ injectSDNCCallbacks(callbacks, "activate");
+
+ // TODO add appropriate assertions
+
+ waitForProcessEnd(businessKey, 10000);
+ checkVariable(businessKey, "UpdateVfModuleInfraSuccessIndicator", true);
+
+ logEnd();
+ }
+
+ // Active Scenario
+ private Map<String, Object> setupVariablesSunnyDayVID() {
+ Map<String, Object> variables = new HashMap<String, Object>();
+ //try {
+ // variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
+ //}
+ //catch (Exception e) {
+
+ //}
+ //variables.put("mso-request-id", "testRequestId");
+ variables.put("requestId", "testRequestId");
+ variables.put("isBaseVfModule", false);
+ variables.put("isDebugLogEnabled", "true");
+ variables.put("recipeTimeout", "0");
+ variables.put("requestAction", "UPDATE_VF_MODULE");
+ variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
+ variables.put("vnfId", "skask");
+ variables.put("vnfType", "vSAMP12");
+ variables.put("vfModuleId", "supercool");
+ variables.put("volumeGroupId", "");
+ variables.put("serviceType", "MOG");
+ variables.put("vfModuleType", "");
+ return variables;
+
+ }
+
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml
index 90c668c..40eca5a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml
@@ -1,20 +1,20 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
- <cloud-owner>att-aic</cloud-owner>
- <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
- <cloud-region-version>2.5</cloud-region-version>
- <complex-name>RDM2WAGPLCP</complex-name>
- </l3-network>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml
index 9b651f2..1bf6df0 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml
@@ -1,20 +1,20 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
- <cloud-owner>att-aic</cloud-owner>
- <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
- <cloud-region-version>3.0</cloud-region-version>
- <complex-name>RDM2WAGPLCP</complex-name>
- </l3-network>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>3.0</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml
index ca5145c..09f01fb 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml
@@ -1,4 +1,4 @@
-<result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>https://aai-conexus-e2e.test.com:8443/aai/v8/business/customers/customer/8310000058863/service-subscriptions/service-subscription/vMOG/service-instances/service-instance/f70e927b-6087-4974-9ef8-c5e4d5847ca4</resource-link>
+<result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-conexus-e2e.test.com:8443/aai/v8/business/customers/customer/8310000058863/service-subscriptions/service-subscription/vMOG/service-instances/service-instance/f70e927b-6087-4974-9ef8-c5e4d5847ca4</resource-link>
</result-data> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml
index d6f7737..b2d9ce2 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml
@@ -1,62 +1,62 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4_3</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>pending-create</orchestration-status>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-create</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <relationship-list/>
- </subnet>
- </subnets>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </l3-network>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4_3</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml
index 03b3781..4dfd8d3 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml
@@ -1,74 +1,74 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_2</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>active</orchestration-status>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>active</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <subnet-name>subnetName</subnet-name>
- <relationship-list/>
- </subnet>
- </subnets>
- <segmentation-assignments>
- <segmentation-id>413</segmentation-id>
- <resource-version>4132176</resource-version>
- </segmentation-assignments>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </l3-network>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>active</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml
index 4eadb10..77e3a64 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml
@@ -1,62 +1,62 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>pending-create</orchestration-status>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-create</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <relationship-list/>
- </subnet>
- </subnets>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </l3-network>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
index e06d27e..fb8c365 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
@@ -1,73 +1,73 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>pending-create</orchestration-status>
- <physical-network-name>networkName</physical-network-name>
- <is-provider-network>false</is-provider-network>
- <is-shared-network>true</is-shared-network>
- <is-external-network>false</is-external-network>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-create</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <subnet-name>subnetName</subnet-name>
- <relationship-list/>
- </subnet>
- </subnets>
- <segmentation-assignments>
- <segmentation-id>413</segmentation-id>
- <resource-version>4132176</resource-version>
- </segmentation-assignments>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>network-policy</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
- <relationship-data>
- <relationship-key>network-policy.network-policy-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
-</l3-network>
+<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml
index 599c34f..59deca9 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml
@@ -1,95 +1,95 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
- <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
- <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
- <network-type>CONTRAIL_EXTERNAL</network-type>
- <network-role>dmz_direct</network-role>
- <network-technology>contrail</network-technology>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <network-role-instance>0</network-role-instance>
- <orchestration-status>pending-create</orchestration-status>
- <physical-network-name>networkName</physical-network-name>
- <is-provider-network>false</is-provider-network>
- <is-shared-network>true</is-shared-network>
- <is-external-network>false</is-external-network>
- <subnets>
- <subnet>
- <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
- <gateway-address>107.239.52.1</gateway-address>
- <network-start-address>107.239.52.0</network-start-address>
- <cidr-mask>24</cidr-mask>
- <ip-version>4</ip-version>
- <orchestration-status>pending-create</orchestration-status>
- <dhcp-enabled>true</dhcp-enabled>
- <subnet-name>subnetName</subnet-name>
- <relationship-list/>
- </subnet>
- </subnets>
- <segmentation-assignments>
- <segmentation-id>413</segmentation-id>
- <resource-version>4132176</resource-version>
- </segmentation-assignments>
- <relationship-list>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vpn-binding</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
- <relationship-data>
- <relationship-key>vpn-binding.vpn-id</relationship-key>
- <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>network-policy</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
- <relationship-data>
- <relationship-key>network-policy.network-policy-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>route-table-reference</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
- <relationship-data>
- <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
- <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </l3-network>
- </rest:payload>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml
index 686ac16..02a280d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml
@@ -1,21 +1,21 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID"
- value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
- <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
- <network-policy-fqdn>GN_EVPN_Test</network-policy-fqdn>
- <heat-stack-id>13979:105757</heat-stack-id>
- <resource-version>13979:105757</resource-version>
- </network-policy>
- </rest:payload>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>GN_EVPN_Test</network-policy-fqdn>
+ <heat-stack-id>13979:105757</heat-stack-id>
+ <resource-version>13979:105757</resource-version>
+ </network-policy>
+ </rest:payload>
</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
index b01e469..52e9692 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
@@ -1,20 +1,20 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID"
- value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
- <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
- <route-table-reference-fqdn>refFQDN1</route-table-reference-fqdn>
- <resource-version>12345</resource-version>
- </route-table-references>
- </rest:payload>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN1</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
index a19f941..ddae6b1 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
@@ -1,20 +1,20 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID"
- value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
- <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
- <route-table-reference-fqdn>refFQDN2</route-table-reference-fqdn>
- <resource-version>12345</resource-version>
- </route-table-references>
- </rest:payload>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN2</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml
index c35faef..19aac50 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml
@@ -1,46 +1,46 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Transfer-Encoding" value="chunked"/>
- <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID"
- value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
- <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
- <vpn-name>GN_EVPN_Test</vpn-name>
- <global-route-target>13979:105757</global-route-target>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </vpn-binding>
- </rest:payload>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="mtcnjv9aaas01.mtcnj.aic.cip.com-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml
index aea1a46..4c18356 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml
@@ -1,38 +1,38 @@
-<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
- <vnf-id>TEST-VNF-ID-0123</vnf-id>
- <vnf-name>STMTN5MMSC20</vnf-name>
- <vnf-type>pcrf-capacity</vnf-type>
- <service-id>SDN-MOBILITY</service-id>
- <equipment-role>vPCRF</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <in-maint>false</in-maint>
- <is-closed-loop-disabled>false</is-closed-loop-disabled>
- <persona-model-id>introvert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <resource-version>0000020</resource-version>
- <vf-modules>
- <vf-module>
- <vf-module-id>lukewarm</vf-module-id>
- <vf-module-name>PCRF::module-0-0</vf-module-name>
- <persona-model-id>introvert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <is-base-vf-module>true</is-base-vf-module>
- <heat-stack-id>fastburn</heat-stack-id>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>0000074</resource-version>
- </vf-module>
- <vf-module>
- <vf-module-id>supercool</vf-module-id>
- <vf-module-name>PCRF::module-1-0</vf-module-name>
- <persona-model-id>extrovert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <is-base-vf-module>false</is-base-vf-module>
- <heat-stack-id>slowburn</heat-stack-id>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>0000075</resource-version>
- </vf-module>
- </vf-modules>
- <relationship-list/>
- <l-interfaces/>
- <lag-interfaces/>
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
+ <vnf-id>TEST-VNF-ID-0123</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <persona-model-id>extrovert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
</generic-vnf> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
index 02b43ff..bff26fa 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
@@ -1,49 +1,49 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
- <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
- <rest:header name="Content-Length" value="968"/>
- <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
- <rest:header name="X-CSI-UniqueTransactionId"
- value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
- <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
- <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
- <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
- <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
- <rest:header name="Cache-Control" value="no-cache,no-store"/>
- <rest:header name="X-FromAppId" value="MSO"/>
- <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
- <rest:header name="X-CSI-ConversationId"
- value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
- <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
- <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
- <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Accept" value="application/xml"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
- <volume-group-id>simpleCinderVolume_201604071</volume-group-id>
- <volume-group-name>simpleCinderVolume_201604071</volume-group-name>
- <heat-stack-id>simpleCinderVolume_201604071</heat-stack-id>
- <vnf-type>simple_cinder_master</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <resource-version>1460134360</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>MSOTest1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
- </volume-group>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>simpleCinderVolume_201604071</volume-group-id>
+ <volume-group-name>simpleCinderVolume_201604071</volume-group-name>
+ <heat-stack-id>simpleCinderVolume_201604071</heat-stack-id>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml
index 96e906f..152bafc 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<volume-group xmlns="http://org.openecomp.aai.inventory/v7">
- <volume-group-id>94f0f72f-4be1-49ed-8410-702396797163</volume-group-id>
- <volume-group-name>MSOTESTVOL103H-vSAMP12_base_vol_module-0</volume-group-name>
- <heat-stack-id/>
- <vnf-type>Test/vSAMP12</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <resource-version>1469203133</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/e444c311b27a45dc9522f2370d70f90f/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>e444c311b27a45dc9522f2370d70f90f</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>mtn6</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>MSOCustomer1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
-</volume-group>
+<?xml version="1.0" encoding="UTF-8"?>
+<volume-group xmlns="http://org.openecomp.aai.inventory/v7">
+ <volume-group-id>94f0f72f-4be1-49ed-8410-702396797163</volume-group-id>
+ <volume-group-name>MSOTESTVOL103H-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1469203133</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/e444c311b27a45dc9522f2370d70f90f/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e444c311b27a45dc9522f2370d70f90f</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOCustomer1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</volume-group>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
index 5e8913f..cb20a41 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
@@ -1,49 +1,49 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
- <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
- <rest:header name="Content-Length" value="968"/>
- <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
- <rest:header name="X-CSI-UniqueTransactionId"
- value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
- <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
- <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
- <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
- <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
- <rest:header name="Cache-Control" value="no-cache,no-store"/>
- <rest:header name="X-FromAppId" value="MSO"/>
- <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
- <rest:header name="X-CSI-ConversationId"
- value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
- <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
- <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
- <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Accept" value="application/xml"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
- <volume-group-id>8424bb3c-c3e7-4553-9662-469649ed9379</volume-group-id>
- <volume-group-name>MSOTESTVOL103W-vSAMP12_base_vol_module-0</volume-group-name>
- <heat-stack-id/>
- <vnf-type>simple_cinder_master</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <resource-version>1460134360</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>MSOTest1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
- </volume-group>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>8424bb3c-c3e7-4553-9662-469649ed9379</volume-group-id>
+ <volume-group-name>MSOTESTVOL103W-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml
index 416689e..55fdedb 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml
@@ -1,6 +1,6 @@
- <search-results xmlns="http://org.openecomp.aai.inventory">
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
+ <search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
+ </result-data>
</search-results> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
index 8056f05..4b3ac85 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
@@ -1,7 +1,7 @@
-<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
- <sdncadapterworkflow:response-data>
- <tag0:RequestData xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
- &lt;output xmlns="org:openecomp:sdnctl:vnf"&gt;&lt;svc-request-id&gt;1660b8da-0a94-442d-8ed5-ea079e3c67c8&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;vnf-information&gt;&lt;vnf-id&gt;8925b50d-de67-44c1-b984-e7ce7b0f4dae&lt;/vnf-id&gt;&lt;/vnf-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;8925b50d-de67-44c1-b984-e7ce7b0f4dae&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;
- </tag0:RequestData>
- </sdncadapterworkflow:response-data>
+<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xmlns:tag0="http://org.openecomp/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
+ &lt;output xmlns="org:openecomp:sdnctl:vnf"&gt;&lt;svc-request-id&gt;1660b8da-0a94-442d-8ed5-ea079e3c67c8&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;vnf-information&gt;&lt;vnf-id&gt;8925b50d-de67-44c1-b984-e7ce7b0f4dae&lt;/vnf-id&gt;&lt;/vnf-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;8925b50d-de67-44c1-b984-e7ce7b0f4dae&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
</sdncadapterworkflow:SDNCAdapterWorkflowResponse> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
index fd10548..c02c35f 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
@@ -1,42 +1,42 @@
-<volume-group xmlns="http://org.openecomp.aai.inventory/v8">
- <volume-group-id>78987</volume-group-id>
- <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
- <heat-stack-id/>
- <vnf-type>Test/vSAMP12</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <resource-version>0000020</resource-version>
- <relationship-list>
- <relationship>
- <related-to>generic-vnf</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/</related-link>
- <relationship-data>
- <relationship-key>generic-vnf.vnf-id</relationship-key>
- <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>generic-vnf.vnf-name</property-key>
- <property-value>MSOSTSAMP12-10601</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>mdt1</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>ECOMP_MDT1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
+<volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>MSOSTSAMP12-10601</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
</volume-group> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml
index 50e4347..5e8a62b 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml
@@ -1,26 +1,26 @@
-<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
- <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
- <vnf-name>STMTN5MMSC21</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>SDN-MOBILITY</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <in-maint>false</in-maint>
- <is-closed-loop-disabled>false</is-closed-loop-disabled>
- <resource-version>1508691</resource-version>
- <vf-modules>
- <vf-module>
- <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
- <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
- <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
- <persona-model-version>1.0</persona-model-version>
- <is-base-vf-module>true</is-base-vf-module>
- <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>1508692</resource-version>
- </vf-module>
- </vf-modules>
- <relationship-list/>
- <l-interfaces/>
- <lag-interfaces/>
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
+ <vnf-name>STMTN5MMSC21</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <resource-version>1508691</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
+ <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
+ <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>1508692</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
</generic-vnf> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml
index f60260d..586e0a6 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml
@@ -1,26 +1,26 @@
-<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
- <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
- <vnf-name>STMTN5MMSC21</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>SDN-MOBILITY</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <in-maint>false</in-maint>
- <is-closed-loop-disabled>false</is-closed-loop-disabled>
- <resource-version>0000021</resource-version>
- <vf-modules>
- <vf-module>
- <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
- <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
- <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
- <persona-model-version>1.0</persona-model-version>
- <is-base-vf-module>true</is-base-vf-module>
- <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>0000073</resource-version>
- </vf-module>
- </vf-modules>
- <relationship-list/>
- <l-interfaces/>
- <lag-interfaces/>
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
+ <vnf-name>STMTN5MMSC21</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <resource-version>0000021</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
+ <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
+ <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000073</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
</generic-vnf> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml
index aea1a46..4c18356 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml
@@ -1,38 +1,38 @@
-<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
- <vnf-id>TEST-VNF-ID-0123</vnf-id>
- <vnf-name>STMTN5MMSC20</vnf-name>
- <vnf-type>pcrf-capacity</vnf-type>
- <service-id>SDN-MOBILITY</service-id>
- <equipment-role>vPCRF</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <in-maint>false</in-maint>
- <is-closed-loop-disabled>false</is-closed-loop-disabled>
- <persona-model-id>introvert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <resource-version>0000020</resource-version>
- <vf-modules>
- <vf-module>
- <vf-module-id>lukewarm</vf-module-id>
- <vf-module-name>PCRF::module-0-0</vf-module-name>
- <persona-model-id>introvert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <is-base-vf-module>true</is-base-vf-module>
- <heat-stack-id>fastburn</heat-stack-id>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>0000074</resource-version>
- </vf-module>
- <vf-module>
- <vf-module-id>supercool</vf-module-id>
- <vf-module-name>PCRF::module-1-0</vf-module-name>
- <persona-model-id>extrovert</persona-model-id>
- <persona-model-version>2.0</persona-model-version>
- <is-base-vf-module>false</is-base-vf-module>
- <heat-stack-id>slowburn</heat-stack-id>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>0000075</resource-version>
- </vf-module>
- </vf-modules>
- <relationship-list/>
- <l-interfaces/>
- <lag-interfaces/>
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
+ <vnf-id>TEST-VNF-ID-0123</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <persona-model-id>extrovert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
</generic-vnf> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
index 02b43ff..bff26fa 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
@@ -1,49 +1,49 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
- <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
- <rest:header name="Content-Length" value="968"/>
- <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
- <rest:header name="X-CSI-UniqueTransactionId"
- value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
- <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
- <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
- <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
- <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
- <rest:header name="Cache-Control" value="no-cache,no-store"/>
- <rest:header name="X-FromAppId" value="MSO"/>
- <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
- <rest:header name="X-CSI-ConversationId"
- value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
- <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
- <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
- <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Accept" value="application/xml"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
- <volume-group-id>simpleCinderVolume_201604071</volume-group-id>
- <volume-group-name>simpleCinderVolume_201604071</volume-group-name>
- <heat-stack-id>simpleCinderVolume_201604071</heat-stack-id>
- <vnf-type>simple_cinder_master</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <resource-version>1460134360</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>MSOTest1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
- </volume-group>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>simpleCinderVolume_201604071</volume-group-id>
+ <volume-group-name>simpleCinderVolume_201604071</volume-group-name>
+ <heat-stack-id>simpleCinderVolume_201604071</heat-stack-id>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
index 5e8913f..cb20a41 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
@@ -1,49 +1,49 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
- <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
- <rest:header name="Content-Length" value="968"/>
- <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
- <rest:header name="X-CSI-UniqueTransactionId"
- value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
- <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
- <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
- <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
- <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
- <rest:header name="Cache-Control" value="no-cache,no-store"/>
- <rest:header name="X-FromAppId" value="MSO"/>
- <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
- <rest:header name="X-CSI-ConversationId"
- value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
- <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
- <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
- <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
- <rest:header name="Content-Type" value="application/xml"/>
- <rest:header name="Accept" value="application/xml"/>
- </rest:headers>
- <rest:payload contentType="text/xml">
- <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
- <volume-group-id>8424bb3c-c3e7-4553-9662-469649ed9379</volume-group-id>
- <volume-group-name>MSOTESTVOL103W-vSAMP12_base_vol_module-0</volume-group-name>
- <heat-stack-id/>
- <vnf-type>simple_cinder_master</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <resource-version>1460134360</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>MSOTest1</property-value>
- </related-to-property>
- </relationship>
- </relationship-list>
- </volume-group>
- </rest:payload>
-</rest:RESTResponse>
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>8424bb3c-c3e7-4553-9662-469649ed9379</volume-group-id>
+ <volume-group-name>MSOTESTVOL103W-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
index b03e95c..244a51e 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
@@ -1,44 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<volume-group xmlns="http://org.openecomp.aai.inventory/v8">
- <volume-group-id>78987</volume-group-id>
- <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
- <heat-stack-id/>
- <vnf-type>Test/vSAMP12</vnf-type>
- <orchestration-status>Pending</orchestration-status>
- <resource-version>0000020</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>mdt1</relationship-value>
- </relationship-data>
- <related-to-property>
- <property-key>tenant.tenant-name</property-key>
- <property-value>ECOMP_MDT1</property-value>
- </related-to-property>
- </relationship>
- <relationship>
- <related-to>vf-module</related-to>
- <related-link>http://localhost:28090/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/vf-modules/vf-module/6a1dc898-b590-47b9-bbf0-34424a7a2ec3/</related-link>
- <relationship-data>
- <relationship-key>generic-vnf.vnf-id</relationship-key>
- <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>vf-module.vf-module-id</relationship-key>
- <relationship-value>6a1dc898-b590-47b9-bbf0-34424a7a2ec3</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
-</volume-group>
+<?xml version="1.0" encoding="UTF-8"?>
+<volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>http://localhost:28090/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/vf-modules/vf-module/6a1dc898-b590-47b9-bbf0-34424a7a2ec3/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>6a1dc898-b590-47b9-bbf0-34424a7a2ec3</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</volume-group>
\ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml
index aa2a85c..58b8708 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml
@@ -1,29 +1,29 @@
-<vf-module xmlns="http://org.openecomp.aai.inventory/v8">
- <vf-module-id>6a1dc898-b590-47b9-bbf0-34424a7a2ec3</vf-module-id>
- <vf-module-name>MSOST10606-vSAMP12_MTN6_base_module-0</vf-module-name>
- <heat-stack-id>MSOST10606-vSAMP12_MTN6_base_module-0/81b01583-690c-4ec3-9c58-0eafa7a90be7</heat-stack-id>
- <orchestration-status>active</orchestration-status>
- <is-base-vf-module>true</is-base-vf-module>
- <resource-version>1475077639</resource-version>
- <persona-model-id>ff5256d2-5a33-55df-13ab-12abad84e7ff</persona-model-id>
- <persona-model-version>1.0</persona-model-version>
- <relationship-list>
- <relationship>
- <related-to>volume-group</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/volume-groups/volume-group/064bd1c6-e377-4009-a744-e958eec6e727/</related-link>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>mtn6</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>volume-group.volume-group-id</relationship-key>
- <relationship-value>064bd1c6-e377-4009-a744-e958eec6e727</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
-
+<vf-module xmlns="http://org.openecomp.aai.inventory/v8">
+ <vf-module-id>6a1dc898-b590-47b9-bbf0-34424a7a2ec3</vf-module-id>
+ <vf-module-name>MSOST10606-vSAMP12_MTN6_base_module-0</vf-module-name>
+ <heat-stack-id>MSOST10606-vSAMP12_MTN6_base_module-0/81b01583-690c-4ec3-9c58-0eafa7a90be7</heat-stack-id>
+ <orchestration-status>active</orchestration-status>
+ <is-base-vf-module>true</is-base-vf-module>
+ <resource-version>1475077639</resource-version>
+ <persona-model-id>ff5256d2-5a33-55df-13ab-12abad84e7ff</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <relationship-list>
+ <relationship>
+ <related-to>volume-group</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/volume-groups/volume-group/064bd1c6-e377-4009-a744-e958eec6e727/</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>volume-group.volume-group-id</relationship-key>
+ <relationship-value>064bd1c6-e377-4009-a744-e958eec6e727</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+
</vf-module> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml
index df84706..354ebb7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VfModularity/VolumeGroup.xml
@@ -1,25 +1,25 @@
- <volume-group xmlns="http://org.openecomp.aai.inventory/v7">
- <volume-group-id>78987</volume-group-id>
- <volume-group-name>Volume_2</volume-group-name>
- <heat-stack-id>slowburn</heat-stack-id>
- <vnf-type>pcrf-capacity</vnf-type>
- <orchestration-status>Active</orchestration-status>
- <resource-version>0000020</resource-version>
- <relationship-list>
- <relationship>
- <related-to>tenant</related-to>
- <relationship-data>
- <relationship-key>cloud-region.cloud-owner</relationship-key>
- <relationship-value>att-aic</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>cloud-region.cloud-region-id</relationship-key>
- <relationship-value>MDTWNJ21</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v7">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>Volume_2</volume-group-name>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <orchestration-status>Active</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>MDTWNJ21</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
</volume-group> \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml b/bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml
index c94e32e..68db73d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/camunda.cfg.xml
@@ -1,61 +1,61 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
-
- <property name="jdbcUrl" value="jdbc:h2:mem:camunda;DB_CLOSE_DELAY=1000" />
- <property name="jdbcDriver" value="org.h2.Driver" />
- <property name="jdbcUsername" value="sa" />
- <property name="jdbcPassword" value="" />
-
- <!-- Database configurations -->
- <property name="databaseSchemaUpdate" value="true" />
-
- <!-- job executor configurations -->
- <property name="jobExecutorActivate" value="true" />
-
- <property name="history" value="full" />
-
- <property name="customPostBPMNParseListeners">
- <list>
- <bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
- </list>
- </property>
-
- <property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" />
-
- <!--<property name="idGenerator" ref="uuidGenerator" />-->
-
- <!-- engine plugins -->
- <property name="processEnginePlugins">
- <list>
- <ref bean="connectProcessEnginePlugin" />
- <ref bean="spinProcessEnginePlugin" />
- <ref bean="loggingPlugin" />
- <ref bean="workflowExceptionPlugin" />
- <ref bean="workbenchPlugin" />
- </list>
- </property>
- </bean>
-
- <bean id="workbenchPlugin" class="org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap">
- <property name="httpPort" value="28088"/>
- </bean>
-
- <bean id="loggingPlugin" class="org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin" />
-
- <!-- Needed until all subflows generate MSOWorkflowException events -->
- <bean id="workflowExceptionPlugin" class="org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin" />
-
- <bean id="foxFailedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
-
- <!--<bean id="uuidGenerator" class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" />-->
-
- <!-- engine plugin beans -->
- <bean id="connectProcessEnginePlugin" class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
- <bean id="spinProcessEnginePlugin" class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
-
-</beans>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
+
+ <property name="jdbcUrl" value="jdbc:h2:mem:camunda;DB_CLOSE_DELAY=1000" />
+ <property name="jdbcDriver" value="org.h2.Driver" />
+ <property name="jdbcUsername" value="sa" />
+ <property name="jdbcPassword" value="" />
+
+ <!-- Database configurations -->
+ <property name="databaseSchemaUpdate" value="true" />
+
+ <!-- job executor configurations -->
+ <property name="jobExecutorActivate" value="true" />
+
+ <property name="history" value="full" />
+
+ <property name="customPostBPMNParseListeners">
+ <list>
+ <bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
+ </list>
+ </property>
+
+ <property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" />
+
+ <!--<property name="idGenerator" ref="uuidGenerator" />-->
+
+ <!-- engine plugins -->
+ <property name="processEnginePlugins">
+ <list>
+ <ref bean="connectProcessEnginePlugin" />
+ <ref bean="spinProcessEnginePlugin" />
+ <ref bean="loggingPlugin" />
+ <ref bean="workflowExceptionPlugin" />
+ <ref bean="workbenchPlugin" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="workbenchPlugin" class="org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap">
+ <property name="httpPort" value="28088"/>
+ </bean>
+
+ <bean id="loggingPlugin" class="org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin" />
+
+ <!-- Needed until all subflows generate MSOWorkflowException events -->
+ <bean id="workflowExceptionPlugin" class="org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin" />
+
+ <bean id="foxFailedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
+
+ <!--<bean id="uuidGenerator" class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" />-->
+
+ <!-- engine plugin beans -->
+ <bean id="connectProcessEnginePlugin" class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
+ <bean id="spinProcessEnginePlugin" class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
+
+</beans>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties
index 4ec6617..ac340c7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties
@@ -1,85 +1,85 @@
-# Default URN Mappings for unit tests
-
-mso.rollback=true
-
-canopi.auth=757A94191D685FD2092AC1490730A4FC
-csi.aots.addincidentmanagement.endpoint=http://localhost:28090/AddIncidentManagementTicketRequest
-csi.networkstatus.endpoint=http://localhost:28090/SendManagedNetworkStatusNotification
-mso.csi.pwd=4EA237303511EFBBC37F17A351562131
-mso.csi.usrname=mso
-mso.msoKey=07a7159d3bf51a0e53be7a8f89699be7
-
-mso.adapters.completemsoprocess.endpoint=http://localhost:28090/CompleteMsoProcess
-
-mso.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter
-mso.adapters.db.auth=757A94191D685FD2092AC1490730A4FC
-
-mso.adapters.network.endpoint=http://localhost:28090/networks/NetworkAdapter
-mso.adapters.network.rest.endpoint=http://localhost:28090/networks/NetworkAdapter
-
-mso.adapters.po.auth=757A94191D685FD2092AC1490730A4FC
-mso.adapters.po.password=3141634BF7E070AA289CF2892C986C0B
-mso.po.timeout=PT60S
-
-aai.auth=757A94191D685FD2092AC1490730A4FC
-
-mso.adapters.sdnc.endpoint=http://localhost:28090/SDNCAdapter
-mso.adapters.sdnc.rest.endpoint=http://localhost:28090/SDNCAdapter/v1/sdnc
-mso.adapters.sdnc.timeout=PT60S
-mso.sdnc.firewall.yang.model=http://com/openecomp/svc/mis/firewall-lite-gui
-mso.sdnc.firewall.yang.model.version=2015-05-15
-mso.sdnc.password=3141634BF7E070AA289CF2892C986C0B
-mso.sdnc.timeout.firewall.minutes=20
-mso.sdnc.timeout=PT10S
-mso.sdnc.timeout.ucpe.async.hours=120
-mso.sdnc.timeout.ucpe.async.minutes=5
-mso.workflow.message.endpoint=http://localhost:28080/mso/WorkflowMesssage
-mso.workflow.sdncadapter.callback=http://localhost:28080/mso/SDNCAdapterCallbackService
-
-mso.catalog.db.endpoint=http://localhost:28090/
-
-mso.adapters.tenant.endpoint=http://localhost:28090/tenantAdapterMock
-mso.adapters.vnf-async.endpoint=http://localhost:28090/vnfs/VnfAdapterAsync
-mso.adapters.vnf.endpoint=http://localhost:28090/vnfs/VnfAdapter
-mso.adapters.vnf.rest.endpoint=http://localhost:28090/vnfs/v1/vnfs
-mso.workflow.vnfadapter.create.callback=http://localhost:28080/mso/vnfAdapterNotify
-mso.workflow.vnfadapter.delete.callback=http://localhost:28080/mso/vnfAdapterNotify
-mso.workflow.vnfadapter.query.callback=http://localhost:28080/mso/services/VNFAdapterQuerCallbackV1
-mso.workflow.vnfadapter.rollback.callback=http://localhost:28080/mso/vnfAdapterNotify
-mso.workflow.createvce.delay.seconds=1
-mso.infra.customer.id=testCustIdInfra
-
-aai.endpoint=http://localhost:28090
-
-# AAI version mappings
-
-# Example to override default version for a resource:
-#mso.workflow.default.aai.vce.version=6
-#mso.workflow.default.aai.v6.vce.uri=/aai/v6/network/vces/vce
-
-mso.workflow.global.default.aai.version=8
-mso.workflow.default.aai.cloud-region.version=9
-mso.workflow.default.aai.generic-vnf.version=9
-
-mso.workflow.default.aai.v9.cloud-region.uri=/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
-mso.workflow.default.aai.v8.customer.uri=/aai/v8/business/customers/customer
-mso.workflow.default.aai.v8.generic-query.uri=/aai/v8/search/generic-query
-mso.workflow.default.aai.v9.generic-vnf.uri=/aai/v9/network/generic-vnfs/generic-vnf
-mso.workflow.default.aai.v8.l3-network.uri=/aai/v8/network/l3-networks/l3-network
-mso.workflow.default.aai.v8.network-policy.uri=/aai/v8/network/network-policies/network-policy
-mso.workflow.default.aai.v8.nodes-query.uri=/aai/v8/search/nodes-query
-mso.workflow.default.aai.v8.route-table-reference.uri=/aai/v8/network/route-table-references/route-table-reference
-mso.workflow.default.aai.v8.tenant.uri=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
-mso.workflow.default.aai.v8.vce.uri=/aai/v8/network/vces/vce
-mso.workflow.default.aai.v8.vpn-binding.uri=/aai/v8/network/vpn-bindings/vpn-binding
-
-
-log.debug.CompleteMsoProcess=true
-log.debug.CreateNetworkInstanceInfra=true
-log.debug.CreateServiceInstanceInfra=true
-log.debug.DeleteNetworkInstanceInfra=true
-log.debug.FalloutHandler=true
-log.debug.GenericGetService=true
-log.debug.sdncAdapter=true
-log.debug.UpdateNetworkInstanceInfra=true
+# Default URN Mappings for unit tests
+
+mso.rollback=true
+
+canopi.auth=757A94191D685FD2092AC1490730A4FC
+csi.aots.addincidentmanagement.endpoint=http://localhost:28090/AddIncidentManagementTicketRequest
+csi.networkstatus.endpoint=http://localhost:28090/SendManagedNetworkStatusNotification
+mso.csi.pwd=4EA237303511EFBBC37F17A351562131
+mso.csi.usrname=mso
+mso.msoKey=07a7159d3bf51a0e53be7a8f89699be7
+
+mso.adapters.completemsoprocess.endpoint=http://localhost:28090/CompleteMsoProcess
+
+mso.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter
+mso.adapters.db.auth=757A94191D685FD2092AC1490730A4FC
+
+mso.adapters.network.endpoint=http://localhost:28090/networks/NetworkAdapter
+mso.adapters.network.rest.endpoint=http://localhost:28090/networks/NetworkAdapter
+
+mso.adapters.po.auth=757A94191D685FD2092AC1490730A4FC
+mso.adapters.po.password=3141634BF7E070AA289CF2892C986C0B
+mso.po.timeout=PT60S
+
+aai.auth=757A94191D685FD2092AC1490730A4FC
+
+mso.adapters.sdnc.endpoint=http://localhost:28090/SDNCAdapter
+mso.adapters.sdnc.rest.endpoint=http://localhost:28090/SDNCAdapter/v1/sdnc
+mso.adapters.sdnc.timeout=PT60S
+mso.sdnc.firewall.yang.model=http://com/openecomp/svc/mis/firewall-lite-gui
+mso.sdnc.firewall.yang.model.version=2015-05-15
+mso.sdnc.password=3141634BF7E070AA289CF2892C986C0B
+mso.sdnc.timeout.firewall.minutes=20
+mso.sdnc.timeout=PT10S
+mso.sdnc.timeout.ucpe.async.hours=120
+mso.sdnc.timeout.ucpe.async.minutes=5
+mso.workflow.message.endpoint=http://localhost:28080/mso/WorkflowMesssage
+mso.workflow.sdncadapter.callback=http://localhost:28080/mso/SDNCAdapterCallbackService
+
+mso.catalog.db.endpoint=http://localhost:28090/
+
+mso.adapters.tenant.endpoint=http://localhost:28090/tenantAdapterMock
+mso.adapters.vnf-async.endpoint=http://localhost:28090/vnfs/VnfAdapterAsync
+mso.adapters.vnf.endpoint=http://localhost:28090/vnfs/VnfAdapter
+mso.adapters.vnf.rest.endpoint=http://localhost:28090/vnfs/v1/vnfs
+mso.workflow.vnfadapter.create.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.vnfadapter.delete.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.vnfadapter.query.callback=http://localhost:28080/mso/services/VNFAdapterQuerCallbackV1
+mso.workflow.vnfadapter.rollback.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.createvce.delay.seconds=1
+mso.infra.customer.id=testCustIdInfra
+
+aai.endpoint=http://localhost:28090
+
+# AAI version mappings
+
+# Example to override default version for a resource:
+#mso.workflow.default.aai.vce.version=6
+#mso.workflow.default.aai.v6.vce.uri=/aai/v6/network/vces/vce
+
+mso.workflow.global.default.aai.version=8
+mso.workflow.default.aai.cloud-region.version=9
+mso.workflow.default.aai.generic-vnf.version=9
+
+mso.workflow.default.aai.v9.cloud-region.uri=/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+mso.workflow.default.aai.v8.customer.uri=/aai/v8/business/customers/customer
+mso.workflow.default.aai.v8.generic-query.uri=/aai/v8/search/generic-query
+mso.workflow.default.aai.v9.generic-vnf.uri=/aai/v9/network/generic-vnfs/generic-vnf
+mso.workflow.default.aai.v8.l3-network.uri=/aai/v8/network/l3-networks/l3-network
+mso.workflow.default.aai.v8.network-policy.uri=/aai/v8/network/network-policies/network-policy
+mso.workflow.default.aai.v8.nodes-query.uri=/aai/v8/search/nodes-query
+mso.workflow.default.aai.v8.route-table-reference.uri=/aai/v8/network/route-table-references/route-table-reference
+mso.workflow.default.aai.v8.tenant.uri=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+mso.workflow.default.aai.v8.vce.uri=/aai/v8/network/vces/vce
+mso.workflow.default.aai.v8.vpn-binding.uri=/aai/v8/network/vpn-bindings/vpn-binding
+mso.workflow.notification.name=GenericNotificationService
+
+log.debug.CompleteMsoProcess=true
+log.debug.CreateNetworkInstanceInfra=true
+log.debug.CreateServiceInstanceInfra=true
+log.debug.DeleteNetworkInstanceInfra=true
+log.debug.FalloutHandler=true
+log.debug.GenericGetService=true
+log.debug.sdncAdapter=true
+log.debug.UpdateNetworkInstanceInfra=true
log.debug.VnfAdapterRestV1=true \ No newline at end of file