airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] branch master updated: Updating thrift stubs
Date Tue, 15 Jan 2019 16:08:55 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git


The following commit(s) were added to refs/heads/master by this push:
     new e35d55e  Updating thrift stubs
e35d55e is described below

commit e35d55eec8714cc10f41e4d40630e0217f13c50c
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Fri Jan 11 16:34:11 2019 -0500

    Updating thrift stubs
---
 airavata/api/Airavata-remote                       |   8 +-
 airavata/api/Airavata.py                           |  58 +------
 .../groupmanager/cpi/GroupManagerService-remote    |   9 +-
 .../groupmanager/cpi/GroupManagerService.py        | 168 +++++++++++++++++++++
 .../iam/admin/services/cpi/IamAdminServices-remote |   8 +-
 .../iam/admin/services/cpi/IamAdminServices.py     |  60 +-------
 .../profile/tenant/cpi/TenantProfileService-remote |   8 +-
 .../profile/tenant/cpi/TenantProfileService.py     |  60 +-------
 .../profile/user/cpi/UserProfileService-remote     |   9 +-
 .../service/profile/user/cpi/UserProfileService.py | 168 +++++++++++++++++++++
 10 files changed, 382 insertions(+), 174 deletions(-)

diff --git a/airavata/api/Airavata-remote b/airavata/api/Airavata-remote
index 77d0221..9ff7ab4 100755
--- a/airavata/api/Airavata-remote
+++ b/airavata/api/Airavata-remote
@@ -24,7 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
     print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate]
[-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
     print('')
     print('Functions:')
-    print('  string getAPIVersion(AuthzToken authzToken)')
+    print('  string getAPIVersion()')
     print('  bool isUserExists(AuthzToken authzToken, string gatewayId, string userName)')
     print('  string addGateway(AuthzToken authzToken, Gateway gateway)')
     print('   getAllUsersInGateway(AuthzToken authzToken, string gatewayId)')
@@ -294,10 +294,10 @@ client = Airavata.Client(protocol)
 transport.open()
 
 if cmd == 'getAPIVersion':
-    if len(args) != 1:
-        print('getAPIVersion requires 1 args')
+    if len(args) != 0:
+        print('getAPIVersion requires 0 args')
         sys.exit(1)
-    pp.pprint(client.getAPIVersion(eval(args[0]),))
+    pp.pprint(client.getAPIVersion())
 
 elif cmd == 'isUserExists':
     if len(args) != 3:
diff --git a/airavata/api/Airavata.py b/airavata/api/Airavata.py
index 03ec907..be91e70 100644
--- a/airavata/api/Airavata.py
+++ b/airavata/api/Airavata.py
@@ -16,13 +16,10 @@ from thrift.transport import TTransport
 
 
 class Iface(object):
-    def getAPIVersion(self, authzToken):
+    def getAPIVersion(self):
         """
         Fetch Apache Airavata API version
 
-
-        Parameters:
-         - authzToken
         """
         pass
 
@@ -3591,21 +3588,17 @@ class Client(Iface):
             self._oprot = oprot
         self._seqid = 0
 
-    def getAPIVersion(self, authzToken):
+    def getAPIVersion(self):
         """
         Fetch Apache Airavata API version
 
-
-        Parameters:
-         - authzToken
         """
-        self.send_getAPIVersion(authzToken)
+        self.send_getAPIVersion()
         return self.recv_getAPIVersion()
 
-    def send_getAPIVersion(self, authzToken):
+    def send_getAPIVersion(self):
         self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
         args = getAPIVersion_args()
-        args.authzToken = authzToken
         args.write(self._oprot)
         self._oprot.writeMessageEnd()
         self._oprot.trans.flush()
@@ -3629,8 +3622,6 @@ class Client(Iface):
             raise result.ace
         if result.ase is not None:
             raise result.ase
-        if result.ae is not None:
-            raise result.ae
         raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion
failed: unknown result")
 
     def isUserExists(self, authzToken, gatewayId, userName):
@@ -13790,7 +13781,7 @@ class Processor(Iface, TProcessor):
         iprot.readMessageEnd()
         result = getAPIVersion_result()
         try:
-            result.success = self._handler.getAPIVersion(args.authzToken)
+            result.success = self._handler.getAPIVersion()
             msg_type = TMessageType.REPLY
         except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
             raise
@@ -13803,9 +13794,6 @@ class Processor(Iface, TProcessor):
         except airavata.api.error.ttypes.AiravataSystemException as ase:
             msg_type = TMessageType.REPLY
             result.ase = ase
-        except airavata.api.error.ttypes.AuthorizationException as ae:
-            msg_type = TMessageType.REPLY
-            result.ae = ae
         except Exception as ex:
             msg_type = TMessageType.EXCEPTION
             logging.exception(ex)
@@ -19711,19 +19699,10 @@ class Processor(Iface, TProcessor):
 
 
 class getAPIVersion_args(object):
-    """
-    Attributes:
-     - authzToken
-    """
 
     thrift_spec = (
-        None,  # 0
-        (1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec),
None, ),  # 1
     )
 
