AT&T 1712 and 1802 release code
[so.git] / bpmn / MSOInfrastructureBPMN / src / test / groovy / org / openecomp / mso / bpmn / infrastructure / scripts / DoUpdateNetworkInstanceTest.groovy
index 08088dd..e84d031 100644 (file)
@@ -12,7 +12,7 @@ import org.camunda.bpm.engine.ProcessEngineServices
 import org.camunda.bpm.engine.RepositoryService\r
 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity\r
 import org.camunda.bpm.engine.repository.ProcessDefinition\r
-import org.camunda.bpm.engine.runtime.Execution\r
+import org.camunda.bpm.engine.delegate.DelegateExecution\r
 import org.junit.Before\r
 import org.junit.Rule\r
 import org.junit.Test\r
@@ -507,6 +507,29 @@ String expectedNetworkInputsMissingNetworkId =
                <orchestration-status>pending-update</orchestration-status>\r
                <dhcp-enabled>true</dhcp-enabled>\r
                           <subnet-name>subnetName</subnet-name>\r
+                          <ip-assignment-direction>true</ip-assignment-direction>\r
+                          <host-routes>\r
+                                       <host-route>\r
+                                               <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>\r
+                                               <route-prefix>172.20.1.0/24</route-prefix>\r
+                                               <next-hop>10.102.200.1</next-hop>\r
+                                               <next-hop-type>ip-address</next-hop-type>\r
+                                               <resource-version>1505857300987</resource-version>\r
+                                       </host-route>\r
+                                               <host-route>\r
+                                               <host-route-id>6f038013-8b15-4eb8-914b-507489fbc8ee</host-route-id>\r
+                                               <route-prefix>10.102.0.0/16</route-prefix>\r
+                                               <next-hop>10.102.200.1</next-hop>\r
+                                               <next-hop-type>ip-address</next-hop-type>\r
+                                               <resource-version>1505857301151</resource-version>\r
+                                       </host-route>\r
+                                       <host-route>\r
+                                               <host-route-id>8811c5f8-f1ed-4fa0-a505-e1be60396e28</host-route-id>\r
+                                               <route-prefix>192.168.2.0/25</route-prefix>\r
+                                               <next-hop>10.102.200.1</next-hop>\r
+                                               <resource-version>1505857301954</resource-version>\r
+                                       </host-route>\r
+                          </host-routes>\r
                <relationship-list/>\r
             </subnet>\r
             <subnet>\r
@@ -518,6 +541,15 @@ String expectedNetworkInputsMissingNetworkId =
                <orchestration-status>pending-delete</orchestration-status>\r
                <dhcp-enabled>true</dhcp-enabled>\r
                           <subnet-name>subnetName</subnet-name>\r
+                          <ip-assignment-direction>true</ip-assignment-direction>\r
+                          <host-routes>\r
+                                       <host-route>\r
+                                               <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>\r
+                                               <route-prefix>172.20.1.0/24</route-prefix>\r
+                                               <next-hop>10.102.200.1</next-hop>\r
+                                               <resource-version>1505857300987</resource-version>\r
+                                       </host-route>\r
+                          </host-routes>\r
                <relationship-list/>\r
             </subnet>\r
          </subnets>\r
@@ -979,6 +1011,19 @@ String expectedNetworkInputsMissingNetworkId =
       <ipVersion>4</ipVersion>\r
       <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>\r
       <subnetName>subnetName</subnetName>\r
+      <addrFromStart>true</addrFromStart>\r
+      <hostRoutes>\r
+         <prefix>172.20.1.0/24</prefix>\r
+         <nextHop>10.102.200.1</nextHop>\r
+      </hostRoutes>\r
+      <hostRoutes>\r
+         <prefix>10.102.0.0/16</prefix>\r
+         <nextHop>10.102.200.1</nextHop>\r
+      </hostRoutes>\r
+      <hostRoutes>\r
+         <prefix>192.168.2.0/25</prefix>\r
+         <nextHop>10.102.200.1</nextHop>\r
+      </hostRoutes>\r
    </subnets>\r
    <skipAAI>true</skipAAI>\r
    <backout>true</backout>\r
@@ -1024,6 +1069,19 @@ String updateNetworkRequest_noPhysicalName =
       <ipVersion>4</ipVersion>\r
       <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>\r
       <subnetName>subnetName</subnetName>\r
+      <addrFromStart>true</addrFromStart>\r
+      <hostRoutes>\r
+         <prefix>172.20.1.0/24</prefix>\r
+         <nextHop>10.102.200.1</nextHop>\r
+      </hostRoutes>\r
+      <hostRoutes>\r
+         <prefix>10.102.0.0/16</prefix>\r
+         <nextHop>10.102.200.1</nextHop>\r
+      </hostRoutes>\r
+      <hostRoutes>\r
+         <prefix>192.168.2.0/25</prefix>\r
+         <nextHop>10.102.200.1</nextHop>\r
+      </hostRoutes>\r
    </subnets>\r
    <skipAAI>true</skipAAI>\r
    <backout>true</backout>\r
