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");
}
}
Aggregations