summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2021-02-01 16:05:45 +0100
committerManuel Bentele2021-02-01 16:05:45 +0100
commit7acaf01b523ffadac8dda2e06f4a6a8341527343 (patch)
treee96586042bcdb3f20cf927f62ebb2a168465d34a
parent[client] Add import of Libvirt XML files to support QEMU (diff)
downloadtutor-module-7acaf01b523ffadac8dda2e06f4a6a8341527343.tar.gz
tutor-module-7acaf01b523ffadac8dda2e06f4a6a8341527343.tar.xz
tutor-module-7acaf01b523ffadac8dda2e06f4a6a8341527343.zip
[client] Extend disk image check for multiple image formats
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
index d5202f4b..eb5e3d4e 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadPage.java
@@ -35,6 +35,7 @@ import org.openslx.dozmod.thrift.cache.MetaDataCache;
import org.openslx.sat.thrift.version.Feature;
import org.openslx.thrifthelper.TConst;
import org.openslx.util.vm.DiskImage;
+import org.openslx.util.vm.DiskImage.ImageFormat;
import org.openslx.util.vm.DiskImage.UnknownImageFormatException;
import org.openslx.util.vm.VmMetaData;
import org.openslx.util.vm.VmMetaData.HardDisk;
@@ -222,8 +223,9 @@ public class ImageUploadPage extends ImageUploadPageLayout {
vmDiskFileInfo = new File(vmBaseDirectory, hdds.get(0).diskImage);
}
DiskImage diskImage;
+ List<DiskImage.ImageFormat> supportedImageFormats = state.meta.getSupportedImageFormats();
try {
- diskImage = new DiskImage(vmDiskFileInfo);
+ diskImage = new DiskImage(vmDiskFileInfo, supportedImageFormats);
} catch (FileNotFoundException e) {
setErrorMessage(I18n.PAGE.getString("ImageUpload.WizardPage.errorMessage.diskImageNotFound",
vmDiskFileInfo.getName()));