Search in sources :

Example 6 with AsyncTaskCreationInfo

use of org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo in project ovirt-engine by oVirt.

the class SyncImageGroupDataVDSCommand method executeIrsBrokerCommand.

@Override
protected void executeIrsBrokerCommand() {
    P params = getParameters();
    uuidReturn = getIrsProxy().syncImageData(params.getStoragePoolId().toString(), params.getStorageDomainId().toString(), params.getImageGroupId().toString(), params.getDstDomainId().toString(), params.getSyncType());
    proceedProxyReturnValue();
    Guid taskID = new Guid(uuidReturn.uuid);
    getVDSReturnValue().setCreationInfo(new AsyncTaskCreationInfo(taskID, AsyncTaskType.syncImageData, params.getStoragePoolId()));
}
Also used : AsyncTaskCreationInfo(org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo) Guid(org.ovirt.engine.core.compat.Guid)

Example 7 with AsyncTaskCreationInfo

use of org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo in project ovirt-engine by oVirt.

the class DownloadImageVDSCommand method executeIrsBrokerCommand.

@Override
protected void executeIrsBrokerCommand() {
    setReturnValue(Guid.Empty);
    log.info("-- executeIrsBrokerCommand: calling 'downloadImage', parameters:");
    log.info("++ dstSpUUID={}", getParameters().getStoragePoolId());
    log.info("++ dstSdUUID={}", getParameters().getStorageDomainId());
    log.info("++ dstImageGUID={}", getParameters().getImageGroupId());
    log.info("++ dstVolUUID={}", getParameters().getImageId());
    log.info("++ importLocation={}", getParameters().getDownloadInfo());
    uuidReturn = getIrsProxy().downloadImage(LocationInfoHelper.prepareLocationInfoForVdsCommand(getParameters().getDownloadInfo()), getParameters().getStoragePoolId().toString(), getParameters().getStorageDomainId().toString(), getParameters().getImageGroupId().toString(), getParameters().getImageId().toString());
    proceedProxyReturnValue();
    getVDSReturnValue().setCreationInfo(new AsyncTaskCreationInfo(new Guid(uuidReturn.uuid), AsyncTaskType.downloadImage, getParameters().getStoragePoolId()));
}
Also used : AsyncTaskCreationInfo(org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo) Guid(org.ovirt.engine.core.compat.Guid)

Example 8 with AsyncTaskCreationInfo

use of org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo in project ovirt-engine by oVirt.

the class ExtendImageSizeVDSCommand method executeIrsBrokerCommand.

@Override
protected void executeIrsBrokerCommand() {
    result = getIrsProxy().extendVolumeSize(getParameters().getStoragePoolId().toString(), getParameters().getStorageDomainId().toString(), getParameters().getImageGroupId().toString(), getParameters().getImageId().toString(), String.valueOf(getParameters().getNewSize()));
    proceedProxyReturnValue();
    getVDSReturnValue().setCreationInfo(new AsyncTaskCreationInfo(Guid.createGuidFromString(result.uuid), AsyncTaskType.extendImageSize, getParameters().getStoragePoolId()));
}
Also used : AsyncTaskCreationInfo(org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo)

Example 9 with AsyncTaskCreationInfo

use of org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo in project ovirt-engine by oVirt.

the class FinalizeMergeVDSCommand method executeIrsBrokerCommand.

@Override
protected void executeIrsBrokerCommand() {
    uuidReturn = getIrsProxy().finalizeMerge(getParameters().getStoragePoolId().toString(), SubchainInfoHelper.prepareSubchainInfoForVdsCommand(getParameters().getSubchainInfo()));
    proceedProxyReturnValue();
    Guid taskID = new Guid(uuidReturn.uuid);
    getVDSReturnValue().setCreationInfo(new AsyncTaskCreationInfo(taskID, AsyncTaskType.finalizeMerge, getParameters().getStoragePoolId()));
}
Also used : AsyncTaskCreationInfo(org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo) Guid(org.ovirt.engine.core.compat.Guid)

Example 10 with AsyncTaskCreationInfo

use of org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo in project ovirt-engine by oVirt.

the class CloneImageGroupStructureVDSCommand method executeIrsBrokerCommand.

@Override
protected void executeIrsBrokerCommand() {
    storageDomainHelper.checkNumberOfLVsForBlockDomain(getParameters().getDstDomainId());
    P params = getParameters();
    uuidReturn = getIrsProxy().cloneImageStructure(params.getStoragePoolId().toString(), params.getStorageDomainId().toString(), params.getImageGroupId().toString(), params.getDstDomainId().toString());
    proceedProxyReturnValue();
    Guid taskID = new Guid(uuidReturn.uuid);
    getVDSReturnValue().setCreationInfo(new AsyncTaskCreationInfo(taskID, AsyncTaskType.cloneImageStructure, params.getStoragePoolId()));
}
Also used : AsyncTaskCreationInfo(org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo) Guid(org.ovirt.engine.core.compat.Guid)

Aggregations

AsyncTaskCreationInfo (org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo)24 Guid (org.ovirt.engine.core.compat.Guid)20 ArrayList (java.util.ArrayList)2 SPMTask (org.ovirt.engine.core.bll.tasks.interfaces.SPMTask)2 AsyncTask (org.ovirt.engine.core.common.businessentities.AsyncTask)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 FutureTask (java.util.concurrent.FutureTask)1 HttpClient (org.apache.commons.httpclient.HttpClient)1 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)1 CopyImageGroupWithDataCommandParameters (org.ovirt.engine.core.common.action.CopyImageGroupWithDataCommandParameters)1 AsyncTaskType (org.ovirt.engine.core.common.asynctasks.AsyncTaskType)1 AsyncTaskStatus (org.ovirt.engine.core.common.businessentities.AsyncTaskStatus)1 EngineException (org.ovirt.engine.core.common.errors.EngineException)1 CopyImageVDSCommandParameters (org.ovirt.engine.core.common.vdscommands.CopyImageVDSCommandParameters)1 DestroyImageVDSCommandParameters (org.ovirt.engine.core.common.vdscommands.DestroyImageVDSCommandParameters)1 MoveImageGroupVDSCommandParameters (org.ovirt.engine.core.common.vdscommands.MoveImageGroupVDSCommandParameters)1 VDSReturnValue (org.ovirt.engine.core.common.vdscommands.VDSReturnValue)1 TransactionScopeOption (org.ovirt.engine.core.compat.TransactionScopeOption)1 VdsManager (org.ovirt.engine.core.vdsbroker.VdsManager)1