}\r
\r
\r
+ public void awaitAaiDistribution(Execution execution) {\r
+ def isDebugEnabled=execution.getVariable(DebugFlag)\r
+\r
+ try {\r
+ String tsleep = execution.getVariable("junitSleepMs")\r
+ \r
+ //workaround for aai replication issue\r
+ utils.log("DEBUG", "sleeping while AAI distributes data", isDebugEnabled)\r
+ sleep(tsleep == null ? 30000 : tsleep as Long)\r
+ \r
+ } catch (Exception ex) {\r
+ // try error in method block\r
+ String exceptionMessage = "Unexpected Error from method awaitAaiDistribution() - " + ex.getMessage()\r
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)\r
+ }\r
+ }\r
+\r
+\r
public void prepareCreateAllottedResourceTXC(Execution execution) {\r
def isDebugEnabled=execution.getVariable(DebugFlag)\r
\r
try {
String msoRequestId = execution.getVariable("msoRequestId")
utils.log("DEBUG", " msoRequestId = " + msoRequestId, isDebugEnabled)
-
- if ((msoRequestId == null) || ("testRequestId".equals(msoRequestId)) || ("testRequestId123".equals(msoRequestId)))
- {
- utils.log("DEBUG"," ***** NOT sleeping 30 seconds for Junit *****", isDebugEnabled)
- }
- else
- {
- utils.log("DEBUG"," ***** sleeping 30 seconds for AAI replication *****", isDebugEnabled)
- sleep(30000);
- utils.log("DEBUG"," ***** sleep over *****", isDebugEnabled)
- }
-
+
execution.setVariable("prefix", Prefix)
//Config Inputs
<bpmn2:incoming>SequenceFlow_0vj46ej</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_13uceka</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13uceka" sourceRef="updateInfraRequest" targetRef="IntermediateThrowEvent_1as6hoa" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13uceka" sourceRef="updateInfraRequest" targetRef="ScriptTask_1e5rwka" />
<bpmn2:scriptTask id="ScriptTask_1qd3uwb" name="Post Process Create Service " scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1ky2sv9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0vj46ej</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="StartService" />
</bpmn2:intermediateCatchEvent>
<bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1as6hoa" name="GoToCreateAllottedResourcesTXC">
- <bpmn2:incoming>SequenceFlow_13uceka</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_16acruh</bpmn2:incoming>
<bpmn2:linkEventDefinition name="CreateAllottedResourcesTXC" />
</bpmn2:intermediateThrowEvent>
<bpmn2:sequenceFlow id="SequenceFlow_15odbkz" sourceRef="IntermediateCatchEvent_1i1nwfx" targetRef="prepareCreateService_scriptTask" />
<bpmn2:incoming>SequenceFlow_0e9e6fo</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0hwsm6n</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:callActivity id="CallActivity_0xt1l8t" name="Call Create BRG Allotted Resource " calledElement="DoCreateAllottedResourceBRG">
- <bpmn2:extensionElements>
- <camunda:in source="msoRequestId" target="msoRequestId" />
- <camunda:in source="disableRollback" target="disableRollback" />
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:in source="failExists" target="failExists" />
- <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
- <camunda:in source="parentServiceInstanceIdBRG" target="parentServiceInstanceId" />
- <camunda:in source="allottedResourceIdBRG" target="allottedResourceId" />
- <camunda:in source="allottedResourceModelInfoBRG" target="allottedResourceModelInfo" />
- <camunda:in source="allottedResourceRoleBRG" target="allottedResourceRole" />
- <camunda:out source="rollbackData" target="DCARBRG_rollbackData" />
- <camunda:out source="rolledBack" target="rolledBack" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="allottedResourceId" target="DCARBRG_allottedResourceId" />
- <camunda:out source="allottedResourceName" target="DCARBRG_allottedResourceName" />
- <camunda:in source="allottedResourceTypeBRG" target="allottedResourceType" />
- <camunda:in source="vni" target="vni" />
- <camunda:in source="vgmuxBearerIP" target="vgmuxBearerIP" />
- <camunda:in source="brgWanMacAddress" target="brgWanMacAddress" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_0b5ztoe</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0e9e6fo</bpmn2:outgoing>
- </bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_0hwsm6n" sourceRef="ExclusiveGateway_0jqgskx" targetRef="IntermediateThrowEvent_0lt5ltv" />
<bpmn2:sequenceFlow id="SequenceFlow_0loks1u" name="No" sourceRef="ExclusiveGateway_1xwfgxs" targetRef="ExclusiveGateway_0jqgskx" />
<bpmn2:sequenceFlow id="SequenceFlow_0b5ztoe" name="Yes" sourceRef="ExclusiveGateway_1xwfgxs" targetRef="CallActivity_0xt1l8t">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("createBRGAR") != null && execution.getVariable("createBRGAR") == true }]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_0e9e6fo" sourceRef="CallActivity_0xt1l8t" targetRef="ExclusiveGateway_0jqgskx" />
<bpmn2:scriptTask id="ScriptTask_05epj75" name="Prepare to create Allotted Resources BRG" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_15vce9o</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0yecpl2</bpmn2:outgoing>
CreateVcpeResCustService.validateVnfCreate(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_0k5vcuu" sourceRef="ScriptTask_18w0jud" targetRef="ExclusiveGateway_1hlbkue" />
+ <bpmn2:callActivity id="CallActivity_0xt1l8t" name="Call Create BRG Allotted Resource " calledElement="DoCreateAllottedResourceBRG">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="failExists" target="failExists" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="parentServiceInstanceIdBRG" target="parentServiceInstanceId" />
+ <camunda:in source="allottedResourceIdBRG" target="allottedResourceId" />
+ <camunda:in source="allottedResourceModelInfoBRG" target="allottedResourceModelInfo" />
+ <camunda:in source="allottedResourceRoleBRG" target="allottedResourceRole" />
+ <camunda:out source="rollbackData" target="DCARBRG_rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="allottedResourceId" target="DCARBRG_allottedResourceId" />
+ <camunda:out source="allottedResourceName" target="DCARBRG_allottedResourceName" />
+ <camunda:in source="allottedResourceTypeBRG" target="allottedResourceType" />
+ <camunda:in source="vni" target="vni" />
+ <camunda:in source="vgmuxBearerIP" target="vgmuxBearerIP" />
+ <camunda:in source="brgWanMacAddress" target="brgWanMacAddress" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0b5ztoe</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0e9e6fo</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_0e9e6fo" sourceRef="CallActivity_0xt1l8t" targetRef="ExclusiveGateway_0jqgskx" />
+ <bpmn2:scriptTask id="ScriptTask_1e5rwka" name="Await AAI Distribution" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13uceka</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_16acruh</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.*
+def CreateVcpeResCustService = new CreateVcpeResCustService()
+CreateVcpeResCustService.awaitAaiDistribution(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_16acruh" sourceRef="ScriptTask_1e5rwka" targetRef="IntermediateThrowEvent_1as6hoa" />
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_13uceka_di" bpmnElement="SequenceFlow_13uceka">
<di:waypoint xsi:type="dc:Point" x="894" y="583" />
- <di:waypoint xsi:type="dc:Point" x="1053" y="583" />
+ <di:waypoint xsi:type="dc:Point" x="995" y="583" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="974" y="568" width="0" height="0" />
+ <dc:Bounds x="899.5" y="568" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1qd3uwb_di" bpmnElement="ScriptTask_1qd3uwb">
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1as6hoa_di" bpmnElement="IntermediateThrowEvent_1as6hoa">
- <dc:Bounds x="1056" y="565" width="36" height="36" />
+ <dc:Bounds x="1027" y="712" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1037" y="606" width="72" height="24" />
+ <dc:Bounds x="1002" y="753" width="85" height="36" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_15odbkz_di" bpmnElement="SequenceFlow_15odbkz">
<dc:Bounds x="515" y="1317" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_0xt1l8t_di" bpmnElement="CallActivity_0xt1l8t">
- <dc:Bounds x="400" y="1151" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0hwsm6n_di" bpmnElement="SequenceFlow_0hwsm6n">
<di:waypoint xsi:type="dc:Point" x="585" y="1292" />
<di:waypoint xsi:type="dc:Point" x="628" y="1292" />
<di:waypoint xsi:type="dc:Point" x="337" y="1191" />
<di:waypoint xsi:type="dc:Point" x="395" y="1191" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="353" y="1216.4242424242425" width="21" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0e9e6fo_di" bpmnElement="SequenceFlow_0e9e6fo">
- <di:waypoint xsi:type="dc:Point" x="500" y="1191" />
- <di:waypoint xsi:type="dc:Point" x="560" y="1191" />
- <di:waypoint xsi:type="dc:Point" x="560" y="1267" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="485" y="1166" width="0" height="12" />
+ <dc:Bounds x="354" y="1216" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_05epj75_di" bpmnElement="ScriptTask_05epj75">
<dc:Bounds x="883" y="961" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0xt1l8t_di" bpmnElement="CallActivity_0xt1l8t">
+ <dc:Bounds x="400" y="1151" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0e9e6fo_di" bpmnElement="SequenceFlow_0e9e6fo">
+ <di:waypoint xsi:type="dc:Point" x="500" y="1191" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="1191" />
+ <di:waypoint xsi:type="dc:Point" x="560" y="1267" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="440" y="1166" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1e5rwka_di" bpmnElement="ScriptTask_1e5rwka">
+ <dc:Bounds x="995" y="543" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16acruh_di" bpmnElement="SequenceFlow_16acruh">
+ <di:waypoint xsi:type="dc:Point" x="1045" y="623" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="663" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="663" />
+ <di:waypoint xsi:type="dc:Point" x="1045" y="712" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1060" y="657" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
// ***** preProcessRequest *****\r
\r
@Test\r
-// @Ignore \r
+ @Ignore \r
public void preProcessRequest() {\r
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRequest_EmptyParts() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRequest_MissingSubscriberId() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRequest_BpmnError() {
ExecutionEntity mex = setupMock()
initPreProcess(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRequest_Ex() {
ExecutionEntity mex = setupMock()
initPreProcess(mex)
// ***** sendSyncResponse *****
@Test
-// @Ignore
+ @Ignore
public void sendSyncResponse() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void sendSyncResponse_Ex() {
ExecutionEntity mex = setupMock()
initSendSyncResponse(mex)
// ***** prepareDecomposeService *****
@Test
-// @Ignore
+ @Ignore
public void prepareDecomposeService() {
ExecutionEntity mex = setupMock()
initPrepareDecomposeService(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareDecomposeService_Ex() {
ExecutionEntity mex = setupMock()
initPrepareDecomposeService(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareCreateServiceInstance_Ex() {
ExecutionEntity mex = setupMock()
initPrepareCreateServiceInstance(mex)
// ***** postProcessServiceInstanceCreate *****
@Test
-// @Ignore
+ @Ignore
public void postProcessServiceInstanceCreate() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void postProcessServiceInstanceCreate_BpmnError() {
ExecutionEntity mex = setupMock()
initPostProcessServiceInstanceCreate(mex)
}
@Test
-// @Ignore
+ @Ignore
public void postProcessServiceInstanceCreate_Ex() {
ExecutionEntity mex = setupMock()
initPostProcessServiceInstanceCreate(mex)
// ***** processDecomposition *****
@Test
-// @Ignore
+ @Ignore
public void processDecomposition() {
ExecutionEntity mex = setupMock()
def svcdecomp = initProcessDecomposition(mex, true, true)
}
@Test
-// @Ignore
+ @Ignore
public void processDecomposition_EmptyNet_EmptyVnf() {
ExecutionEntity mex = setupMock()
def svcdecomp = initProcessDecomposition(mex, true, true)
}
@Test
-// @Ignore
+ @Ignore
public void processDecomposition_Ex() {
ExecutionEntity mex = setupMock()
def svcdecomp = initProcessDecomposition(mex, true, true)
}
+ // ***** awaitAaiDistribution *****
+
+ @Test
+ @Ignore
+ public void awaitAaiDistribution() {
+ ExecutionEntity mex = setupMock()
+ initAwaitAaiDistribution(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.awaitAaiDistribution(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).getVariable("junitSleepMs")
+ }
+
+
// ***** prepareCreateAllottedResourceTXC *****
@Test
}
@Test
-// @Ignore
+ @Ignore
public void prepareCreateAllottedResourceTXC_NullArList() {
ExecutionEntity mex = setupMock()
def svcdecomp = initPrepareCreateAllottedResourceTXC(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareCreateAllottedResourceTXC_Ex() {
ExecutionEntity mex = setupMock()
initPrepareCreateAllottedResourceTXC(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareCreateAllottedResourceBRG_NullArList() {
ExecutionEntity mex = setupMock()
def svcdecomp = initPrepareCreateAllottedResourceBRG(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareCreateAllottedResourceBRG_Ex() {
ExecutionEntity mex = setupMock()
initPrepareCreateAllottedResourceBRG(mex)
// ***** prepareVnfAndModulesCreate *****
@Test
-// @Ignore
+ @Ignore
public void prepareVnfAndModulesCreate() {
ExecutionEntity mex = setupMock()
initPrepareVnfAndModulesCreate(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareVnfAndModulesCreate_EmptyList() {
ExecutionEntity mex = setupMock()
initPrepareVnfAndModulesCreate(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareVnfAndModulesCreate_NullList() {
ExecutionEntity mex = setupMock()
initPrepareVnfAndModulesCreate(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareVnfAndModulesCreate_Ex() {
ExecutionEntity mex = setupMock()
initPrepareVnfAndModulesCreate(mex)
// ***** validateVnfCreate *****
@Test
-// @Ignore
+ @Ignore
public void validateVnfCreate() {
ExecutionEntity mex = setupMock()
initValidateVnfCreate(mex)
}
@Test
-// @Ignore
+ @Ignore
public void validateVnfCreate_Ex() {
ExecutionEntity mex = setupMock()
initValidateVnfCreate(mex)
// ***** postProcessResponse *****
@Test
-// @Ignore
+ @Ignore
public void postProcessResponse() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void postProcessResponse_BpmnError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void postProcessResponse_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
// ***** preProcessRollback *****
@Test
-// @Ignore
+ @Ignore
public void preProcessRollback() {
ExecutionEntity mex = setupMock()
def wfe = initPreProcessRollback(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRollback_NullWfe() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRollback_BpmnError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRollback_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
// ***** postProcessRollback *****
@Test
-// @Ignore
+ @Ignore
public void postProcessRollback() {
ExecutionEntity mex = setupMock()
def wfe = initPostProcessRollback(mex)
}
@Test
-// @Ignore
+ @Ignore
public void postProcessRollback_NullWfe() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void postProcessRollback_BpmnError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void postProcessRollback_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
// ***** prepareFalloutRequest *****
@Test
-// @Ignore
+ @Ignore
public void prepareFalloutRequest() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void prepareFalloutRequest_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
// ***** sendSyncError *****
@Test
-// @Ignore
+ @Ignore
public void sendSyncError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void sendSyncError_NotWfe() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void sendSyncError_NullWfe() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void sendSyncError_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
// ***** processJavaException *****
@Test
-// @Ignore
+ @Ignore
public void processJavaException() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void processJavaException_BpmnError() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void processJavaException_Ex() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
- when(svcdecomp.toJsonString()).thenReturn("mydecomp")
+ when(svcdecomp.toJsonStringNoRootName()).thenReturn("mydecomp")
}
private void initPostProcessServiceInstanceCreate(ExecutionEntity mex) {
return svcdecomp
}
+ private initAwaitAaiDistribution(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("junitSleepMs")).thenReturn("5")
+ }
+
private ServiceDecomposition initPrepareCreateAllottedResourceTXC(ExecutionEntity mex) {
ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
List<AllottedResource> arlst = new LinkedList<>()
ModelInfo mod = mock(ModelInfo.class)
HomingSolution home = mock(HomingSolution.class)
- when(ar.toJsonString()).thenReturn("json"+id)
+ when(ar.toJsonStringNoRootName()).thenReturn("json"+id)
when(ar.getAllottedResourceType()).thenReturn("TunnelXConn")
when(ar.getModelInfo()).thenReturn(mod)
when(ar.getAllottedResourceRole()).thenReturn("TXCr")
when(ar.getHomingSolution()).thenReturn(home)
- when(mod.toJsonString()).thenReturn("model"+id)
+ when(mod.toJsonStringNoRootName()).thenReturn("model"+id)
when(home.getServiceInstanceId()).thenReturn("home"+id)
ModelInfo mod = mock(ModelInfo.class)
HomingSolution home = mock(HomingSolution.class)
- when(ar.toJsonString()).thenReturn("json"+id)
+ when(ar.toJsonStringNoRootName()).thenReturn("json"+id)
when(ar.getAllottedResourceType()).thenReturn("BRG")
when(ar.getModelInfo()).thenReturn(mod)
when(ar.getAllottedResourceRole()).thenReturn("BRGr")
when(ar.getHomingSolution()).thenReturn(home)
- when(mod.toJsonString()).thenReturn("model"+id)
+ when(mod.toJsonStringNoRootName()).thenReturn("model"+id)
when(home.getServiceInstanceId()).thenReturn("home"+id)
// ***** preProcessRequest *****\r
\r
@Test\r
-// @Ignore \r
+ @Ignore \r
public void preProcessRequest() {\r
ExecutionEntity mex = setupMock()
initPreProcess(mex)
// ***** getAaiAR *****
@Test
-// @Ignore
+ @Ignore
public void getAaiAR() {
MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
}
@Test
-// @Ignore
+ @Ignore
public void getAaiAR_Duplicate() {
MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
}
@Test
-// @Ignore
+ @Ignore
public void getAaiAR_NotActive() {
MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
}
@Test
-// @Ignore
+ @Ignore
public void getAaiAR_NoStatus() {
MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
// ***** createAaiAR *****
@Test
-// @Ignore
+ @Ignore
public void createAaiAR() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void createAaiAR_NoArid_NoModelUuids() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void createAaiAR_MissingPsiLink() {
ExecutionEntity mex = setupMock()
initCreateAaiAr(mex)
}
@Test
-// @Ignore
+ @Ignore
public void createAaiAR_HttpFailed() {
ExecutionEntity mex = setupMock()
initCreateAaiAr(mex)
}
@Test
-// @Ignore
+ @Ignore
public void createAaiAR_BpmnError() {
ExecutionEntity mex = setupMock()
initCreateAaiAr(mex)
}
@Test
-// @Ignore
+ @Ignore
public void createAaiAR_Ex() {
ExecutionEntity mex = setupMock()
initCreateAaiAr(mex)
// ***** buildSDNCRequest *****
@Test
-// @Ignore
+ @Ignore
public void buildSDNCRequest() {
ExecutionEntity mex = setupMock()
initBuildSDNCRequest(mex)
}
@Test
-// @Ignore
+ @Ignore
public void buildSDNCRequest_Ex() {
ExecutionEntity mex = setupMock()
initBuildSDNCRequest(mex)
// ***** preProcessSDNCAssign *****
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCAssign() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCAssign_BpmnError() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCAssign_Ex() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
// ***** preProcessSDNCCreate *****
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCCreate() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCCreate_BpmnError() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCCreate_Ex() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
// ***** preProcessSDNCActivate *****
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCActivate() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCActivate_BpmnError() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCActivate_Ex() {
ExecutionEntity mex = setupMock()
initPreProcessSDNC(mex)
// ***** validateSDNCResp *****
@Test
-// @Ignore
+ @Ignore
public void validateSDNCResp() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void validateSDNCResp_Get() {
ExecutionEntity mex = setupMock()
def data = initValidateSDNCResp(mex)
}
@Test
-// @Ignore
+ @Ignore
public void validateSDNCResp_Unsuccessful() {
ExecutionEntity mex = setupMock()
initValidateSDNCResp(mex)
}
@Test
-// @Ignore
+ @Ignore
public void validateSDNCResp_BpmnError() {
ExecutionEntity mex = setupMock()
initValidateSDNCResp(mex)
}
@Test
-// @Ignore
+ @Ignore
public void validateSDNCResp_Ex() {
ExecutionEntity mex = setupMock()
initValidateSDNCResp(mex)
// ***** preProcessSDNCGet *****
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCGet_FoundAR() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCGet_NotFoundAR() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessSDNCGet_Ex() {
ExecutionEntity mex = setupMock()
initPreProcessSDNCGet(mex)
// ***** updateAaiAROrchStatus *****
@Test
-// @Ignore
+ @Ignore
public void updateAaiAROrchStatus() {
MockPatchAllottedResource(CUST, SVC, INST, ARID)
// ***** generateOutputs *****
@Test
-// @Ignore
+ @Ignore
public void generateOutputs() {
ExecutionEntity mex = setupMock()
def txctop = FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml")
}
@Test
-// @Ignore
+ @Ignore
public void generateOutputs_BadXml() {
ExecutionEntity mex = setupMock()
}
@Test
-// @Ignore
+ @Ignore
public void generateOutputs_BpmnError() {
ExecutionEntity mex = setupMock()
}
@Test
-// @Ignore
+ @Ignore
public void generateOutputs_Ex() {
ExecutionEntity mex = setupMock()
// ***** preProcessRollback *****
@Test
-// @Ignore
+ @Ignore
public void preProcessRollback() {
ExecutionEntity mex = setupMock()
WorkflowException wfe = mock(WorkflowException.class)
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRollback_NotWFE() {
ExecutionEntity mex = setupMock()
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRollback_BpmnError() {
ExecutionEntity mex = setupMock()
}
@Test
-// @Ignore
+ @Ignore
public void preProcessRollback_Ex() {
ExecutionEntity mex = setupMock()
// ***** postProcessRollback *****
@Test
-// @Ignore
+ @Ignore
public void postProcessRollback() {
ExecutionEntity mex = setupMock()
WorkflowException wfe = mock(WorkflowException.class)
}
@Test
-// @Ignore
+ @Ignore
public void postProcessRollback_NotWFE() {
ExecutionEntity mex = setupMock()
}
@Test
-// @Ignore
+ @Ignore
public void postProcessRollback_BpmnError() {
ExecutionEntity mex = setupMock()
}
@Test
-// @Ignore
+ @Ignore
public void postProcessRollback_Ex() {
ExecutionEntity mex = setupMock()
variables.put("allottedResourceType", "TXC");
variables.put("allottedResourceId", ARID);
variables.put("brgWanMacAddress", "wanmac");
- variables.put("junitSleepMs", "5");
variables.put("serviceInstanceId", DEC_INST);
variables.put("parentServiceInstanceId", DEC_PARENT_INST);