@@ -1148,7 +1206,32 @@ String updateNetworkRequest_noPhysicalName =
          <ip-version>4</ip-version>\r
          <orchestration-status>Active</orchestration-status>\r
          <dhcp-enabled>true</dhcp-enabled>\r
+         <resource-version>1505857300987</resource-version>\r
          <subnet-name>subnetName</subnet-name>\r
+         <ip-assignment-direction>true</ip-assignment-direction>\r
+         <host-routes>\r
+            <host-route>\r
+               <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>\r
+               <route-prefix>172.20.1.0/24</route-prefix>\r
+               <next-hop>10.102.200.1</next-hop>\r
+               <next-hop-type>ip-address</next-hop-type>\r
+               <resource-version>1505857300987</resource-version>\r
+            </host-route>\r
+            <host-route>\r
+               <host-route-id>6f038013-8b15-4eb8-914b-507489fbc8ee</host-route-id>\r
+               <route-prefix>10.102.0.0/16</route-prefix>\r
+               <next-hop>10.102.200.1</next-hop>\r
+               <next-hop-type>ip-address</next-hop-type>\r
+               <resource-version>1505857301151</resource-version>\r
+            </host-route>\r
+            <host-route>\r
+               <host-route-id>8811c5f8-f1ed-4fa0-a505-e1be60396e28</host-route-id>\r
+               <route-prefix>192.168.2.0/25</route-prefix>\r
+               <next-hop>10.102.200.1</next-hop>\r
+               <next-hop-type/>\r
+               <resource-version>1505857301954</resource-version>\r
+            </host-route>\r
+         </host-routes>\r
       </subnet>\r
    </subnets>\r
    <segmentation-assignments>\r
@@ -1505,13 +1588,13 @@ String rollbackSDNCRequest =
       <network-information>\r
          <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>\r
          <network-type>CONTRAIL_EXTERNAL</network-type>\r
-         <onap-model-information>\r
+         <ecomp-model-information>\r
             <model-invariant-uuid>invariant-uuid</model-invariant-uuid>\r
             <model-customization-uuid>customization-uuid</model-customization-uuid>\r
             <model-uuid>uuid</model-uuid>\r
             <model-version>version</model-version>\r
             <model-name>CONTRAIL_EXTERNAL</model-name>\r
-         </onap-model-information>\r
+         </ecomp-model-information>\r
       </network-information>\r
       <network-request-information>\r
          <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>\r
@@ -1550,7 +1633,7 @@ String rollbackNetworkRequest =
 \r
                }\r
 \r
-               public void initializeVariables (Execution mockExecution) {\r
+               public void initializeVariables (DelegateExecution mockExecution) {\r
 \r
                        verify(mockExecution).setVariable(Prefix + "messageId", "")\r
                        verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "")\r
@@ -1665,7 +1748,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")\r
                        when(mockExecution.getVariable("disableRollback")).thenReturn("true")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.preProcessRequest(mockExecution)\r
 \r
@@ -1727,7 +1810,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_adapters_network_rest_endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")\r
                        when(mockExecution.getVariable("URN_mso_adapters_sdnc_resource_endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")\r
                        \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.preProcessRequest(mockExecution)\r
 \r
@@ -1779,7 +1862,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")\r
                        when(mockExecution.getVariable("disableRollback")).thenReturn("true")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        try {\r
                                DoUpdateNetworkInstance.preProcessRequest(mockExecution)\r
@@ -1835,7 +1918,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")\r
                        when(mockExecution.getVariable("disableRollback")).thenReturn("true")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        try {\r
                                DoUpdateNetworkInstance.preProcessRequest(mockExecution)\r
@@ -1884,7 +1967,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")\r
                        when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.prepareUpdateNetworkRequest(mockExecution)\r
 \r
@@ -1921,7 +2004,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")\r
                        when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.prepareUpdateNetworkRequest(mockExecution)\r
 \r
@@ -1954,7 +2037,7 @@ String rollbackNetworkRequest =
                        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/")\r
 \r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.prepareSDNCRequest(mockExecution)\r
 \r
@@ -1984,7 +2067,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")\r
                        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/")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.prepareSDNCRollbackRequest(mockExecution)\r
 \r
@@ -2001,7 +2084,7 @@ String rollbackNetworkRequest =
                        println "************ callRESTQueryAAINetworkId ************* "\r
 \r
                        WireMock.reset();\r
-                       MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", "1");\r
+                       MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", "all");\r
 \r
                        ExecutionEntity mockExecution = setupMock()\r
                        when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)\r
@@ -2013,7 +2096,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
                        \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAINetworkId(mockExecution)\r
 \r
@@ -2022,7 +2105,7 @@ String rollbackNetworkRequest =
                        //preDebugger.printInvocations(mockExecution)\r
 \r
                        verify(mockExecution).setVariable("prefix", Prefix + "")\r
-                       verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=1")\r
+                       verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")\r
                        verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "200")\r
 \r
                }\r
@@ -2047,7 +2130,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
                        \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)\r
 \r
