use of org.ovirt.engine.core.common.action.ProcessOvfUpdateParameters in project ovirt-engine by oVirt.
the class UpdateOvfStoreForStorageDomainCommand method executeCommand.
@Override
protected void executeCommand() {
Guid storageDomainId = getStorageDomainId();
ProcessOvfUpdateParameters parameters = new ProcessOvfUpdateParameters(getStoragePoolId(), getStorageDomainId());
ActionReturnValue actionReturnValue = runInternalAction(ActionType.ProcessOvfUpdateForStoragePool, parameters, getContext());
Set<Guid> proccessedDomains = actionReturnValue.getActionReturnValue();
if (!actionReturnValue.getSucceeded()) {
propagateFailure(actionReturnValue);
return;
}
if (proccessedDomains != null && proccessedDomains.contains(storageDomainId)) {
actionReturnValue = runInternalActionWithTasksContext(ActionType.ProcessOvfUpdateForStorageDomain, createProcessOvfUpdateForDomainParams());
if (!actionReturnValue.getSucceeded()) {
propagateFailure(actionReturnValue);
return;
}
} else {
addCustomValue("StorageDomainName", getStorageDomain().getName());
auditLogDirector.log(this, AuditLogType.OVF_STORES_UPDATE_IGNORED);
}
setSucceeded(true);
}
use of org.ovirt.engine.core.common.action.ProcessOvfUpdateParameters in project ovirt-engine by oVirt.
the class UpdateOvfStoreForStorageDomainCommand method createProcessOvfUpdateForDomainParams.
private ProcessOvfUpdateParameters createProcessOvfUpdateForDomainParams() {
ProcessOvfUpdateParameters params = new ProcessOvfUpdateParameters(getStoragePoolId(), getStorageDomainId());
params.setSkipDomainChecks(true);
if (isExecutedAsChildCommand()) {
params.setParentCommand(getParameters().getParentCommand());
params.setEntityInfo(getParameters().getParentParameters().getEntityInfo());
params.setParentParameters(getParameters().getParentParameters());
}
return params;
}
Aggregations