-    def __init__(self, authzToken=None,):
-        self.authzToken = authzToken
-
     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))
@@ -19733,12 +19712,6 @@ class getAPIVersion_args(object):
             (fname, ftype, fid) = iprot.readFieldBegin()
             if ftype == TType.STOP:
                 break
-            if fid == 1:
-                if ftype == TType.STRUCT:
-                    self.authzToken = airavata.model.security.ttypes.AuthzToken()
-                    self.authzToken.read(iprot)
-                else:
-                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -19749,16 +19722,10 @@ class getAPIVersion_args(object):
             oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
             return
         oprot.writeStructBegin('getAPIVersion_args')
-        if self.authzToken is not None:
-            oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
-            self.authzToken.write(oprot)
-            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
     def validate(self):
-        if self.authzToken is None:
-            raise TProtocolException(message='Required field authzToken is unset!')
         return
 
     def __repr__(self):
@@ -19780,7 +19747,6 @@ class getAPIVersion_result(object):
      - ire
      - ace
      - ase
-     - ae
     """
 
     thrift_spec = (
@@ -19788,15 +19754,13 @@ class getAPIVersion_result(object):
         (1, TType.STRUCT, 'ire', (airavata.api.error.ttypes.InvalidRequestException, airavata.api.error.ttypes.InvalidRequestException.thrift_spec),
None, ),  # 1
         (2, TType.STRUCT, 'ace', (airavata.api.error.ttypes.AiravataClientException, airavata.api.error.ttypes.AiravataClientException.thrift_spec),
None, ),  # 2
         (3, TType.STRUCT, 'ase', (airavata.api.error.ttypes.AiravataSystemException, airavata.api.error.ttypes.AiravataSystemException.thrift_spec),
None, ),  # 3
-        (4, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec),
None, ),  # 4
     )
 
-    def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
+    def __init__(self, success=None, ire=None, ace=None, ase=None,):
         self.success = success
         self.ire = ire
         self.ace = ace
         self.ase = ase
-        self.ae = ae
 
     def read(self, iprot):
         if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport)
and self.thrift_spec is not None:
@@ -19830,12 +19794,6 @@ class getAPIVersion_result(object):
                     self.ase.read(iprot)
                 else:
                     iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.STRUCT:
-                    self.ae = airavata.api.error.ttypes.AuthorizationException()
-                    self.ae.read(iprot)
-                else:
-                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -19862,10 +19820,6 @@ class getAPIVersion_result(object):
             oprot.writeFieldBegin('ase', TType.STRUCT, 3)
             self.ase.write(oprot)
             oprot.writeFieldEnd()
-        if self.ae is not None:
-            oprot.writeFieldBegin('ae', TType.STRUCT, 4)
-            self.ae.write(oprot)
-            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
diff --git a/airavata/service/profile/groupmanager/cpi/GroupManagerService-remote b/airavata/service/profile/groupmanager/cpi/GroupManagerService-remote
index 5f5b33c..ab732bf 100755
--- a/airavata/service/profile/groupmanager/cpi/GroupManagerService-remote
+++ b/airavata/service/profile/groupmanager/cpi/GroupManagerService-remote
@@ -24,6 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
     print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate]
[-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
     print('')
     print('Functions:')
+    print('  string getAPIVersion()')
     print('  string createGroup(AuthzToken authzToken, GroupModel groupModel)')
     print('  bool updateGroup(AuthzToken authzToken, GroupModel groupModel)')
     print('  bool deleteGroup(AuthzToken authzToken, string groupId, string ownerId)')
@@ -116,7 +117,13 @@ protocol = TBinaryProtocol(transport)
 client = GroupManagerService.Client(protocol)
 transport.open()
 
-if cmd == 'createGroup':
+if cmd == 'getAPIVersion':
+    if len(args) != 0:
+        print('getAPIVersion requires 0 args')
+        sys.exit(1)
+    pp.pprint(client.getAPIVersion())
+
+elif cmd == 'createGroup':
     if len(args) != 2:
         print('createGroup requires 2 args')
         sys.exit(1)
diff --git a/airavata/service/profile/groupmanager/cpi/GroupManagerService.py b/airavata/service/profile/groupmanager/cpi/GroupManagerService.py
index 1df8d23..e0d3fd7 100644
--- a/airavata/service/profile/groupmanager/cpi/GroupManagerService.py
+++ b/airavata/service/profile/groupmanager/cpi/GroupManagerService.py
@@ -16,6 +16,9 @@ from thrift.transport import TTransport
 
 
 class Iface(object):
+    def getAPIVersion(self):
+        pass
+
     def createGroup(self, authzToken, groupModel):
         """
         Parameters:
