Skip to content

Commit 8717e3a

Browse files
committed
set willDeleteBackupsOnOfferingRemoval to false for dummy and veeam. Disallow create new instance from networker backup.
1 parent cfc9c6f commit 8717e3a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

plugins/backup/dummy/src/main/java/org/apache/cloudstack/backup/DummyBackupProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public boolean removeVMFromBackupOffering(VirtualMachine vm) {
110110

111111
@Override
112112
public boolean willDeleteBackupsOnOfferingRemoval() {
113-
return true;
113+
return false;
114114
}
115115

116116
@Override

plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/VeeamBackupProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public boolean removeVMFromBackupOffering(final VirtualMachine vm) {
221221

222222
@Override
223223
public boolean willDeleteBackupsOnOfferingRemoval() {
224-
return true;
224+
return false;
225225
}
226226

227227
@Override

server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,9 @@ public boolean restoreBackupToVM(final Long backupId, final Long vmId) throws Re
896896
String errorMessage = "Failed to find backup offering of the VM backup.";
897897
throw new CloudRuntimeException("Failed to find backup offering of the VM backup.");
898898
}
899+
if ("networker".equals(offering.getProvider())) {
900+
throw new CloudRuntimeException("Create instance from VM is not supported for Networker Backup plugin.");
901+
}
899902

900903
String backupDetailsInMessage = ReflectionToStringBuilderUtils.reflectOnlySelectedFields(backup, "uuid", "externalId", "newVMId", "type", "status", "date");
901904
try {

0 commit comments

Comments
 (0)