Search in sources :

Example 1 with SyncImageGroupDataVDSCommandParameters

use of org.ovirt.engine.core.common.vdscommands.SyncImageGroupDataVDSCommandParameters in project ovirt-engine by oVirt.

the class SyncImageGroupDataCommand method executeCommand.

@Override
protected void executeCommand() {
    getParameters().setEntityInfo(new EntityInfo(VdcObjectType.Disk, getParameters().getImageGroup()));
    Guid taskId = persistAsyncTaskPlaceHolder(getParameters().getParentCommand());
    VDSReturnValue vdsReturnValue = runVdsCommand(VDSCommandType.SyncImageGroupData, new SyncImageGroupDataVDSCommandParameters(getParameters().getStoragePoolId(), getParameters().getStorageDomainId(), getParameters().getImageGroup(), getParameters().getDstStorageDomain(), SyncImageGroupDataVDSCommandParameters.SYNC_TYPE_INTERNAL));
    if (vdsReturnValue.getSucceeded()) {
        getParameters().setVdsmTaskIds(new ArrayList<>());
        getParameters().getVdsmTaskIds().add(createTask(taskId, vdsReturnValue.getCreationInfo(), getParameters().getParentCommand(), VdcObjectType.Storage, getParameters().getStorageDomainId()));
        getReturnValue().getVdsmTaskIdList().add(getParameters().getVdsmTaskIds().get(0));
    }
    setSucceeded(true);
}
Also used : EntityInfo(org.ovirt.engine.core.common.asynctasks.EntityInfo) SyncImageGroupDataVDSCommandParameters(org.ovirt.engine.core.common.vdscommands.SyncImageGroupDataVDSCommandParameters) Guid(org.ovirt.engine.core.compat.Guid) VDSReturnValue(org.ovirt.engine.core.common.vdscommands.VDSReturnValue)

Aggregations

EntityInfo (org.ovirt.engine.core.common.asynctasks.EntityInfo)1 SyncImageGroupDataVDSCommandParameters (org.ovirt.engine.core.common.vdscommands.SyncImageGroupDataVDSCommandParameters)1 VDSReturnValue (org.ovirt.engine.core.common.vdscommands.VDSReturnValue)1 Guid (org.ovirt.engine.core.compat.Guid)1