@@ -135,6 +138,34 @@ class Client(Iface):
             self._oprot = oprot
         self._seqid = 0
 
+    def getAPIVersion(self):
+        self.send_getAPIVersion()
+        return self.recv_getAPIVersion()
+
+    def send_getAPIVersion(self):
+        self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
+        args = getAPIVersion_args()
+        args.write(self._oprot)
+        self._oprot.writeMessageEnd()
+        self._oprot.trans.flush()
+
+    def recv_getAPIVersion(self):
+        iprot = self._iprot
+        (fname, mtype, rseqid) = iprot.readMessageBegin()
+        if mtype == TMessageType.EXCEPTION:
+            x = TApplicationException()
+            x.read(iprot)
+            iprot.readMessageEnd()
+            raise x
+        result = getAPIVersion_result()
+        result.read(iprot)
+        iprot.readMessageEnd()
+        if result.success is not None:
+            return result.success
+        if result.gse is not None:
+            raise result.gse
+        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion
failed: unknown result")
+
     def createGroup(self, authzToken, groupModel):
         """
         Parameters:
@@ -635,6 +666,7 @@ class Processor(Iface, TProcessor):
     def __init__(self, handler):
         self._handler = handler
         self._processMap = {}
+        self._processMap["getAPIVersion"] = Processor.process_getAPIVersion
         self._processMap["createGroup"] = Processor.process_createGroup
         self._processMap["updateGroup"] = Processor.process_updateGroup
         self._processMap["deleteGroup"] = Processor.process_deleteGroup
@@ -664,6 +696,28 @@ class Processor(Iface, TProcessor):
             self._processMap[name](self, seqid, iprot, oprot)
         return True
 
+    def process_getAPIVersion(self, seqid, iprot, oprot):
+        args = getAPIVersion_args()
+        args.read(iprot)
+        iprot.readMessageEnd()
+        result = getAPIVersion_result()
+        try:
+            result.success = self._handler.getAPIVersion()
+            msg_type = TMessageType.REPLY
+        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+            raise
+        except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException
as gse:
+            msg_type = TMessageType.REPLY
+            result.gse = gse
+        except Exception as ex:
+            msg_type = TMessageType.EXCEPTION
+            logging.exception(ex)
+            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal
error')
+        oprot.writeMessageBegin("getAPIVersion", msg_type, seqid)
+        result.write(oprot)
+        oprot.writeMessageEnd()
+        oprot.trans.flush()
+
     def process_createGroup(self, seqid, iprot, oprot):
         args = createGroup_args()
         args.read(iprot)
@@ -992,6 +1046,120 @@ class Processor(Iface, TProcessor):
 # HELPER FUNCTIONS AND STRUCTURES
 
 
+class getAPIVersion_args(object):
+
+    thrift_spec = (
+    )
+
+    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
+            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('getAPIVersion_args')
+        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 getAPIVersion_result(object):
+    """
+    Attributes:
+     - success
+     - gse
+    """
+
+    thrift_spec = (
+        (0, TType.STRING, 'success', 'UTF8', None, ),  # 0
+        (1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException,
airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec),
None, ),  # 1
+    )
+
+    def __init__(self, success=None, gse=None,):
+        self.success = success
+        self.gse = gse
+
+    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.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
+                    self.gse.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('getAPIVersion_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.gse is not None:
+            oprot.writeFieldBegin('gse', TType.STRUCT, 1)
+            self.gse.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 createGroup_args(object):
     """
     Attributes:
diff --git a/airavata/service/profile/iam/admin/services/cpi/IamAdminServices-remote b/airavata/service/profile/iam/admin/services/cpi/IamAdminServices-remote
index c164ce1..ba10cb0 100755
--- a/airavata/service/profile/iam/admin/services/cpi/IamAdminServices-remote
+++ b/airavata/service/profile/iam/admin/services/cpi/IamAdminServices-remote
@@ -24,7 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
     print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate]
[-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
     print('')
     print('Functions:')
-    print('  string getAPIVersion(AuthzToken authzToken)')
+    print('  string getAPIVersion()')
     print('  Gateway setUpGateway(AuthzToken authzToken, Gateway gateway)')
     print('  bool isUsernameAvailable(AuthzToken authzToken, string username)')
     print('  bool registerUser(AuthzToken authzToken, string username, string emailAddress,
string firstName, string lastName, string newPassword)')
@@ -118,10 +118,10 @@ client = IamAdminServices.Client(protocol)
 transport.open()
 
 if cmd == 'getAPIVersion':
-    if len(args) != 1:
-        print('getAPIVersion requires 1 args')
+    if len(args) != 0:
+        print('getAPIVersion requires 0 args')
         sys.exit(1)
-    pp.pprint(client.getAPIVersion(eval(args[0]),))
+    pp.pprint(client.getAPIVersion())
 
 elif cmd == 'setUpGateway':
     if len(args) != 2:
diff --git a/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.py b/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.py
index dae59b5..2e6fac8 100644
--- a/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.py
+++ b/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.py
@@ -16,11 +16,7 @@ from thrift.transport import TTransport
 
 
 class Iface(object):
-    def getAPIVersion(self, authzToken):
-        """
-        Parameters:
-         - authzToken
-        """
+    def getAPIVersion(self):
         pass
 
     def setUpGateway(self, authzToken, gateway):
@@ -143,18 +139,13 @@ class Client(Iface):
             self._oprot = oprot
         self._seqid = 0
 
-    def getAPIVersion(self, authzToken):
-        """
-        Parameters:
-         - authzToken
-        """
-        self.send_getAPIVersion(authzToken)
+    def getAPIVersion(self):
+        self.send_getAPIVersion()
         return self.recv_getAPIVersion()
 
-    def send_getAPIVersion(self, authzToken):
+    def send_getAPIVersion(self):
         self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
         args = getAPIVersion_args()
-        args.authzToken = authzToken
         args.write(self._oprot)
         self._oprot.writeMessageEnd()
         self._oprot.trans.flush()
@@ -174,8 +165,6 @@ class Client(Iface):
             return result.success
         if result.Idse is not None:
             raise result.Idse
-        if result.ae is not None:
-            raise result.ae
         raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion
failed: unknown result")
 
     def setUpGateway(self, authzToken, gateway):
@@ -714,16 +703,13 @@ class Processor(Iface, TProcessor):
         iprot.readMessageEnd()
         result = getAPIVersion_result()
         try:
-            result.success = self._handler.getAPIVersion(args.authzToken)
+            result.success = self._handler.getAPIVersion()
             msg_type = TMessageType.REPLY
         except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
             raise
         except airavata.service.profile.iam.admin.services.cpi.error.ttypes.IamAdminServicesException
as Idse:
             msg_type = TMessageType.REPLY
             result.Idse = Idse
-        except airavata.api.error.ttypes.AuthorizationException as ae:
-            msg_type = TMessageType.REPLY
-            result.ae = ae
         except Exception as ex:
             msg_type = TMessageType.EXCEPTION
             logging.exception(ex)
@@ -1062,19 +1048,10 @@ class Processor(Iface, TProcessor):
 
 
 class getAPIVersion_args(object):
-    """
-    Attributes:
-     - authzToken
-    """
 
     thrift_spec = (
-        None,  # 0
-        (1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec),
None, ),  # 1
     )
 