@@ -2082,7 +2165,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)\r
 \r
@@ -2117,7 +2200,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)\r
 \r
@@ -2155,7 +2238,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)\r
 \r
@@ -2172,6 +2255,41 @@ String rollbackNetworkRequest =
 \r
                }\r
 \r
+               @Test\r
+               //@Ignore\r
+               public void callRESTQueryAAINetworkVpnBindingList_200() {\r
+\r
+                       println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "\r
+\r
+                       WireMock.reset();\r
+                       MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");\r
+                       MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");\r
+\r
+                       ExecutionEntity mockExecution = setupMock()\r
+                       when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6\r
+                       when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")\r
+                       when(mockExecution.getVariable("URN_aai_endpoint")).thenReturn("http://localhost:8090")\r
+                       when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn("8")\r
+                       when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")\r
+                       when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")\r
+                       when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_namespace")).thenReturn('http://org.openecomp.aai.inventory/')\r
+                       when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
+                       when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
+\r
+                       // preProcessRequest(DelegateExecution execution)\r
+                       DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
+                       DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)\r
+\r
+                       verify(mockExecution).setVariable("prefix", Prefix + "")\r
+                       verify(mockExecution).setVariable(Prefix + "vpnCount", 2)\r
+                       verify(mockExecution).setVariable(Prefix + "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/'])\r
+                       // the last vpnBinding value is saved.\r
+                       verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")\r
+                       verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")\r
+\r
+               }\r
+\r
+               \r
                @Test\r
                //@Ignore\r
                public void callRESTQueryAAINetworkVpnBinding_TestScenario01_200() {\r
@@ -2192,7 +2310,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)\r
 \r
@@ -2230,7 +2348,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)\r
 \r
@@ -2269,7 +2387,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)\r
 \r
@@ -2305,7 +2423,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAINetworkTableRef(mockExecution)\r
 \r
@@ -2342,7 +2460,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(mockExecution)\r
 \r
@@ -2367,7 +2485,7 @@ String rollbackNetworkRequest =
                        println "************ callRESTReQueryAAINetworkId ************* "\r
 \r
                        WireMock.reset();\r
-                       MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", "1");\r
+                       MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", "all");\r
 \r
                        ExecutionEntity mockExecution = setupMock()\r
                        when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)\r
@@ -2380,7 +2498,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTReQueryAAINetworkId(mockExecution)\r
 \r
@@ -2389,7 +2507,7 @@ String rollbackNetworkRequest =
                        //preDebugger.printInvocations(mockExecution)\r
 \r
                        verify(mockExecution).setVariable("prefix", Prefix + "")\r
-                       verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=1")\r
+                       verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")\r
                        verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "200")\r
 \r
                }\r
@@ -2402,7 +2520,7 @@ String rollbackNetworkRequest =
                        println "************ callRESTUpdateContrailAAINetwork ************* "\r
 \r
                        WireMock.reset();\r
-                       MockPutNetworkIdWithDepth("UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml", "49c86598-f766-46f8-84f8-8d1c1b10f9b4", "1");\r
+                       MockPutNetworkIdWithDepth("UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml", "49c86598-f766-46f8-84f8-8d1c1b10f9b4", "all");\r
                        \r
                        ExecutionEntity mockExecution = setupMock()\r
                        when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)\r
@@ -2417,7 +2535,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")\r
                        when(mockExecution.getVariable("URN_aai_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.callRESTUpdateContrailAAINetwork(mockExecution)\r
 \r
@@ -2426,7 +2544,7 @@ String rollbackNetworkRequest =
                        //preDebugger.printInvocations(mockExecution)\r
 \r
                        verify(mockExecution).setVariable("prefix", Prefix + "")\r
-                       verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=1")\r
+                       verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")\r
                        verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest)\r
                        verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "200")\r
                        //verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", updateContrailAAIResponse)\r
@@ -2564,7 +2682,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackNetworkRequest)\r
                        when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.prepareRollbackData(mockExecution)\r
 \r
@@ -2588,7 +2706,7 @@ String rollbackNetworkRequest =
                        when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)\r
                        when(mockExecution.getVariable("mso-request-id")).thenReturn("requestId")\r
 \r
-                       // preProcessRequest(Execution execution)\r
+                       // preProcessRequest(DelegateExecution execution)\r
                        DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()\r
                        DoUpdateNetworkInstance.postProcessResponse(mockExecution)\r
 \r