Repository: airavata Updated Branches: refs/heads/auroraMesosIntegration 4012db244 -> 325d1630c
http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py index c53ac73..d2b2ba5 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py @@ -19,6 +19,7 @@ import apache.airavata.model.application.io.ttypes import apache.airavata.model.appcatalog.appdeployment.ttypes import apache.airavata.model.appcatalog.appinterface.ttypes import apache.airavata.model.appcatalog.computeresource.ttypes +import apache.airavata.model.appcatalog.credentialsummary.ttypes import apache.airavata.model.appcatalog.storageresource.ttypes import apache.airavata.model.appcatalog.gatewayprofile.ttypes import apache.airavata.model.appcatalog.userresourceprofile.ttypes http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py index 71b7322..f402da2 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py @@ -210,25 +210,28 @@ class MonitorMode: """ POLL_JOB_MANAGER = 0 - JOB_EMAIL_NOTIFICATION_MONITOR = 1 - XSEDE_AMQP_SUBSCRIBE = 2 - FORK = 3 - LOCAL = 4 + CLOUD_JOB_MONITOR = 1 + JOB_EMAIL_NOTIFICATION_MONITOR = 2 + XSEDE_AMQP_SUBSCRIBE = 3 + FORK = 4 + LOCAL = 5 _VALUES_TO_NAMES = { 0: "POLL_JOB_MANAGER", - 1: "JOB_EMAIL_NOTIFICATION_MONITOR", - 2: "XSEDE_AMQP_SUBSCRIBE", - 3: "FORK", - 4: "LOCAL", + 1: "CLOUD_JOB_MONITOR", + 2: "JOB_EMAIL_NOTIFICATION_MONITOR", + 3: "XSEDE_AMQP_SUBSCRIBE", + 4: "FORK", + 5: "LOCAL", } _NAMES_TO_VALUES = { "POLL_JOB_MANAGER": 0, - "JOB_EMAIL_NOTIFICATION_MONITOR": 1, - "XSEDE_AMQP_SUBSCRIBE": 2, - "FORK": 3, - "LOCAL": 4, + "CLOUD_JOB_MONITOR": 1, + "JOB_EMAIL_NOTIFICATION_MONITOR": 2, + "XSEDE_AMQP_SUBSCRIBE": 3, + "FORK": 4, + "LOCAL": 5, } class DMType: http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/__init__.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/__init__.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/constants.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/constants.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/constants.py new file mode 100644 index 0000000..4a6492b --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/constants.py @@ -0,0 +1,11 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from ttypes import * + http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/ttypes.py new file mode 100644 index 0000000..cf18c9e --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/credentialsummary/ttypes.py @@ -0,0 +1,154 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException, TApplicationException + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + + +class CredentialSummary: + """ + Attributes: + - gatewayId + - username + - token + - publicKey + - persistedTime + - description + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'gatewayId', None, None, ), # 1 + (2, TType.STRING, 'username', None, None, ), # 2 + (3, TType.STRING, 'token', None, None, ), # 3 + (4, TType.STRING, 'publicKey', None, None, ), # 4 + (5, TType.I64, 'persistedTime', None, None, ), # 5 + (6, TType.STRING, 'description', None, None, ), # 6 + ) + + def __init__(self, gatewayId=None, username=None, token=None, publicKey=None, persistedTime=None, description=None,): + self.gatewayId = gatewayId + self.username = username + self.token = token + self.publicKey = publicKey + self.persistedTime = persistedTime + self.description = description + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.gatewayId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.username = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.token = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.publicKey = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.persistedTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.description = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CredentialSummary') + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 1) + oprot.writeString(self.gatewayId) + oprot.writeFieldEnd() + if self.username is not None: + oprot.writeFieldBegin('username', TType.STRING, 2) + oprot.writeString(self.username) + oprot.writeFieldEnd() + if self.token is not None: + oprot.writeFieldBegin('token', TType.STRING, 3) + oprot.writeString(self.token) + oprot.writeFieldEnd() + if self.publicKey is not None: + oprot.writeFieldBegin('publicKey', TType.STRING, 4) + oprot.writeString(self.publicKey) + oprot.writeFieldEnd() + if self.persistedTime is not None: + oprot.writeFieldBegin('persistedTime', TType.I64, 5) + oprot.writeI64(self.persistedTime) + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin('description', TType.STRING, 6) + oprot.writeString(self.description) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.gatewayId is None: + raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') + if self.username is None: + raise TProtocol.TProtocolException(message='Required field username is unset!') + if self.token is None: + raise TProtocol.TProtocolException(message='Required field token is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.gatewayId) + value = (value * 31) ^ hash(self.username) + value = (value * 31) ^ hash(self.token) + value = (value * 31) ^ hash(self.publicKey) + value = (value * 31) ^ hash(self.persistedTime) + value = (value * 31) ^ hash(self.description) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/__init__.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/__init__.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/constants.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/constants.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/constants.py new file mode 100644 index 0000000..4a6492b --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/constants.py @@ -0,0 +1,11 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from ttypes import * + http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/ttypes.py new file mode 100644 index 0000000..5903ba0 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/userresourceprofile/ttypes.py @@ -0,0 +1,538 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException, TApplicationException +import apache.airavata.model.appcatalog.computeresource.ttypes +import apache.airavata.model.data.movement.ttypes +import apache.airavata.model.user.ttypes + + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + + +class UserComputeResourcePreference: + """ + User specific preferences for a Computer Resource + + computeResourceId: + Corelate the preference to a compute resource. + + + loginUserName: + If turned true, Airavata will override the preferences of better alternatives exist. + + + preferredBatchQueue: + Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics. + + scratchLocation: + Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution. + + allocationProjectNumber: + Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an + allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the + account to be used has to be added to the allocation. + + resourceSpecificCredentialStoreToken: + Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's + default credential store. + + + Attributes: + - computeResourceId + - loginUserName + - preferredBatchQueue + - scratchLocation + - allocationProjectNumber + - resourceSpecificCredentialStoreToken + - qualityOfService + - reservation + - reservationStartTime + - reservationEndTime + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'computeResourceId', None, None, ), # 1 + (2, TType.STRING, 'loginUserName', None, None, ), # 2 + (3, TType.STRING, 'preferredBatchQueue', None, None, ), # 3 + (4, TType.STRING, 'scratchLocation', None, None, ), # 4 + (5, TType.STRING, 'allocationProjectNumber', None, None, ), # 5 + (6, TType.STRING, 'resourceSpecificCredentialStoreToken', None, None, ), # 6 + (7, TType.STRING, 'qualityOfService', None, None, ), # 7 + (8, TType.STRING, 'reservation', None, None, ), # 8 + (9, TType.I64, 'reservationStartTime', None, None, ), # 9 + (10, TType.I64, 'reservationEndTime', None, None, ), # 10 + ) + + def __init__(self, computeResourceId=None, loginUserName=None, preferredBatchQueue=None, scratchLocation=None, allocationProjectNumber=None, resourceSpecificCredentialStoreToken=None, qualityOfService=None, reservation=None, reservationStartTime=None, reservationEndTime=None,): + self.computeResourceId = computeResourceId + self.loginUserName = loginUserName + self.preferredBatchQueue = preferredBatchQueue + self.scratchLocation = scratchLocation + self.allocationProjectNumber = allocationProjectNumber + self.resourceSpecificCredentialStoreToken = resourceSpecificCredentialStoreToken + self.qualityOfService = qualityOfService + self.reservation = reservation + self.reservationStartTime = reservationStartTime + self.reservationEndTime = reservationEndTime + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.computeResourceId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.loginUserName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.preferredBatchQueue = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.scratchLocation = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.allocationProjectNumber = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.resourceSpecificCredentialStoreToken = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.qualityOfService = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.reservation = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.reservationStartTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.I64: + self.reservationEndTime = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UserComputeResourcePreference') + if self.computeResourceId is not None: + oprot.writeFieldBegin('computeResourceId', TType.STRING, 1) + oprot.writeString(self.computeResourceId) + oprot.writeFieldEnd() + if self.loginUserName is not None: + oprot.writeFieldBegin('loginUserName', TType.STRING, 2) + oprot.writeString(self.loginUserName) + oprot.writeFieldEnd() + if self.preferredBatchQueue is not None: + oprot.writeFieldBegin('preferredBatchQueue', TType.STRING, 3) + oprot.writeString(self.preferredBatchQueue) + oprot.writeFieldEnd() + if self.scratchLocation is not None: + oprot.writeFieldBegin('scratchLocation', TType.STRING, 4) + oprot.writeString(self.scratchLocation) + oprot.writeFieldEnd() + if self.allocationProjectNumber is not None: + oprot.writeFieldBegin('allocationProjectNumber', TType.STRING, 5) + oprot.writeString(self.allocationProjectNumber) + oprot.writeFieldEnd() + if self.resourceSpecificCredentialStoreToken is not None: + oprot.writeFieldBegin('resourceSpecificCredentialStoreToken', TType.STRING, 6) + oprot.writeString(self.resourceSpecificCredentialStoreToken) + oprot.writeFieldEnd() + if self.qualityOfService is not None: + oprot.writeFieldBegin('qualityOfService', TType.STRING, 7) + oprot.writeString(self.qualityOfService) + oprot.writeFieldEnd() + if self.reservation is not None: + oprot.writeFieldBegin('reservation', TType.STRING, 8) + oprot.writeString(self.reservation) + oprot.writeFieldEnd() + if self.reservationStartTime is not None: + oprot.writeFieldBegin('reservationStartTime', TType.I64, 9) + oprot.writeI64(self.reservationStartTime) + oprot.writeFieldEnd() + if self.reservationEndTime is not None: + oprot.writeFieldBegin('reservationEndTime', TType.I64, 10) + oprot.writeI64(self.reservationEndTime) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.computeResourceId is None: + raise TProtocol.TProtocolException(message='Required field computeResourceId is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.computeResourceId) + value = (value * 31) ^ hash(self.loginUserName) + value = (value * 31) ^ hash(self.preferredBatchQueue) + value = (value * 31) ^ hash(self.scratchLocation) + value = (value * 31) ^ hash(self.allocationProjectNumber) + value = (value * 31) ^ hash(self.resourceSpecificCredentialStoreToken) + value = (value * 31) ^ hash(self.qualityOfService) + value = (value * 31) ^ hash(self.reservation) + value = (value * 31) ^ hash(self.reservationStartTime) + value = (value * 31) ^ hash(self.reservationEndTime) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UserStoragePreference: + """ + Attributes: + - storageResourceId + - loginUserName + - fileSystemRootLocation + - resourceSpecificCredentialStoreToken + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'storageResourceId', None, None, ), # 1 + (2, TType.STRING, 'loginUserName', None, None, ), # 2 + (3, TType.STRING, 'fileSystemRootLocation', None, None, ), # 3 + (4, TType.STRING, 'resourceSpecificCredentialStoreToken', None, None, ), # 4 + ) + + def __init__(self, storageResourceId=None, loginUserName=None, fileSystemRootLocation=None, resourceSpecificCredentialStoreToken=None,): + self.storageResourceId = storageResourceId + self.loginUserName = loginUserName + self.fileSystemRootLocation = fileSystemRootLocation + self.resourceSpecificCredentialStoreToken = resourceSpecificCredentialStoreToken + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.storageResourceId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.loginUserName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.fileSystemRootLocation = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.resourceSpecificCredentialStoreToken = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UserStoragePreference') + if self.storageResourceId is not None: + oprot.writeFieldBegin('storageResourceId', TType.STRING, 1) + oprot.writeString(self.storageResourceId) + oprot.writeFieldEnd() + if self.loginUserName is not None: + oprot.writeFieldBegin('loginUserName', TType.STRING, 2) + oprot.writeString(self.loginUserName) + oprot.writeFieldEnd() + if self.fileSystemRootLocation is not None: + oprot.writeFieldBegin('fileSystemRootLocation', TType.STRING, 3) + oprot.writeString(self.fileSystemRootLocation) + oprot.writeFieldEnd() + if self.resourceSpecificCredentialStoreToken is not None: + oprot.writeFieldBegin('resourceSpecificCredentialStoreToken', TType.STRING, 4) + oprot.writeString(self.resourceSpecificCredentialStoreToken) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.storageResourceId is None: + raise TProtocol.TProtocolException(message='Required field storageResourceId is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.storageResourceId) + value = (value * 31) ^ hash(self.loginUserName) + value = (value * 31) ^ hash(self.fileSystemRootLocation) + value = (value * 31) ^ hash(self.resourceSpecificCredentialStoreToken) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UserResourceProfile: + """ + User Resource Profile + + userId: + Unique identifier used to link user to corresponding user data model + + gatewayID: + Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration. + + credentialStoreToken: + Gateway's defualt credential store token. + + computeResourcePreferences: + List of resource preferences for each of the registered compute resources. + + identityServerTenant: + + identityServerPwdCredToken: + + isNull: + Indicates that this instance is just a container for a null value. + + + Attributes: + - userId + - gatewayID + - credentialStoreToken + - userComputeResourcePreferences + - userStoragePreferences + - identityServerTenant + - identityServerPwdCredToken + - isNull + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'userId', None, None, ), # 1 + (2, TType.STRING, 'gatewayID', None, None, ), # 2 + (3, TType.STRING, 'credentialStoreToken', None, None, ), # 3 + (4, TType.LIST, 'userComputeResourcePreferences', (TType.STRUCT,(UserComputeResourcePreference, UserComputeResourcePreference.thrift_spec)), None, ), # 4 + (5, TType.LIST, 'userStoragePreferences', (TType.STRUCT,(UserStoragePreference, UserStoragePreference.thrift_spec)), None, ), # 5 + (6, TType.STRING, 'identityServerTenant', None, None, ), # 6 + (7, TType.STRING, 'identityServerPwdCredToken', None, None, ), # 7 + (8, TType.BOOL, 'isNull', None, False, ), # 8 + ) + + def __init__(self, userId=None, gatewayID=None, credentialStoreToken=None, userComputeResourcePreferences=None, userStoragePreferences=None, identityServerTenant=None, identityServerPwdCredToken=None, isNull=thrift_spec[8][4],): + self.userId = userId + self.gatewayID = gatewayID + self.credentialStoreToken = credentialStoreToken + self.userComputeResourcePreferences = userComputeResourcePreferences + self.userStoragePreferences = userStoragePreferences + self.identityServerTenant = identityServerTenant + self.identityServerPwdCredToken = identityServerPwdCredToken + self.isNull = isNull + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.userId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.gatewayID = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.credentialStoreToken = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.userComputeResourcePreferences = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in xrange(_size0): + _elem5 = UserComputeResourcePreference() + _elem5.read(iprot) + self.userComputeResourcePreferences.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.userStoragePreferences = [] + (_etype9, _size6) = iprot.readListBegin() + for _i10 in xrange(_size6): + _elem11 = UserStoragePreference() + _elem11.read(iprot) + self.userStoragePreferences.append(_elem11) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.identityServerTenant = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.identityServerPwdCredToken = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.isNull = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UserResourceProfile') + if self.userId is not None: + oprot.writeFieldBegin('userId', TType.STRING, 1) + oprot.writeString(self.userId) + oprot.writeFieldEnd() + if self.gatewayID is not None: + oprot.writeFieldBegin('gatewayID', TType.STRING, 2) + oprot.writeString(self.gatewayID) + oprot.writeFieldEnd() + if self.credentialStoreToken is not None: + oprot.writeFieldBegin('credentialStoreToken', TType.STRING, 3) + oprot.writeString(self.credentialStoreToken) + oprot.writeFieldEnd() + if self.userComputeResourcePreferences is not None: + oprot.writeFieldBegin('userComputeResourcePreferences', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.userComputeResourcePreferences)) + for iter12 in self.userComputeResourcePreferences: + iter12.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.userStoragePreferences is not None: + oprot.writeFieldBegin('userStoragePreferences', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.userStoragePreferences)) + for iter13 in self.userStoragePreferences: + iter13.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.identityServerTenant is not None: + oprot.writeFieldBegin('identityServerTenant', TType.STRING, 6) + oprot.writeString(self.identityServerTenant) + oprot.writeFieldEnd() + if self.identityServerPwdCredToken is not None: + oprot.writeFieldBegin('identityServerPwdCredToken', TType.STRING, 7) + oprot.writeString(self.identityServerPwdCredToken) + oprot.writeFieldEnd() + if self.isNull is not None: + oprot.writeFieldBegin('isNull', TType.BOOL, 8) + oprot.writeBool(self.isNull) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.userId is None: + raise TProtocol.TProtocolException(message='Required field userId is unset!') + if self.gatewayID is None: + raise TProtocol.TProtocolException(message='Required field gatewayID is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.userId) + value = (value * 31) ^ hash(self.gatewayID) + value = (value * 31) ^ hash(self.credentialStoreToken) + value = (value * 31) ^ hash(self.userComputeResourcePreferences) + value = (value * 31) ^ hash(self.userStoragePreferences) + value = (value * 31) ^ hash(self.identityServerTenant) + value = (value * 31) ^ hash(self.identityServerPwdCredToken) + value = (value * 31) ^ hash(self.isNull) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java index 2aeba80..8526dff 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java @@ -41,10 +41,11 @@ import org.apache.thrift.TEnum; */ public enum MonitorMode implements org.apache.thrift.TEnum { POLL_JOB_MANAGER(0), - JOB_EMAIL_NOTIFICATION_MONITOR(1), - XSEDE_AMQP_SUBSCRIBE(2), - FORK(3), - LOCAL(4); + CLOUD_JOB_MONITOR(1), + JOB_EMAIL_NOTIFICATION_MONITOR(2), + XSEDE_AMQP_SUBSCRIBE(3), + FORK(4), + LOCAL(5); private final int value; @@ -68,12 +69,14 @@ public enum MonitorMode implements org.apache.thrift.TEnum { case 0: return POLL_JOB_MANAGER; case 1: - return JOB_EMAIL_NOTIFICATION_MONITOR; + return CLOUD_JOB_MONITOR; case 2: - return XSEDE_AMQP_SUBSCRIBE; + return JOB_EMAIL_NOTIFICATION_MONITOR; case 3: - return FORK; + return XSEDE_AMQP_SUBSCRIBE; case 4: + return FORK; + case 5: return LOCAL; default: return null; http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift index d674584..ea1d64d 100644 --- a/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift +++ b/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift @@ -193,6 +193,7 @@ enum JobSubmissionProtocol { **/ enum MonitorMode { POLL_JOB_MANAGER, + CLOUD_JOB_MONITOR, JOB_EMAIL_NOTIFICATION_MONITOR, XSEDE_AMQP_SUBSCRIBE, FORK,
