use of org.ovirt.engine.core.common.asynctasks.AsyncTaskType in project ovirt-engine by oVirt.
the class HSMGetAllTasksInfoVDSCommand method parseTaskInfo.
protected AsyncTaskCreationInfo parseTaskInfo(Map<String, String> taskInfo, Guid taskID) {
try {
String deTaskType = taskInfo.get(VERB_KEY);
AsyncTaskType taskType;
try {
taskType = AsyncTaskType.valueOf(deTaskType);
} catch (Exception e) {
taskType = AsyncTaskType.unknown;
log.warn("The task type in the vdsm response is '{}' and does not " + " appear in the AsyncTaskType enum", deTaskType);
}
AsyncTaskCreationInfo tempVar = new AsyncTaskCreationInfo();
tempVar.setVdsmTaskId(taskID);
tempVar.setTaskType(taskType);
AsyncTaskCreationInfo task = tempVar;
return task;
} catch (RuntimeException e) {
log.error("Could not parse single task info: '{}' (possibly specific task should not be monitored): {}", taskInfo, e.getMessage());
log.debug("Exception", e);
return null;
}
}
Aggregations