| # |
| # Autogenerated by Thrift Compiler (0.10.0) |
| # |
| # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| # |
| # options string: py |
| # |
| |
| from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException |
| from thrift.protocol.TProtocol import TProtocolException |
| import sys |
| import airavata.base.api.BaseAPI |
| import logging |
| from .ttypes import * |
| from thrift.Thrift import TProcessor |
| from thrift.transport import TTransport |
| |
| |
| class Iface(airavata.base.api.BaseAPI.Iface): |
| def getCredentialSummary(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| pass |
| |
| def getAllCredentialSummaries(self, type, accessibleTokenIds, gatewayId): |
| """ |
| Parameters: |
| - type |
| - accessibleTokenIds |
| - gatewayId |
| """ |
| pass |
| |
| def addSSHCredential(self, sshCredential): |
| """ |
| This method is to add SSHCredential which will return the token Id in success |
| |
| |
| Parameters: |
| - sshCredential |
| """ |
| pass |
| |
| def addCertificateCredential(self, certificateCredential): |
| """ |
| Parameters: |
| - certificateCredential |
| """ |
| pass |
| |
| def addPasswordCredential(self, passwordCredential): |
| """ |
| Parameters: |
| - passwordCredential |
| """ |
| pass |
| |
| def getSSHCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| pass |
| |
| def getCertificateCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| pass |
| |
| def getPasswordCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| pass |
| |
| def getAllCredentialSummaryForGateway(self, type, gatewayId): |
| """ |
| Parameters: |
| - type |
| - gatewayId |
| """ |
| pass |
| |
| def getAllCredentialSummaryForUserInGateway(self, type, gatewayId, userId): |
| """ |
| Parameters: |
| - type |
| - gatewayId |
| - userId |
| """ |
| pass |
| |
| def getAllPWDCredentialsForGateway(self, gatewayId): |
| """ |
| Parameters: |
| - gatewayId |
| """ |
| pass |
| |
| def deleteSSHCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| pass |
| |
| def deletePWDCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| pass |
| |
| |
| class Client(airavata.base.api.BaseAPI.Client, Iface): |
| def __init__(self, iprot, oprot=None): |
| airavata.base.api.BaseAPI.Client.__init__(self, iprot, oprot) |
| |
| def getCredentialSummary(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| self.send_getCredentialSummary(tokenId, gatewayId) |
| return self.recv_getCredentialSummary() |
| |
| def send_getCredentialSummary(self, tokenId, gatewayId): |
| self._oprot.writeMessageBegin('getCredentialSummary', TMessageType.CALL, self._seqid) |
| args = getCredentialSummary_args() |
| args.tokenId = tokenId |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_getCredentialSummary(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = getCredentialSummary_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "getCredentialSummary failed: unknown result") |
| |
| def getAllCredentialSummaries(self, type, accessibleTokenIds, gatewayId): |
| """ |
| Parameters: |
| - type |
| - accessibleTokenIds |
| - gatewayId |
| """ |
| self.send_getAllCredentialSummaries(type, accessibleTokenIds, gatewayId) |
| return self.recv_getAllCredentialSummaries() |
| |
| def send_getAllCredentialSummaries(self, type, accessibleTokenIds, gatewayId): |
| self._oprot.writeMessageBegin('getAllCredentialSummaries', TMessageType.CALL, self._seqid) |
| args = getAllCredentialSummaries_args() |
| args.type = type |
| args.accessibleTokenIds = accessibleTokenIds |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_getAllCredentialSummaries(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = getAllCredentialSummaries_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllCredentialSummaries failed: unknown result") |
| |
| def addSSHCredential(self, sshCredential): |
| """ |
| This method is to add SSHCredential which will return the token Id in success |
| |
| |
| Parameters: |
| - sshCredential |
| """ |
| self.send_addSSHCredential(sshCredential) |
| return self.recv_addSSHCredential() |
| |
| def send_addSSHCredential(self, sshCredential): |
| self._oprot.writeMessageBegin('addSSHCredential', TMessageType.CALL, self._seqid) |
| args = addSSHCredential_args() |
| args.sshCredential = sshCredential |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_addSSHCredential(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = addSSHCredential_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "addSSHCredential failed: unknown result") |
| |
| def addCertificateCredential(self, certificateCredential): |
| """ |
| Parameters: |
| - certificateCredential |
| """ |
| self.send_addCertificateCredential(certificateCredential) |
| return self.recv_addCertificateCredential() |
| |
| def send_addCertificateCredential(self, certificateCredential): |
| self._oprot.writeMessageBegin('addCertificateCredential', TMessageType.CALL, self._seqid) |
| args = addCertificateCredential_args() |
| args.certificateCredential = certificateCredential |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_addCertificateCredential(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = addCertificateCredential_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "addCertificateCredential failed: unknown result") |
| |
| def addPasswordCredential(self, passwordCredential): |
| """ |
| Parameters: |
| - passwordCredential |
| """ |
| self.send_addPasswordCredential(passwordCredential) |
| return self.recv_addPasswordCredential() |
| |
| def send_addPasswordCredential(self, passwordCredential): |
| self._oprot.writeMessageBegin('addPasswordCredential', TMessageType.CALL, self._seqid) |
| args = addPasswordCredential_args() |
| args.passwordCredential = passwordCredential |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_addPasswordCredential(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = addPasswordCredential_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "addPasswordCredential failed: unknown result") |
| |
| def getSSHCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| self.send_getSSHCredential(tokenId, gatewayId) |
| return self.recv_getSSHCredential() |
| |
| def send_getSSHCredential(self, tokenId, gatewayId): |
| self._oprot.writeMessageBegin('getSSHCredential', TMessageType.CALL, self._seqid) |
| args = getSSHCredential_args() |
| args.tokenId = tokenId |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_getSSHCredential(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = getSSHCredential_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "getSSHCredential failed: unknown result") |
| |
| def getCertificateCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| self.send_getCertificateCredential(tokenId, gatewayId) |
| return self.recv_getCertificateCredential() |
| |
| def send_getCertificateCredential(self, tokenId, gatewayId): |
| self._oprot.writeMessageBegin('getCertificateCredential', TMessageType.CALL, self._seqid) |
| args = getCertificateCredential_args() |
| args.tokenId = tokenId |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_getCertificateCredential(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = getCertificateCredential_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "getCertificateCredential failed: unknown result") |
| |
| def getPasswordCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| self.send_getPasswordCredential(tokenId, gatewayId) |
| return self.recv_getPasswordCredential() |
| |
| def send_getPasswordCredential(self, tokenId, gatewayId): |
| self._oprot.writeMessageBegin('getPasswordCredential', TMessageType.CALL, self._seqid) |
| args = getPasswordCredential_args() |
| args.tokenId = tokenId |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_getPasswordCredential(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = getPasswordCredential_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "getPasswordCredential failed: unknown result") |
| |
| def getAllCredentialSummaryForGateway(self, type, gatewayId): |
| """ |
| Parameters: |
| - type |
| - gatewayId |
| """ |
| self.send_getAllCredentialSummaryForGateway(type, gatewayId) |
| return self.recv_getAllCredentialSummaryForGateway() |
| |
| def send_getAllCredentialSummaryForGateway(self, type, gatewayId): |
| self._oprot.writeMessageBegin('getAllCredentialSummaryForGateway', TMessageType.CALL, self._seqid) |
| args = getAllCredentialSummaryForGateway_args() |
| args.type = type |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_getAllCredentialSummaryForGateway(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = getAllCredentialSummaryForGateway_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllCredentialSummaryForGateway failed: unknown result") |
| |
| def getAllCredentialSummaryForUserInGateway(self, type, gatewayId, userId): |
| """ |
| Parameters: |
| - type |
| - gatewayId |
| - userId |
| """ |
| self.send_getAllCredentialSummaryForUserInGateway(type, gatewayId, userId) |
| return self.recv_getAllCredentialSummaryForUserInGateway() |
| |
| def send_getAllCredentialSummaryForUserInGateway(self, type, gatewayId, userId): |
| self._oprot.writeMessageBegin('getAllCredentialSummaryForUserInGateway', TMessageType.CALL, self._seqid) |
| args = getAllCredentialSummaryForUserInGateway_args() |
| args.type = type |
| args.gatewayId = gatewayId |
| args.userId = userId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_getAllCredentialSummaryForUserInGateway(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = getAllCredentialSummaryForUserInGateway_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllCredentialSummaryForUserInGateway failed: unknown result") |
| |
| def getAllPWDCredentialsForGateway(self, gatewayId): |
| """ |
| Parameters: |
| - gatewayId |
| """ |
| self.send_getAllPWDCredentialsForGateway(gatewayId) |
| return self.recv_getAllPWDCredentialsForGateway() |
| |
| def send_getAllPWDCredentialsForGateway(self, gatewayId): |
| self._oprot.writeMessageBegin('getAllPWDCredentialsForGateway', TMessageType.CALL, self._seqid) |
| args = getAllPWDCredentialsForGateway_args() |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_getAllPWDCredentialsForGateway(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = getAllPWDCredentialsForGateway_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPWDCredentialsForGateway failed: unknown result") |
| |
| def deleteSSHCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| self.send_deleteSSHCredential(tokenId, gatewayId) |
| return self.recv_deleteSSHCredential() |
| |
| def send_deleteSSHCredential(self, tokenId, gatewayId): |
| self._oprot.writeMessageBegin('deleteSSHCredential', TMessageType.CALL, self._seqid) |
| args = deleteSSHCredential_args() |
| args.tokenId = tokenId |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_deleteSSHCredential(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = deleteSSHCredential_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteSSHCredential failed: unknown result") |
| |
| def deletePWDCredential(self, tokenId, gatewayId): |
| """ |
| Parameters: |
| - tokenId |
| - gatewayId |
| """ |
| self.send_deletePWDCredential(tokenId, gatewayId) |
| return self.recv_deletePWDCredential() |
| |
| def send_deletePWDCredential(self, tokenId, gatewayId): |
| self._oprot.writeMessageBegin('deletePWDCredential', TMessageType.CALL, self._seqid) |
| args = deletePWDCredential_args() |
| args.tokenId = tokenId |
| args.gatewayId = gatewayId |
| args.write(self._oprot) |
| self._oprot.writeMessageEnd() |
| self._oprot.trans.flush() |
| |
| def recv_deletePWDCredential(self): |
| iprot = self._iprot |
| (fname, mtype, rseqid) = iprot.readMessageBegin() |
| if mtype == TMessageType.EXCEPTION: |
| x = TApplicationException() |
| x.read(iprot) |
| iprot.readMessageEnd() |
| raise x |
| result = deletePWDCredential_result() |
| result.read(iprot) |
| iprot.readMessageEnd() |
| if result.success is not None: |
| return result.success |
| if result.csException is not None: |
| raise result.csException |
| raise TApplicationException(TApplicationException.MISSING_RESULT, "deletePWDCredential failed: unknown result") |
| |
| |
| class Processor(airavata.base.api.BaseAPI.Processor, Iface, TProcessor): |
| def __init__(self, handler): |
| airavata.base.api.BaseAPI.Processor.__init__(self, handler) |
| self._processMap["getCredentialSummary"] = Processor.process_getCredentialSummary |
| self._processMap["getAllCredentialSummaries"] = Processor.process_getAllCredentialSummaries |
| self._processMap["addSSHCredential"] = Processor.process_addSSHCredential |
| self._processMap["addCertificateCredential"] = Processor.process_addCertificateCredential |
| self._processMap["addPasswordCredential"] = Processor.process_addPasswordCredential |
| self._processMap["getSSHCredential"] = Processor.process_getSSHCredential |
| self._processMap["getCertificateCredential"] = Processor.process_getCertificateCredential |
| self._processMap["getPasswordCredential"] = Processor.process_getPasswordCredential |
| self._processMap["getAllCredentialSummaryForGateway"] = Processor.process_getAllCredentialSummaryForGateway |
| self._processMap["getAllCredentialSummaryForUserInGateway"] = Processor.process_getAllCredentialSummaryForUserInGateway |
| self._processMap["getAllPWDCredentialsForGateway"] = Processor.process_getAllPWDCredentialsForGateway |
| self._processMap["deleteSSHCredential"] = Processor.process_deleteSSHCredential |
| self._processMap["deletePWDCredential"] = Processor.process_deletePWDCredential |
| |
| def process(self, iprot, oprot): |
| (name, type, seqid) = iprot.readMessageBegin() |
| if name not in self._processMap: |
| iprot.skip(TType.STRUCT) |
| iprot.readMessageEnd() |
| x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) |
| oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) |
| x.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| return |
| else: |
| self._processMap[name](self, seqid, iprot, oprot) |
| return True |
| |
| def process_getCredentialSummary(self, seqid, iprot, oprot): |
| args = getCredentialSummary_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = getCredentialSummary_result() |
| try: |
| result.success = self._handler.getCredentialSummary(args.tokenId, args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("getCredentialSummary", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_getAllCredentialSummaries(self, seqid, iprot, oprot): |
| args = getAllCredentialSummaries_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = getAllCredentialSummaries_result() |
| try: |
| result.success = self._handler.getAllCredentialSummaries(args.type, args.accessibleTokenIds, args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("getAllCredentialSummaries", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_addSSHCredential(self, seqid, iprot, oprot): |
| args = addSSHCredential_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = addSSHCredential_result() |
| try: |
| result.success = self._handler.addSSHCredential(args.sshCredential) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("addSSHCredential", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_addCertificateCredential(self, seqid, iprot, oprot): |
| args = addCertificateCredential_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = addCertificateCredential_result() |
| try: |
| result.success = self._handler.addCertificateCredential(args.certificateCredential) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("addCertificateCredential", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_addPasswordCredential(self, seqid, iprot, oprot): |
| args = addPasswordCredential_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = addPasswordCredential_result() |
| try: |
| result.success = self._handler.addPasswordCredential(args.passwordCredential) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("addPasswordCredential", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_getSSHCredential(self, seqid, iprot, oprot): |
| args = getSSHCredential_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = getSSHCredential_result() |
| try: |
| result.success = self._handler.getSSHCredential(args.tokenId, args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("getSSHCredential", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_getCertificateCredential(self, seqid, iprot, oprot): |
| args = getCertificateCredential_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = getCertificateCredential_result() |
| try: |
| result.success = self._handler.getCertificateCredential(args.tokenId, args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("getCertificateCredential", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_getPasswordCredential(self, seqid, iprot, oprot): |
| args = getPasswordCredential_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = getPasswordCredential_result() |
| try: |
| result.success = self._handler.getPasswordCredential(args.tokenId, args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("getPasswordCredential", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_getAllCredentialSummaryForGateway(self, seqid, iprot, oprot): |
| args = getAllCredentialSummaryForGateway_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = getAllCredentialSummaryForGateway_result() |
| try: |
| result.success = self._handler.getAllCredentialSummaryForGateway(args.type, args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("getAllCredentialSummaryForGateway", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_getAllCredentialSummaryForUserInGateway(self, seqid, iprot, oprot): |
| args = getAllCredentialSummaryForUserInGateway_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = getAllCredentialSummaryForUserInGateway_result() |
| try: |
| result.success = self._handler.getAllCredentialSummaryForUserInGateway(args.type, args.gatewayId, args.userId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("getAllCredentialSummaryForUserInGateway", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_getAllPWDCredentialsForGateway(self, seqid, iprot, oprot): |
| args = getAllPWDCredentialsForGateway_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = getAllPWDCredentialsForGateway_result() |
| try: |
| result.success = self._handler.getAllPWDCredentialsForGateway(args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("getAllPWDCredentialsForGateway", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_deleteSSHCredential(self, seqid, iprot, oprot): |
| args = deleteSSHCredential_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = deleteSSHCredential_result() |
| try: |
| result.success = self._handler.deleteSSHCredential(args.tokenId, args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("deleteSSHCredential", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| def process_deletePWDCredential(self, seqid, iprot, oprot): |
| args = deletePWDCredential_args() |
| args.read(iprot) |
| iprot.readMessageEnd() |
| result = deletePWDCredential_result() |
| try: |
| result.success = self._handler.deletePWDCredential(args.tokenId, args.gatewayId) |
| msg_type = TMessageType.REPLY |
| except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): |
| raise |
| except airavata.api.credential.store.error.ttypes.CredentialStoreException as csException: |
| msg_type = TMessageType.REPLY |
| result.csException = csException |
| except Exception as ex: |
| msg_type = TMessageType.EXCEPTION |
| logging.exception(ex) |
| result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') |
| oprot.writeMessageBegin("deletePWDCredential", msg_type, seqid) |
| result.write(oprot) |
| oprot.writeMessageEnd() |
| oprot.trans.flush() |
| |
| # HELPER FUNCTIONS AND STRUCTURES |
| |
| |
| class getCredentialSummary_args(object): |
| """ |
| Attributes: |
| - tokenId |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'tokenId', 'UTF8', None, ), # 1 |
| (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 |
| ) |
| |
| def __init__(self, tokenId=None, gatewayId=None,): |
| self.tokenId = tokenId |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.tokenId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getCredentialSummary_args') |
| if self.tokenId is not None: |
| oprot.writeFieldBegin('tokenId', TType.STRING, 1) |
| oprot.writeString(self.tokenId.encode('utf-8') if sys.version_info[0] == 2 else self.tokenId) |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 2) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.tokenId is None: |
| raise TProtocolException(message='Required field tokenId is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getCredentialSummary_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.STRUCT, 'success', (airavata.model.credential.store.ttypes.CredentialSummary, airavata.model.credential.store.ttypes.CredentialSummary.thrift_spec), None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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 = airavata.model.credential.store.ttypes.CredentialSummary() |
| self.success.read(iprot) |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getCredentialSummary_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.STRUCT, 0) |
| self.success.write(oprot) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getAllCredentialSummaries_args(object): |
| """ |
| Attributes: |
| - type |
| - accessibleTokenIds |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.I32, 'type', None, None, ), # 1 |
| (2, TType.LIST, 'accessibleTokenIds', (TType.STRING, 'UTF8', False), None, ), # 2 |
| (3, TType.STRING, 'gatewayId', 'UTF8', None, ), # 3 |
| ) |
| |
| def __init__(self, type=None, accessibleTokenIds=None, gatewayId=None,): |
| self.type = type |
| self.accessibleTokenIds = accessibleTokenIds |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.I32: |
| self.type = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.LIST: |
| self.accessibleTokenIds = [] |
| (_etype3, _size0) = iprot.readListBegin() |
| for _i4 in range(_size0): |
| _elem5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| self.accessibleTokenIds.append(_elem5) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 3: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getAllCredentialSummaries_args') |
| if self.type is not None: |
| oprot.writeFieldBegin('type', TType.I32, 1) |
| oprot.writeI32(self.type) |
| oprot.writeFieldEnd() |
| if self.accessibleTokenIds is not None: |
| oprot.writeFieldBegin('accessibleTokenIds', TType.LIST, 2) |
| oprot.writeListBegin(TType.STRING, len(self.accessibleTokenIds)) |
| for iter6 in self.accessibleTokenIds: |
| oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 3) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.type is None: |
| raise TProtocolException(message='Required field type is unset!') |
| if self.accessibleTokenIds is None: |
| raise TProtocolException(message='Required field accessibleTokenIds is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getAllCredentialSummaries_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.LIST, 'success', (TType.STRUCT, (airavata.model.credential.store.ttypes.CredentialSummary, airavata.model.credential.store.ttypes.CredentialSummary.thrift_spec), False), None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.LIST: |
| self.success = [] |
| (_etype10, _size7) = iprot.readListBegin() |
| for _i11 in range(_size7): |
| _elem12 = airavata.model.credential.store.ttypes.CredentialSummary() |
| _elem12.read(iprot) |
| self.success.append(_elem12) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getAllCredentialSummaries_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.LIST, 0) |
| oprot.writeListBegin(TType.STRUCT, len(self.success)) |
| for iter13 in self.success: |
| iter13.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 addSSHCredential_args(object): |
| """ |
| Attributes: |
| - sshCredential |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRUCT, 'sshCredential', (airavata.model.credential.store.ttypes.SSHCredential, airavata.model.credential.store.ttypes.SSHCredential.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, sshCredential=None,): |
| self.sshCredential = sshCredential |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.sshCredential = airavata.model.credential.store.ttypes.SSHCredential() |
| self.sshCredential.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('addSSHCredential_args') |
| if self.sshCredential is not None: |
| oprot.writeFieldBegin('sshCredential', TType.STRUCT, 1) |
| self.sshCredential.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.sshCredential is None: |
| raise TProtocolException(message='Required field sshCredential is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 addSSHCredential_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.STRING, 'success', 'UTF8', None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('addSSHCredential_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.STRING, 0) |
| oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 addCertificateCredential_args(object): |
| """ |
| Attributes: |
| - certificateCredential |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRUCT, 'certificateCredential', (airavata.model.credential.store.ttypes.CertificateCredential, airavata.model.credential.store.ttypes.CertificateCredential.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, certificateCredential=None,): |
| self.certificateCredential = certificateCredential |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.certificateCredential = airavata.model.credential.store.ttypes.CertificateCredential() |
| self.certificateCredential.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('addCertificateCredential_args') |
| if self.certificateCredential is not None: |
| oprot.writeFieldBegin('certificateCredential', TType.STRUCT, 1) |
| self.certificateCredential.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.certificateCredential is None: |
| raise TProtocolException(message='Required field certificateCredential is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 addCertificateCredential_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.STRING, 'success', 'UTF8', None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('addCertificateCredential_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.STRING, 0) |
| oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 addPasswordCredential_args(object): |
| """ |
| Attributes: |
| - passwordCredential |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRUCT, 'passwordCredential', (airavata.model.credential.store.ttypes.PasswordCredential, airavata.model.credential.store.ttypes.PasswordCredential.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, passwordCredential=None,): |
| self.passwordCredential = passwordCredential |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.passwordCredential = airavata.model.credential.store.ttypes.PasswordCredential() |
| self.passwordCredential.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('addPasswordCredential_args') |
| if self.passwordCredential is not None: |
| oprot.writeFieldBegin('passwordCredential', TType.STRUCT, 1) |
| self.passwordCredential.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.passwordCredential is None: |
| raise TProtocolException(message='Required field passwordCredential is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 addPasswordCredential_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.STRING, 'success', 'UTF8', None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('addPasswordCredential_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.STRING, 0) |
| oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getSSHCredential_args(object): |
| """ |
| Attributes: |
| - tokenId |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'tokenId', 'UTF8', None, ), # 1 |
| (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 |
| ) |
| |
| def __init__(self, tokenId=None, gatewayId=None,): |
| self.tokenId = tokenId |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.tokenId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getSSHCredential_args') |
| if self.tokenId is not None: |
| oprot.writeFieldBegin('tokenId', TType.STRING, 1) |
| oprot.writeString(self.tokenId.encode('utf-8') if sys.version_info[0] == 2 else self.tokenId) |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 2) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.tokenId is None: |
| raise TProtocolException(message='Required field tokenId is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getSSHCredential_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.STRUCT, 'success', (airavata.model.credential.store.ttypes.SSHCredential, airavata.model.credential.store.ttypes.SSHCredential.thrift_spec), None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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 = airavata.model.credential.store.ttypes.SSHCredential() |
| self.success.read(iprot) |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getSSHCredential_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.STRUCT, 0) |
| self.success.write(oprot) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getCertificateCredential_args(object): |
| """ |
| Attributes: |
| - tokenId |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'tokenId', 'UTF8', None, ), # 1 |
| (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 |
| ) |
| |
| def __init__(self, tokenId=None, gatewayId=None,): |
| self.tokenId = tokenId |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.tokenId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getCertificateCredential_args') |
| if self.tokenId is not None: |
| oprot.writeFieldBegin('tokenId', TType.STRING, 1) |
| oprot.writeString(self.tokenId.encode('utf-8') if sys.version_info[0] == 2 else self.tokenId) |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 2) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.tokenId is None: |
| raise TProtocolException(message='Required field tokenId is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getCertificateCredential_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.STRUCT, 'success', (airavata.model.credential.store.ttypes.CertificateCredential, airavata.model.credential.store.ttypes.CertificateCredential.thrift_spec), None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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 = airavata.model.credential.store.ttypes.CertificateCredential() |
| self.success.read(iprot) |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getCertificateCredential_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.STRUCT, 0) |
| self.success.write(oprot) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getPasswordCredential_args(object): |
| """ |
| Attributes: |
| - tokenId |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'tokenId', 'UTF8', None, ), # 1 |
| (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 |
| ) |
| |
| def __init__(self, tokenId=None, gatewayId=None,): |
| self.tokenId = tokenId |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.tokenId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getPasswordCredential_args') |
| if self.tokenId is not None: |
| oprot.writeFieldBegin('tokenId', TType.STRING, 1) |
| oprot.writeString(self.tokenId.encode('utf-8') if sys.version_info[0] == 2 else self.tokenId) |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 2) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.tokenId is None: |
| raise TProtocolException(message='Required field tokenId is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getPasswordCredential_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.STRUCT, 'success', (airavata.model.credential.store.ttypes.PasswordCredential, airavata.model.credential.store.ttypes.PasswordCredential.thrift_spec), None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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 = airavata.model.credential.store.ttypes.PasswordCredential() |
| self.success.read(iprot) |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getPasswordCredential_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.STRUCT, 0) |
| self.success.write(oprot) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getAllCredentialSummaryForGateway_args(object): |
| """ |
| Attributes: |
| - type |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.I32, 'type', None, None, ), # 1 |
| (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 |
| ) |
| |
| def __init__(self, type=None, gatewayId=None,): |
| self.type = type |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.I32: |
| self.type = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getAllCredentialSummaryForGateway_args') |
| if self.type is not None: |
| oprot.writeFieldBegin('type', TType.I32, 1) |
| oprot.writeI32(self.type) |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 2) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.type is None: |
| raise TProtocolException(message='Required field type is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getAllCredentialSummaryForGateway_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.LIST, 'success', (TType.STRUCT, (airavata.model.credential.store.ttypes.CredentialSummary, airavata.model.credential.store.ttypes.CredentialSummary.thrift_spec), False), None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.LIST: |
| self.success = [] |
| (_etype17, _size14) = iprot.readListBegin() |
| for _i18 in range(_size14): |
| _elem19 = airavata.model.credential.store.ttypes.CredentialSummary() |
| _elem19.read(iprot) |
| self.success.append(_elem19) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getAllCredentialSummaryForGateway_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.LIST, 0) |
| oprot.writeListBegin(TType.STRUCT, len(self.success)) |
| for iter20 in self.success: |
| iter20.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getAllCredentialSummaryForUserInGateway_args(object): |
| """ |
| Attributes: |
| - type |
| - gatewayId |
| - userId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.I32, 'type', None, None, ), # 1 |
| (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 |
| (3, TType.STRING, 'userId', 'UTF8', None, ), # 3 |
| ) |
| |
| def __init__(self, type=None, gatewayId=None, userId=None,): |
| self.type = type |
| self.gatewayId = gatewayId |
| self.userId = userId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.I32: |
| self.type = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 3: |
| if ftype == TType.STRING: |
| self.userId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getAllCredentialSummaryForUserInGateway_args') |
| if self.type is not None: |
| oprot.writeFieldBegin('type', TType.I32, 1) |
| oprot.writeI32(self.type) |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 2) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| if self.userId is not None: |
| oprot.writeFieldBegin('userId', TType.STRING, 3) |
| oprot.writeString(self.userId.encode('utf-8') if sys.version_info[0] == 2 else self.userId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.type is None: |
| raise TProtocolException(message='Required field type is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| if self.userId is None: |
| raise TProtocolException(message='Required field userId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getAllCredentialSummaryForUserInGateway_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.LIST, 'success', (TType.STRUCT, (airavata.model.credential.store.ttypes.CredentialSummary, airavata.model.credential.store.ttypes.CredentialSummary.thrift_spec), False), None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.LIST: |
| self.success = [] |
| (_etype24, _size21) = iprot.readListBegin() |
| for _i25 in range(_size21): |
| _elem26 = airavata.model.credential.store.ttypes.CredentialSummary() |
| _elem26.read(iprot) |
| self.success.append(_elem26) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getAllCredentialSummaryForUserInGateway_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.LIST, 0) |
| oprot.writeListBegin(TType.STRUCT, len(self.success)) |
| for iter27 in self.success: |
| iter27.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getAllPWDCredentialsForGateway_args(object): |
| """ |
| Attributes: |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'gatewayId', 'UTF8', None, ), # 1 |
| ) |
| |
| def __init__(self, gatewayId=None,): |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getAllPWDCredentialsForGateway_args') |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 1) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 getAllPWDCredentialsForGateway_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.MAP: |
| self.success = {} |
| (_ktype29, _vtype30, _size28) = iprot.readMapBegin() |
| for _i32 in range(_size28): |
| _key33 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| _val34 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| self.success[_key33] = _val34 |
| iprot.readMapEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 1: |
| if ftype == TType.STRUCT: |
| self.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('getAllPWDCredentialsForGateway_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.MAP, 0) |
| oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) |
| for kiter35, viter36 in self.success.items(): |
| oprot.writeString(kiter35.encode('utf-8') if sys.version_info[0] == 2 else kiter35) |
| oprot.writeString(viter36.encode('utf-8') if sys.version_info[0] == 2 else viter36) |
| oprot.writeMapEnd() |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 deleteSSHCredential_args(object): |
| """ |
| Attributes: |
| - tokenId |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'tokenId', 'UTF8', None, ), # 1 |
| (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 |
| ) |
| |
| def __init__(self, tokenId=None, gatewayId=None,): |
| self.tokenId = tokenId |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.tokenId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('deleteSSHCredential_args') |
| if self.tokenId is not None: |
| oprot.writeFieldBegin('tokenId', TType.STRING, 1) |
| oprot.writeString(self.tokenId.encode('utf-8') if sys.version_info[0] == 2 else self.tokenId) |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 2) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.tokenId is None: |
| raise TProtocolException(message='Required field tokenId is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 deleteSSHCredential_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.BOOL, 'success', None, None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('deleteSSHCredential_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.BOOL, 0) |
| oprot.writeBool(self.success) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 deletePWDCredential_args(object): |
| """ |
| Attributes: |
| - tokenId |
| - gatewayId |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'tokenId', 'UTF8', None, ), # 1 |
| (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 |
| ) |
| |
| def __init__(self, tokenId=None, gatewayId=None,): |
| self.tokenId = tokenId |
| self.gatewayId = gatewayId |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.tokenId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRING: |
| self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('deletePWDCredential_args') |
| if self.tokenId is not None: |
| oprot.writeFieldBegin('tokenId', TType.STRING, 1) |
| oprot.writeString(self.tokenId.encode('utf-8') if sys.version_info[0] == 2 else self.tokenId) |
| oprot.writeFieldEnd() |
| if self.gatewayId is not None: |
| oprot.writeFieldBegin('gatewayId', TType.STRING, 2) |
| oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.tokenId is None: |
| raise TProtocolException(message='Required field tokenId is unset!') |
| if self.gatewayId is None: |
| raise TProtocolException(message='Required field gatewayId is unset!') |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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 deletePWDCredential_result(object): |
| """ |
| Attributes: |
| - success |
| - csException |
| """ |
| |
| thrift_spec = ( |
| (0, TType.BOOL, 'success', None, None, ), # 0 |
| (1, TType.STRUCT, 'csException', (airavata.api.credential.store.error.ttypes.CredentialStoreException, airavata.api.credential.store.error.ttypes.CredentialStoreException.thrift_spec), None, ), # 1 |
| ) |
| |
| def __init__(self, success=None, csException=None,): |
| self.success = success |
| self.csException = csException |
| |
| def read(self, iprot): |
| if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: |
| iprot._fast_decode(self, iprot, (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.csException = airavata.api.credential.store.error.ttypes.CredentialStoreException() |
| self.csException.read(iprot) |
| else: |
| iprot.skip(ftype) |
| else: |
| iprot.skip(ftype) |
| iprot.readFieldEnd() |
| iprot.readStructEnd() |
| |
| def write(self, oprot): |
| if oprot._fast_encode is not None and self.thrift_spec is not None: |
| oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) |
| return |
| oprot.writeStructBegin('deletePWDCredential_result') |
| if self.success is not None: |
| oprot.writeFieldBegin('success', TType.BOOL, 0) |
| oprot.writeBool(self.success) |
| oprot.writeFieldEnd() |
| if self.csException is not None: |
| oprot.writeFieldBegin('csException', TType.STRUCT, 1) |
| self.csException.write(oprot) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| return |
| |
| def __repr__(self): |
| L = ['%s=%r' % (key, value) |
| for key, value in self.__dict__.items()] |
| 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) |