Search in sources :

Example 1 with CreateOvaParameters

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

the class ExportOvaCommand method buildCreateOvaParameters.

private CreateOvaParameters buildCreateOvaParameters() {
    CreateOvaParameters parameters = new CreateOvaParameters();
    parameters.setVm(vmDao.get(getParameters().getEntityId()));
    getParameters().getDiskInfoDestinationMap().forEach((source, destination) -> {
        // same as the disk<->vm element for the original disk
        destination.setDiskVmElements(Collections.singleton(diskVmElementDao.get(new VmDeviceId(source.getId(), getParameters().getEntityId()))));
    });
    parameters.setDiskInfoDestinationMap(getParameters().getDiskInfoDestinationMap());
    parameters.setProxyHostId(getParameters().getProxyHostId());
    parameters.setDirectory(getParameters().getDirectory());
    parameters.setName(getParameters().getName());
    return parameters;
}
Also used : VmDeviceId(org.ovirt.engine.core.common.businessentities.VmDeviceId) CreateOvaParameters(org.ovirt.engine.core.common.action.CreateOvaParameters)

Aggregations

CreateOvaParameters (org.ovirt.engine.core.common.action.CreateOvaParameters)1 VmDeviceId (org.ovirt.engine.core.common.businessentities.VmDeviceId)1