use of org.ovirt.engine.core.common.action.CreateCloneOfTemplateParameters in project ovirt-engine by oVirt.
the class AddVmFromTemplateCommand method buildDiskCreationParameters.
@Override
protected CreateCloneOfTemplateParameters buildDiskCreationParameters(DiskImage disk) {
DiskImageBase diskInfo = getParameters().getDiskInfoDestinationMap().get(disk.getId());
CreateCloneOfTemplateParameters params = new CreateCloneOfTemplateParameters(disk.getImageId(), getParameters().getVmStaticData().getId(), diskInfo);
params.setStorageDomainId(diskInfoSourceMap.get(disk.getId()));
params.setDestStorageDomainId(retrieveDestinationDomainForDisk(disk.getId()));
params.setDiskAlias(diskInfoDestinationMap.get(disk.getId()).getDiskAlias());
params.setVmSnapshotId(getVmSnapshotId());
params.setParentCommand(ActionType.AddVmFromTemplate);
params.setParentParameters(getParameters());
params.setEntityInfo(getParameters().getEntityInfo());
params.setQuotaId(diskInfoDestinationMap.get(disk.getId()).getQuotaId() != null ? diskInfoDestinationMap.get(disk.getId()).getQuotaId() : null);
params.setDiskProfileId(diskInfoDestinationMap.get(disk.getId()).getDiskProfileId());
return params;
}
Aggregations