-    def __init__(self, authzToken=None,):
-        self.authzToken = authzToken
-
     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))
@@ -1084,12 +1061,6 @@ class getAPIVersion_args(object):
             (fname, ftype, fid) = iprot.readFieldBegin()
             if ftype == TType.STOP:
                 break
-            if fid == 1:
-                if ftype == TType.STRUCT:
-                    self.authzToken = airavata.model.security.ttypes.AuthzToken()
-                    self.authzToken.read(iprot)
-                else:
-                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -1100,16 +1071,10 @@ class getAPIVersion_args(object):
             oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
             return
         oprot.writeStructBegin('getAPIVersion_args')
-        if self.authzToken is not None:
-            oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
-            self.authzToken.write(oprot)
-            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
     def validate(self):
-        if self.authzToken is None:
-            raise TProtocolException(message='Required field authzToken is unset!')
         return
 
     def __repr__(self):
@@ -1129,19 +1094,16 @@ class getAPIVersion_result(object):
     Attributes:
      - success
      - Idse
-     - ae
     """
 
     thrift_spec = (
         (0, TType.STRING, 'success', 'UTF8', None, ),  # 0
         (1, TType.STRUCT, 'Idse', (airavata.service.profile.iam.admin.services.cpi.error.ttypes.IamAdminServicesException,
airavata.service.profile.iam.admin.services.cpi.error.ttypes.IamAdminServicesException.thrift_spec),
None, ),  # 1
-        (2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec),
None, ),  # 2
     )
 
-    def __init__(self, success=None, Idse=None, ae=None,):
+    def __init__(self, success=None, Idse=None,):
         self.success = success
         self.Idse = Idse
-        self.ae = ae
 
     def read(self, iprot):
         if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport)
and self.thrift_spec is not None:
@@ -1163,12 +1125,6 @@ class getAPIVersion_result(object):
                     self.Idse.read(iprot)
                 else:
                     iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRUCT:
-                    self.ae = airavata.api.error.ttypes.AuthorizationException()
-                    self.ae.read(iprot)
-                else:
-                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -1187,10 +1143,6 @@ class getAPIVersion_result(object):
             oprot.writeFieldBegin('Idse', TType.STRUCT, 1)
             self.Idse.write(oprot)
             oprot.writeFieldEnd()
-        if self.ae is not None:
-            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
-            self.ae.write(oprot)
-            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
diff --git a/airavata/service/profile/tenant/cpi/TenantProfileService-remote b/airavata/service/profile/tenant/cpi/TenantProfileService-remote
index 410b138..307dc4c 100755
--- a/airavata/service/profile/tenant/cpi/TenantProfileService-remote
+++ b/airavata/service/profile/tenant/cpi/TenantProfileService-remote
@@ -24,7 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
     print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate]
[-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
     print('')
     print('Functions:')
-    print('  string getAPIVersion(AuthzToken authzToken)')
+    print('  string getAPIVersion()')
     print('  string addGateway(AuthzToken authzToken, Gateway gateway)')
     print('  bool updateGateway(AuthzToken authzToken, Gateway updatedGateway)')
     print('  Gateway getGateway(AuthzToken authzToken, string airavataInternalGatewayId)')
@@ -112,10 +112,10 @@ client = TenantProfileService.Client(protocol)
 transport.open()
 
 if cmd == 'getAPIVersion':
-    if len(args) != 1:
-        print('getAPIVersion requires 1 args')
+    if len(args) != 0:
+        print('getAPIVersion requires 0 args')
         sys.exit(1)
-    pp.pprint(client.getAPIVersion(eval(args[0]),))
+    pp.pprint(client.getAPIVersion())
 
 elif cmd == 'addGateway':
     if len(args) != 2:
diff --git a/airavata/service/profile/tenant/cpi/TenantProfileService.py b/airavata/service/profile/tenant/cpi/TenantProfileService.py
index dd89fbb..2328e0f 100644
--- a/airavata/service/profile/tenant/cpi/TenantProfileService.py
+++ b/airavata/service/profile/tenant/cpi/TenantProfileService.py
@@ -16,11 +16,7 @@ from thrift.transport import TTransport
 
 
 class Iface(object):
-    def getAPIVersion(self, authzToken):
-        """
-        Parameters:
-         - authzToken
-        """
+    def getAPIVersion(self):
         pass
 
     def addGateway(self, authzToken, gateway):
@@ -89,18 +85,13 @@ class Client(Iface):
             self._oprot = oprot
         self._seqid = 0
 
-    def getAPIVersion(self, authzToken):
-        """
-        Parameters:
-         - authzToken
-        """
-        self.send_getAPIVersion(authzToken)
+    def getAPIVersion(self):
+        self.send_getAPIVersion()
         return self.recv_getAPIVersion()
 
-    def send_getAPIVersion(self, authzToken):
+    def send_getAPIVersion(self):
         self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
         args = getAPIVersion_args()
-        args.authzToken = authzToken
         args.write(self._oprot)
         self._oprot.writeMessageEnd()
         self._oprot.trans.flush()
@@ -120,8 +111,6 @@ class Client(Iface):
             return result.success
         if result.tpe is not None:
             raise result.tpe
-        if result.ae is not None:
-            raise result.ae
         raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion
failed: unknown result")
 
     def addGateway(self, authzToken, gateway):
@@ -420,16 +409,13 @@ class Processor(Iface, TProcessor):
         iprot.readMessageEnd()
         result = getAPIVersion_result()
         try:
-            result.success = self._handler.getAPIVersion(args.authzToken)
+            result.success = self._handler.getAPIVersion()
             msg_type = TMessageType.REPLY
         except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
             raise
         except airavata.service.profile.tenant.cpi.error.ttypes.TenantProfileServiceException
as tpe:
             msg_type = TMessageType.REPLY
             result.tpe = tpe
-        except airavata.api.error.ttypes.AuthorizationException as ae:
-            msg_type = TMessageType.REPLY
-            result.ae = ae
         except Exception as ex:
             msg_type = TMessageType.EXCEPTION
             logging.exception(ex)
@@ -618,19 +604,10 @@ class Processor(Iface, TProcessor):
 
 
 class getAPIVersion_args(object):
-    """
-    Attributes:
-     - authzToken
-    """
 
     thrift_spec = (
-        None,  # 0
-        (1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec),
None, ),  # 1
     )
 
-    def __init__(self, authzToken=None,):
-        self.authzToken = authzToken
-
     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))
@@ -640,12 +617,6 @@ class getAPIVersion_args(object):
             (fname, ftype, fid) = iprot.readFieldBegin()
             if ftype == TType.STOP:
                 break
-            if fid == 1:
-                if ftype == TType.STRUCT:
-                    self.authzToken = airavata.model.security.ttypes.AuthzToken()
-                    self.authzToken.read(iprot)
-                else:
-                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -656,16 +627,10 @@ class getAPIVersion_args(object):
             oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
             return
         oprot.writeStructBegin('getAPIVersion_args')
-        if self.authzToken is not None:
-            oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
-            self.authzToken.write(oprot)
-            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
     def validate(self):
-        if self.authzToken is None:
-            raise TProtocolException(message='Required field authzToken is unset!')
         return
 
     def __repr__(self):
@@ -685,19 +650,16 @@ class getAPIVersion_result(object):
     Attributes:
      - success
      - tpe
-     - ae
     """
 
     thrift_spec = (
         (0, TType.STRING, 'success', 'UTF8', None, ),  # 0
         (1, TType.STRUCT, 'tpe', (airavata.service.profile.tenant.cpi.error.ttypes.TenantProfileServiceException,
airavata.service.profile.tenant.cpi.error.ttypes.TenantProfileServiceException.thrift_spec),
None, ),  # 1
-        (2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec),
None, ),  # 2
     )
 
