airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [45/52] [partial] airavata git commit: AIRAVATA-2505 Upgrade Airavata to Thrift 0.10.0
Date Tue, 05 Sep 2017 20:44:47 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService-remote
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService-remote
b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService-remote
index 9ec9a1c..dacc90a 100755
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService-remote
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService-remote
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
 #
 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 #
@@ -9,429 +9,452 @@
 
 import sys
 import pprint
-from urlparse import urlparse
-from thrift.transport import TTransport
-from thrift.transport import TSocket
-from thrift.transport import TSSLSocket
-from thrift.transport import THttpClient
-from thrift.protocol import TBinaryProtocol
+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]] 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)
+    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
+    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
+    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
+    framed = True
+    argi += 1
 
 if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl':
-  ssl = True
-  argi += 1
+    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:]
+args = sys.argv[argi + 1:]
 
 if http:
-  transport = THttpClient.THttpClient(host, port, uri)
+    transport = THttpClient.THttpClient(host, port, uri)
 else:
-  socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host,
port)
-  if framed:
-    transport = TTransport.TFramedTransport(socket)
-  else:
-    transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol(transport)
+    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]),))
+    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]),))
+    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],))
+    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],))
+    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],))
+    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]),))
+    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]),))
+    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]),))
+    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],))
+    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],))
+    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],))
+    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]),))
+    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]),))
+    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]),))
+    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],))
+    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],))
+    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],))
+    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]),))
+    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],))
+    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],))
+    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]),))
+    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]),))
+    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],))
+    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],))
+    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],))
+    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]),))
+    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]),))
+    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],))
+    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],))
+    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],))
+    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]),))
+    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]),))
+    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]),))
+    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],))
+    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],))
+    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],))
+    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]),))
+    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],))
+    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],))
+    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]),))
+    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]),))
+    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],))
+    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],))
+    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],))
+    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]),))
+    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]),))
+    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],))
+    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]),))
+    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],))
+    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],))
+    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)
+    print('Unrecognized method %s' % cmd)
+    sys.exit(1)
 
 transport.close()


Mime
View raw message