summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Ritter2024-07-04 16:27:19 +0200
committerSteffen Ritter2024-07-04 16:27:19 +0200
commitd4d1c40db7d892f696d2f078893f7b41387d1fee (patch)
treed6bda33e6d18466bf85835de29b91c78fea348e8
parent[server] CoW: Fix race condition generating invalid hashes (diff)
downloadtutor-module-d4d1c40db7d892f696d2f078893f7b41387d1fee.tar.gz
tutor-module-d4d1c40db7d892f696d2f078893f7b41387d1fee.tar.xz
tutor-module-d4d1c40db7d892f696d2f078893f7b41387d1fee.zip
[client] Allow publishing of vbox and qemu VMs
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java7
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java7
2 files changed, 12 insertions, 2 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
index 7809069d..93c1e630 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
@@ -475,7 +475,12 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout
*/
private void uploadToMaster() {
// 04.2018: bail if we the user tries to publish a non-vmware image.
- if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS) && !TConst.VIRT_VMWARE.equals(image.virtId)) {
+ // 07.2024: allow vmware, virtualbox and qemu. remove check completely?
+ if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS) && !(
+ TConst.VIRT_VMWARE.equals(image.virtId) ||
+ TConst.VIRT_VIRTUALBOX.equals(image.virtId) ||
+ TConst.VIRT_QEMU.equals(image.virtId)
+ )) {
Gui.showMessageBox(
I18n.WINDOW.getString("ImageDetails.Message.error.publishNonVMWareImage",
MetaDataCache.getVirtualizerById(image.virtId).virtName),
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
index 4c2d4f7c..7bc025a5 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
@@ -263,11 +263,16 @@ public class ImagePublishedWindow extends ImagePublishedWindowLayout implements
// 04.2018: Safety check to hide the non-vmware images from the list
// in case they somehow manage to get published. Remove this when we
// support publishing images from other hypervisors.
+ // 07.2024: allow vmware, virtualbox and qemu. remove check completely?
if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS)) {
for (Iterator<ImageSummaryRead> iter = imagePublishedList.listIterator(); iter
.hasNext();) {
ImageSummaryRead current = iter.next();
- if (current != null && !current.virtId.equals(TConst.VIRT_VMWARE)) {
+ if (current != null && !(
+ current.virtId.equals(TConst.VIRT_VMWARE) ||
+ current.virtId.equals(TConst.VIRT_VIRTUALBOX) ||
+ current.virtId.equals(TConst.VIRT_QEMU)
+ )) {
iter.remove();
}
}