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 Wed, 02 May 2018 19:06:48 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 c5f8787  Updating thrift stubs
c5f8787 is described below

commit c5f8787c144da49b606f3d1c1953a66b48f8f641
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Wed May 2 15:03:04 2018 -0400

    Updating thrift stubs
---
 airavata/api/Airavata-remote                       |  2 +-
 airavata/api/Airavata.py                           | 25 ++++++++++----
 .../appcatalog/groupresourceprofile/ttypes.py      |  5 +--
 .../model/appcatalog/storageresource/ttypes.py     | 26 ++++++++++++++-
 airavata/model/data/movement/ttypes.py             | 38 +++++++++++++++++++++-
 5 files changed, 85 insertions(+), 11 deletions(-)

diff --git a/airavata/api/Airavata-remote b/airavata/api/Airavata-remote
index 138ed6b..7b09b27 100755
--- a/airavata/api/Airavata-remote
+++ b/airavata/api/Airavata-remote
@@ -193,7 +193,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
     print('  bool shareResourceWithUsers(AuthzToken authzToken, string resourceId, ResourceType
resourceType,  userPermissionList)')
     print('  bool revokeSharingOfResourceFromUsers(AuthzToken authzToken, string resourceId,
ResourceType resourceType,  userPermissionList)')
     print('   getAllAccessibleUsers(AuthzToken authzToken, string resourceId, ResourceType
resourceType, ResourcePermissionType permissionType)')
-    print('  void createGroupResourceProfile(AuthzToken authzToken, GroupResourceProfile
groupResourceProfile)')
+    print('  string createGroupResourceProfile(AuthzToken authzToken, GroupResourceProfile
groupResourceProfile)')
     print('  void updateGroupResourceProfile(AuthzToken authzToken, GroupResourceProfile
groupResourceProfile)')
     print('  GroupResourceProfile getGroupResourceProfile(AuthzToken authzToken, string groupResourceProfileId)')
     print('  bool removeGroupResourceProfile(AuthzToken authzToken, string groupResourceProfileId)')
diff --git a/airavata/api/Airavata.py b/airavata/api/Airavata.py
index b36f53f..8a09145 100644
--- a/airavata/api/Airavata.py
+++ b/airavata/api/Airavata.py
@@ -12797,7 +12797,7 @@ class Client(Iface):
          - groupResourceProfile
         """
         self.send_createGroupResourceProfile(authzToken, groupResourceProfile)
-        self.recv_createGroupResourceProfile()
+        return self.recv_createGroupResourceProfile()
 
     def send_createGroupResourceProfile(self, authzToken, groupResourceProfile):
         self._oprot.writeMessageBegin('createGroupResourceProfile', TMessageType.CALL, self._seqid)
@@ -12819,6 +12819,8 @@ class Client(Iface):
         result = createGroupResourceProfile_result()
         result.read(iprot)
         iprot.readMessageEnd()
+        if result.success is not None:
+            return result.success
         if result.ire is not None:
             raise result.ire
         if result.ace is not None:
@@ -12827,7 +12829,7 @@ class Client(Iface):
             raise result.ase
         if result.ae is not None:
             raise result.ae
-        return
+        raise TApplicationException(TApplicationException.MISSING_RESULT, "createGroupResourceProfile
failed: unknown result")
 
     def updateGroupResourceProfile(self, authzToken, groupResourceProfile):
         """
@@ -18828,7 +18830,7 @@ class Processor(Iface, TProcessor):
         iprot.readMessageEnd()
         result = createGroupResourceProfile_result()
         try:
-            self._handler.createGroupResourceProfile(args.authzToken, args.groupResourceProfile)
+            result.success = self._handler.createGroupResourceProfile(args.authzToken, args.groupResourceProfile)
             msg_type = TMessageType.REPLY
         except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
             raise
