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.Ignore\r
import org.junit.Rule\r
<service-information>\r
<service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\r
<subscription-service-type>MSO-dev-service-type</subscription-service-type>\r
- <onap-model-information>\r
+ <ecomp-model-information>\r
<model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>\r
<model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>\r
<model-version>1.0</model-version>\r
<model-name>HNGW Protected OAM</model-name>\r
- </onap-model-information>\r
+ </ecomp-model-information>\r
<service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>\r
<global-customer-id>globalId_45678905678</global-customer-id>\r
<subscriber-name/>\r
<network-information>\r
<network-id>networkId</network-id>\r
<network-type>CONTRAIL_EXTERNAL</network-type>\r
- <onap-model-information>\r
+ <ecomp-model-information>\r
<model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>\r
<model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>\r
<model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>\r
<model-version>1</model-version>\r
<model-name>CONTRAIL_EXTERNAL</model-name>\r
- </onap-model-information>\r
+ </ecomp-model-information>\r
</network-information>\r
<network-request-input>\r
<network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>\r
<service-information>\r
<service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>\r
<subscription-service-type>MSO-dev-service-type</subscription-service-type>\r
- <onap-model-information>\r
+ <ecomp-model-information>\r
<model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>\r
<model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>\r
<model-version>1.0</model-version>\r
<model-name>HNGW Protected OAM</model-name>\r
- </onap-model-information>\r
+ </ecomp-model-information>\r
<service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>\r
<global-customer-id>globalId_45678905678</global-customer-id>\r
<subscriber-name/>\r
<network-information>\r
<network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>\r
<network-type>CONTRAIL_EXTERNAL</network-type>\r
- <onap-model-information>\r
+ <ecomp-model-information>\r
<model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>\r
<model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>\r
<model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>\r
<model-version>1</model-version>\r
<model-name>CONTRAIL_EXTERNAL</model-name>\r
- </onap-model-information>\r
+ </ecomp-model-information>\r
</network-information>\r
<network-request-input>\r
<network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>\r
\r
}\r
\r
- public void initializeVariables (Execution mockExecution) {\r
+ public void initializeVariables (DelegateExecution mockExecution) {\r
\r
verify(mockExecution).setVariable(Prefix + "networkRequest", "")\r
verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)\r
when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")\r
when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")\r
\r
- // preProcessRequest(Execution execution)\r
+ // preProcessRequest(DelegateExecution execution)\r
DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()\r
try {\r
DoDeleteNetworkInstance.preProcessRequest(mockExecution)\r
when(mockExecution.getVariable("URN_mso_rollback")).thenReturn("true")\r
when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")\r
\r
- // preProcessRequest(Execution execution)\r
+ // preProcessRequest(DelegateExecution execution)\r
DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()\r
DoDeleteNetworkInstance.preProcessRequest(mockExecution)\r
\r
when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn(null)\r
when(mockExecution.getVariable(Prefix + "deactivateSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)\r
\r
- // preProcessRequest(Execution execution)\r
+ // preProcessRequest(DelegateExecution execution)\r
DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()\r
DoDeleteNetworkInstance.prepareRpcSDNCDeactivateRollback(mockExecution)\r
\r
println "************ callRESTQueryAAI ************* "\r
\r
WireMock.reset();\r
- MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml", "1");\r
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml", "all");\r
\r
ExecutionEntity mockExecution = setupMock()\r
when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)\r
DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)\r
\r
verify(mockExecution).setVariable("prefix", Prefix)\r
- verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+"?depth=1")\r
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+"?depth=all")\r
\r
verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")\r
//verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponse)\r
println "************ callRESTQueryAAI ************* "\r
\r
WireMock.reset();\r
- MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml", "1");\r
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml", "all");\r
\r
ExecutionEntity mockExecution = setupMock()\r
when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)\r
DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)\r
\r
verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)\r
- verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+"?depth=1")\r
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+"?depth=all")\r
\r
verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")\r
//verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponseWithRelationship)\r
println "************ callRESTQueryAAI ************* "\r
\r
WireMock.reset();\r
- MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml", "1");\r
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml", "all");\r
\r
ExecutionEntity mockExecution = setupMock()\r
when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)\r
DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)\r
\r
verify(mockExecution).setVariable("prefix", Prefix)\r
- verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+ "?depth=1")\r
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+ "?depth=all")\r
\r
verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")\r
//verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponse)\r
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
DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()\r
DoDeleteNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)\r
\r
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
DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()\r
DoDeleteNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)\r
\r
when(mockExecution.getVariable(Prefix + "source")).thenReturn("PORTAL")\r
when(mockExecution.getVariable(Prefix + "isException")).thenReturn(false)\r
\r
- // postProcessResponse(Execution execution)\r
+ // postProcessResponse(DelegateExecution execution)\r
DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()\r
DoDeleteNetworkInstance.postProcessResponse(mockExecution)\r
\r
when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")).thenReturn(sdncAdapaterDeactivateRollback)\r
when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)\r
\r
- // preProcessRequest(Execution execution)\r
+ // preProcessRequest(DelegateExecution execution)\r
DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()\r
DoDeleteNetworkInstance.prepareRollbackData(mockExecution)\r
\r
\r
}\r
\r
-}
+}
\ No newline at end of file