summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2017-01-26 16:03:40 +0100
committerSimon Rettberg2017-01-26 16:03:40 +0100
commitcc2d730f0c71d4642cf122733eec2a67eea90036 (patch)
tree086d5631f5a9539c2b2ac5a4ffe8d844c0d956f7
parent[vmutil] Tweak strings of vmware options (diff)
downloadmaster-sync-shared-v1.1.tar.gz
master-sync-shared-v1.1.tar.xz
master-sync-shared-v1.1.zip
Add Feature support for dozmod; add allowLoginByDefault optionv1.1
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java110
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java739
-rw-r--r--src/main/java/org/openslx/sat/thrift/version/Feature.java12
-rw-r--r--src/main/thrift/bwlp.thrift6
5 files changed, 862 insertions, 7 deletions
diff --git a/pom.xml b/pom.xml
index 5f10585..15765a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,7 +94,7 @@
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
- <version>[0.9.1,1.0.0]</version>
+ <version>[0.9.1,0.9.9]</version>
<scope>compile</scope>
</dependency>
<dependency>
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 f9ec5f2..08482a7 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 = "2016-01-19")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-01-24")
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");
@@ -46,6 +46,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
private static final org.apache.thrift.protocol.TField MAX_TRANSFERS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxTransfers", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField MAX_CONNECTIONS_PER_TRANSFER_FIELD_DESC = new org.apache.thrift.protocol.TField("maxConnectionsPerTransfer", org.apache.thrift.protocol.TType.I32, (short)7);
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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -61,6 +62,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
public int maxTransfers; // optional
public int maxConnectionsPerTransfer; // optional
public int maxLocationsPerLecture; // optional
+ public boolean allowLoginByDefault; // 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 {
@@ -71,7 +73,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
MAX_LECTURE_VALIDITY_DAYS((short)5, "maxLectureValidityDays"),
MAX_TRANSFERS((short)6, "maxTransfers"),
MAX_CONNECTIONS_PER_TRANSFER((short)7, "maxConnectionsPerTransfer"),
- MAX_LOCATIONS_PER_LECTURE((short)8, "maxLocationsPerLecture");
+ MAX_LOCATIONS_PER_LECTURE((short)8, "maxLocationsPerLecture"),
+ ALLOW_LOGIN_BY_DEFAULT((short)9, "allowLoginByDefault");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -102,6 +105,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return MAX_CONNECTIONS_PER_TRANSFER;
case 8: // MAX_LOCATIONS_PER_LECTURE
return MAX_LOCATIONS_PER_LECTURE;
+ case 9: // ALLOW_LOGIN_BY_DEFAULT
+ return ALLOW_LOGIN_BY_DEFAULT;
default:
return null;
}
@@ -148,8 +153,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
private static final int __MAXTRANSFERS_ISSET_ID = 3;
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 byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE};
+ private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT};
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);
@@ -169,6 +175,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.MAX_LOCATIONS_PER_LECTURE, new org.apache.thrift.meta_data.FieldMetaData("maxLocationsPerLecture", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.ALLOW_LOGIN_BY_DEFAULT, new org.apache.thrift.meta_data.FieldMetaData("allowLoginByDefault", 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);
}
@@ -211,6 +219,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
this.maxTransfers = other.maxTransfers;
this.maxConnectionsPerTransfer = other.maxConnectionsPerTransfer;
this.maxLocationsPerLecture = other.maxLocationsPerLecture;
+ this.allowLoginByDefault = other.allowLoginByDefault;
}
public SatelliteConfig deepCopy() {
@@ -233,6 +242,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
this.maxConnectionsPerTransfer = 0;
setMaxLocationsPerLectureIsSet(false);
this.maxLocationsPerLecture = 0;
+ setAllowLoginByDefaultIsSet(false);
+ this.allowLoginByDefault = false;
}
public int getPageSize() {
@@ -421,6 +432,29 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID, value);
}
+ public boolean isAllowLoginByDefault() {
+ return this.allowLoginByDefault;
+ }
+
+ public SatelliteConfig setAllowLoginByDefault(boolean allowLoginByDefault) {
+ this.allowLoginByDefault = allowLoginByDefault;
+ setAllowLoginByDefaultIsSet(true);
+ return this;
+ }
+
+ public void unsetAllowLoginByDefault() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID);
+ }
+
+ /** Returns true if field allowLoginByDefault is set (has been assigned a value) and false otherwise */
+ public boolean isSetAllowLoginByDefault() {
+ return EncodingUtils.testBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID);
+ }
+
+ public void setAllowLoginByDefaultIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PAGE_SIZE:
@@ -487,6 +521,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
break;
+ case ALLOW_LOGIN_BY_DEFAULT:
+ if (value == null) {
+ unsetAllowLoginByDefault();
+ } else {
+ setAllowLoginByDefault((Boolean)value);
+ }
+ break;
+
}
}
@@ -516,6 +558,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
case MAX_LOCATIONS_PER_LECTURE:
return getMaxLocationsPerLecture();
+ case ALLOW_LOGIN_BY_DEFAULT:
+ return isAllowLoginByDefault();
+
}
throw new IllegalStateException();
}
@@ -543,6 +588,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return isSetMaxConnectionsPerTransfer();
case MAX_LOCATIONS_PER_LECTURE:
return isSetMaxLocationsPerLecture();
+ case ALLOW_LOGIN_BY_DEFAULT:
+ return isSetAllowLoginByDefault();
}
throw new IllegalStateException();
}
@@ -632,6 +679,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return false;
}
+ boolean this_present_allowLoginByDefault = true && this.isSetAllowLoginByDefault();
+ boolean that_present_allowLoginByDefault = true && that.isSetAllowLoginByDefault();
+ if (this_present_allowLoginByDefault || that_present_allowLoginByDefault) {
+ if (!(this_present_allowLoginByDefault && that_present_allowLoginByDefault))
+ return false;
+ if (this.allowLoginByDefault != that.allowLoginByDefault)
+ return false;
+ }
+
return true;
}
@@ -679,6 +735,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (present_maxLocationsPerLecture)
list.add(maxLocationsPerLecture);
+ boolean present_allowLoginByDefault = true && (isSetAllowLoginByDefault());
+ list.add(present_allowLoginByDefault);
+ if (present_allowLoginByDefault)
+ list.add(allowLoginByDefault);
+
return list.hashCode();
}
@@ -770,6 +831,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetAllowLoginByDefault()).compareTo(other.isSetAllowLoginByDefault());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAllowLoginByDefault()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allowLoginByDefault, other.allowLoginByDefault);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -835,6 +906,12 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
sb.append(this.maxLocationsPerLecture);
first = false;
}
+ if (isSetAllowLoginByDefault()) {
+ if (!first) sb.append(", ");
+ sb.append("allowLoginByDefault:");
+ sb.append(this.allowLoginByDefault);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -952,6 +1029,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 9: // ALLOW_LOGIN_BY_DEFAULT
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.allowLoginByDefault = iprot.readBool();
+ struct.setAllowLoginByDefaultIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1001,6 +1086,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
oprot.writeI32(struct.maxLocationsPerLecture);
oprot.writeFieldEnd();
}
+ if (struct.isSetAllowLoginByDefault()) {
+ oprot.writeFieldBegin(ALLOW_LOGIN_BY_DEFAULT_FIELD_DESC);
+ oprot.writeBool(struct.allowLoginByDefault);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1043,7 +1133,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (struct.isSetMaxLocationsPerLecture()) {
optionals.set(7);
}
- oprot.writeBitSet(optionals, 8);
+ if (struct.isSetAllowLoginByDefault()) {
+ optionals.set(8);
+ }
+ oprot.writeBitSet(optionals, 9);
if (struct.isSetPageSize()) {
oprot.writeI32(struct.pageSize);
}
@@ -1068,12 +1161,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (struct.isSetMaxLocationsPerLecture()) {
oprot.writeI32(struct.maxLocationsPerLecture);
}
+ if (struct.isSetAllowLoginByDefault()) {
+ oprot.writeBool(struct.allowLoginByDefault);
+ }
}
@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(8);
+ BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.pageSize = iprot.readI32();
struct.setPageSizeIsSet(true);
@@ -1108,6 +1204,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
struct.maxLocationsPerLecture = iprot.readI32();
struct.setMaxLocationsPerLectureIsSet(true);
}
+ if (incoming.get(8)) {
+ struct.allowLoginByDefault = iprot.readBool();
+ struct.setAllowLoginByDefaultIsSet(true);
+ }
}
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
index 5acedf9..29b0ee0 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
@@ -34,13 +34,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-02")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-01-24")
public class SatelliteServer {
public interface Iface {
public long getVersion(long clientVersion) throws org.apache.thrift.TException;
+ public String getSupportedFeatures() throws org.apache.thrift.TException;
+
public SatelliteConfig getConfiguration() throws org.apache.thrift.TException;
public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
@@ -129,6 +131,8 @@ public class SatelliteServer {
public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -256,6 +260,28 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVersion failed: unknown result");
}
+ public String getSupportedFeatures() throws org.apache.thrift.TException
+ {
+ send_getSupportedFeatures();
+ return recv_getSupportedFeatures();
+ }
+
+ public void send_getSupportedFeatures() throws org.apache.thrift.TException
+ {
+ getSupportedFeatures_args args = new getSupportedFeatures_args();
+ sendBase("getSupportedFeatures", args);
+ }
+
+ public String recv_getSupportedFeatures() throws org.apache.thrift.TException
+ {
+ getSupportedFeatures_result result = new getSupportedFeatures_result();
+ receiveBase(result, "getSupportedFeatures");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupportedFeatures failed: unknown result");
+ }
+
public SatelliteConfig getConfiguration() throws org.apache.thrift.TException
{
send_getConfiguration();
@@ -1509,6 +1535,35 @@ public class SatelliteServer {
}
}
+ public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getSupportedFeatures_call method_call = new getSupportedFeatures_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getSupportedFeatures_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getSupportedFeatures_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupportedFeatures", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getSupportedFeatures_args args = new getSupportedFeatures_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getSupportedFeatures();
+ }
+ }
+
public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getConfiguration_call method_call = new getConfiguration_call(resultHandler, this, ___protocolFactory, ___transport);
@@ -2940,6 +2995,7 @@ public class SatelliteServer {
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("getVersion", new getVersion());
+ processMap.put("getSupportedFeatures", new getSupportedFeatures());
processMap.put("getConfiguration", new getConfiguration());
processMap.put("requestImageVersionUpload", new requestImageVersionUpload());
processMap.put("updateBlockHashes", new updateBlockHashes());
@@ -3005,6 +3061,26 @@ public class SatelliteServer {
}
}
+ public static class getSupportedFeatures<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupportedFeatures_args> {
+ public getSupportedFeatures() {
+ super("getSupportedFeatures");
+ }
+
+ public getSupportedFeatures_args getEmptyArgsInstance() {
+ return new getSupportedFeatures_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getSupportedFeatures_result getResult(I iface, getSupportedFeatures_args args) throws org.apache.thrift.TException {
+ getSupportedFeatures_result result = new getSupportedFeatures_result();
+ result.success = iface.getSupportedFeatures();
+ return result;
+ }
+ }
+
public static class getConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getConfiguration_args> {
public getConfiguration() {
super("getConfiguration");
@@ -4095,6 +4171,7 @@ public class SatelliteServer {
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("getVersion", new getVersion());
+ processMap.put("getSupportedFeatures", new getSupportedFeatures());
processMap.put("getConfiguration", new getConfiguration());
processMap.put("requestImageVersionUpload", new requestImageVersionUpload());
processMap.put("updateBlockHashes", new updateBlockHashes());
@@ -4191,6 +4268,57 @@ public class SatelliteServer {
}
}
+ public static class getSupportedFeatures<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSupportedFeatures_args, String> {
+ public getSupportedFeatures() {
+ super("getSupportedFeatures");
+ }
+
+ public getSupportedFeatures_args getEmptyArgsInstance() {
+ return new getSupportedFeatures_args();
+ }
+
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ getSupportedFeatures_result result = new getSupportedFeatures_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getSupportedFeatures_result result = new getSupportedFeatures_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getSupportedFeatures_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.getSupportedFeatures(resultHandler);
+ }
+ }
+
public static class getConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getConfiguration_args, SatelliteConfig> {
public getConfiguration() {
super("getConfiguration");
@@ -7486,6 +7614,615 @@ public class SatelliteServer {
}
+ public static class getSupportedFeatures_args implements org.apache.thrift.TBase<getSupportedFeatures_args, getSupportedFeatures_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSupportedFeatures_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupportedFeatures_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getSupportedFeatures_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getSupportedFeatures_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ 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);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupportedFeatures_args.class, metaDataMap);
+ }
+
+ public getSupportedFeatures_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getSupportedFeatures_args(getSupportedFeatures_args other) {
+ }
+
+ public getSupportedFeatures_args deepCopy() {
+ return new getSupportedFeatures_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getSupportedFeatures_args)
+ return this.equals((getSupportedFeatures_args)that);
+ return false;
+ }
+
+ public boolean equals(getSupportedFeatures_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getSupportedFeatures_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getSupportedFeatures_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getSupportedFeatures_argsStandardSchemeFactory implements SchemeFactory {
+ public getSupportedFeatures_argsStandardScheme getScheme() {
+ return new getSupportedFeatures_argsStandardScheme();
+ }
+ }
+
+ private static class getSupportedFeatures_argsStandardScheme extends StandardScheme<getSupportedFeatures_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getSupportedFeatures_argsTupleSchemeFactory implements SchemeFactory {
+ public getSupportedFeatures_argsTupleScheme getScheme() {
+ return new getSupportedFeatures_argsTupleScheme();
+ }
+ }
+
+ private static class getSupportedFeatures_argsTupleScheme extends TupleScheme<getSupportedFeatures_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getSupportedFeatures_result implements org.apache.thrift.TBase<getSupportedFeatures_result, getSupportedFeatures_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSupportedFeatures_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupportedFeatures_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getSupportedFeatures_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getSupportedFeatures_resultTupleSchemeFactory());
+ }
+
+ public String success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ 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);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupportedFeatures_result.class, metaDataMap);
+ }
+
+ public getSupportedFeatures_result() {
+ }
+
+ public getSupportedFeatures_result(
+ String success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getSupportedFeatures_result(getSupportedFeatures_result other) {
+ if (other.isSetSuccess()) {
+ this.success = other.success;
+ }
+ }
+
+ public getSupportedFeatures_result deepCopy() {
+ return new getSupportedFeatures_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public String getSuccess() {
+ return this.success;
+ }
+
+ public getSupportedFeatures_result setSuccess(String success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getSupportedFeatures_result)
+ return this.equals((getSupportedFeatures_result)that);
+ return false;
+ }
+
+ public boolean equals(getSupportedFeatures_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true && (isSetSuccess());
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getSupportedFeatures_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getSupportedFeatures_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getSupportedFeatures_resultStandardSchemeFactory implements SchemeFactory {
+ public getSupportedFeatures_resultStandardScheme getScheme() {
+ return new getSupportedFeatures_resultStandardScheme();
+ }
+ }
+
+ private static class getSupportedFeatures_resultStandardScheme extends StandardScheme<getSupportedFeatures_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getSupportedFeatures_resultTupleSchemeFactory implements SchemeFactory {
+ public getSupportedFeatures_resultTupleScheme getScheme() {
+ return new getSupportedFeatures_resultTupleScheme();
+ }
+ }
+
+ private static class getSupportedFeatures_resultTupleScheme extends TupleScheme<getSupportedFeatures_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeString(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
public static class getConfiguration_args implements org.apache.thrift.TBase<getConfiguration_args, getConfiguration_args._Fields>, java.io.Serializable, Cloneable, Comparable<getConfiguration_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getConfiguration_args");
diff --git a/src/main/java/org/openslx/sat/thrift/version/Feature.java b/src/main/java/org/openslx/sat/thrift/version/Feature.java
new file mode 100644
index 0000000..d3d45b8
--- /dev/null
+++ b/src/main/java/org/openslx/sat/thrift/version/Feature.java
@@ -0,0 +1,12 @@
+package org.openslx.sat.thrift.version;
+
+public enum Feature {
+
+ /**
+ * Server can properly extend the expiration time of an image version that
+ * is already expired, but has not been deleted yet. (Early versions of dmsd
+ * did not handle this case properly.)
+ */
+ EXTEND_EXPIRED_VM,
+
+}
diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift
index 47f0964..12fa302 100644
--- a/src/main/thrift/bwlp.thrift
+++ b/src/main/thrift/bwlp.thrift
@@ -353,6 +353,8 @@ struct SatelliteConfig {
7: optional i32 maxConnectionsPerTransfer,
// Maximum number of locations per lecture
8: optional i32 maxLocationsPerLecture,
+ // Whether users connecting to the sat for the first time are allowed to login
+ 9: optional bool allowLoginByDefault,
}
struct SatelliteStatus {
@@ -406,6 +408,10 @@ service SatelliteServer {
// Get server (thrift interface) version
int getVersion(1: int clientVersion),
+ // Get server features. Kinda superseding getVersion, as it's reasier to handle minor updates
+ // This returns a space separated list of keywords which represent certain features
+ string getSupportedFeatures(),
+
// Get configuration parameters of this satellite server
SatelliteConfig getConfiguration(),