You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/09/21 16:59:49 UTC
[19/54] [abbrv] [partial] airavata-django-portal git commit: Moving
admin_view JS into django app and moving django project back
http://git-wip-us.apache.org/repos/asf/airavata-django-portal/blob/d8d7c37a/django_portal/apache/airavata/api/constants.py
----------------------------------------------------------------------
diff --git a/django_portal/apache/airavata/api/constants.py b/django_portal/apache/airavata/api/constants.py
deleted file mode 100644
index b7efdcc..0000000
--- a/django_portal/apache/airavata/api/constants.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# 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
-from .ttypes import *
-AIRAVATA_API_VERSION = "0.17.0"
http://git-wip-us.apache.org/repos/asf/airavata-django-portal/blob/d8d7c37a/django_portal/apache/airavata/api/error/__init__.py
----------------------------------------------------------------------
diff --git a/django_portal/apache/airavata/api/error/__init__.py b/django_portal/apache/airavata/api/error/__init__.py
deleted file mode 100644
index adefd8e..0000000
--- a/django_portal/apache/airavata/api/error/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-__all__ = ['ttypes', 'constants']
http://git-wip-us.apache.org/repos/asf/airavata-django-portal/blob/d8d7c37a/django_portal/apache/airavata/api/error/constants.py
----------------------------------------------------------------------
diff --git a/django_portal/apache/airavata/api/error/constants.py b/django_portal/apache/airavata/api/error/constants.py
deleted file mode 100644
index eb0d35a..0000000
--- a/django_portal/apache/airavata/api/error/constants.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# 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
-from .ttypes import *
http://git-wip-us.apache.org/repos/asf/airavata-django-portal/blob/d8d7c37a/django_portal/apache/airavata/api/error/ttypes.py
----------------------------------------------------------------------
diff --git a/django_portal/apache/airavata/api/error/ttypes.py b/django_portal/apache/airavata/api/error/ttypes.py
deleted file mode 100644
index 390ffe8..0000000
--- a/django_portal/apache/airavata/api/error/ttypes.py
+++ /dev/null
@@ -1,947 +0,0 @@
-#
-# 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 apache.airavata.model.experiment.ttypes
-
-from thrift.transport import TTransport
-
-
-class AiravataErrorType(object):
- """
- A list of Airavata API Error Message Types
-
- UNKNOWN: No information available about the error
-
- PERMISSION_DENIED: Not permitted to perform action
-
- INTERNAL_ERROR: Unexpected problem with the service
-
- AUTHENTICATION_FAILURE: The client failed to authenticate.
-
- INVALID_AUTHORIZATION: Security Token and/or Username and/or password is incorrect
-
- AUTHORIZATION_EXPIRED: Authentication token expired
-
- UNKNOWN_GATEWAY_ID: The gateway is not registered with Airavata.
-
- UNSUPPORTED_OPERATION: Operation denied because it is currently unsupported.
- """
- UNKNOWN = 0
- PERMISSION_DENIED = 1
- INTERNAL_ERROR = 2
- AUTHENTICATION_FAILURE = 3
- INVALID_AUTHORIZATION = 4
- AUTHORIZATION_EXPIRED = 5
- UNKNOWN_GATEWAY_ID = 6
- UNSUPPORTED_OPERATION = 7
-
- _VALUES_TO_NAMES = {
- 0: "UNKNOWN",
- 1: "PERMISSION_DENIED",
- 2: "INTERNAL_ERROR",
- 3: "AUTHENTICATION_FAILURE",
- 4: "INVALID_AUTHORIZATION",
- 5: "AUTHORIZATION_EXPIRED",
- 6: "UNKNOWN_GATEWAY_ID",
- 7: "UNSUPPORTED_OPERATION",
- }
-
- _NAMES_TO_VALUES = {
- "UNKNOWN": 0,
- "PERMISSION_DENIED": 1,
- "INTERNAL_ERROR": 2,
- "AUTHENTICATION_FAILURE": 3,
- "INVALID_AUTHORIZATION": 4,
- "AUTHORIZATION_EXPIRED": 5,
- "UNKNOWN_GATEWAY_ID": 6,
- "UNSUPPORTED_OPERATION": 7,
- }
-
-
-class ExperimentNotFoundException(TException):
- """
- This exception is thrown when a client asks to perform an operation on an experiment that does not exist.
-
- identifier: A description of the experiment that was not found on the server.
-
- key: The value passed from the client in the identifier, which was not found.
-
- Attributes:
- - message
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'message', 'UTF8', None, ), # 1
- )
-
- def __init__(self, message=None,):
- self.message = message
-
- 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.message = 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('ExperimentNotFoundException')
- if self.message is not None:
- oprot.writeFieldBegin('message', TType.STRING, 1)
- oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.message is None:
- raise TProtocolException(message='Required field message is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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 ProjectNotFoundException(TException):
- """
- 1: optional string identifier,
- 2: optional string key
-
-
- Attributes:
- - message
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'message', 'UTF8', None, ), # 1
- )
-
- def __init__(self, message=None,):
- self.message = message
-
- 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.message = 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('ProjectNotFoundException')
- if self.message is not None:
- oprot.writeFieldBegin('message', TType.STRING, 1)
- oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.message is None:
- raise TProtocolException(message='Required field message is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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 InvalidRequestException(TException):
- """
- This exception is thrown for invalid requests that occur from any reasons like required input parameters are missing,
- or a parameter is malformed.
-
- message: contains the associated error message.
-
- Attributes:
- - message
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'message', 'UTF8', None, ), # 1
- )
-
- def __init__(self, message=None,):
- self.message = message
-
- 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.message = 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('InvalidRequestException')
- if self.message is not None:
- oprot.writeFieldBegin('message', TType.STRING, 1)
- oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.message is None:
- raise TProtocolException(message='Required field message is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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 TimedOutException(TException):
- """
- This exception is thrown when RPC timeout gets exceeded.
- """
-
- 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('TimedOutException')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __str__(self):
- return repr(self)
-
- 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 AuthenticationException(TException):
- """
- This exception is thrown for invalid sshKeyAuthentication requests.
-
- message: contains the cause of the authorization failure.
-
- Attributes:
- - message
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'message', 'UTF8', None, ), # 1
- )
-
- def __init__(self, message=None,):
- self.message = message
-
- 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.message = 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('AuthenticationException')
- if self.message is not None:
- oprot.writeFieldBegin('message', TType.STRING, 1)
- oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.message is None:
- raise TProtocolException(message='Required field message is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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 AuthorizationException(TException):
- """
- This exception is thrown for invalid authorization requests such user does not have acces to an aplication or resource.
-
- message: contains the authorization failure message
-
- Attributes:
- - message
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'message', 'UTF8', None, ), # 1
- )
-
- def __init__(self, message=None,):
- self.message = message
-
- 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.message = 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('AuthorizationException')
- if self.message is not None:
- oprot.writeFieldBegin('message', TType.STRING, 1)
- oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.message is None:
- raise TProtocolException(message='Required field message is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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 DuplicateEntryException(TException):
- """
- This exception is thrown when you try to save a duplicate entity that already exists
- in the database.
-
- message: contains the associated error message
-
-
- Attributes:
- - message
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'message', 'UTF8', None, ), # 1
- )
-
- def __init__(self, message=None,):
- self.message = message
-
- 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.message = 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('DuplicateEntryException')
- if self.message is not None:
- oprot.writeFieldBegin('message', TType.STRING, 1)
- oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.message is None:
- raise TProtocolException(message='Required field message is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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 AiravataClientException(TException):
- """
- This exception is thrown by Airavata Services when a call fails as a result of
- a problem that a client may be able to resolve. For example, if the user
- attempts to execute an application on a resource gateway does not have access to.
-
- This exception would not be used for internal system errors that do not
- reflect user actions, but rather reflect a problem within the service that
- the client cannot resolve.
-
- airavataErrorType: The message type indicating the error that occurred.
- must be one of the values of AiravataErrorType.
-
- parameter: If the error applied to a particular input parameter, this will
- indicate which parameter.
-
- Attributes:
- - airavataErrorType
- - parameter
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'airavataErrorType', None, None, ), # 1
- (2, TType.STRING, 'parameter', 'UTF8', None, ), # 2
- )
-
- def __init__(self, airavataErrorType=None, parameter=None,):
- self.airavataErrorType = airavataErrorType
- self.parameter = parameter
-
- 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.airavataErrorType = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.parameter = 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('AiravataClientException')
- if self.airavataErrorType is not None:
- oprot.writeFieldBegin('airavataErrorType', TType.I32, 1)
- oprot.writeI32(self.airavataErrorType)
- oprot.writeFieldEnd()
- if self.parameter is not None:
- oprot.writeFieldBegin('parameter', TType.STRING, 2)
- oprot.writeString(self.parameter.encode('utf-8') if sys.version_info[0] == 2 else self.parameter)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.airavataErrorType is None:
- raise TProtocolException(message='Required field airavataErrorType is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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 ValidatorResult(object):
- """
- Attributes:
- - result
- - errorDetails
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.BOOL, 'result', None, None, ), # 1
- (2, TType.STRING, 'errorDetails', 'UTF8', None, ), # 2
- )
-
- def __init__(self, result=None, errorDetails=None,):
- self.result = result
- self.errorDetails = errorDetails
-
- 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.BOOL:
- self.result = iprot.readBool()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.errorDetails = 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('ValidatorResult')
- if self.result is not None:
- oprot.writeFieldBegin('result', TType.BOOL, 1)
- oprot.writeBool(self.result)
- oprot.writeFieldEnd()
- if self.errorDetails is not None:
- oprot.writeFieldBegin('errorDetails', TType.STRING, 2)
- oprot.writeString(self.errorDetails.encode('utf-8') if sys.version_info[0] == 2 else self.errorDetails)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.result is None:
- raise TProtocolException(message='Required field result 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 ValidationResults(object):
- """
- Attributes:
- - validationState
- - validationResultList
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.BOOL, 'validationState', None, None, ), # 1
- (2, TType.LIST, 'validationResultList', (TType.STRUCT, (ValidatorResult, ValidatorResult.thrift_spec), False), None, ), # 2
- )
-
- def __init__(self, validationState=None, validationResultList=None,):
- self.validationState = validationState
- self.validationResultList = validationResultList
-
- 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.BOOL:
- self.validationState = iprot.readBool()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.LIST:
- self.validationResultList = []
- (_etype3, _size0) = iprot.readListBegin()
- for _i4 in range(_size0):
- _elem5 = ValidatorResult()
- _elem5.read(iprot)
- self.validationResultList.append(_elem5)
- iprot.readListEnd()
- 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('ValidationResults')
- if self.validationState is not None:
- oprot.writeFieldBegin('validationState', TType.BOOL, 1)
- oprot.writeBool(self.validationState)
- oprot.writeFieldEnd()
- if self.validationResultList is not None:
- oprot.writeFieldBegin('validationResultList', TType.LIST, 2)
- oprot.writeListBegin(TType.STRUCT, len(self.validationResultList))
- for iter6 in self.validationResultList:
- iter6.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.validationState is None:
- raise TProtocolException(message='Required field validationState is unset!')
- if self.validationResultList is None:
- raise TProtocolException(message='Required field validationResultList 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 LaunchValidationException(TException):
- """
- Attributes:
- - validationResult
- - errorMessage
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'validationResult', (ValidationResults, ValidationResults.thrift_spec), None, ), # 1
- (2, TType.STRING, 'errorMessage', 'UTF8', None, ), # 2
- )
-
- def __init__(self, validationResult=None, errorMessage=None,):
- self.validationResult = validationResult
- self.errorMessage = errorMessage
-
- 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.validationResult = ValidationResults()
- self.validationResult.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.errorMessage = 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('LaunchValidationException')
- if self.validationResult is not None:
- oprot.writeFieldBegin('validationResult', TType.STRUCT, 1)
- self.validationResult.write(oprot)
- oprot.writeFieldEnd()
- if self.errorMessage is not None:
- oprot.writeFieldBegin('errorMessage', TType.STRING, 2)
- oprot.writeString(self.errorMessage.encode('utf-8') if sys.version_info[0] == 2 else self.errorMessage)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.validationResult is None:
- raise TProtocolException(message='Required field validationResult is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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 AiravataSystemException(TException):
- """
- This exception is thrown by Airavata Services when a call fails as a result of
- a problem in the service that could not be changed through client's action.
-
- airavataErrorType: The message type indicating the error that occurred.
- must be one of the values of AiravataErrorType.
-
- message: This may contain additional information about the error
-
-
- Attributes:
- - airavataErrorType
- - message
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'airavataErrorType', None, None, ), # 1
- (2, TType.STRING, 'message', 'UTF8', None, ), # 2
- )
-
- def __init__(self, airavataErrorType=None, message=None,):
- self.airavataErrorType = airavataErrorType
- self.message = message
-
- 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.airavataErrorType = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.message = 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('AiravataSystemException')
- if self.airavataErrorType is not None:
- oprot.writeFieldBegin('airavataErrorType', TType.I32, 1)
- oprot.writeI32(self.airavataErrorType)
- oprot.writeFieldEnd()
- if self.message is not None:
- oprot.writeFieldBegin('message', TType.STRING, 2)
- oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.airavataErrorType is None:
- raise TProtocolException(message='Required field airavataErrorType is unset!')
- return
-
- def __str__(self):
- return repr(self)
-
- 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)
http://git-wip-us.apache.org/repos/asf/airavata-django-portal/blob/d8d7c37a/django_portal/apache/airavata/api/sharing/SharingRegistryService-remote
----------------------------------------------------------------------
diff --git a/django_portal/apache/airavata/api/sharing/SharingRegistryService-remote b/django_portal/apache/airavata/api/sharing/SharingRegistryService-remote
deleted file mode 100644
index dacc90a..0000000
--- a/django_portal/apache/airavata/api/sharing/SharingRegistryService-remote
+++ /dev/null
@@ -1,460 +0,0 @@
-#!/usr/bin/env python
-#
-# Autogenerated by Thrift Compiler (0.10.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-# options string: py
-#
-
-import sys
-import pprint
-if sys.version_info[0] > 2:
- from urllib.parse import urlparse
-else:
- from urlparse import urlparse
-from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
-from thrift.protocol.TBinaryProtocol import TBinaryProtocol
-
-from apache.airavata.api.sharing import SharingRegistryService
-from apache.airavata.api.sharing.ttypes import *
-
-if len(sys.argv) <= 1 or sys.argv[1] == '--help':
- print('')
- 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 createDomain(Domain domain)')
- print(' bool updateDomain(Domain domain)')
- print(' bool isDomainExists(string domainId)')
- print(' bool deleteDomain(string domainId)')
- print(' Domain getDomain(string domainId)')
- print(' getDomains(i32 offset, i32 limit)')
- print(' string createUser(User user)')
- print(' bool updatedUser(User user)')
- print(' bool isUserExists(string domainId, string userId)')
- print(' bool deleteUser(string domainId, string userId)')
- print(' User getUser(string domainId, string userId)')
- print(' getUsers(string domainId, i32 offset, i32 limit)')
- print(' string createGroup(UserGroup group)')
- print(' bool updateGroup(UserGroup group)')
- print(' bool isGroupExists(string domainId, string groupId)')
- print(' bool deleteGroup(string domainId, string groupId)')
- print(' UserGroup getGroup(string domainId, string groupId)')
- print(' getGroups(string domainId, i32 offset, i32 limit)')
- print(' bool addUsersToGroup(string domainId, userIds, string groupId)')
- print(' bool removeUsersFromGroup(string domainId, userIds, string groupId)')
- print(' getGroupMembersOfTypeUser(string domainId, string groupId, i32 offset, i32 limit)')
- print(' getGroupMembersOfTypeGroup(string domainId, string groupId, i32 offset, i32 limit)')
- print(' bool addChildGroupsToParentGroup(string domainId, childIds, string groupId)')
- print(' bool removeChildGroupFromParentGroup(string domainId, string childId, string groupId)')
- print(' getAllMemberGroupsForUser(string domainId, string userId)')
- print(' string createEntityType(EntityType entityType)')
- print(' bool updateEntityType(EntityType entityType)')
- print(' bool isEntityTypeExists(string domainId, string entityTypeId)')
- print(' bool deleteEntityType(string domainId, string entityTypeId)')
- print(' EntityType getEntityType(string domainId, string entityTypeId)')
- print(' getEntityTypes(string domainId, i32 offset, i32 limit)')
- print(' string createEntity(Entity entity)')
- print(' bool updateEntity(Entity entity)')
- print(' bool isEntityExists(string domainId, string entityId)')
- print(' bool deleteEntity(string domainId, string entityId)')
- print(' Entity getEntity(string domainId, string entityId)')
- print(' searchEntities(string domainId, string userId, filters, i32 offset, i32 limit)')
- print(' getListOfSharedUsers(string domainId, string entityId, string permissionTypeId)')
- print(' getListOfSharedGroups(string domainId, string entityId, string permissionTypeId)')
- print(' string createPermissionType(PermissionType permissionType)')
- print(' bool updatePermissionType(PermissionType permissionType)')
- print(' bool isPermissionExists(string dimainId, string permissionId)')
- print(' bool deletePermissionType(string domainId, string permissionTypeId)')
- print(' PermissionType getPermissionType(string domainId, string permissionTypeId)')
- print(' getPermissionTypes(string domainId, i32 offset, i32 limit)')
- print(' bool shareEntityWithUsers(string domainId, string entityId, userList, string perssionTypeId, bool cascadePermission)')
- print(' bool revokeEntitySharingFromUsers(string domainId, string entityId, userList, string perssionTypeId)')
- print(' bool shareEntityWithGroups(string domainId, string entityId, groupList, string perssionTypeId, bool cascadePermission)')
- print(' bool revokeEntitySharingFromGroups(string domainId, string entityId, groupList, string perssionTypeId)')
- print(' bool userHasAccess(string domainId, string userId, string entityId, string permissionTypeId)')
- print('')
- sys.exit(0)
-
-pp = pprint.PrettyPrinter(indent=2)
-host = 'localhost'
-port = 9090
-uri = ''
-framed = False
-ssl = False
-validate = True
-ca_certs = None
-keyfile = None
-certfile = None
-http = False
-argi = 1
-
-if sys.argv[argi] == '-h':
- parts = sys.argv[argi + 1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- argi += 2
-
-if sys.argv[argi] == '-u':
- url = urlparse(sys.argv[argi + 1])
- parts = url[1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- else:
- port = 80
- uri = url[2]
- if url[4]:
- uri += '?%s' % url[4]
- http = True
- argi += 2
-
-if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
- framed = True
- argi += 1
-
-if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl':
- ssl = True
- argi += 1
-
-if sys.argv[argi] == '-novalidate':
- validate = False
- argi += 1
-
-if sys.argv[argi] == '-ca_certs':
- ca_certs = sys.argv[argi+1]
- argi += 2
-
-if sys.argv[argi] == '-keyfile':
- keyfile = sys.argv[argi+1]
- argi += 2
-
-if sys.argv[argi] == '-certfile':
- certfile = sys.argv[argi+1]
- argi += 2
-
-cmd = sys.argv[argi]
-args = sys.argv[argi + 1:]
-
-if http:
- transport = THttpClient.THttpClient(host, port, uri)
-else:
- if ssl:
- socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile)
- else:
- socket = TSocket.TSocket(host, port)
- if framed:
- transport = TTransport.TFramedTransport(socket)
- else:
- transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol(transport)
-client = SharingRegistryService.Client(protocol)
-transport.open()
-
-if cmd == 'createDomain':
- if len(args) != 1:
- print('createDomain requires 1 args')
- sys.exit(1)
- pp.pprint(client.createDomain(eval(args[0]),))
-
-elif cmd == 'updateDomain':
- if len(args) != 1:
- print('updateDomain requires 1 args')
- sys.exit(1)
- pp.pprint(client.updateDomain(eval(args[0]),))
-
-elif cmd == 'isDomainExists':
- if len(args) != 1:
- print('isDomainExists requires 1 args')
- sys.exit(1)
- pp.pprint(client.isDomainExists(args[0],))
-
-elif cmd == 'deleteDomain':
- if len(args) != 1:
- print('deleteDomain requires 1 args')
- sys.exit(1)
- pp.pprint(client.deleteDomain(args[0],))
-
-elif cmd == 'getDomain':
- if len(args) != 1:
- print('getDomain requires 1 args')
- sys.exit(1)
- pp.pprint(client.getDomain(args[0],))
-
-elif cmd == 'getDomains':
- if len(args) != 2:
- print('getDomains requires 2 args')
- sys.exit(1)
- pp.pprint(client.getDomains(eval(args[0]), eval(args[1]),))
-
-elif cmd == 'createUser':
- if len(args) != 1:
- print('createUser requires 1 args')
- sys.exit(1)
- pp.pprint(client.createUser(eval(args[0]),))
-
-elif cmd == 'updatedUser':
- if len(args) != 1:
- print('updatedUser requires 1 args')
- sys.exit(1)
- pp.pprint(client.updatedUser(eval(args[0]),))
-
-elif cmd == 'isUserExists':
- if len(args) != 2:
- print('isUserExists requires 2 args')
- sys.exit(1)
- pp.pprint(client.isUserExists(args[0], args[1],))
-
-elif cmd == 'deleteUser':
- if len(args) != 2:
- print('deleteUser requires 2 args')
- sys.exit(1)
- pp.pprint(client.deleteUser(args[0], args[1],))
-
-elif cmd == 'getUser':
- if len(args) != 2:
- print('getUser requires 2 args')
- sys.exit(1)
- pp.pprint(client.getUser(args[0], args[1],))
-
-elif cmd == 'getUsers':
- if len(args) != 3:
- print('getUsers requires 3 args')
- sys.exit(1)
- pp.pprint(client.getUsers(args[0], eval(args[1]), eval(args[2]),))
-
-elif cmd == 'createGroup':
- if len(args) != 1:
- print('createGroup requires 1 args')
- sys.exit(1)
- pp.pprint(client.createGroup(eval(args[0]),))
-
-elif cmd == 'updateGroup':
- if len(args) != 1:
- print('updateGroup requires 1 args')
- sys.exit(1)
- pp.pprint(client.updateGroup(eval(args[0]),))
-
-elif cmd == 'isGroupExists':
- if len(args) != 2:
- print('isGroupExists requires 2 args')
- sys.exit(1)
- pp.pprint(client.isGroupExists(args[0], args[1],))
-
-elif cmd == 'deleteGroup':
- if len(args) != 2:
- print('deleteGroup requires 2 args')
- sys.exit(1)
- pp.pprint(client.deleteGroup(args[0], args[1],))
-
-elif cmd == 'getGroup':
- if len(args) != 2:
- print('getGroup requires 2 args')
- sys.exit(1)
- pp.pprint(client.getGroup(args[0], args[1],))
-
-elif cmd == 'getGroups':
- if len(args) != 3:
- print('getGroups requires 3 args')
- sys.exit(1)
- pp.pprint(client.getGroups(args[0], eval(args[1]), eval(args[2]),))
-
-elif cmd == 'addUsersToGroup':
- if len(args) != 3:
- print('addUsersToGroup requires 3 args')
- sys.exit(1)
- pp.pprint(client.addUsersToGroup(args[0], eval(args[1]), args[2],))
-
-elif cmd == 'removeUsersFromGroup':
- if len(args) != 3:
- print('removeUsersFromGroup requires 3 args')
- sys.exit(1)
- pp.pprint(client.removeUsersFromGroup(args[0], eval(args[1]), args[2],))
-
-elif cmd == 'getGroupMembersOfTypeUser':
- if len(args) != 4:
- print('getGroupMembersOfTypeUser requires 4 args')
- sys.exit(1)
- pp.pprint(client.getGroupMembersOfTypeUser(args[0], args[1], eval(args[2]), eval(args[3]),))
-
-elif cmd == 'getGroupMembersOfTypeGroup':
- if len(args) != 4:
- print('getGroupMembersOfTypeGroup requires 4 args')
- sys.exit(1)
- pp.pprint(client.getGroupMembersOfTypeGroup(args[0], args[1], eval(args[2]), eval(args[3]),))
-
-elif cmd == 'addChildGroupsToParentGroup':
- if len(args) != 3:
- print('addChildGroupsToParentGroup requires 3 args')
- sys.exit(1)
- pp.pprint(client.addChildGroupsToParentGroup(args[0], eval(args[1]), args[2],))
-
-elif cmd == 'removeChildGroupFromParentGroup':
- if len(args) != 3:
- print('removeChildGroupFromParentGroup requires 3 args')
- sys.exit(1)
- pp.pprint(client.removeChildGroupFromParentGroup(args[0], args[1], args[2],))
-
-elif cmd == 'getAllMemberGroupsForUser':
- if len(args) != 2:
- print('getAllMemberGroupsForUser requires 2 args')
- sys.exit(1)
- pp.pprint(client.getAllMemberGroupsForUser(args[0], args[1],))
-
-elif cmd == 'createEntityType':
- if len(args) != 1:
- print('createEntityType requires 1 args')
- sys.exit(1)
- pp.pprint(client.createEntityType(eval(args[0]),))
-
-elif cmd == 'updateEntityType':
- if len(args) != 1:
- print('updateEntityType requires 1 args')
- sys.exit(1)
- pp.pprint(client.updateEntityType(eval(args[0]),))
-
-elif cmd == 'isEntityTypeExists':
- if len(args) != 2:
- print('isEntityTypeExists requires 2 args')
- sys.exit(1)
- pp.pprint(client.isEntityTypeExists(args[0], args[1],))
-
-elif cmd == 'deleteEntityType':
- if len(args) != 2:
- print('deleteEntityType requires 2 args')
- sys.exit(1)
- pp.pprint(client.deleteEntityType(args[0], args[1],))
-
-elif cmd == 'getEntityType':
- if len(args) != 2:
- print('getEntityType requires 2 args')
- sys.exit(1)
- pp.pprint(client.getEntityType(args[0], args[1],))
-
-elif cmd == 'getEntityTypes':
- if len(args) != 3:
- print('getEntityTypes requires 3 args')
- sys.exit(1)
- pp.pprint(client.getEntityTypes(args[0], eval(args[1]), eval(args[2]),))
-
-elif cmd == 'createEntity':
- if len(args) != 1:
- print('createEntity requires 1 args')
- sys.exit(1)
- pp.pprint(client.createEntity(eval(args[0]),))
-
-elif cmd == 'updateEntity':
- if len(args) != 1:
- print('updateEntity requires 1 args')
- sys.exit(1)
- pp.pprint(client.updateEntity(eval(args[0]),))
-
-elif cmd == 'isEntityExists':
- if len(args) != 2:
- print('isEntityExists requires 2 args')
- sys.exit(1)
- pp.pprint(client.isEntityExists(args[0], args[1],))
-
-elif cmd == 'deleteEntity':
- if len(args) != 2:
- print('deleteEntity requires 2 args')
- sys.exit(1)
- pp.pprint(client.deleteEntity(args[0], args[1],))
-
-elif cmd == 'getEntity':
- if len(args) != 2:
- print('getEntity requires 2 args')
- sys.exit(1)
- pp.pprint(client.getEntity(args[0], args[1],))
-
-elif cmd == 'searchEntities':
- if len(args) != 5:
- print('searchEntities requires 5 args')
- sys.exit(1)
- pp.pprint(client.searchEntities(args[0], args[1], eval(args[2]), eval(args[3]), eval(args[4]),))
-
-elif cmd == 'getListOfSharedUsers':
- if len(args) != 3:
- print('getListOfSharedUsers requires 3 args')
- sys.exit(1)
- pp.pprint(client.getListOfSharedUsers(args[0], args[1], args[2],))
-
-elif cmd == 'getListOfSharedGroups':
- if len(args) != 3:
- print('getListOfSharedGroups requires 3 args')
- sys.exit(1)
- pp.pprint(client.getListOfSharedGroups(args[0], args[1], args[2],))
-
-elif cmd == 'createPermissionType':
- if len(args) != 1:
- print('createPermissionType requires 1 args')
- sys.exit(1)
- pp.pprint(client.createPermissionType(eval(args[0]),))
-
-elif cmd == 'updatePermissionType':
- if len(args) != 1:
- print('updatePermissionType requires 1 args')
- sys.exit(1)
- pp.pprint(client.updatePermissionType(eval(args[0]),))
-
-elif cmd == 'isPermissionExists':
- if len(args) != 2:
- print('isPermissionExists requires 2 args')
- sys.exit(1)
- pp.pprint(client.isPermissionExists(args[0], args[1],))
-
-elif cmd == 'deletePermissionType':
- if len(args) != 2:
- print('deletePermissionType requires 2 args')
- sys.exit(1)
- pp.pprint(client.deletePermissionType(args[0], args[1],))
-
-elif cmd == 'getPermissionType':
- if len(args) != 2:
- print('getPermissionType requires 2 args')
- sys.exit(1)
- pp.pprint(client.getPermissionType(args[0], args[1],))
-
-elif cmd == 'getPermissionTypes':
- if len(args) != 3:
- print('getPermissionTypes requires 3 args')
- sys.exit(1)
- pp.pprint(client.getPermissionTypes(args[0], eval(args[1]), eval(args[2]),))
-
-elif cmd == 'shareEntityWithUsers':
- if len(args) != 5:
- print('shareEntityWithUsers requires 5 args')
- sys.exit(1)
- pp.pprint(client.shareEntityWithUsers(args[0], args[1], eval(args[2]), args[3], eval(args[4]),))
-
-elif cmd == 'revokeEntitySharingFromUsers':
- if len(args) != 4:
- print('revokeEntitySharingFromUsers requires 4 args')
- sys.exit(1)
- pp.pprint(client.revokeEntitySharingFromUsers(args[0], args[1], eval(args[2]), args[3],))
-
-elif cmd == 'shareEntityWithGroups':
- if len(args) != 5:
- print('shareEntityWithGroups requires 5 args')
- sys.exit(1)
- pp.pprint(client.shareEntityWithGroups(args[0], args[1], eval(args[2]), args[3], eval(args[4]),))
-
-elif cmd == 'revokeEntitySharingFromGroups':
- if len(args) != 4:
- print('revokeEntitySharingFromGroups requires 4 args')
- sys.exit(1)
- pp.pprint(client.revokeEntitySharingFromGroups(args[0], args[1], eval(args[2]), args[3],))
-
-elif cmd == 'userHasAccess':
- if len(args) != 4:
- print('userHasAccess requires 4 args')
- sys.exit(1)
- pp.pprint(client.userHasAccess(args[0], args[1], args[2], args[3],))
-
-else:
- print('Unrecognized method %s' % cmd)
- sys.exit(1)
-
-transport.close()