You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/04/23 04:00:35 UTC
[23/35] airavata git commit: adding backend functionality for
notifications
http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
index bcebcdd..d3b3fd7 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
@@ -154,6 +154,51 @@ class Iface:
"""
pass
+ def createNotification(self, authzToken, notification):
+ """
+ * API methods to retrieve notifications
+ *
+
+ Parameters:
+ - authzToken
+ - notification
+ """
+ pass
+
+ def updateNotification(self, authzToken, notification):
+ """
+ Parameters:
+ - authzToken
+ - notification
+ """
+ pass
+
+ def deleteNotification(self, authzToken, gatewayId, notificationId):
+ """
+ Parameters:
+ - authzToken
+ - gatewayId
+ - notificationId
+ """
+ pass
+
+ def getNotification(self, authzToken, gatewayId, notificationId):
+ """
+ Parameters:
+ - authzToken
+ - gatewayId
+ - notificationId
+ """
+ pass
+
+ def getAllNotifications(self, authzToken, gatewayId):
+ """
+ Parameters:
+ - authzToken
+ - gatewayId
+ """
+ pass
+
def generateAndRegisterSSHKeys(self, authzToken, gatewayId, userName):
"""
Generate and Register SSH Key Pair with Airavata Credential Store.
@@ -3365,6 +3410,214 @@ class Client(Iface):
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "isGatewayExist failed: unknown result")
+ def createNotification(self, authzToken, notification):
+ """
+ * API methods to retrieve notifications
+ *
+
+ Parameters:
+ - authzToken
+ - notification
+ """
+ self.send_createNotification(authzToken, notification)
+ return self.recv_createNotification()
+
+ def send_createNotification(self, authzToken, notification):
+ self._oprot.writeMessageBegin('createNotification', TMessageType.CALL, self._seqid)
+ args = createNotification_args()
+ args.authzToken = authzToken
+ args.notification = notification
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createNotification(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createNotification_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ire is not None:
+ raise result.ire
+ if result.ace is not None:
+ raise result.ace
+ if result.ase is not None:
+ raise result.ase
+ if result.ae is not None:
+ raise result.ae
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "createNotification failed: unknown result")
+
+ def updateNotification(self, authzToken, notification):
+ """
+ Parameters:
+ - authzToken
+ - notification
+ """
+ self.send_updateNotification(authzToken, notification)
+ self.recv_updateNotification()
+
+ def send_updateNotification(self, authzToken, notification):
+ self._oprot.writeMessageBegin('updateNotification', TMessageType.CALL, self._seqid)
+ args = updateNotification_args()
+ args.authzToken = authzToken
+ args.notification = notification
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_updateNotification(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = updateNotification_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ire is not None:
+ raise result.ire
+ if result.ace is not None:
+ raise result.ace
+ if result.ase is not None:
+ raise result.ase
+ if result.ae is not None:
+ raise result.ae
+ return
+
+ def deleteNotification(self, authzToken, gatewayId, notificationId):
+ """
+ Parameters:
+ - authzToken
+ - gatewayId
+ - notificationId
+ """
+ self.send_deleteNotification(authzToken, gatewayId, notificationId)
+ self.recv_deleteNotification()
+
+ def send_deleteNotification(self, authzToken, gatewayId, notificationId):
+ self._oprot.writeMessageBegin('deleteNotification', TMessageType.CALL, self._seqid)
+ args = deleteNotification_args()
+ args.authzToken = authzToken
+ args.gatewayId = gatewayId
+ args.notificationId = notificationId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteNotification(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteNotification_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ire is not None:
+ raise result.ire
+ if result.ace is not None:
+ raise result.ace
+ if result.ase is not None:
+ raise result.ase
+ if result.ae is not None:
+ raise result.ae
+ return
+
+ def getNotification(self, authzToken, gatewayId, notificationId):
+ """
+ Parameters:
+ - authzToken
+ - gatewayId
+ - notificationId
+ """
+ self.send_getNotification(authzToken, gatewayId, notificationId)
+ return self.recv_getNotification()
+
+ def send_getNotification(self, authzToken, gatewayId, notificationId):
+ self._oprot.writeMessageBegin('getNotification', TMessageType.CALL, self._seqid)
+ args = getNotification_args()
+ args.authzToken = authzToken
+ args.gatewayId = gatewayId
+ args.notificationId = notificationId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getNotification(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getNotification_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ire is not None:
+ raise result.ire
+ if result.ace is not None:
+ raise result.ace
+ if result.ase is not None:
+ raise result.ase
+ if result.ae is not None:
+ raise result.ae
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getNotification failed: unknown result")
+
+ def getAllNotifications(self, authzToken, gatewayId):
+ """
+ Parameters:
+ - authzToken
+ - gatewayId
+ """
+ self.send_getAllNotifications(authzToken, gatewayId)
+ return self.recv_getAllNotifications()
+
+ def send_getAllNotifications(self, authzToken, gatewayId):
+ self._oprot.writeMessageBegin('getAllNotifications', TMessageType.CALL, self._seqid)
+ args = getAllNotifications_args()
+ args.authzToken = authzToken
+ args.gatewayId = gatewayId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getAllNotifications(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getAllNotifications_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ire is not None:
+ raise result.ire
+ if result.ace is not None:
+ raise result.ace
+ if result.ase is not None:
+ raise result.ase
+ if result.ae is not None:
+ raise result.ae
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllNotifications failed: unknown result")
+
def generateAndRegisterSSHKeys(self, authzToken, gatewayId, userName):
"""
Generate and Register SSH Key Pair with Airavata Credential Store.
@@ -10615,6 +10868,11 @@ class Processor(Iface, TProcessor):
self._processMap["deleteGateway"] = Processor.process_deleteGateway
self._processMap["getAllGateways"] = Processor.process_getAllGateways
self._processMap["isGatewayExist"] = Processor.process_isGatewayExist
+ self._processMap["createNotification"] = Processor.process_createNotification
+ self._processMap["updateNotification"] = Processor.process_updateNotification
+ self._processMap["deleteNotification"] = Processor.process_deleteNotification
+ self._processMap["getNotification"] = Processor.process_getNotification
+ self._processMap["getAllNotifications"] = Processor.process_getAllNotifications
self._processMap["generateAndRegisterSSHKeys"] = Processor.process_generateAndRegisterSSHKeys
self._processMap["getSSHPubKey"] = Processor.process_getSSHPubKey
self._processMap["getAllUserSSHPubKeys"] = Processor.process_getAllUserSSHPubKeys
@@ -11010,13 +11268,13 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_generateAndRegisterSSHKeys(self, seqid, iprot, oprot):
- args = generateAndRegisterSSHKeys_args()
+ def process_createNotification(self, seqid, iprot, oprot):
+ args = createNotification_args()
args.read(iprot)
iprot.readMessageEnd()
- result = generateAndRegisterSSHKeys_result()
+ result = createNotification_result()
try:
- result.success = self._handler.generateAndRegisterSSHKeys(args.authzToken, args.gatewayId, args.userName)
+ result.success = self._handler.createNotification(args.authzToken, args.notification)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11029,22 +11287,25 @@ class Processor(Iface, TProcessor):
except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
+ except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ msg_type = TMessageType.REPLY
+ result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("generateAndRegisterSSHKeys", msg_type, seqid)
+ oprot.writeMessageBegin("createNotification", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_getSSHPubKey(self, seqid, iprot, oprot):
- args = getSSHPubKey_args()
+ def process_updateNotification(self, seqid, iprot, oprot):
+ args = updateNotification_args()
args.read(iprot)
iprot.readMessageEnd()
- result = getSSHPubKey_result()
+ result = updateNotification_result()
try:
- result.success = self._handler.getSSHPubKey(args.authzToken, args.airavataCredStoreToken, args.gatewayId)
+ self._handler.updateNotification(args.authzToken, args.notification)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11057,22 +11318,25 @@ class Processor(Iface, TProcessor):
except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
+ except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ msg_type = TMessageType.REPLY
+ result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getSSHPubKey", msg_type, seqid)
+ oprot.writeMessageBegin("updateNotification", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_getAllUserSSHPubKeys(self, seqid, iprot, oprot):
- args = getAllUserSSHPubKeys_args()
+ def process_deleteNotification(self, seqid, iprot, oprot):
+ args = deleteNotification_args()
args.read(iprot)
iprot.readMessageEnd()
- result = getAllUserSSHPubKeys_result()
+ result = deleteNotification_result()
try:
- result.success = self._handler.getAllUserSSHPubKeys(args.authzToken, args.userName)
+ self._handler.deleteNotification(args.authzToken, args.gatewayId, args.notificationId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11085,22 +11349,25 @@ class Processor(Iface, TProcessor):
except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
+ except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ msg_type = TMessageType.REPLY
+ result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getAllUserSSHPubKeys", msg_type, seqid)
+ oprot.writeMessageBegin("deleteNotification", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_getAllGatewaySSHPubKeys(self, seqid, iprot, oprot):
- args = getAllGatewaySSHPubKeys_args()
+ def process_getNotification(self, seqid, iprot, oprot):
+ args = getNotification_args()
args.read(iprot)
iprot.readMessageEnd()
- result = getAllGatewaySSHPubKeys_result()
+ result = getNotification_result()
try:
- result.success = self._handler.getAllGatewaySSHPubKeys(args.authzToken, args.gatewayId)
+ result.success = self._handler.getNotification(args.authzToken, args.gatewayId, args.notificationId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11113,22 +11380,25 @@ class Processor(Iface, TProcessor):
except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
+ except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ msg_type = TMessageType.REPLY
+ result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getAllGatewaySSHPubKeys", msg_type, seqid)
+ oprot.writeMessageBegin("getNotification", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_deleteSSHPubKey(self, seqid, iprot, oprot):
- args = deleteSSHPubKey_args()
+ def process_getAllNotifications(self, seqid, iprot, oprot):
+ args = getAllNotifications_args()
args.read(iprot)
iprot.readMessageEnd()
- result = deleteSSHPubKey_result()
+ result = getAllNotifications_result()
try:
- result.success = self._handler.deleteSSHPubKey(args.authzToken, args.airavataCredStoreToken, args.gatewayId)
+ result.success = self._handler.getAllNotifications(args.authzToken, args.gatewayId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11141,22 +11411,25 @@ class Processor(Iface, TProcessor):
except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
+ except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ msg_type = TMessageType.REPLY
+ result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("deleteSSHPubKey", msg_type, seqid)
+ oprot.writeMessageBegin("getAllNotifications", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_createProject(self, seqid, iprot, oprot):
- args = createProject_args()
+ def process_generateAndRegisterSSHKeys(self, seqid, iprot, oprot):
+ args = generateAndRegisterSSHKeys_args()
args.read(iprot)
iprot.readMessageEnd()
- result = createProject_result()
+ result = generateAndRegisterSSHKeys_result()
try:
- result.success = self._handler.createProject(args.authzToken, args.gatewayId, args.project)
+ result.success = self._handler.generateAndRegisterSSHKeys(args.authzToken, args.gatewayId, args.userName)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11169,25 +11442,50 @@ class Processor(Iface, TProcessor):
except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
- except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("generateAndRegisterSSHKeys", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getSSHPubKey(self, seqid, iprot, oprot):
+ args = getSSHPubKey_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getSSHPubKey_result()
+ try:
+ result.success = self._handler.getSSHPubKey(args.authzToken, args.airavataCredStoreToken, args.gatewayId)
msg_type = TMessageType.REPLY
- result.ae = ae
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except apache.airavata.api.error.ttypes.InvalidRequestException as ire:
+ msg_type = TMessageType.REPLY
+ result.ire = ire
+ except apache.airavata.api.error.ttypes.AiravataClientException as ace:
+ msg_type = TMessageType.REPLY
+ result.ace = ace
+ except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
+ msg_type = TMessageType.REPLY
+ result.ase = ase
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("createProject", msg_type, seqid)
+ oprot.writeMessageBegin("getSSHPubKey", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_updateProject(self, seqid, iprot, oprot):
- args = updateProject_args()
+ def process_getAllUserSSHPubKeys(self, seqid, iprot, oprot):
+ args = getAllUserSSHPubKeys_args()
args.read(iprot)
iprot.readMessageEnd()
- result = updateProject_result()
+ result = getAllUserSSHPubKeys_result()
try:
- self._handler.updateProject(args.authzToken, args.projectId, args.updatedProject)
+ result.success = self._handler.getAllUserSSHPubKeys(args.authzToken, args.userName)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11200,28 +11498,50 @@ class Processor(Iface, TProcessor):
except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
- except apache.airavata.api.error.ttypes.ProjectNotFoundException as pnfe:
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("getAllUserSSHPubKeys", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getAllGatewaySSHPubKeys(self, seqid, iprot, oprot):
+ args = getAllGatewaySSHPubKeys_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getAllGatewaySSHPubKeys_result()
+ try:
+ result.success = self._handler.getAllGatewaySSHPubKeys(args.authzToken, args.gatewayId)
msg_type = TMessageType.REPLY
- result.pnfe = pnfe
- except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except apache.airavata.api.error.ttypes.InvalidRequestException as ire:
msg_type = TMessageType.REPLY
- result.ae = ae
+ result.ire = ire
+ except apache.airavata.api.error.ttypes.AiravataClientException as ace:
+ msg_type = TMessageType.REPLY
+ result.ace = ace
+ except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
+ msg_type = TMessageType.REPLY
+ result.ase = ase
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("updateProject", msg_type, seqid)
+ oprot.writeMessageBegin("getAllGatewaySSHPubKeys", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_getProject(self, seqid, iprot, oprot):
- args = getProject_args()
+ def process_deleteSSHPubKey(self, seqid, iprot, oprot):
+ args = deleteSSHPubKey_args()
args.read(iprot)
iprot.readMessageEnd()
- result = getProject_result()
+ result = deleteSSHPubKey_result()
try:
- result.success = self._handler.getProject(args.authzToken, args.projectId)
+ result.success = self._handler.deleteSSHPubKey(args.authzToken, args.airavataCredStoreToken, args.gatewayId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11234,9 +11554,34 @@ class Processor(Iface, TProcessor):
except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
- except apache.airavata.api.error.ttypes.ProjectNotFoundException as pnfe:
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("deleteSSHPubKey", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_createProject(self, seqid, iprot, oprot):
+ args = createProject_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = createProject_result()
+ try:
+ result.success = self._handler.createProject(args.authzToken, args.gatewayId, args.project)
msg_type = TMessageType.REPLY
- result.pnfe = pnfe
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except apache.airavata.api.error.ttypes.InvalidRequestException as ire:
+ msg_type = TMessageType.REPLY
+ result.ire = ire
+ except apache.airavata.api.error.ttypes.AiravataClientException as ace:
+ msg_type = TMessageType.REPLY
+ result.ace = ace
+ except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
+ msg_type = TMessageType.REPLY
+ result.ase = ase
except apache.airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
@@ -11244,18 +11589,86 @@ class Processor(Iface, TProcessor):
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("getProject", msg_type, seqid)
+ oprot.writeMessageBegin("createProject", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_deleteProject(self, seqid, iprot, oprot):
- args = deleteProject_args()
+ def process_updateProject(self, seqid, iprot, oprot):
+ args = updateProject_args()
args.read(iprot)
iprot.readMessageEnd()
- result = deleteProject_result()
+ result = updateProject_result()
try:
- result.success = self._handler.deleteProject(args.authzToken, args.projectId)
+ self._handler.updateProject(args.authzToken, args.projectId, args.updatedProject)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except apache.airavata.api.error.ttypes.InvalidRequestException as ire:
+ msg_type = TMessageType.REPLY
+ result.ire = ire
+ except apache.airavata.api.error.ttypes.AiravataClientException as ace:
+ msg_type = TMessageType.REPLY
+ result.ace = ace
+ except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
+ msg_type = TMessageType.REPLY
+ result.ase = ase
+ except apache.airavata.api.error.ttypes.ProjectNotFoundException as pnfe:
+ msg_type = TMessageType.REPLY
+ result.pnfe = pnfe
+ except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ msg_type = TMessageType.REPLY
+ result.ae = ae
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("updateProject", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getProject(self, seqid, iprot, oprot):
+ args = getProject_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getProject_result()
+ try:
+ result.success = self._handler.getProject(args.authzToken, args.projectId)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except apache.airavata.api.error.ttypes.InvalidRequestException as ire:
+ msg_type = TMessageType.REPLY
+ result.ire = ire
+ except apache.airavata.api.error.ttypes.AiravataClientException as ace:
+ msg_type = TMessageType.REPLY
+ result.ace = ace
+ except apache.airavata.api.error.ttypes.AiravataSystemException as ase:
+ msg_type = TMessageType.REPLY
+ result.ase = ase
+ except apache.airavata.api.error.ttypes.ProjectNotFoundException as pnfe:
+ msg_type = TMessageType.REPLY
+ result.pnfe = pnfe
+ except apache.airavata.api.error.ttypes.AuthorizationException as ae:
+ msg_type = TMessageType.REPLY
+ result.ae = ae
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("getProject", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_deleteProject(self, seqid, iprot, oprot):
+ args = deleteProject_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = deleteProject_result()
+ try:
+ result.success = self._handler.deleteProject(args.authzToken, args.projectId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -15277,25 +15690,855 @@ class getAPIVersion_result:
def __ne__(self, other):
return not (self == other)
-class isUserExists_args:
+class isUserExists_args:
+ """
+ Attributes:
+ - authzToken
+ - gatewayId
+ - userName
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
+ (2, TType.STRING, 'gatewayId', None, None, ), # 2
+ (3, TType.STRING, 'userName', None, None, ), # 3
+ )
+
+ def __init__(self, authzToken=None, gatewayId=None, userName=None,):
+ self.authzToken = authzToken
+ self.gatewayId = gatewayId
+ self.userName = userName
+
+ 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.STRUCT:
+ self.authzToken = apache.airavata.model.security.ttypes.AuthzToken()
+ self.authzToken.read(iprot)
+ 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.userName = 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('isUserExists_args')
+ if self.authzToken is not None:
+ oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
+ self.authzToken.write(oprot)
+ oprot.writeFieldEnd()
+ if self.gatewayId is not None:
+ oprot.writeFieldBegin('gatewayId', TType.STRING, 2)
+ oprot.writeString(self.gatewayId)
+ oprot.writeFieldEnd()
+ if self.userName is not None:
+ oprot.writeFieldBegin('userName', TType.STRING, 3)
+ oprot.writeString(self.userName)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.authzToken is None:
+ raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
+ 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!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.authzToken)
+ value = (value * 31) ^ hash(self.gatewayId)
+ value = (value * 31) ^ hash(self.userName)
+ 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 isUserExists_result:
+ """
+ Attributes:
+ - success
+ - ire
+ - ace
+ - ase
+ - ae
+ """
+
+ thrift_spec = (
+ (0, TType.BOOL, 'success', None, None, ), # 0
+ (1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'ae', (apache.airavata.api.error.ttypes.AuthorizationException, apache.airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4
+ )
+
+ def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
+ self.success = success
+ self.ire = ire
+ self.ace = ace
+ self.ase = ase
+ self.ae = ae
+
+ 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 == 0:
+ if ftype == TType.BOOL:
+ self.success = iprot.readBool()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ire = apache.airavata.api.error.ttypes.InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.ace = apache.airavata.api.error.ttypes.AiravataClientException()
+ self.ace.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.ase = apache.airavata.api.error.ttypes.AiravataSystemException()
+ self.ase.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.ae = apache.airavata.api.error.ttypes.AuthorizationException()
+ self.ae.read(iprot)
+ 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('isUserExists_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.BOOL, 0)
+ oprot.writeBool(self.success)
+ oprot.writeFieldEnd()
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ace is not None:
+ oprot.writeFieldBegin('ace', TType.STRUCT, 2)
+ self.ace.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ase is not None:
+ oprot.writeFieldBegin('ase', TType.STRUCT, 3)
+ self.ase.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ae is not None:
+ oprot.writeFieldBegin('ae', TType.STRUCT, 4)
+ self.ae.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.success)
+ value = (value * 31) ^ hash(self.ire)
+ value = (value * 31) ^ hash(self.ace)
+ value = (value * 31) ^ hash(self.ase)
+ value = (value * 31) ^ hash(self.ae)
+ 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 addGateway_args:
+ """
+ Attributes:
+ - authzToken
+ - gateway
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'gateway', (apache.airavata.model.workspace.ttypes.Gateway, apache.airavata.model.workspace.ttypes.Gateway.thrift_spec), None, ), # 2
+ )
+
+ def __init__(self, authzToken=None, gateway=None,):
+ self.authzToken = authzToken
+ self.gateway = gateway
+
+ 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.STRUCT:
+ self.authzToken = apache.airavata.model.security.ttypes.AuthzToken()
+ self.authzToken.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.gateway = apache.airavata.model.workspace.ttypes.Gateway()
+ self.gateway.read(iprot)
+ 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('addGateway_args')
+ if self.authzToken is not None:
+ oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
+ self.authzToken.write(oprot)
+ oprot.writeFieldEnd()
+ if self.gateway is not None:
+ oprot.writeFieldBegin('gateway', TType.STRUCT, 2)
+ self.gateway.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.authzToken is None:
+ raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
+ if self.gateway is None:
+ raise TProtocol.TProtocolException(message='Required field gateway is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.authzToken)
+ value = (value * 31) ^ hash(self.gateway)
+ 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 addGateway_result:
+ """
+ Attributes:
+ - success
+ - ire
+ - ace
+ - ase
+ - ae
+ """
+
+ thrift_spec = (
+ (0, TType.STRING, 'success', None, None, ), # 0
+ (1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'ae', (apache.airavata.api.error.ttypes.AuthorizationException, apache.airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4
+ )
+
+ def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
+ self.success = success
+ self.ire = ire
+ self.ace = ace
+ self.ase = ase
+ self.ae = ae
+
+ 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 == 0:
+ if ftype == TType.STRING:
+ self.success = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ire = apache.airavata.api.error.ttypes.InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.ace = apache.airavata.api.error.ttypes.AiravataClientException()
+ self.ace.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.ase = apache.airavata.api.error.ttypes.AiravataSystemException()
+ self.ase.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.ae = apache.airavata.api.error.ttypes.AuthorizationException()
+ self.ae.read(iprot)
+ 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('addGateway_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRING, 0)
+ oprot.writeString(self.success)
+ oprot.writeFieldEnd()
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ace is not None:
+ oprot.writeFieldBegin('ace', TType.STRUCT, 2)
+ self.ace.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ase is not None:
+ oprot.writeFieldBegin('ase', TType.STRUCT, 3)
+ self.ase.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ae is not None:
+ oprot.writeFieldBegin('ae', TType.STRUCT, 4)
+ self.ae.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.success)
+ value = (value * 31) ^ hash(self.ire)
+ value = (value * 31) ^ hash(self.ace)
+ value = (value * 31) ^ hash(self.ase)
+ value = (value * 31) ^ hash(self.ae)
+ 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 updateGateway_args:
+ """
+ Attributes:
+ - authzToken
+ - gatewayId
+ - updatedGateway
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
+ (2, TType.STRING, 'gatewayId', None, None, ), # 2
+ (3, TType.STRUCT, 'updatedGateway', (apache.airavata.model.workspace.ttypes.Gateway, apache.airavata.model.workspace.ttypes.Gateway.thrift_spec), None, ), # 3
+ )
+
+ def __init__(self, authzToken=None, gatewayId=None, updatedGateway=None,):
+ self.authzToken = authzToken
+ self.gatewayId = gatewayId
+ self.updatedGateway = updatedGateway
+
+ 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.STRUCT:
+ self.authzToken = apache.airavata.model.security.ttypes.AuthzToken()
+ self.authzToken.read(iprot)
+ 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.STRUCT:
+ self.updatedGateway = apache.airavata.model.workspace.ttypes.Gateway()
+ self.updatedGateway.read(iprot)
+ 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('updateGateway_args')
+ if self.authzToken is not None:
+ oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
+ self.authzToken.write(oprot)
+ oprot.writeFieldEnd()
+ if self.gatewayId is not None:
+ oprot.writeFieldBegin('gatewayId', TType.STRING, 2)
+ oprot.writeString(self.gatewayId)
+ oprot.writeFieldEnd()
+ if self.updatedGateway is not None:
+ oprot.writeFieldBegin('updatedGateway', TType.STRUCT, 3)
+ self.updatedGateway.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.authzToken is None:
+ raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
+ if self.gatewayId is None:
+ raise TProtocol.TProtocolException(message='Required field gatewayId is unset!')
+ if self.updatedGateway is None:
+ raise TProtocol.TProtocolException(message='Required field updatedGateway is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.authzToken)
+ value = (value * 31) ^ hash(self.gatewayId)
+ value = (value * 31) ^ hash(self.updatedGateway)
+ 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 updateGateway_result:
+ """
+ Attributes:
+ - ire
+ - ace
+ - ase
+ - ae
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'ae', (apache.airavata.api.error.ttypes.AuthorizationException, apache.airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4
+ )
+
+ def __init__(self, ire=None, ace=None, ase=None, ae=None,):
+ self.ire = ire
+ self.ace = ace
+ self.ase = ase
+ self.ae = ae
+
+ 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.STRUCT:
+ self.ire = apache.airavata.api.error.ttypes.InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.ace = apache.airavata.api.error.ttypes.AiravataClientException()
+ self.ace.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.ase = apache.airavata.api.error.ttypes.AiravataSystemException()
+ self.ase.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.ae = apache.airavata.api.error.ttypes.AuthorizationException()
+ self.ae.read(iprot)
+ 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('updateGateway_result')
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ace is not None:
+ oprot.writeFieldBegin('ace', TType.STRUCT, 2)
+ self.ace.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ase is not None:
+ oprot.writeFieldBegin('ase', TType.STRUCT, 3)
+ self.ase.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ae is not None:
+ oprot.writeFieldBegin('ae', TType.STRUCT, 4)
+ self.ae.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.ire)
+ value = (value * 31) ^ hash(self.ace)
+ value = (value * 31) ^ hash(self.ase)
+ value = (value * 31) ^ hash(self.ae)
+ 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 getGateway_args:
+ """
+ Attributes:
+ - authzToken
+ - gatewayId
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
+ (2, TType.STRING, 'gatewayId', None, None, ), # 2
+ )
+
+ def __init__(self, authzToken=None, gatewayId=None,):
+ self.authzToken = authzToken
+ self.gatewayId = gatewayId
+
+ 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.STRUCT:
+ self.authzToken = apache.airavata.model.security.ttypes.AuthzToken()
+ self.authzToken.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.gatewayId = 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('getGateway_args')
+ if self.authzToken is not None:
+ oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
+ self.authzToken.write(oprot)
+ oprot.writeFieldEnd()
+ if self.gatewayId is not None:
+ oprot.writeFieldBegin('gatewayId', TType.STRING, 2)
+ oprot.writeString(self.gatewayId)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.authzToken is None:
+ raise TProtocol.TProtocolException(message='Required field authzToken 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.authzToken)
+ value = (value * 31) ^ hash(self.gatewayId)
+ 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 getGateway_result:
+ """
+ Attributes:
+ - success
+ - ire
+ - ace
+ - ase
+ - ae
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (apache.airavata.model.workspace.ttypes.Gateway, apache.airavata.model.workspace.ttypes.Gateway.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'ae', (apache.airavata.api.error.ttypes.AuthorizationException, apache.airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4
+ )
+
+ def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
+ self.success = success
+ self.ire = ire
+ self.ace = ace
+ self.ase = ase
+ self.ae = ae
+
+ 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 == 0:
+ if ftype == TType.STRUCT:
+ self.success = apache.airavata.model.workspace.ttypes.Gateway()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ire = apache.airavata.api.error.ttypes.InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.ace = apache.airavata.api.error.ttypes.AiravataClientException()
+ self.ace.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.ase = apache.airavata.api.error.ttypes.AiravataSystemException()
+ self.ase.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.ae = apache.airavata.api.error.ttypes.AuthorizationException()
+ self.ae.read(iprot)
+ 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('getGateway_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ace is not None:
+ oprot.writeFieldBegin('ace', TType.STRUCT, 2)
+ self.ace.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ase is not None:
+ oprot.writeFieldBegin('ase', TType.STRUCT, 3)
+ self.ase.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ae is not None:
+ oprot.writeFieldBegin('ae', TType.STRUCT, 4)
+ self.ae.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.success)
+ value = (value * 31) ^ hash(self.ire)
+ value = (value * 31) ^ hash(self.ace)
+ value = (value * 31) ^ hash(self.ase)
+ value = (value * 31) ^ hash(self.ae)
+ 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 deleteGateway_args:
"""
Attributes:
- authzToken
- gatewayId
- - userName
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'gatewayId', None, None, ), # 2
- (3, TType.STRING, 'userName', None, None, ), # 3
)
- def __init__(self, authzToken=None, gatewayId=None, userName=None,):
+ def __init__(self, authzToken=None, gatewayId=None,):
self.authzToken = authzToken
self.gatewayId = gatewayId
- self.userName = userName
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:
@@ -15317,11 +16560,6 @@ class isUserExists_args:
self.gatewayId = iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.userName = iprot.readString()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -15331,7 +16569,7 @@ class isUserExists_args:
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('isUserExists_args')
+ oprot.writeStructBegin('deleteGateway_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
@@ -15340,10 +16578,6 @@ class isUserExists_args:
oprot.writeFieldBegin('gatewayId', TType.STRING, 2)
oprot.writeString(self.gatewayId)
oprot.writeFieldEnd()
- if self.userName is not None:
- oprot.writeFieldBegin('userName', TType.STRING, 3)
- oprot.writeString(self.userName)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -15352,8 +16586,6 @@ class isUserExists_args:
raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
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!')
return
@@ -15361,7 +16593,6 @@ class isUserExists_args:
value = 17
value = (value * 31) ^ hash(self.authzToken)
value = (value * 31) ^ hash(self.gatewayId)
- value = (value * 31) ^ hash(self.userName)
return value
def __repr__(self):
@@ -15375,7 +16606,7 @@ class isUserExists_args:
def __ne__(self, other):
return not (self == other)
-class isUserExists_result:
+class deleteGateway_result:
"""
Attributes:
- success
@@ -15447,7 +16678,7 @@ class isUserExists_result:
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('isUserExists_result')
+ oprot.writeStructBegin('deleteGateway_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
@@ -15495,22 +16726,19 @@ class isUserExists_result:
def __ne__(self, other):
return not (self == other)
-class addGateway_args:
+class getAllGateways_args:
"""
Attributes:
- authzToken
- - gateway
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'gateway', (apache.airavata.model.workspace.ttypes.Gateway, apache.airavata.model.workspace.ttypes.Gateway.thrift_spec), None, ), # 2
)
- def __init__(self, authzToken=None, gateway=None,):
+ def __init__(self, authzToken=None,):
self.authzToken = authzToken
- self.gateway = gateway
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:
@@ -15527,12 +16755,6 @@ class addGateway_args:
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.gateway = apache.airavata.model.workspace.ttypes.Gateway()
- self.gateway.read(iprot)
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -15542,30 +16764,23 @@ class addGateway_args:
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('addGateway_args')
+ oprot.writeStructBegin('getAllGateways_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
- if self.gateway is not None:
- oprot.writeFieldBegin('gateway', TType.STRUCT, 2)
- self.gateway.write(oprot)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
- if self.gateway is None:
- raise TProtocol.TProtocolException(message='Required field gateway is unset!')
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(self.authzToken)
- value = (value * 31) ^ hash(self.gateway)
return value
def __repr__(self):
@@ -15579,7 +16794,7 @@ class addGateway_args:
def __ne__(self, other):
return not (self == other)
-class addGateway_result:
+class getAllGateways_result:
"""
Attributes:
- success
@@ -15590,7 +16805,7 @@ class addGateway_result:
"""
thrift_spec = (
- (0, TType.STRING, 'success', None, None, ), # 0
+ (0, TType.LIST, 'success', (TType.STRUCT,(apache.airavata.model.workspace.ttypes.Gateway, apache.airavata.model.workspace.ttypes.Gateway.thrift_spec)), None, ), # 0
(1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
(3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
@@ -15614,8 +16829,14 @@ class addGateway_result:
if ftype == TType.STOP:
break
if fid == 0:
- if ftype == TType.STRING:
- self.success = iprot.readString()
+ if ftype == TType.LIST:
+ self.success = []
+ (_etype3, _size0) = iprot.readListBegin()
+ for _i4 in xrange(_size0):
+ _elem5 = apache.airavata.model.workspace.ttypes.Gateway()
+ _elem5.read(iprot)
+ self.success.append(_elem5)
+ iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 1:
@@ -15651,10 +16872,13 @@ class addGateway_result:
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('addGateway_result')
+ oprot.writeStructBegin('getAllGateways_result')
if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRING, 0)
- oprot.writeString(self.success)
+ oprot.writeFieldBegin('success', TType.LIST, 0)
+ oprot.writeListBegin(TType.STRUCT, len(self.success))
+ for iter6 in self.success:
+ iter6.write(oprot)
+ oprot.writeListEnd()
oprot.writeFieldEnd()
if self.ire is not None:
oprot.writeFieldBegin('ire', TType.STRUCT, 1)
@@ -15699,25 +16923,22 @@ class addGateway_result:
def __ne__(self, other):
return not (self == other)
-class updateGateway_args:
+class isGatewayExist_args:
"""
Attributes:
- authzToken
- gatewayId
- - updatedGateway
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'gatewayId', None, None, ), # 2
- (3, TType.STRUCT, 'updatedGateway', (apache.airavata.model.workspace.ttypes.Gateway, apache.airavata.model.workspace.ttypes.Gateway.thrift_spec), None, ), # 3
)
- def __init__(self, authzToken=None, gatewayId=None, updatedGateway=None,):
+ def __init__(self, authzToken=None, gatewayId=None,):
self.authzToken = authzToken
self.gatewayId = gatewayId
- self.updatedGateway = updatedGateway
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:
@@ -15739,12 +16960,6 @@ class updateGateway_args:
self.gatewayId = iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRUCT:
- self.updatedGateway = apache.airavata.model.workspace.ttypes.Gateway()
- self.updatedGateway.read(iprot)
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -15754,7 +16969,7 @@ class updateGateway_args:
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('updateGateway_args')
+ oprot.writeStructBegin('isGatewayExist_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
@@ -15763,10 +16978,6 @@ class updateGateway_args:
oprot.writeFieldBegin('gatewayId', TType.STRING, 2)
oprot.writeString(self.gatewayId)
oprot.writeFieldEnd()
- if self.updatedGateway is not None:
- oprot.writeFieldBegin('updatedGateway', TType.STRUCT, 3)
- self.updatedGateway.write(oprot)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -15775,8 +16986,6 @@ class updateGateway_args:
raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
if self.gatewayId is None:
raise TProtocol.TProtocolException(message='Required field gatewayId is unset!')
- if self.updatedGateway is None:
- raise TProtocol.TProtocolException(message='Required field updatedGateway is unset!')
return
@@ -15784,7 +16993,6 @@ class updateGateway_args:
value = 17
value = (value * 31) ^ hash(self.authzToken)
value = (value * 31) ^ hash(self.gatewayId)
- value = (value * 31) ^ hash(self.updatedGateway)
return value
def __repr__(self):
@@ -15798,9 +17006,10 @@ class updateGateway_args:
def __ne__(self, other):
return not (self == other)
-class updateGateway_result:
+class isGatewayExist_result:
"""
Attributes:
+ - success
- ire
- ace
- ase
@@ -15808,14 +17017,15 @@ class updateGateway_result:
"""
thrift_spec = (
- None, # 0
+ (0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
(3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
(4, TType.STRUCT, 'ae', (apache.airavata.api.error.ttypes.AuthorizationException, apache.airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4
)
- def __init__(self, ire=None, ace=None, ase=None, ae=None,):
+ def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
+ self.success = success
self.ire = ire
self.ace = ace
self.ase = ase
@@ -15830,8 +17040,217 @@ class updateGateway_result:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
+ if fid == 0:
+ if ftype == TType.BOOL:
+ self.success = iprot.readBool()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ire = apache.airavata.api.error.ttypes.InvalidRequestException()
+ self.ire.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.ace = apache.airavata.api.error.ttypes.AiravataClientException()
+ self.ace.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.ase = apache.airavata.api.error.ttypes.AiravataSystemException()
+ self.ase.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.ae = apache.airavata.api.error.ttypes.AuthorizationException()
+ self.ae.read(iprot)
+ 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('isGatewayExist_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.BOOL, 0)
+ oprot.writeBool(self.success)
+ oprot.writeFieldEnd()
+ if self.ire is not None:
+ oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+ self.ire.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ace is not None:
+ oprot.writeFieldBegin('ace', TType.STRUCT, 2)
+ self.ace.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ase is not None:
+ oprot.writeFieldBegin('ase', TType.STRUCT, 3)
+ self.ase.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ae is not None:
+ oprot.writeFieldBegin('ae', TType.STRUCT, 4)
+ self.ae.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.success)
+ value = (value * 31) ^ hash(self.ire)
+ value = (value * 31) ^ hash(self.ace)
+ value = (value * 31) ^ hash(self.ase)
+ value = (value * 31) ^ hash(self.ae)
+ 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 createNotification_args:
+ """
+ Attributes:
+ - authzToken
+ - notification
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'notification', (apache.airavata.model.workspace.ttypes.Notification, apache.airavata.model.workspace.ttypes.Notification.thrift_spec), None, ), # 2
+ )
+
+ def __init__(self, authzToken=None, notification=None,):
+ self.authzToken = authzToken
+ self.notification = notification
+
+ 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.STRUCT:
+ self.authzToken = apache.airavata.model.security.ttypes.AuthzToken()
+ self.authzToken.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.notification = apache.airavata.model.workspace.ttypes.Notification()
+ self.notification.read(iprot)
+ 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('createNotification_args')
+ if self.authzToken is not None:
+ oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
+ self.authzToken.write(oprot)
+ oprot.writeFieldEnd()
+ if self.notification is not None:
+ oprot.writeFieldBegin('notification', TType.STRUCT, 2)
+ self.notification.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.authzToken is None:
+ raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
+ if self.notification is None:
+ raise TProtocol.TProtocolException(message='Required field notification is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.authzToken)
+ value = (value * 31) ^ hash(self.notification)
+ 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 createNotification_result:
+ """
+ Attributes:
+ - success
+ - ire
+ - ace
+ - ase
+ - ae
+ """
+
+ thrift_spec = (
+ (0, TType.STRING, 'success', None, None, ), # 0
+ (1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'ae', (apache.airavata.api.error.ttypes.AuthorizationException, apache.airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4
+ )
+
+ def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
+ self.success = success
+ self.ire = ire
+ self.ace = ace
+ self.ase = ase
+ self.ae = ae
+
+ 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 == 0:
+ if ftype == TType.STRING:
+ self.success = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
self.ire = apache.airavata.api.error.ttypes.InvalidRequestException()
self.ire.read(iprot)
else:
@@ -15863,7 +17282,11 @@ class updateGateway_result:
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('updateGateway_result')
+ oprot.writeStructBegin('createNotification_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRING, 0)
+ oprot.writeString(self.success)
+ oprot.writeFieldEnd()
if self.ire is not None:
oprot.writeFieldBegin('ire', TType.STRUCT, 1)
self.ire.write(oprot)
@@ -15889,6 +17312,7 @@ class updateGateway_result:
def __hash__(self):
value = 17
+ value = (value * 31) ^ hash(self.success)
value = (value * 31) ^ hash(self.ire)
value = (value * 31) ^ hash(self.ace)
value = (value * 31) ^ hash(self.ase)
@@ -15906,22 +17330,22 @@ class updateGateway_result:
def __ne__(self, other):
return not (self == other)
-class getGateway_args:
+class updateNotification_args:
"""
Attributes:
- authzToken
- - gatewayId
+ - notification
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
- (2, TType.STRING, 'gatewayId', None, None, ), # 2
+ (2, TType.STRUCT, 'notification', (apache.airavata.model.workspace.ttypes.Notification, apache.airavata.model.workspace.ttypes.Notification.thrift_spec), None, ), # 2
)
- def __init__(self, authzToken=None, gatewayId=None,):
+ def __init__(self, authzToken=None, notification=None,):
self.authzToken = authzToken
- self.gatewayId = gatewayId
+ self.notification = notification
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:
@@ -15939,8 +17363,9 @@ class getGateway_args:
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.STRING:
- self.gatewayId = iprot.readString()
+ if ftype == TType.STRUCT:
+ self.notification = apache.airavata.model.workspace.ttypes.Notification()
+ self.notification.read(iprot)
else:
iprot.skip(ftype)
else:
@@ -15952,14 +17377,14 @@ class getGateway_args:
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('getGateway_args')
+ oprot.writeStructBegin('updateNotification_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
- if self.gatewayId is not None:
- oprot.writeFieldBegin('gatewayId', TType.STRING, 2)
- oprot.writeString(self.gatewayId)
+ if self.notification is not None:
+ oprot.writeFieldBegin('notification', TType.STRUCT, 2)
+ self.notification.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -15967,15 +17392,15 @@ class getGateway_args:
def validate(self):
if self.authzToken is None:
raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
- if self.gatewayId is None:
- raise TProtocol.TProtocolException(message='Required field gatewayId is unset!')
+ if self.notification is None:
+ raise TProtocol.TProtocolException(message='Required field notification is unset!')
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(self.authzToken)
- value = (value * 31) ^ hash(self.gatewayId)
+ value = (value * 31) ^ hash(self.notification)
return value
def __repr__(self):
@@ -15989,10 +17414,9 @@ class getGateway_args:
def __ne__(self, other):
return not (self == other)
-class getGateway_result:
+class updateNotification_result:
"""
Attributes:
- - success
- ire
- ace
- ase
@@ -16000,15 +17424,14 @@ class getGateway_result:
"""
thrift_spec = (
- (0, TType.STRUCT, 'success', (apache.airavata.model.workspace.ttypes.Gateway, apache.airavata.model.workspace.ttypes.Gateway.thrift_spec), None, ), # 0
+ None, # 0
(1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
(3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
(4, TType.STRUCT, 'ae', (apache.airavata.api.error.ttypes.AuthorizationException, apache.airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4
)
- def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
- self.success = success
+ def __init__(self, ire=None, ace=None, ase=None, ae=None,):
self.ire = ire
self.ace = ace
self.ase = ase
@@ -16023,13 +17446,7 @@ class getGateway_result:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = apache.airavata.model.workspace.ttypes.Gateway()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
+ if fid == 1:
if ftype == TType.STRUCT:
self.ire = apache.airavata.api.error.ttypes.InvalidRequestException()
self.ire.read(iprot)
@@ -16062,11 +17479,7 @@ class getGateway_result:
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('getGateway_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
+ oprot.writeStructBegin('updateNotification_result')
if self.ire is not None:
oprot.writeFieldBegin('ire', TType.STRUCT, 1)
self.ire.write(oprot)
@@ -16092,7 +17505,6 @@ class getGateway_result:
def __hash__(self):
value = 17
- value = (value * 31) ^ hash(self.success)
value = (value * 31) ^ hash(self.ire)
value = (value * 31) ^ hash(self.ace)
value = (value * 31) ^ hash(self.ase)
@@ -16110,22 +17522,25 @@ class getGateway_result:
def __ne__(self, other):
return not (self == other)
-class deleteGateway_args:
+class deleteNotification_args:
"""
Attributes:
- authzToken
- gatewayId
+ - notificationId
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'gatewayId', None, None, ), # 2
+ (3, TType.STRING, 'notificationId', None, None, ), # 3
)
- def __init__(self, authzToken=None, gatewayId=None,):
+ def __init__(self, authzToken=None, gatewayId=None, notificationId=None,):
self.authzToken = authzToken
self.gatewayId = gatewayId
+ self.notificationId = notificationId
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:
@@ -16147,6 +17562,11 @@ class deleteGateway_args:
self.gatewayId = iprot.readString()
else:
iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRING:
+ self.notificationId = iprot.readString()
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -16156,7 +17576,7 @@ class deleteGateway_args:
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('deleteGateway_args')
+ oprot.writeStructBegin('deleteNotification_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
@@ -16165,6 +17585,10 @@ class deleteGateway_args:
oprot.writeFieldBegin('gatewayId', TType.STRING, 2)
oprot.writeString(self.gatewayId)
oprot.writeFieldEnd()
+ if self.notificationId is not None:
+ oprot.writeFieldBegin('notificationId', TType.STRING, 3)
+ oprot.writeString(self.notificationId)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -16173,6 +17597,8 @@ class deleteGateway_args:
raise TProtocol.TProtocolException(message='Required field authzToken is unset!')
if self.gatewayId is None:
raise TProtocol.TProtocolException(message='Required field gatewayId is unset!')
+ if self.notificationId is None:
+ raise TProtocol.TProtocolException(message='Required field notificationId is unset!')
return
@@ -16180,6 +17606,7 @@ class deleteGateway_args:
<TRUNCATED>