Search in sources :

Example 26 with BBObjectNotFoundException

use of org.onap.so.client.exception.BBObjectNotFoundException in project so by onap.

the class SDNCDeactivateTaskTest method before.

@Before
public void before() throws BBObjectNotFoundException {
    customer = setCustomer();
    serviceInstance = setServiceInstance();
    cloudRegion = setCloudRegion();
    requestContext = setRequestContext();
    genericVnf = setGenericVnf();
    vfModule = setVfModule();
    network = setL3Network();
    doThrow(new BpmnError("BPMN Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(Exception.class));
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(genericVnf);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))).thenReturn(network);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))).thenReturn(vfModule);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))).thenReturn(serviceInstance);
    when(env.getRequiredProperty("mso.workflow.message.endpoint")).thenReturn("http://localhost:9090");
}
Also used : BuildingBlockExecution(org.onap.so.bpmn.common.BuildingBlockExecution) BBObjectNotFoundException(org.onap.so.client.exception.BBObjectNotFoundException) BpmnError(org.camunda.bpm.engine.delegate.BpmnError) Before(org.junit.Before)

Example 27 with BBObjectNotFoundException

use of org.onap.so.client.exception.BBObjectNotFoundException in project so by onap.

the class SDNCAssignTasksTest method before.

@Before
public void before() throws BBObjectNotFoundException {
    customer = setCustomer();
    serviceInstance = setServiceInstance();
    network = setL3Network();
    cloudRegion = setCloudRegion();
    requestContext = setRequestContext();
    genericVnf = setGenericVnf();
    vfModule = setVfModule();
    volumeGroup = setVolumeGroup();
    doThrow(new BpmnError("BPMN Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(Exception.class));
    doThrow(new BpmnError("BPMN Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(genericVnf);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))).thenReturn(vfModule);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))).thenReturn(network);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))).thenReturn(serviceInstance);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VOLUME_GROUP_ID))).thenReturn(volumeGroup);
    when(env.getRequiredProperty("mso.workflow.message.endpoint")).thenReturn("http://localhost:9090");
}
Also used : BuildingBlockExecution(org.onap.so.bpmn.common.BuildingBlockExecution) BBObjectNotFoundException(org.onap.so.client.exception.BBObjectNotFoundException) BpmnError(org.camunda.bpm.engine.delegate.BpmnError) Before(org.junit.Before)

Example 28 with BBObjectNotFoundException

use of org.onap.so.client.exception.BBObjectNotFoundException in project so by onap.

the class GenericVnfHealthCheckTest method before.

@Before
public void before() throws BBObjectNotFoundException {
    genericVnf = setGenericVnf();
    msoRequestId = UUID.randomUUID().toString();
    requestContext = setRequestContext();
    requestContext.setMsoRequestId(msoRequestId);
    gBBInput.setRequestContext(requestContext);
    doThrow(new BpmnError("BPMN Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(Exception.class));
    when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(genericVnf);
}
Also used : BuildingBlockExecution(org.onap.so.bpmn.common.BuildingBlockExecution) BBObjectNotFoundException(org.onap.so.client.exception.BBObjectNotFoundException) BpmnError(org.camunda.bpm.engine.delegate.BpmnError) Before(org.junit.Before)

Example 29 with BBObjectNotFoundException

use of org.onap.so.client.exception.BBObjectNotFoundException in project so by onap.

the class SDNCUnassignTasksTest method before.

@Before
public void before() throws BBObjectNotFoundException {
    customer = setCustomer();
    serviceInstance = setServiceInstance();
    requestContext = setRequestContext();
    genericVnf = setGenericVnf();
    vfModule = setVfModule();
    cloudRegion = setCloudRegion();
    network = setL3Network();
    doThrow(new BpmnError("BPMN Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(Exception.class));
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(genericVnf);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))).thenReturn(network);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))).thenReturn(vfModule);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))).thenReturn(serviceInstance);
    when(env.getRequiredProperty("mso.workflow.message.endpoint")).thenReturn("http://localhost:9090");
}
Also used : BuildingBlockExecution(org.onap.so.bpmn.common.BuildingBlockExecution) BBObjectNotFoundException(org.onap.so.client.exception.BBObjectNotFoundException) BpmnError(org.camunda.bpm.engine.delegate.BpmnError) Before(org.junit.Before)

Example 30 with BBObjectNotFoundException

use of org.onap.so.client.exception.BBObjectNotFoundException in project so by onap.

the class ConfigDeployVnfTest method before.

@Before
public void before() throws BBObjectNotFoundException {
    genericVnf = setGenericVnf();
    serviceInstance = setServiceInstance();
    msoRequestId = UUID.randomUUID().toString();
    requestContext = setRequestContext();
    requestContext.setMsoRequestId(msoRequestId);
    gBBInput.setRequestContext(requestContext);
    doThrow(new BpmnError("BPMN Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(Exception.class));
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(genericVnf);
    when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))).thenReturn(serviceInstance);
}
Also used : BuildingBlockExecution(org.onap.so.bpmn.common.BuildingBlockExecution) BBObjectNotFoundException(org.onap.so.client.exception.BBObjectNotFoundException) BpmnError(org.camunda.bpm.engine.delegate.BpmnError) Before(org.junit.Before)

Aggregations

BBObjectNotFoundException (org.onap.so.client.exception.BBObjectNotFoundException)56 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)23 BuildingBlockExecution (org.onap.so.bpmn.common.BuildingBlockExecution)20 BpmnError (org.camunda.bpm.engine.delegate.BpmnError)18 Before (org.junit.Before)18 GenericVnf (org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf)18 ModelInfoServiceInstance (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)12 VfModule (org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule)10 GeneralBuildingBlock (org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock)9 VolumeGroup (org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup)6 ModelInfoGenericVnf (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf)6 InstanceGroup (org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup)5 L3Network (org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network)5 Collection (org.onap.so.bpmn.servicedecomposition.bbobjects.Collection)4 RequestContext (org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext)4 BadResponseException (org.onap.so.client.exception.BadResponseException)4 Test (org.junit.Test)3 CloudRegion (org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2