@@ -53525,6 +53527,7 @@ class createGroupResourceProfile_args(object):
 class createGroupResourceProfile_result(object):
     """
     Attributes:
+     - success
      - ire
      - ace
      - ase
@@ -53532,14 +53535,15 @@ class createGroupResourceProfile_result(object):
     """
 
     thrift_spec = (
-        None,  # 0
+        (0, TType.STRING, 'success', 'UTF8', None, ),  # 0
         (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, ire=None, ace=None, ase=None, ae=None,):
+    def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
+        self.success = success
         self.ire = ire
         self.ace = ace
         self.ase = ase
@@ -53554,7 +53558,12 @@ class createGroupResourceProfile_result(object):
             (fname, ftype, fid) = iprot.readFieldBegin()
             if ftype == TType.STOP:
                 break
-            if fid == 1:
+            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.ire = airavata.api.error.ttypes.InvalidRequestException()
                     self.ire.read(iprot)
@@ -53588,6 +53597,10 @@ class createGroupResourceProfile_result(object):
             oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
             return
         oprot.writeStructBegin('createGroupResourceProfile_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.ire is not None:
             oprot.writeFieldBegin('ire', TType.STRUCT, 1)
             self.ire.write(oprot)
diff --git a/airavata/model/appcatalog/groupresourceprofile/ttypes.py b/airavata/model/appcatalog/groupresourceprofile/ttypes.py
index 197af65..b8689fd 100644
--- a/airavata/model/appcatalog/groupresourceprofile/ttypes.py
+++ b/airavata/model/appcatalog/groupresourceprofile/ttypes.py
@@ -9,6 +9,7 @@
 from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
 from thrift.protocol.TProtocol import TProtocolException
 import sys
+import airavata.model.commons.ttypes
 import airavata.model.appcatalog.computeresource.ttypes
 import airavata.model.data.movement.ttypes
 
@@ -677,7 +678,7 @@ class GroupResourceProfile(object):
 
     thrift_spec = (
         None,  # 0
-        (1, TType.STRING, 'gatewayId', 'UTF8', None, ),  # 1
+        (1, TType.STRING, 'gatewayId', 'UTF8', "DO_NOT_SET_AT_CLIENTS", ),  # 1
         (2, TType.STRING, 'groupResourceProfileId', 'UTF8', None, ),  # 2
         (3, TType.STRING, 'groupResourceProfileName', 'UTF8', None, ),  # 3
         (4, TType.LIST, 'computePreferences', (TType.STRUCT, (GroupComputeResourcePreference,
GroupComputeResourcePreference.thrift_spec), False), None, ),  # 4
@@ -687,7 +688,7 @@ class GroupResourceProfile(object):
         (8, TType.I64, 'updatedTime', None, None, ),  # 8
     )
 
-    def __init__(self, gatewayId=None, groupResourceProfileId=None, groupResourceProfileName=None,
computePreferences=None, computeResourcePolicies=None, batchQueueResourcePolicies=None, creationTime=None,
updatedTime=None,):
+    def __init__(self, gatewayId=thrift_spec[1][4], groupResourceProfileId=None, groupResourceProfileName=None,
computePreferences=None, computeResourcePolicies=None, batchQueueResourcePolicies=None, creationTime=None,
updatedTime=None,):
         self.gatewayId = gatewayId
         self.groupResourceProfileId = groupResourceProfileId
         self.groupResourceProfileName = groupResourceProfileName
diff --git a/airavata/model/appcatalog/storageresource/ttypes.py b/airavata/model/appcatalog/storageresource/ttypes.py
index e1ebd1c..747540b 100644
--- a/airavata/model/appcatalog/storageresource/ttypes.py
+++ b/airavata/model/appcatalog/storageresource/ttypes.py
@@ -39,6 +39,8 @@ class StorageResourceDescription(object):
      - storageResourceDescription
      - enabled
      - dataMovementInterfaces
+     - creationTime
+     - updateTime
     """
 
     thrift_spec = (
@@ -48,14 +50,18 @@ class StorageResourceDescription(object):
         (3, TType.STRING, 'storageResourceDescription', 'UTF8', None, ),  # 3
         (4, TType.BOOL, 'enabled', None, None, ),  # 4
         (5, TType.LIST, 'dataMovementInterfaces', (TType.STRUCT, (airavata.model.data.movement.ttypes.DataMovementInterface,
airavata.model.data.movement.ttypes.DataMovementInterface.thrift_spec), False), None, ), 
# 5
+        (6, TType.I64, 'creationTime', None, None, ),  # 6
+        (7, TType.I64, 'updateTime', None, None, ),  # 7
     )
 
-    def __init__(self, storageResourceId=thrift_spec[1][4], hostName=None, storageResourceDescription=None,
enabled=None, dataMovementInterfaces=None,):
+    def __init__(self, storageResourceId=thrift_spec[1][4], hostName=None, storageResourceDescription=None,
enabled=None, dataMovementInterfaces=None, creationTime=None, updateTime=None,):
         self.storageResourceId = storageResourceId
         self.hostName = hostName
         self.storageResourceDescription = storageResourceDescription
         self.enabled = enabled
         self.dataMovementInterfaces = dataMovementInterfaces
+        self.creationTime = creationTime
+        self.updateTime = updateTime
 
     def read(self, iprot):
         if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport)
and self.thrift_spec is not None:
@@ -97,6 +103,16 @@ class StorageResourceDescription(object):
                     iprot.readListEnd()
                 else:
                     iprot.skip(ftype)
+            elif fid == 6:
+                if ftype == TType.I64:
+                    self.creationTime = iprot.readI64()
+                else:
+                    iprot.skip(ftype)
+            elif fid == 7:
+                if ftype == TType.I64:
+                    self.updateTime = iprot.readI64()
+                else:
+                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -130,6 +146,14 @@ class StorageResourceDescription(object):
                 iter6.write(oprot)
             oprot.writeListEnd()
             oprot.writeFieldEnd()
+        if self.creationTime is not None:
+            oprot.writeFieldBegin('creationTime', TType.I64, 6)
+            oprot.writeI64(self.creationTime)
+            oprot.writeFieldEnd()
+        if self.updateTime is not None:
+            oprot.writeFieldBegin('updateTime', TType.I64, 7)
+            oprot.writeI64(self.updateTime)
+            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 
diff --git a/airavata/model/data/movement/ttypes.py b/airavata/model/data/movement/ttypes.py
index c25eb43..bc6f022 100644
--- a/airavata/model/data/movement/ttypes.py
+++ b/airavata/model/data/movement/ttypes.py
@@ -504,6 +504,9 @@ class DataMovementInterface(object):
      - dataMovementInterfaceId
      - dataMovementProtocol
      - priorityOrder
+     - creationTime
+     - updateTime
+     - storageResourceId
     """
 
     thrift_spec = (
@@ -511,12 +514,18 @@ class DataMovementInterface(object):
         (1, TType.STRING, 'dataMovementInterfaceId', 'UTF8', None, ),  # 1
         (2, TType.I32, 'dataMovementProtocol', None, None, ),  # 2
         (3, TType.I32, 'priorityOrder', None, 0, ),  # 3
+        (4, TType.I64, 'creationTime', None, None, ),  # 4
+        (5, TType.I64, 'updateTime', None, None, ),  # 5
+        (6, TType.STRING, 'storageResourceId', 'UTF8', None, ),  # 6
     )
 
-    def __init__(self, dataMovementInterfaceId=None, dataMovementProtocol=None, priorityOrder=thrift_spec[3][4],):
+    def __init__(self, dataMovementInterfaceId=None, dataMovementProtocol=None, priorityOrder=thrift_spec[3][4],
creationTime=None, updateTime=None, storageResourceId=None,):
         self.dataMovementInterfaceId = dataMovementInterfaceId
         self.dataMovementProtocol = dataMovementProtocol
         self.priorityOrder = priorityOrder
+        self.creationTime = creationTime
+        self.updateTime = updateTime
+        self.storageResourceId = storageResourceId
 
     def read(self, iprot):
         if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport)
and self.thrift_spec is not None:
@@ -542,6 +551,21 @@ class DataMovementInterface(object):
                     self.priorityOrder = iprot.readI32()
                 else:
                     iprot.skip(ftype)
+            elif fid == 4:
+                if ftype == TType.I64:
+                    self.creationTime = iprot.readI64()
+                else:
+                    iprot.skip(ftype)
+            elif fid == 5:
+                if ftype == TType.I64:
+                    self.updateTime = iprot.readI64()
+                else:
+                    iprot.skip(ftype)
+            elif fid == 6:
+                if ftype == TType.STRING:
+                    self.storageResourceId = iprot.readString().decode('utf-8') if sys.version_info[0]
== 2 else iprot.readString()
+                else:
+                    iprot.skip(ftype)
             else:
                 iprot.skip(ftype)
             iprot.readFieldEnd()
@@ -564,6 +588,18 @@ class DataMovementInterface(object):
             oprot.writeFieldBegin('priorityOrder', TType.I32, 3)
             oprot.writeI32(self.priorityOrder)
             oprot.writeFieldEnd()
+        if self.creationTime is not None:
+            oprot.writeFieldBegin('creationTime', TType.I64, 4)
+            oprot.writeI64(self.creationTime)
+            oprot.writeFieldEnd()
+        if self.updateTime is not None:
+            oprot.writeFieldBegin('updateTime', TType.I64, 5)
+            oprot.writeI64(self.updateTime)
+            oprot.writeFieldEnd()
+        if self.storageResourceId is not None:
+            oprot.writeFieldBegin('storageResourceId', TType.STRING, 6)
+            oprot.writeString(self.storageResourceId.encode('utf-8') if sys.version_info[0]
== 2 else self.storageResourceId)
+            oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
 

-- 
To stop receiving notification emails like this one, please contact
machristie@apache.org.

Mime
View raw message