-    def __init__(self, success=None, tpe=None, ae=None,):
+    def __init__(self, success=None, tpe=None,):
         self.success = success
         self.tpe = tpe
-        self.ae = ae
 
     def read(self, iprot):
         if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport)
and self.thrift_spec is not None:
@@ -719,12 +681,6 @@ class getAPIVersion_result(object):
                     self.tpe.read(iprot)
                 else:
                     iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRUCT:
-                    self.ae = airavata.api.error.ttypes.AuthorizationException()
-                    self.ae.read(iprot)
-                else:
-                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -743,10 +699,6 @@ class getAPIVersion_result(object):
             oprot.writeFieldBegin('tpe', TType.STRUCT, 1)
             self.tpe.write(oprot)
             oprot.writeFieldEnd()
-        if self.ae is not None:
-            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
-            self.ae.write(oprot)
-            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
diff --git a/airavata/service/profile/user/cpi/UserProfileService-remote b/airavata/service/profile/user/cpi/UserProfileService-remote
index 7e14fc4..3883c1b 100755
--- a/airavata/service/profile/user/cpi/UserProfileService-remote
+++ b/airavata/service/profile/user/cpi/UserProfileService-remote
@@ -24,6 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
     print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate]
[-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
     print('')
     print('Functions:')
+    print('  string getAPIVersion()')
     print('  string initializeUserProfile(AuthzToken authzToken)')
     print('  string addUserProfile(AuthzToken authzToken, UserProfile userProfile)')
     print('  bool updateUserProfile(AuthzToken authzToken, UserProfile userProfile)')
@@ -110,7 +111,13 @@ protocol = TBinaryProtocol(transport)
 client = UserProfileService.Client(protocol)
 transport.open()
 
-if cmd == 'initializeUserProfile':
+if cmd == 'getAPIVersion':
+    if len(args) != 0:
+        print('getAPIVersion requires 0 args')
+        sys.exit(1)
+    pp.pprint(client.getAPIVersion())
+
+elif cmd == 'initializeUserProfile':
     if len(args) != 1:
         print('initializeUserProfile requires 1 args')
         sys.exit(1)
diff --git a/airavata/service/profile/user/cpi/UserProfileService.py b/airavata/service/profile/user/cpi/UserProfileService.py
index 7d64942..a5d06cb 100644
--- a/airavata/service/profile/user/cpi/UserProfileService.py
+++ b/airavata/service/profile/user/cpi/UserProfileService.py
@@ -16,6 +16,9 @@ from thrift.transport import TTransport
 
 
 class Iface(object):
+    def getAPIVersion(self):
+        pass
+
     def initializeUserProfile(self, authzToken):
         """
         Create an initial UserProfile based on information in the IAM service for this user.
@@ -86,6 +89,34 @@ class Client(Iface):
             self._oprot = oprot
         self._seqid = 0
 
+    def getAPIVersion(self):
+        self.send_getAPIVersion()
+        return self.recv_getAPIVersion()
+
+    def send_getAPIVersion(self):
+        self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
+        args = getAPIVersion_args()
+        args.write(self._oprot)
+        self._oprot.writeMessageEnd()
+        self._oprot.trans.flush()
+
+    def recv_getAPIVersion(self):
+        iprot = self._iprot
+        (fname, mtype, rseqid) = iprot.readMessageBegin()
+        if mtype == TMessageType.EXCEPTION:
+            x = TApplicationException()
+            x.read(iprot)
+            iprot.readMessageEnd()
+            raise x
+        result = getAPIVersion_result()
+        result.read(iprot)
+        iprot.readMessageEnd()
+        if result.success is not None:
+            return result.success
+        if result.upe is not None:
+            raise result.upe
+        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion
failed: unknown result")
+
     def initializeUserProfile(self, authzToken):
         """
         Create an initial UserProfile based on information in the IAM service for this user.
@@ -360,6 +391,7 @@ class Processor(Iface, TProcessor):
     def __init__(self, handler):
         self._handler = handler
         self._processMap = {}
+        self._processMap["getAPIVersion"] = Processor.process_getAPIVersion
         self._processMap["initializeUserProfile"] = Processor.process_initializeUserProfile
         self._processMap["addUserProfile"] = Processor.process_addUserProfile
         self._processMap["updateUserProfile"] = Processor.process_updateUserProfile
@@ -383,6 +415,28 @@ class Processor(Iface, TProcessor):
             self._processMap[name](self, seqid, iprot, oprot)
         return True
 
+    def process_getAPIVersion(self, seqid, iprot, oprot):
+        args = getAPIVersion_args()
+        args.read(iprot)
+        iprot.readMessageEnd()
+        result = getAPIVersion_result()
+        try:
+            result.success = self._handler.getAPIVersion()
+            msg_type = TMessageType.REPLY
+        except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+            raise
+        except airavata.service.profile.user.cpi.error.ttypes.UserProfileServiceException
as upe:
+            msg_type = TMessageType.REPLY
+            result.upe = upe
+        except Exception as ex:
+            msg_type = TMessageType.EXCEPTION
+            logging.exception(ex)
+            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal
error')
+        oprot.writeMessageBegin("getAPIVersion", msg_type, seqid)
+        result.write(oprot)
+        oprot.writeMessageEnd()
+        oprot.trans.flush()
+
     def process_initializeUserProfile(self, seqid, iprot, oprot):
         args = initializeUserProfile_args()
         args.read(iprot)
@@ -561,6 +615,120 @@ class Processor(Iface, TProcessor):
 # HELPER FUNCTIONS AND STRUCTURES
 
 
+class getAPIVersion_args(object):
+
+    thrift_spec = (
+    )
+
+    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
+            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('getAPIVersion_args')
+        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 getAPIVersion_result(object):
+    """
+    Attributes:
+     - success
+     - upe
+    """
+
+    thrift_spec = (
+        (0, TType.STRING, 'success', 'UTF8', None, ),  # 0
+        (1, TType.STRUCT, 'upe', (airavata.service.profile.user.cpi.error.ttypes.UserProfileServiceException,
airavata.service.profile.user.cpi.error.ttypes.UserProfileServiceException.thrift_spec), None,
),  # 1
+    )
+
+    def __init__(self, success=None, upe=None,):
+        self.success = success
+        self.upe = upe
+
+    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.upe = airavata.service.profile.user.cpi.error.ttypes.UserProfileServiceException()
+                    self.upe.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('getAPIVersion_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.upe is not None:
+            oprot.writeFieldBegin('upe', TType.STRUCT, 1)
+            self.upe.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 initializeUserProfile_args(object):
     """
     Attributes:


Mime
View raw message