You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (result == null || !Boolean.TRUE.equals(result.first())) {
11039
-
if (result != null && StringUtils.isNotEmpty(result.second())) {
11040
-
throw new CloudRuntimeException(String.format("Failed to create Instance from backup %s using bx provider. Error: %s", backup.getUuid(), result.second()));
11041
-
}
11042
-
throw new CloudRuntimeException(String.format("Failed to create Instance from backup %s using bx provider.", backup.getUuid()));
// throw new CloudRuntimeException(String.format("Unable to find restored Instance created from backup %s using bx provider.", backup.getUuid()));
11052
-
// }
11053
-
return result;
11054
-
} else {
11055
-
throw new CloudRuntimeException("Create instance from backup is not supported for this provider.");
11023
+
Pair<Boolean, String> result = backupProvider.restoreBackupToVM(cmd.getBackupId(), cmd.getName());
11024
+
if (result == null || !Boolean.TRUE.equals(result.first())) {
11025
+
if (result != null && StringUtils.isNotEmpty(result.second())) {
11026
+
throw new CloudRuntimeException(String.format("Failed to create Instance from backup %s using bx provider. Error: %s", backup.getUuid(), result.second()));
11027
+
}
11028
+
throw new CloudRuntimeException(String.format("Failed to create Instance from backup %s using bx provider.", backup.getUuid()));
0 commit comments