Search in sources :

Example 56 with BBObjectNotFoundException

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

the class AppcRunTasks method preProcessActivity.

public void preProcessActivity(BuildingBlockExecution execution) {
    execution.setVariable("actionSnapshot", Action.Snapshot);
    execution.setVariable("actionLock", Action.Lock);
    execution.setVariable("actionUnlock", Action.Unlock);
    execution.setVariable("actionUpgradePreCheck", Action.UpgradePreCheck);
    execution.setVariable("actionUpgradePostCheck", Action.UpgradePostCheck);
    execution.setVariable("actionQuiesceTraffic", Action.QuiesceTraffic);
    execution.setVariable("actionUpgradeBackup", Action.UpgradeBackup);
    execution.setVariable("actionUpgradeSoftware", Action.UpgradeSoftware);
    execution.setVariable("actionResumeTraffic", Action.ResumeTraffic);
    execution.setVariable("actionStop", Action.Stop);
    execution.setVariable("actionStart", Action.Start);
    execution.setVariable("actionHealthCheck", Action.HealthCheck);
    execution.setVariable("actionDistributeTraffic", Action.DistributeTraffic);
    execution.setVariable("actionDistributeTrafficCheck", Action.DistributeTrafficCheck);
    execution.setVariable(ROLLBACK_VNF_STOP, false);
    execution.setVariable(ROLLBACK_VNF_LOCK, false);
    execution.setVariable(ROLLBACK_QUIESCE_TRAFFIC, false);
    execution.setVariable("vmIdList", null);
    execution.setVariable("vserverIdList", null);
    GenericVnf vnf = null;
    try {
        vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
    } catch (BBObjectNotFoundException e) {
        exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "No valid VNF exists");
    }
    try {
        getVserversForAppc(execution, vnf);
    } catch (Exception e) {
        exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Unable to retrieve vservers");
    }
}
Also used : BBObjectNotFoundException(org.onap.so.client.exception.BBObjectNotFoundException) GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) BBObjectNotFoundException(org.onap.so.client.exception.BBObjectNotFoundException)

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