diff options
-rw-r--r-- | pom.xml | 15 | ||||
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java | 110 | ||||
-rw-r--r-- | src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java | 14 | ||||
-rw-r--r-- | src/main/java/org/openslx/sat/thrift/version/Feature.java | 6 | ||||
-rw-r--r-- | src/main/java/org/openslx/vm/disk/DiskImage.java | 71 | ||||
-rw-r--r-- | src/main/java/org/openslx/vm/disk/DiskImageQcow2.java | 22 | ||||
-rw-r--r-- | src/main/java/org/openslx/vm/disk/DiskImageVdi.java | 18 | ||||
-rw-r--r-- | src/main/java/org/openslx/vm/disk/DiskImageVmdk.java | 21 | ||||
-rw-r--r-- | src/main/thrift/bwlp.thrift | 2 |
9 files changed, 159 insertions, 120 deletions
@@ -8,25 +8,12 @@ <packaging>jar</packaging> <name>master-sync-shared</name> - <url>http://maven.apache.org</url> + <url>https://git.openslx.org/bwlp/master-sync-shared.git</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> - <repositories> - <repository> - <snapshots> - <enabled>true</enabled> - <updatePolicy>always</updatePolicy> - <checksumPolicy>warn</checksumPolicy> - </snapshots> - <id>mltk-repo</id> - <name>mltk repo</name> - <url>http://mltk-services.ruf.uni-freiburg.de:8081/nexus/content/repositories/snapshots/</url> - </repository> - </repositories> - <distributionManagement> <repository> <id>mltk-repo</id> diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java index 4737596..0dc1800 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-02-22") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2021-04-21") public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, SatelliteConfig._Fields>, java.io.Serializable, Cloneable, Comparable<SatelliteConfig> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SatelliteConfig"); @@ -48,6 +48,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, private static final org.apache.thrift.protocol.TField MAX_LOCATIONS_PER_LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxLocationsPerLecture", org.apache.thrift.protocol.TType.I32, (short)8); private static final org.apache.thrift.protocol.TField ALLOW_LOGIN_BY_DEFAULT_FIELD_DESC = new org.apache.thrift.protocol.TField("allowLoginByDefault", org.apache.thrift.protocol.TType.BOOL, (short)9); private static final org.apache.thrift.protocol.TField SERVER_SIDE_COPY_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSideCopy", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField ALLOW_STUDENT_DOWNLOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("allowStudentDownload", org.apache.thrift.protocol.TType.BOOL, (short)11); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -69,6 +70,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, * @see SscMode */ public SscMode serverSideCopy; // optional + public boolean allowStudentDownload; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -85,7 +87,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, * * @see SscMode */ - SERVER_SIDE_COPY((short)10, "serverSideCopy"); + SERVER_SIDE_COPY((short)10, "serverSideCopy"), + ALLOW_STUDENT_DOWNLOAD((short)11, "allowStudentDownload"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -120,6 +123,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return ALLOW_LOGIN_BY_DEFAULT; case 10: // SERVER_SIDE_COPY return SERVER_SIDE_COPY; + case 11: // ALLOW_STUDENT_DOWNLOAD + return ALLOW_STUDENT_DOWNLOAD; default: return null; } @@ -167,8 +172,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, private static final int __MAXCONNECTIONSPERTRANSFER_ISSET_ID = 4; private static final int __MAXLOCATIONSPERLECTURE_ISSET_ID = 5; private static final int __ALLOWLOGINBYDEFAULT_ISSET_ID = 6; + private static final int __ALLOWSTUDENTDOWNLOAD_ISSET_ID = 7; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT,_Fields.SERVER_SIDE_COPY}; + private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT,_Fields.SERVER_SIDE_COPY,_Fields.ALLOW_STUDENT_DOWNLOAD}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -192,6 +198,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.SERVER_SIDE_COPY, new org.apache.thrift.meta_data.FieldMetaData("serverSideCopy", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SscMode.class))); + tmpMap.put(_Fields.ALLOW_STUDENT_DOWNLOAD, new org.apache.thrift.meta_data.FieldMetaData("allowStudentDownload", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SatelliteConfig.class, metaDataMap); } @@ -238,6 +246,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (other.isSetServerSideCopy()) { this.serverSideCopy = other.serverSideCopy; } + this.allowStudentDownload = other.allowStudentDownload; } public SatelliteConfig deepCopy() { @@ -263,6 +272,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, setAllowLoginByDefaultIsSet(false); this.allowLoginByDefault = false; this.serverSideCopy = null; + setAllowStudentDownloadIsSet(false); + this.allowStudentDownload = false; } public int getPageSize() { @@ -506,6 +517,29 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } } + public boolean isAllowStudentDownload() { + return this.allowStudentDownload; + } + + public SatelliteConfig setAllowStudentDownload(boolean allowStudentDownload) { + this.allowStudentDownload = allowStudentDownload; + setAllowStudentDownloadIsSet(true); + return this; + } + + public void unsetAllowStudentDownload() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID); + } + + /** Returns true if field allowStudentDownload is set (has been assigned a value) and false otherwise */ + public boolean isSetAllowStudentDownload() { + return EncodingUtils.testBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID); + } + + public void setAllowStudentDownloadIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case PAGE_SIZE: @@ -588,6 +622,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } break; + case ALLOW_STUDENT_DOWNLOAD: + if (value == null) { + unsetAllowStudentDownload(); + } else { + setAllowStudentDownload((Boolean)value); + } + break; + } } @@ -623,6 +665,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, case SERVER_SIDE_COPY: return getServerSideCopy(); + case ALLOW_STUDENT_DOWNLOAD: + return isAllowStudentDownload(); + } throw new IllegalStateException(); } @@ -654,6 +699,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return isSetAllowLoginByDefault(); case SERVER_SIDE_COPY: return isSetServerSideCopy(); + case ALLOW_STUDENT_DOWNLOAD: + return isSetAllowStudentDownload(); } throw new IllegalStateException(); } @@ -761,6 +808,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return false; } + boolean this_present_allowStudentDownload = true && this.isSetAllowStudentDownload(); + boolean that_present_allowStudentDownload = true && that.isSetAllowStudentDownload(); + if (this_present_allowStudentDownload || that_present_allowStudentDownload) { + if (!(this_present_allowStudentDownload && that_present_allowStudentDownload)) + return false; + if (this.allowStudentDownload != that.allowStudentDownload) + return false; + } + return true; } @@ -818,6 +874,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (present_serverSideCopy) list.add(serverSideCopy.getValue()); + boolean present_allowStudentDownload = true && (isSetAllowStudentDownload()); + list.add(present_allowStudentDownload); + if (present_allowStudentDownload) + list.add(allowStudentDownload); + return list.hashCode(); } @@ -929,6 +990,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } + lastComparison = Boolean.valueOf(isSetAllowStudentDownload()).compareTo(other.isSetAllowStudentDownload()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAllowStudentDownload()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allowStudentDownload, other.allowStudentDownload); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1010,6 +1081,12 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } first = false; } + if (isSetAllowStudentDownload()) { + if (!first) sb.append(", "); + sb.append("allowStudentDownload:"); + sb.append(this.allowStudentDownload); + first = false; + } sb.append(")"); return sb.toString(); } @@ -1143,6 +1220,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 11: // ALLOW_STUDENT_DOWNLOAD + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.allowStudentDownload = iprot.readBool(); + struct.setAllowStudentDownloadIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1204,6 +1289,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, oprot.writeFieldEnd(); } } + if (struct.isSetAllowStudentDownload()) { + oprot.writeFieldBegin(ALLOW_STUDENT_DOWNLOAD_FIELD_DESC); + oprot.writeBool(struct.allowStudentDownload); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1252,7 +1342,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (struct.isSetServerSideCopy()) { optionals.set(9); } - oprot.writeBitSet(optionals, 10); + if (struct.isSetAllowStudentDownload()) { + optionals.set(10); + } + oprot.writeBitSet(optionals, 11); if (struct.isSetPageSize()) { oprot.writeI32(struct.pageSize); } @@ -1283,12 +1376,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (struct.isSetServerSideCopy()) { oprot.writeI32(struct.serverSideCopy.getValue()); } + if (struct.isSetAllowStudentDownload()) { + oprot.writeBool(struct.allowStudentDownload); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, SatelliteConfig struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(10); + BitSet incoming = iprot.readBitSet(11); if (incoming.get(0)) { struct.pageSize = iprot.readI32(); struct.setPageSizeIsSet(true); @@ -1331,6 +1427,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, struct.serverSideCopy = org.openslx.bwlp.thrift.iface.SscMode.findByValue(iprot.readI32()); struct.setServerSideCopyIsSet(true); } + if (incoming.get(10)) { + struct.allowStudentDownload = iprot.readBool(); + struct.setAllowStudentDownloadIsSet(true); + } } } diff --git a/src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java b/src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java index 8a69020..300a75f 100644 --- a/src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java +++ b/src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java @@ -389,7 +389,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H currentChunk = chunks.getMissing(); } catch ( InterruptedException e ) { Thread.currentThread().interrupt(); - cancel(); + LOGGER.info("Incoming transfer connection was interrupted"); return null; } if ( currentChunk == null ) { @@ -600,7 +600,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H } // A block finished, see if we can queue a new one queueUnhashedChunk( false ); - if ( localCopyManager != null ) { + if ( localCopyManager != null && localCopyManager.isAlive() ) { localCopyManager.trigger(); } } @@ -645,7 +645,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H final synchronized void finishUploadInternal() { - if ( state == TransferState.FINISHED ) { + if ( state == TransferState.FINISHED || state == TransferState.ERROR ) { return; } try { @@ -659,13 +659,9 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H if ( localCopyManager != null ) { localCopyManager.interrupt(); } - if ( state != TransferState.WORKING ) { + state = TransferState.FINISHED; // Races... + if ( !finishIncomingTransfer() ) { state = TransferState.ERROR; - } else { - state = TransferState.FINISHED; // Races... - if ( !finishIncomingTransfer() ) { - state = TransferState.ERROR; - } } } diff --git a/src/main/java/org/openslx/sat/thrift/version/Feature.java b/src/main/java/org/openslx/sat/thrift/version/Feature.java index b81d65f..4507505 100644 --- a/src/main/java/org/openslx/sat/thrift/version/Feature.java +++ b/src/main/java/org/openslx/sat/thrift/version/Feature.java @@ -35,5 +35,9 @@ public enum Feature { * Allow editing of USB speed */ CONFIGURE_USB, - + + /** + * Allow uploading of Docker Images + */ + DOCKER_CONTAINER, } diff --git a/src/main/java/org/openslx/vm/disk/DiskImage.java b/src/main/java/org/openslx/vm/disk/DiskImage.java index d2cd71b..cf7df83 100644 --- a/src/main/java/org/openslx/vm/disk/DiskImage.java +++ b/src/main/java/org/openslx/vm/disk/DiskImage.java @@ -1,5 +1,6 @@ package org.openslx.vm.disk; +import java.io.Closeable; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; @@ -9,6 +10,7 @@ import java.util.function.Predicate; import org.openslx.bwlp.thrift.iface.Virtualizer; import org.openslx.thrifthelper.TConst; +import org.openslx.util.Util; import org.openslx.virtualization.Version; /** @@ -20,7 +22,7 @@ import org.openslx.virtualization.Version; * @author Manuel Bentele * @version 1.0 */ -public abstract class DiskImage +public abstract class DiskImage implements Closeable { /** * Stores the image file of the disk. @@ -32,29 +34,11 @@ public abstract class DiskImage * * @param diskImage file to a disk storing the image content. * - * @throws FileNotFoundException cannot find specified disk image file. - * @throws IOException cannot access the content of the disk image file. - * - * @implNote Do not use this constructor to create a new disk image from an image file with - * unknown disk image format. Instead, use the factory method - * {@link #newInstance(File)} to probe unknown disk image files before creation. - */ - public DiskImage( File diskImage ) throws FileNotFoundException, IOException - { - final RandomAccessFile diskFile = new RandomAccessFile( diskImage, "r" ); - this.diskImage = diskFile; - } - - /** - * Creates a new disk image from an existing image file with a known disk image format. - * - * @param diskImage file to a disk storing the image content. - * * @implNote Do not use this constructor to create a new disk image from an image file with * unknown disk image format. Instead, use the factory method * {@link #newInstance(File)} to probe unknown disk image files before creation. */ - public DiskImage( RandomAccessFile diskImage ) + protected DiskImage( RandomAccessFile diskImage ) { this.diskImage = diskImage; } @@ -125,30 +109,47 @@ public abstract class DiskImage /** * Creates a new disk image from an existing image file with an unknown disk image format. * - * @param diskImage file to a disk storing the image content. + * @param diskImagePath file to a disk storing the image content. * @return concrete disk image instance. * * @throws FileNotFoundException cannot find specified disk image file. * @throws IOException cannot access the content of the disk image file. * @throws DiskImageException disk image file has an invalid and unknown disk image format. */ - public static DiskImage newInstance( File diskImage ) throws FileNotFoundException, IOException, DiskImageException + public static DiskImage newInstance( File diskImagePath ) + throws FileNotFoundException, IOException, DiskImageException { - final RandomAccessFile diskFile = new RandomAccessFile( diskImage, "r" ); - final DiskImage diskImageInstance; - - if ( DiskImageQcow2.probe( diskFile ) ) { - diskImageInstance = new DiskImageQcow2( diskFile ); - } else if ( DiskImageVdi.probe( diskFile ) ) { - diskImageInstance = new DiskImageVdi( diskFile ); - } else if ( DiskImageVmdk.probe( diskFile ) ) { - diskImageInstance = new DiskImageVmdk( diskFile ); - } else { - final String errorMsg = new String( "File '" + diskImage.getAbsolutePath() + "' is not a valid disk image!" ); - throw new DiskImageException( errorMsg ); + // Make sure this doesn't escape the scope, in case instantiation fails - we can't know when the GC + // would come along and close this file, which is problematic on Windows (blocking rename/delete) + final RandomAccessFile fileHandle = new RandomAccessFile( diskImagePath, "r" ); + + try { + if ( DiskImageQcow2.probe( fileHandle ) ) { + return new DiskImageQcow2( fileHandle ); + } else if ( DiskImageVdi.probe( fileHandle ) ) { + return new DiskImageVdi( fileHandle ); + } else if ( DiskImageVmdk.probe( fileHandle ) ) { + return new DiskImageVmdk( fileHandle ); + } + } catch ( Exception e ) { + Util.safeClose( fileHandle ); + throw e; } + Util.safeClose( fileHandle ); + final String errorMsg = new String( "File '" + diskImagePath.getAbsolutePath() + "' is not a valid disk image!" ); + throw new DiskImageException( errorMsg ); + } - return diskImageInstance; + @Override + public void close() throws IOException + { + Util.safeClose( diskImage ); + } + + @Override + protected void finalize() throws Throwable + { + close(); } /** diff --git a/src/main/java/org/openslx/vm/disk/DiskImageQcow2.java b/src/main/java/org/openslx/vm/disk/DiskImageQcow2.java index 657c144..e569708 100644 --- a/src/main/java/org/openslx/vm/disk/DiskImageQcow2.java +++ b/src/main/java/org/openslx/vm/disk/DiskImageQcow2.java @@ -1,8 +1,5 @@ package org.openslx.vm.disk; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.RandomAccessFile; import org.openslx.virtualization.Version; @@ -51,24 +48,11 @@ public class DiskImageQcow2 extends DiskImage /** * Creates a new QCOW2 disk image from an existing QCOW2 image file. * - * @param disk file to a QCOW2 disk storing the image content. - * - * @throws FileNotFoundException cannot find specified QCOW2 disk image file. - * @throws IOException cannot access the content of the QCOW2 disk image file. - */ - public DiskImageQcow2( File disk ) throws FileNotFoundException, IOException - { - super( disk ); - } - - /** - * Creates a new QCOW2 disk image from an existing QCOW2 image file. - * - * @param disk file to a QCOW2 disk storing the image content. + * @param diskImage file to a QCOW2 disk storing the image content. */ - public DiskImageQcow2( RandomAccessFile disk ) + DiskImageQcow2( RandomAccessFile diskImage ) { - super( disk ); + super( diskImage ); } /** diff --git a/src/main/java/org/openslx/vm/disk/DiskImageVdi.java b/src/main/java/org/openslx/vm/disk/DiskImageVdi.java index 16db956..37e45c1 100644 --- a/src/main/java/org/openslx/vm/disk/DiskImageVdi.java +++ b/src/main/java/org/openslx/vm/disk/DiskImageVdi.java @@ -1,8 +1,5 @@ package org.openslx.vm.disk; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.RandomAccessFile; import org.openslx.virtualization.Version; @@ -24,21 +21,8 @@ public class DiskImageVdi extends DiskImage * Creates a new VDI disk image from an existing VDI image file. * * @param diskImage file to a VDI disk storing the image content. - * - * @throws FileNotFoundException cannot find specified VDI disk image file. - * @throws IOException cannot access the content of the VDI disk image file. - */ - public DiskImageVdi( File diskImage ) throws FileNotFoundException, IOException - { - super( diskImage ); - } - - /** - * Creates a new VDI disk image from an existing VDI image file. - * - * @param diskImage file to a VDI disk storing the image content. */ - public DiskImageVdi( RandomAccessFile diskImage ) + DiskImageVdi( RandomAccessFile diskImage ) { super( diskImage ); } diff --git a/src/main/java/org/openslx/vm/disk/DiskImageVmdk.java b/src/main/java/org/openslx/vm/disk/DiskImageVmdk.java index b2f45a1..75a2bac 100644 --- a/src/main/java/org/openslx/vm/disk/DiskImageVmdk.java +++ b/src/main/java/org/openslx/vm/disk/DiskImageVmdk.java @@ -1,8 +1,5 @@ package org.openslx.vm.disk; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.RandomAccessFile; import org.openslx.util.Util; @@ -44,24 +41,8 @@ public class DiskImageVmdk extends DiskImage * @param diskImage file to a VMDK disk storing the image content. * * @throws DiskImageException parsing of the VMDK's embedded descriptor file failed. - * @throws FileNotFoundException cannot find specified VMDK disk image file. - * @throws IOException cannot access the content of the VMDK disk image file. */ - public DiskImageVmdk( File diskImage ) throws DiskImageException, FileNotFoundException, IOException - { - super( diskImage ); - - this.vmdkConfig = this.parseVmdkConfig(); - } - - /** - * Creates a new VMDK disk image from an existing VMDK image file. - * - * @param diskImage file to a VMDK disk storing the image content. - * - * @throws DiskImageException parsing of the VMDK's embedded descriptor file failed. - */ - public DiskImageVmdk( RandomAccessFile diskImage ) throws DiskImageException + DiskImageVmdk( RandomAccessFile diskImage ) throws DiskImageException { super( diskImage ); diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index 3fc9c5a..9b4c008 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -423,6 +423,8 @@ struct SatelliteConfig { 9: optional bool allowLoginByDefault, // ServerSide Copy on, off, auto or controlled by user 10: optional SscMode serverSideCopy, + // Students are allowed to download non-restricted images? + 11: optional bool allowStudentDownload, } struct SatelliteStatus { |