Search in sources :

Example 1 with MoveDisksParameters

use of org.ovirt.engine.core.common.action.MoveDisksParameters in project ovirt-engine by oVirt.

the class BackendVmDiskResource method move.

@Override
public Response move(Action action) {
    validateParameters(action, "storageDomain.id|name");
    Guid storageDomainId = getStorageDomainId(action);
    Disk disk = getDisk();
    Guid sourceStorageDomainId = getSourceStorageDomainId(disk);
    Guid imageId = getDiskImageId(disk.getImageId());
    MoveDiskParameters innerParams = new MoveDiskParameters(imageId, sourceStorageDomainId, storageDomainId);
    innerParams.setImageGroupID(asGuid(disk.getId()));
    MoveDisksParameters params = new MoveDisksParameters(Collections.singletonList(innerParams));
    return doAction(ActionType.MoveDisk, params, action);
}
Also used : MoveDiskParameters(org.ovirt.engine.core.common.action.MoveDiskParameters) MoveDisksParameters(org.ovirt.engine.core.common.action.MoveDisksParameters) Guid(org.ovirt.engine.core.compat.Guid) Disk(org.ovirt.engine.api.model.Disk)

Aggregations

Disk (org.ovirt.engine.api.model.Disk)1 MoveDiskParameters (org.ovirt.engine.core.common.action.MoveDiskParameters)1 MoveDisksParameters (org.ovirt.engine.core.common.action.MoveDisksParameters)1 Guid (org.ovirt.engine.core.compat.Guid)1