Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: allow setting the 'backup' flag while creating a VM from a temp… #398

Merged
merged 1 commit into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@ protected CreateSnapshotFromTemplateParameters buildDiskCreationParameters(DiskI
tempVar.setParentParameters(getParameters());
tempVar.setQuotaId(diskInfoDestinationMap.get(image.getId()).getQuotaId());
tempVar.setDiskProfileId(diskInfoDestinationMap.get(image.getId()).getDiskProfileId());
tempVar.setBackup(diskInfoDestinationMap.get(image.getId()).getBackup());
bennyz marked this conversation as resolved.
Show resolved Hide resolved

return tempVar;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ protected DiskImage cloneDiskImage(Guid newImageGuid, DiskImage srcDiskImage) {
retDiskImage.setQuotaId(getParameters().getQuotaId());
retDiskImage.setDiskProfileId(getParameters().getDiskProfileId());
retDiskImage.setDiskAlias(getParameters().getDiskAlias());
retDiskImage.setBackup(getParameters().getBackup());
return retDiskImage;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.ovirt.engine.core.common.VdcObjectType;
import org.ovirt.engine.core.common.asynctasks.EntityInfo;
import org.ovirt.engine.core.common.businessentities.storage.DiskBackup;
import org.ovirt.engine.core.compat.Guid;

public class ImagesActionsParametersBase extends StorageDomainParametersBase {
Expand All @@ -19,6 +20,7 @@ public class ImagesActionsParametersBase extends StorageDomainParametersBase {
private boolean importEntity;
private boolean leaveLocked;
private Long initialSizeInBytes;
private DiskBackup backup;
sleviim marked this conversation as resolved.
Show resolved Hide resolved

public ImagesActionsParametersBase() {
imageId = Guid.Empty;
Expand Down Expand Up @@ -141,4 +143,12 @@ public void setInitialSizeInBytes(Long initialSizeInBytes) {
public Long getInitialSizeInBytes() {
return initialSizeInBytes;
}

public DiskBackup getBackup() {
return backup;
}

public void setBackup(DiskBackup backup) {
this.backup = backup;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ public void setContentType(DiskContentType contentType) {
}

public DiskBackup getBackup() {
return backup;
if (backup != null) {
return backup;
}
return DiskBackup.None;
}

public void setBackup(DiskBackup backup) {
Expand Down