From 64fb60e8b994689ec208d02fd8dadaa3451c29a8 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 18 Jul 2023 15:18:25 +0200 Subject: [PATCH] fix(Forc):fixed forc security group --- portal_client.thrift | 4 +- simple_vm_client/VirtualMachineHandler.py | 19 +- simple_vm_client/VirtualMachineService-remote | 835 +- simple_vm_client/VirtualMachineService.py | 8180 ++++++++++++----- 4 files changed, 6637 insertions(+), 2401 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index bd2e368..aa45515 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -407,7 +407,9 @@ service VirtualMachineService { 7:list> volume_ids_path_new, 8:list> volume_ids_path_attach, - 9:list additional_keys + 9:list additional_keys, + 10:optional string research_environment + ) throws (1:NameAlreadyUsedException e,2:ResourceNotAvailableException r,5:ImageNotFoundException i,6:FlavorNotFoundException f,7:DefaultException o) diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index fafdc1d..2fc8a40 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -307,15 +307,16 @@ def start_server( volume_ids_path_new: list[dict[str, str]], volume_ids_path_attach: list[dict[str, str]], additional_keys: list[str], + research_environment: str, ) -> str: - # if research_environment: - # research_environment_metadata = ( - # self.forc_connector.get_metadata_by_research_environment( - # research_environment=research_environment - # ) - # ) - # else: - # research_environment_metadata = None + if research_environment: + research_environment_metadata = ( + self.forc_connector.get_metadata_by_research_environment( + research_environment=research_environment + ) + ) + else: + research_environment_metadata = None return self.openstack_connector.start_server( flavor_name=flavor_name, image_name=image_name, @@ -325,7 +326,7 @@ def start_server( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, additional_keys=additional_keys, - # research_environment_metadata=research_environment_metadata, + research_environment_metadata=research_environment_metadata, ) def start_server_with_custom_key( diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index 0fe5a3a..fb31620 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -7,91 +7,117 @@ # options string: py # -import sys import pprint +import sys + 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 thrift.protocol.TBinaryProtocol import TBinaryProtocol +from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport from VirtualMachineService import VirtualMachineService -from VirtualMachineService.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(' bool is_version(double version)') - print(' string get_client_version()') - print(' get_gateway_ip()') - print(' get_calculation_values()') - print(' string import_keypair(string keyname, string public_key)') - print(' get_vm_ports(string openstack_id)') - print(' void add_udp_security_group(string server_id)') - print(' get_flavors()') - print(' get_images()') - print(' get_public_images()') - print(' get_private_images()') - print(' Image get_image(string openstack_id, bool ignore_not_active)') - print(' Volume get_volume(string volume_id)') - print(' get_volumes_by_ids( volume_ids)') - print(' void resize_volume(string volume_id, int size)') - print(' void delete_server(string openstack_id)') - print(' string start_server(string flavor_name, string image_name, string public_key, string servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys)') - print(' bool is_bibigrid_available()') - print(' void detach_ip_from_server(string server_id, string floating_ip)') - print(' string start_server_with_custom_key(string flavor_name, string image_name, string servername, metadata, string research_environment, volume_ids_path_new, volume_ids_path_attach)') - print(' bool exist_server(string name)') - print(' int create_and_deploy_playbook(string public_key, string openstack_id, conda_packages, string research_environment_template, apt_packages, bool create_only_backend, string base_url)') - print(' PlaybookResult get_playbook_logs(string openstack_id)') - print(' bool has_forc()') - print(' string get_forc_url()') - print(' Backend create_backend(string owner, string user_path, string template, string upstream_url)') - print(' get_backends()') - print(' get_backends_by_owner(string owner)') - print(' get_backends_by_template(string template)') - print(' Backend get_backend_by_id(i64 id)') - print(' void delete_backend(i64 id)') - print(' add_user_to_backend(i64 backend_id, string user_id)') - print(' get_users_from_backend(i64 backend_id)') - print(' delete_user_from_backend(i64 backend_id, string user_id)') - print(' get_allowed_templates()') - print(' get_servers()') - print(' get_servers_by_ids( server_ids)') - print(' get_servers_by_bibigrid_id(string bibigrid_id)') - print(' scale_up_cluster(string cluster_id, string image_name, string flavor_name, int count, names, int start_idx, int batch_idx)') - print(' string add_cluster_machine(string cluster_id, string cluster_user, string cluster_group_id, string image_name, string flavor_name, string name, string key_name, int batch_idx, int worker_idx)') - print(' ClusterInfo get_cluster_info(string cluster_id)') - print(' get_cluster_status(string cluster_id)') - print(' VM get_server(string openstack_id)') - print(' void stop_server(string openstack_id)') - print(' string create_snapshot(string openstack_id, string name, string username, base_tags, string description)') - print(' get_limits()') - print(' start_cluster(string public_key, ClusterInstance master_instance, worker_instances, string user)') - print(' terminate_cluster(string cluster_id)') - print(' void delete_image(string image_id)') - print(' void detach_volume(string volume_id, string server_id)') - print(' void delete_volume(string volume_id)') - print(' attach_volume_to_server(string openstack_id, string volume_id)') - print(' void resume_server(string openstack_id)') - print(' Volume create_volume(string volume_name, int volume_storage, metadata)') - print(' Volume create_volume_by_source_volume(string volume_name, metadata, string source_volume_id)') - print(' Volume create_volume_by_volume_snap(string volume_name, metadata, string volume_snap_id)') - print(' string create_volume_snapshot(string volume_id, string name, string description)') - print(' Snapshot get_volume_snapshot(string name_or_id)') - print(' void delete_volume_snapshot(string snapshot_id)') - print(' void reboot_hard_server(string openstack_id)') - print(' void reboot_soft_server(string openstack_id)') - print('') + +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(" bool is_version(double version)") + print(" string get_client_version()") + print(" get_gateway_ip()") + print(" get_calculation_values()") + print(" string import_keypair(string keyname, string public_key)") + print(" get_vm_ports(string openstack_id)") + print(" void add_udp_security_group(string server_id)") + print(" get_flavors()") + print(" get_images()") + print(" get_public_images()") + print(" get_private_images()") + print(" Image get_image(string openstack_id, bool ignore_not_active)") + print(" Volume get_volume(string volume_id)") + print(" get_volumes_by_ids( volume_ids)") + print(" void resize_volume(string volume_id, int size)") + print(" void delete_server(string openstack_id)") + print( + " string start_server(string flavor_name, string image_name, string public_key, string servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys, string research_environment)" + ) + print(" bool is_bibigrid_available()") + print(" void detach_ip_from_server(string server_id, string floating_ip)") + print( + " string start_server_with_custom_key(string flavor_name, string image_name, string servername, metadata, string research_environment, volume_ids_path_new, volume_ids_path_attach)" + ) + print(" bool exist_server(string name)") + print( + " int create_and_deploy_playbook(string public_key, string openstack_id, conda_packages, string research_environment_template, apt_packages, bool create_only_backend, string base_url)" + ) + print(" PlaybookResult get_playbook_logs(string openstack_id)") + print(" bool has_forc()") + print(" string get_forc_url()") + print( + " Backend create_backend(string owner, string user_path, string template, string upstream_url)" + ) + print(" get_backends()") + print(" get_backends_by_owner(string owner)") + print(" get_backends_by_template(string template)") + print(" Backend get_backend_by_id(i64 id)") + print(" void delete_backend(i64 id)") + print(" add_user_to_backend(i64 backend_id, string user_id)") + print(" get_users_from_backend(i64 backend_id)") + print(" delete_user_from_backend(i64 backend_id, string user_id)") + print(" get_allowed_templates()") + print(" get_servers()") + print(" get_servers_by_ids( server_ids)") + print(" get_servers_by_bibigrid_id(string bibigrid_id)") + print( + " scale_up_cluster(string cluster_id, string image_name, string flavor_name, int count, names, int start_idx, int batch_idx)" + ) + print( + " string add_cluster_machine(string cluster_id, string cluster_user, string cluster_group_id, string image_name, string flavor_name, string name, string key_name, int batch_idx, int worker_idx)" + ) + print(" ClusterInfo get_cluster_info(string cluster_id)") + print(" get_cluster_status(string cluster_id)") + print(" VM get_server(string openstack_id)") + print(" void stop_server(string openstack_id)") + print( + " string create_snapshot(string openstack_id, string name, string username, base_tags, string description)" + ) + print(" get_limits()") + print( + " start_cluster(string public_key, ClusterInstance master_instance, worker_instances, string user)" + ) + print(" terminate_cluster(string cluster_id)") + print(" void delete_image(string image_id)") + print(" void detach_volume(string volume_id, string server_id)") + print(" void delete_volume(string volume_id)") + print(" attach_volume_to_server(string openstack_id, string volume_id)") + print(" void resume_server(string openstack_id)") + print(" Volume create_volume(string volume_name, int volume_storage, metadata)") + print( + " Volume create_volume_by_source_volume(string volume_name, metadata, string source_volume_id)" + ) + print( + " Volume create_volume_by_volume_snap(string volume_name, metadata, string volume_snap_id)" + ) + print( + " string create_volume_snapshot(string volume_id, string name, string description)" + ) + print(" Snapshot get_volume_snapshot(string name_or_id)") + print(" void delete_volume_snapshot(string snapshot_id)") + print(" void reboot_hard_server(string openstack_id)") + print(" void reboot_soft_server(string openstack_id)") + print("") sys.exit(0) pp = pprint.PrettyPrinter(indent=2) -host = 'localhost' +host = "localhost" port = 9090 -uri = '' +uri = "" framed = False ssl = False validate = True @@ -101,16 +127,16 @@ certfile = None http = False argi = 1 -if sys.argv[argi] == '-h': - parts = sys.argv[argi + 1].split(':') +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': +if sys.argv[argi] == "-u": url = urlparse(sys.argv[argi + 1]) - parts = url[1].split(':') + parts = url[1].split(":") host = parts[0] if len(parts) > 1: port = int(parts[1]) @@ -118,42 +144,49 @@ if sys.argv[argi] == '-u': port = 80 uri = url[2] if url[4]: - uri += '?%s' % url[4] + uri += "?%s" % url[4] http = True argi += 2 -if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': +if sys.argv[argi] == "-f" or sys.argv[argi] == "-framed": framed = True argi += 1 -if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': +if sys.argv[argi] == "-s" or sys.argv[argi] == "-ssl": ssl = True argi += 1 -if sys.argv[argi] == '-novalidate': +if sys.argv[argi] == "-novalidate": validate = False argi += 1 -if sys.argv[argi] == '-ca_certs': - ca_certs = sys.argv[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] +if sys.argv[argi] == "-keyfile": + keyfile = sys.argv[argi + 1] argi += 2 -if sys.argv[argi] == '-certfile': - certfile = sys.argv[argi+1] +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) else: if ssl: - socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) + socket = TSSLSocket.TSSLSocket( + host, + port, + validate=validate, + ca_certs=ca_certs, + keyfile=keyfile, + certfile=certfile, + ) else: socket = TSocket.TSocket(host, port) if framed: @@ -164,374 +197,622 @@ protocol = TBinaryProtocol(transport) client = VirtualMachineService.Client(protocol) transport.open() -if cmd == 'is_version': +if cmd == "is_version": if len(args) != 1: - print('is_version requires 1 args') + print("is_version requires 1 args") sys.exit(1) - pp.pprint(client.is_version(eval(args[0]),)) + pp.pprint( + client.is_version( + eval(args[0]), + ) + ) -elif cmd == 'get_client_version': +elif cmd == "get_client_version": if len(args) != 0: - print('get_client_version requires 0 args') + print("get_client_version requires 0 args") sys.exit(1) pp.pprint(client.get_client_version()) -elif cmd == 'get_gateway_ip': +elif cmd == "get_gateway_ip": if len(args) != 0: - print('get_gateway_ip requires 0 args') + print("get_gateway_ip requires 0 args") sys.exit(1) pp.pprint(client.get_gateway_ip()) -elif cmd == 'get_calculation_values': +elif cmd == "get_calculation_values": if len(args) != 0: - print('get_calculation_values requires 0 args') + print("get_calculation_values requires 0 args") sys.exit(1) pp.pprint(client.get_calculation_values()) -elif cmd == 'import_keypair': +elif cmd == "import_keypair": if len(args) != 2: - print('import_keypair requires 2 args') + print("import_keypair requires 2 args") sys.exit(1) - pp.pprint(client.import_keypair(args[0], args[1],)) + pp.pprint( + client.import_keypair( + args[0], + args[1], + ) + ) -elif cmd == 'get_vm_ports': +elif cmd == "get_vm_ports": if len(args) != 1: - print('get_vm_ports requires 1 args') + print("get_vm_ports requires 1 args") sys.exit(1) - pp.pprint(client.get_vm_ports(args[0],)) + pp.pprint( + client.get_vm_ports( + args[0], + ) + ) -elif cmd == 'add_udp_security_group': +elif cmd == "add_udp_security_group": if len(args) != 1: - print('add_udp_security_group requires 1 args') + print("add_udp_security_group requires 1 args") sys.exit(1) - pp.pprint(client.add_udp_security_group(args[0],)) + pp.pprint( + client.add_udp_security_group( + args[0], + ) + ) -elif cmd == 'get_flavors': +elif cmd == "get_flavors": if len(args) != 0: - print('get_flavors requires 0 args') + print("get_flavors requires 0 args") sys.exit(1) pp.pprint(client.get_flavors()) -elif cmd == 'get_images': +elif cmd == "get_images": if len(args) != 0: - print('get_images requires 0 args') + print("get_images requires 0 args") sys.exit(1) pp.pprint(client.get_images()) -elif cmd == 'get_public_images': +elif cmd == "get_public_images": if len(args) != 0: - print('get_public_images requires 0 args') + print("get_public_images requires 0 args") sys.exit(1) pp.pprint(client.get_public_images()) -elif cmd == 'get_private_images': +elif cmd == "get_private_images": if len(args) != 0: - print('get_private_images requires 0 args') + print("get_private_images requires 0 args") sys.exit(1) pp.pprint(client.get_private_images()) -elif cmd == 'get_image': +elif cmd == "get_image": if len(args) != 2: - print('get_image requires 2 args') + print("get_image requires 2 args") sys.exit(1) - pp.pprint(client.get_image(args[0], eval(args[1]),)) + pp.pprint( + client.get_image( + args[0], + eval(args[1]), + ) + ) -elif cmd == 'get_volume': +elif cmd == "get_volume": if len(args) != 1: - print('get_volume requires 1 args') + print("get_volume requires 1 args") sys.exit(1) - pp.pprint(client.get_volume(args[0],)) + pp.pprint( + client.get_volume( + args[0], + ) + ) -elif cmd == 'get_volumes_by_ids': +elif cmd == "get_volumes_by_ids": if len(args) != 1: - print('get_volumes_by_ids requires 1 args') + print("get_volumes_by_ids requires 1 args") sys.exit(1) - pp.pprint(client.get_volumes_by_ids(eval(args[0]),)) + pp.pprint( + client.get_volumes_by_ids( + eval(args[0]), + ) + ) -elif cmd == 'resize_volume': +elif cmd == "resize_volume": if len(args) != 2: - print('resize_volume requires 2 args') + print("resize_volume requires 2 args") sys.exit(1) - pp.pprint(client.resize_volume(args[0], eval(args[1]),)) + pp.pprint( + client.resize_volume( + args[0], + eval(args[1]), + ) + ) -elif cmd == 'delete_server': +elif cmd == "delete_server": if len(args) != 1: - print('delete_server requires 1 args') + print("delete_server requires 1 args") sys.exit(1) - pp.pprint(client.delete_server(args[0],)) + pp.pprint( + client.delete_server( + args[0], + ) + ) -elif cmd == 'start_server': - if len(args) != 8: - print('start_server requires 8 args') - sys.exit(1) - pp.pprint(client.start_server(args[0], args[1], args[2], args[3], eval(args[4]), eval(args[5]), eval(args[6]), eval(args[7]),)) - -elif cmd == 'is_bibigrid_available': +elif cmd == "start_server": + if len(args) != 9: + print("start_server requires 9 args") + sys.exit(1) + pp.pprint( + client.start_server( + args[0], + args[1], + args[2], + args[3], + eval(args[4]), + eval(args[5]), + eval(args[6]), + eval(args[7]), + args[8], + ) + ) + +elif cmd == "is_bibigrid_available": if len(args) != 0: - print('is_bibigrid_available requires 0 args') + print("is_bibigrid_available requires 0 args") sys.exit(1) pp.pprint(client.is_bibigrid_available()) -elif cmd == 'detach_ip_from_server': +elif cmd == "detach_ip_from_server": if len(args) != 2: - print('detach_ip_from_server requires 2 args') + print("detach_ip_from_server requires 2 args") sys.exit(1) - pp.pprint(client.detach_ip_from_server(args[0], args[1],)) + pp.pprint( + client.detach_ip_from_server( + args[0], + args[1], + ) + ) -elif cmd == 'start_server_with_custom_key': +elif cmd == "start_server_with_custom_key": if len(args) != 7: - print('start_server_with_custom_key requires 7 args') - sys.exit(1) - pp.pprint(client.start_server_with_custom_key(args[0], args[1], args[2], eval(args[3]), args[4], eval(args[5]), eval(args[6]),)) - -elif cmd == 'exist_server': + print("start_server_with_custom_key requires 7 args") + sys.exit(1) + pp.pprint( + client.start_server_with_custom_key( + args[0], + args[1], + args[2], + eval(args[3]), + args[4], + eval(args[5]), + eval(args[6]), + ) + ) + +elif cmd == "exist_server": if len(args) != 1: - print('exist_server requires 1 args') + print("exist_server requires 1 args") sys.exit(1) - pp.pprint(client.exist_server(args[0],)) + pp.pprint( + client.exist_server( + args[0], + ) + ) -elif cmd == 'create_and_deploy_playbook': +elif cmd == "create_and_deploy_playbook": if len(args) != 7: - print('create_and_deploy_playbook requires 7 args') - sys.exit(1) - pp.pprint(client.create_and_deploy_playbook(args[0], args[1], eval(args[2]), args[3], eval(args[4]), eval(args[5]), args[6],)) - -elif cmd == 'get_playbook_logs': + print("create_and_deploy_playbook requires 7 args") + sys.exit(1) + pp.pprint( + client.create_and_deploy_playbook( + args[0], + args[1], + eval(args[2]), + args[3], + eval(args[4]), + eval(args[5]), + args[6], + ) + ) + +elif cmd == "get_playbook_logs": if len(args) != 1: - print('get_playbook_logs requires 1 args') + print("get_playbook_logs requires 1 args") sys.exit(1) - pp.pprint(client.get_playbook_logs(args[0],)) + pp.pprint( + client.get_playbook_logs( + args[0], + ) + ) -elif cmd == 'has_forc': +elif cmd == "has_forc": if len(args) != 0: - print('has_forc requires 0 args') + print("has_forc requires 0 args") sys.exit(1) pp.pprint(client.has_forc()) -elif cmd == 'get_forc_url': +elif cmd == "get_forc_url": if len(args) != 0: - print('get_forc_url requires 0 args') + print("get_forc_url requires 0 args") sys.exit(1) pp.pprint(client.get_forc_url()) -elif cmd == 'create_backend': +elif cmd == "create_backend": if len(args) != 4: - print('create_backend requires 4 args') - sys.exit(1) - pp.pprint(client.create_backend(args[0], args[1], args[2], args[3],)) - -elif cmd == 'get_backends': + print("create_backend requires 4 args") + sys.exit(1) + pp.pprint( + client.create_backend( + args[0], + args[1], + args[2], + args[3], + ) + ) + +elif cmd == "get_backends": if len(args) != 0: - print('get_backends requires 0 args') + print("get_backends requires 0 args") sys.exit(1) pp.pprint(client.get_backends()) -elif cmd == 'get_backends_by_owner': +elif cmd == "get_backends_by_owner": if len(args) != 1: - print('get_backends_by_owner requires 1 args') + print("get_backends_by_owner requires 1 args") sys.exit(1) - pp.pprint(client.get_backends_by_owner(args[0],)) + pp.pprint( + client.get_backends_by_owner( + args[0], + ) + ) -elif cmd == 'get_backends_by_template': +elif cmd == "get_backends_by_template": if len(args) != 1: - print('get_backends_by_template requires 1 args') + print("get_backends_by_template requires 1 args") sys.exit(1) - pp.pprint(client.get_backends_by_template(args[0],)) + pp.pprint( + client.get_backends_by_template( + args[0], + ) + ) -elif cmd == 'get_backend_by_id': +elif cmd == "get_backend_by_id": if len(args) != 1: - print('get_backend_by_id requires 1 args') + print("get_backend_by_id requires 1 args") sys.exit(1) - pp.pprint(client.get_backend_by_id(eval(args[0]),)) + pp.pprint( + client.get_backend_by_id( + eval(args[0]), + ) + ) -elif cmd == 'delete_backend': +elif cmd == "delete_backend": if len(args) != 1: - print('delete_backend requires 1 args') + print("delete_backend requires 1 args") sys.exit(1) - pp.pprint(client.delete_backend(eval(args[0]),)) + pp.pprint( + client.delete_backend( + eval(args[0]), + ) + ) -elif cmd == 'add_user_to_backend': +elif cmd == "add_user_to_backend": if len(args) != 2: - print('add_user_to_backend requires 2 args') + print("add_user_to_backend requires 2 args") sys.exit(1) - pp.pprint(client.add_user_to_backend(eval(args[0]), args[1],)) + pp.pprint( + client.add_user_to_backend( + eval(args[0]), + args[1], + ) + ) -elif cmd == 'get_users_from_backend': +elif cmd == "get_users_from_backend": if len(args) != 1: - print('get_users_from_backend requires 1 args') + print("get_users_from_backend requires 1 args") sys.exit(1) - pp.pprint(client.get_users_from_backend(eval(args[0]),)) + pp.pprint( + client.get_users_from_backend( + eval(args[0]), + ) + ) -elif cmd == 'delete_user_from_backend': +elif cmd == "delete_user_from_backend": if len(args) != 2: - print('delete_user_from_backend requires 2 args') + print("delete_user_from_backend requires 2 args") sys.exit(1) - pp.pprint(client.delete_user_from_backend(eval(args[0]), args[1],)) + pp.pprint( + client.delete_user_from_backend( + eval(args[0]), + args[1], + ) + ) -elif cmd == 'get_allowed_templates': +elif cmd == "get_allowed_templates": if len(args) != 0: - print('get_allowed_templates requires 0 args') + print("get_allowed_templates requires 0 args") sys.exit(1) pp.pprint(client.get_allowed_templates()) -elif cmd == 'get_servers': +elif cmd == "get_servers": if len(args) != 0: - print('get_servers requires 0 args') + print("get_servers requires 0 args") sys.exit(1) pp.pprint(client.get_servers()) -elif cmd == 'get_servers_by_ids': +elif cmd == "get_servers_by_ids": if len(args) != 1: - print('get_servers_by_ids requires 1 args') + print("get_servers_by_ids requires 1 args") sys.exit(1) - pp.pprint(client.get_servers_by_ids(eval(args[0]),)) + pp.pprint( + client.get_servers_by_ids( + eval(args[0]), + ) + ) -elif cmd == 'get_servers_by_bibigrid_id': +elif cmd == "get_servers_by_bibigrid_id": if len(args) != 1: - print('get_servers_by_bibigrid_id requires 1 args') + print("get_servers_by_bibigrid_id requires 1 args") sys.exit(1) - pp.pprint(client.get_servers_by_bibigrid_id(args[0],)) + pp.pprint( + client.get_servers_by_bibigrid_id( + args[0], + ) + ) -elif cmd == 'scale_up_cluster': +elif cmd == "scale_up_cluster": if len(args) != 7: - print('scale_up_cluster requires 7 args') - sys.exit(1) - pp.pprint(client.scale_up_cluster(args[0], args[1], args[2], eval(args[3]), eval(args[4]), eval(args[5]), eval(args[6]),)) - -elif cmd == 'add_cluster_machine': + print("scale_up_cluster requires 7 args") + sys.exit(1) + pp.pprint( + client.scale_up_cluster( + args[0], + args[1], + args[2], + eval(args[3]), + eval(args[4]), + eval(args[5]), + eval(args[6]), + ) + ) + +elif cmd == "add_cluster_machine": if len(args) != 9: - print('add_cluster_machine requires 9 args') - sys.exit(1) - pp.pprint(client.add_cluster_machine(args[0], args[1], args[2], args[3], args[4], args[5], args[6], eval(args[7]), eval(args[8]),)) - -elif cmd == 'get_cluster_info': + print("add_cluster_machine requires 9 args") + sys.exit(1) + pp.pprint( + client.add_cluster_machine( + args[0], + args[1], + args[2], + args[3], + args[4], + args[5], + args[6], + eval(args[7]), + eval(args[8]), + ) + ) + +elif cmd == "get_cluster_info": if len(args) != 1: - print('get_cluster_info requires 1 args') + print("get_cluster_info requires 1 args") sys.exit(1) - pp.pprint(client.get_cluster_info(args[0],)) + pp.pprint( + client.get_cluster_info( + args[0], + ) + ) -elif cmd == 'get_cluster_status': +elif cmd == "get_cluster_status": if len(args) != 1: - print('get_cluster_status requires 1 args') + print("get_cluster_status requires 1 args") sys.exit(1) - pp.pprint(client.get_cluster_status(args[0],)) + pp.pprint( + client.get_cluster_status( + args[0], + ) + ) -elif cmd == 'get_server': +elif cmd == "get_server": if len(args) != 1: - print('get_server requires 1 args') + print("get_server requires 1 args") sys.exit(1) - pp.pprint(client.get_server(args[0],)) + pp.pprint( + client.get_server( + args[0], + ) + ) -elif cmd == 'stop_server': +elif cmd == "stop_server": if len(args) != 1: - print('stop_server requires 1 args') + print("stop_server requires 1 args") sys.exit(1) - pp.pprint(client.stop_server(args[0],)) + pp.pprint( + client.stop_server( + args[0], + ) + ) -elif cmd == 'create_snapshot': +elif cmd == "create_snapshot": if len(args) != 5: - print('create_snapshot requires 5 args') - sys.exit(1) - pp.pprint(client.create_snapshot(args[0], args[1], args[2], eval(args[3]), args[4],)) - -elif cmd == 'get_limits': + print("create_snapshot requires 5 args") + sys.exit(1) + pp.pprint( + client.create_snapshot( + args[0], + args[1], + args[2], + eval(args[3]), + args[4], + ) + ) + +elif cmd == "get_limits": if len(args) != 0: - print('get_limits requires 0 args') + print("get_limits requires 0 args") sys.exit(1) pp.pprint(client.get_limits()) -elif cmd == 'start_cluster': +elif cmd == "start_cluster": if len(args) != 4: - print('start_cluster requires 4 args') - sys.exit(1) - pp.pprint(client.start_cluster(args[0], eval(args[1]), eval(args[2]), args[3],)) - -elif cmd == 'terminate_cluster': + print("start_cluster requires 4 args") + sys.exit(1) + pp.pprint( + client.start_cluster( + args[0], + eval(args[1]), + eval(args[2]), + args[3], + ) + ) + +elif cmd == "terminate_cluster": if len(args) != 1: - print('terminate_cluster requires 1 args') + print("terminate_cluster requires 1 args") sys.exit(1) - pp.pprint(client.terminate_cluster(args[0],)) + pp.pprint( + client.terminate_cluster( + args[0], + ) + ) -elif cmd == 'delete_image': +elif cmd == "delete_image": if len(args) != 1: - print('delete_image requires 1 args') + print("delete_image requires 1 args") sys.exit(1) - pp.pprint(client.delete_image(args[0],)) + pp.pprint( + client.delete_image( + args[0], + ) + ) -elif cmd == 'detach_volume': +elif cmd == "detach_volume": if len(args) != 2: - print('detach_volume requires 2 args') + print("detach_volume requires 2 args") sys.exit(1) - pp.pprint(client.detach_volume(args[0], args[1],)) + pp.pprint( + client.detach_volume( + args[0], + args[1], + ) + ) -elif cmd == 'delete_volume': +elif cmd == "delete_volume": if len(args) != 1: - print('delete_volume requires 1 args') + print("delete_volume requires 1 args") sys.exit(1) - pp.pprint(client.delete_volume(args[0],)) + pp.pprint( + client.delete_volume( + args[0], + ) + ) -elif cmd == 'attach_volume_to_server': +elif cmd == "attach_volume_to_server": if len(args) != 2: - print('attach_volume_to_server requires 2 args') + print("attach_volume_to_server requires 2 args") sys.exit(1) - pp.pprint(client.attach_volume_to_server(args[0], args[1],)) + pp.pprint( + client.attach_volume_to_server( + args[0], + args[1], + ) + ) -elif cmd == 'resume_server': +elif cmd == "resume_server": if len(args) != 1: - print('resume_server requires 1 args') + print("resume_server requires 1 args") sys.exit(1) - pp.pprint(client.resume_server(args[0],)) + pp.pprint( + client.resume_server( + args[0], + ) + ) -elif cmd == 'create_volume': +elif cmd == "create_volume": if len(args) != 3: - print('create_volume requires 3 args') + print("create_volume requires 3 args") sys.exit(1) - pp.pprint(client.create_volume(args[0], eval(args[1]), eval(args[2]),)) + pp.pprint( + client.create_volume( + args[0], + eval(args[1]), + eval(args[2]), + ) + ) -elif cmd == 'create_volume_by_source_volume': +elif cmd == "create_volume_by_source_volume": if len(args) != 3: - print('create_volume_by_source_volume requires 3 args') + print("create_volume_by_source_volume requires 3 args") sys.exit(1) - pp.pprint(client.create_volume_by_source_volume(args[0], eval(args[1]), args[2],)) + pp.pprint( + client.create_volume_by_source_volume( + args[0], + eval(args[1]), + args[2], + ) + ) -elif cmd == 'create_volume_by_volume_snap': +elif cmd == "create_volume_by_volume_snap": if len(args) != 3: - print('create_volume_by_volume_snap requires 3 args') + print("create_volume_by_volume_snap requires 3 args") sys.exit(1) - pp.pprint(client.create_volume_by_volume_snap(args[0], eval(args[1]), args[2],)) + pp.pprint( + client.create_volume_by_volume_snap( + args[0], + eval(args[1]), + args[2], + ) + ) -elif cmd == 'create_volume_snapshot': +elif cmd == "create_volume_snapshot": if len(args) != 3: - print('create_volume_snapshot requires 3 args') + print("create_volume_snapshot requires 3 args") sys.exit(1) - pp.pprint(client.create_volume_snapshot(args[0], args[1], args[2],)) + pp.pprint( + client.create_volume_snapshot( + args[0], + args[1], + args[2], + ) + ) -elif cmd == 'get_volume_snapshot': +elif cmd == "get_volume_snapshot": if len(args) != 1: - print('get_volume_snapshot requires 1 args') + print("get_volume_snapshot requires 1 args") sys.exit(1) - pp.pprint(client.get_volume_snapshot(args[0],)) + pp.pprint( + client.get_volume_snapshot( + args[0], + ) + ) -elif cmd == 'delete_volume_snapshot': +elif cmd == "delete_volume_snapshot": if len(args) != 1: - print('delete_volume_snapshot requires 1 args') + print("delete_volume_snapshot requires 1 args") sys.exit(1) - pp.pprint(client.delete_volume_snapshot(args[0],)) + pp.pprint( + client.delete_volume_snapshot( + args[0], + ) + ) -elif cmd == 'reboot_hard_server': +elif cmd == "reboot_hard_server": if len(args) != 1: - print('reboot_hard_server requires 1 args') + print("reboot_hard_server requires 1 args") sys.exit(1) - pp.pprint(client.reboot_hard_server(args[0],)) + pp.pprint( + client.reboot_hard_server( + args[0], + ) + ) -elif cmd == 'reboot_soft_server': +elif cmd == "reboot_soft_server": if len(args) != 1: - print('reboot_soft_server requires 1 args') + print("reboot_soft_server requires 1 args") sys.exit(1) - pp.pprint(client.reboot_soft_server(args[0],)) + pp.pprint( + client.reboot_soft_server( + args[0], + ) + ) else: - print('Unrecognized method %s' % cmd) + print("Unrecognized method %s" % cmd) sys.exit(1) transport.close() diff --git a/simple_vm_client/VirtualMachineService.py b/simple_vm_client/VirtualMachineService.py index 61b3ee6..93548d1 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -6,15 +6,14 @@ # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -from thrift.TRecursive import fix_spec - -import sys import logging -from ttypes import * -from thrift.Thrift import TProcessor +import sys + +from thrift.Thrift import TApplicationException, TMessageType, TProcessor, TType from thrift.transport import TTransport +from thrift.TRecursive import fix_spec +from ttypes import * + all_structs = [] @@ -23,13 +22,13 @@ class Iface(object): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ + def is_version(self, version): """ Parameters: - version """ - pass def get_client_version(self): """ @@ -37,14 +36,12 @@ def get_client_version(self): Returns Version of the client """ - pass def get_gateway_ip(self): """ Gets the gateway ip. """ - pass def get_calculation_values(self): pass @@ -59,7 +56,6 @@ def import_keypair(self, keyname, public_key): - public_key: The public key """ - pass def get_vm_ports(self, openstack_id): """ @@ -70,7 +66,6 @@ def get_vm_ports(self, openstack_id): - openstack_id: Id of server """ - pass def add_udp_security_group(self, server_id): """ @@ -80,7 +75,6 @@ def add_udp_security_group(self, server_id): - server_id: OpenStack id of the server """ - pass def get_flavors(self): """ @@ -88,7 +82,6 @@ def get_flavors(self): Returns: List of flavor instances. """ - pass def get_images(self): """ @@ -96,7 +89,6 @@ def get_images(self): Returns: List of Image instances. """ - pass def get_public_images(self): """ @@ -104,7 +96,6 @@ def get_public_images(self): Returns: List of public Image instances. """ - pass def get_private_images(self): """ @@ -112,7 +103,6 @@ def get_private_images(self): Returns: List of private Image instances. """ - pass def get_image(self, openstack_id, ignore_not_active): """ @@ -124,7 +114,6 @@ def get_image(self, openstack_id, ignore_not_active): - ignore_not_active """ - pass def get_volume(self, volume_id): """ @@ -132,7 +121,6 @@ def get_volume(self, volume_id): - volume_id """ - pass def get_volumes_by_ids(self, volume_ids): """ @@ -140,7 +128,6 @@ def get_volumes_by_ids(self, volume_ids): - volume_ids """ - pass def resize_volume(self, volume_id, size): """ @@ -149,7 +136,6 @@ def resize_volume(self, volume_id, size): - size """ - pass def delete_server(self, openstack_id): """ @@ -160,9 +146,19 @@ def delete_server(self, openstack_id): - openstack_id: Id of the server. """ - pass - def start_server(self, flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys): + def start_server( + self, + flavor_name, + image_name, + public_key, + servername, + metadata, + volume_ids_path_new, + volume_ids_path_attach, + additional_keys, + research_environment, + ): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -173,9 +169,9 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - volume_ids_path_new - volume_ids_path_attach - additional_keys + - research_environment """ - pass def is_bibigrid_available(self): pass @@ -187,9 +183,17 @@ def detach_ip_from_server(self, server_id, floating_ip): - floating_ip """ - pass - def start_server_with_custom_key(self, flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach): + def start_server_with_custom_key( + self, + flavor_name, + image_name, + servername, + metadata, + research_environment, + volume_ids_path_new, + volume_ids_path_attach, + ): """ Start a new server with custom key for ansible. @@ -203,7 +207,6 @@ def start_server_with_custom_key(self, flavor_name, image_name, servername, meta - volume_ids_path_attach """ - pass def exist_server(self, name): """ @@ -213,9 +216,17 @@ def exist_server(self, name): - name """ - pass - def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): + def create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): """ Create and deploy an ansible playbook @@ -229,7 +240,6 @@ def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, r - base_url """ - pass def get_playbook_logs(self, openstack_id): """ @@ -239,14 +249,12 @@ def get_playbook_logs(self, openstack_id): - openstack_id """ - pass def has_forc(self): """ Get boolean if client has backend url configured """ - pass def get_forc_url(self): pass @@ -262,14 +270,12 @@ def create_backend(self, owner, user_path, template, upstream_url): - upstream_url """ - pass def get_backends(self): """ Get all backends """ - pass def get_backends_by_owner(self, owner): """ @@ -279,7 +285,6 @@ def get_backends_by_owner(self, owner): - owner """ - pass def get_backends_by_template(self, template): """ @@ -289,7 +294,6 @@ def get_backends_by_template(self, template): - template """ - pass def get_backend_by_id(self, id): """ @@ -299,7 +303,6 @@ def get_backend_by_id(self, id): - id """ - pass def delete_backend(self, id): """ @@ -309,7 +312,6 @@ def delete_backend(self, id): - id """ - pass def add_user_to_backend(self, backend_id, user_id): """ @@ -320,7 +322,6 @@ def add_user_to_backend(self, backend_id, user_id): - user_id """ - pass def get_users_from_backend(self, backend_id): """ @@ -330,7 +331,6 @@ def get_users_from_backend(self, backend_id): - backend_id """ - pass def delete_user_from_backend(self, backend_id, user_id): """ @@ -341,7 +341,6 @@ def delete_user_from_backend(self, backend_id, user_id): - user_id """ - pass def get_allowed_templates(self): pass @@ -352,7 +351,6 @@ def get_servers(self): Returns: List of server instances. """ - pass def get_servers_by_ids(self, server_ids): """ @@ -363,7 +361,6 @@ def get_servers_by_ids(self, server_ids): - server_ids """ - pass def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -374,9 +371,10 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): - bibigrid_id """ - pass - def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): + def scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): """ Parameters: - cluster_id @@ -388,9 +386,19 @@ def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, st - batch_idx """ - pass - def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): + def add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): """ Parameters: - cluster_id @@ -404,7 +412,6 @@ def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_ - worker_idx """ - pass def get_cluster_info(self, cluster_id): """ @@ -412,7 +419,6 @@ def get_cluster_info(self, cluster_id): - cluster_id """ - pass def get_cluster_status(self, cluster_id): """ @@ -420,7 +426,6 @@ def get_cluster_status(self, cluster_id): - cluster_id """ - pass def get_server(self, openstack_id): """ @@ -431,7 +436,6 @@ def get_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def stop_server(self, openstack_id): """ @@ -442,7 +446,6 @@ def stop_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def create_snapshot(self, openstack_id, name, username, base_tags, description): """ @@ -458,7 +461,6 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): - description: Description of the new snapshot """ - pass def get_limits(self): """ @@ -468,7 +470,6 @@ def get_limits(self): 'totalInstancesUsed': totalInstancesUsed} """ - pass def start_cluster(self, public_key, master_instance, worker_instances, user): """ @@ -479,7 +480,6 @@ def start_cluster(self, public_key, master_instance, worker_instances, user): - user """ - pass def terminate_cluster(self, cluster_id): """ @@ -487,7 +487,6 @@ def terminate_cluster(self, cluster_id): - cluster_id """ - pass def delete_image(self, image_id): """ @@ -498,7 +497,6 @@ def delete_image(self, image_id): - image_id: Id of image """ - pass def detach_volume(self, volume_id, server_id): """ @@ -509,7 +507,6 @@ def detach_volume(self, volume_id, server_id): - server_id: Id of the server where the volume is attached """ - pass def delete_volume(self, volume_id): """ @@ -519,7 +516,6 @@ def delete_volume(self, volume_id): - volume_id """ - pass def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -531,7 +527,6 @@ def attach_volume_to_server(self, openstack_id, volume_id): - volume_id: Id of volume """ - pass def resume_server(self, openstack_id): """ @@ -541,7 +536,6 @@ def resume_server(self, openstack_id): - openstack_id: Id of the server """ - pass def create_volume(self, volume_name, volume_storage, metadata): """ @@ -553,7 +547,6 @@ def create_volume(self, volume_name, volume_storage, metadata): - metadata: Metadata for the new volume """ - pass def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -565,7 +558,6 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ - pass def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -577,7 +569,6 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - volume_snap_id: ID of volume snapshot """ - pass def create_volume_snapshot(self, volume_id, name, description): """ @@ -590,7 +581,6 @@ def create_volume_snapshot(self, volume_id, name, description): - description: Description for the volume snapshot """ - pass def get_volume_snapshot(self, name_or_id): """ @@ -601,7 +591,6 @@ def get_volume_snapshot(self, name_or_id): - name_or_id: Name or ID of volume snapshot """ - pass def delete_volume_snapshot(self, snapshot_id): """ @@ -611,7 +600,6 @@ def delete_volume_snapshot(self, snapshot_id): - snapshot_id """ - pass def reboot_hard_server(self, openstack_id): """ @@ -621,7 +609,6 @@ def reboot_hard_server(self, openstack_id): - openstack_id: Id of the server """ - pass def reboot_soft_server(self, openstack_id): """ @@ -631,7 +618,6 @@ def reboot_soft_server(self, openstack_id): - openstack_id: Id of the server """ - pass class Client(Iface): @@ -639,6 +625,7 @@ class Client(Iface): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ + def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: @@ -655,7 +642,7 @@ def is_version(self, version): return self.recv_is_version() def send_is_version(self, version): - self._oprot.writeMessageBegin('is_version', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("is_version", TMessageType.CALL, self._seqid) args = is_version_args() args.version = version args.write(self._oprot) @@ -675,7 +662,9 @@ def recv_is_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "is_version failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "is_version failed: unknown result" + ) def get_client_version(self): """ @@ -687,7 +676,9 @@ def get_client_version(self): return self.recv_get_client_version() def send_get_client_version(self): - self._oprot.writeMessageBegin('get_client_version', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_client_version", TMessageType.CALL, self._seqid + ) args = get_client_version_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -706,7 +697,10 @@ def recv_get_client_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_client_version failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_client_version failed: unknown result", + ) def get_gateway_ip(self): """ @@ -717,7 +711,7 @@ def get_gateway_ip(self): return self.recv_get_gateway_ip() def send_get_gateway_ip(self): - self._oprot.writeMessageBegin('get_gateway_ip', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_gateway_ip", TMessageType.CALL, self._seqid) args = get_gateway_ip_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -736,14 +730,19 @@ def recv_get_gateway_ip(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_gateway_ip failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_gateway_ip failed: unknown result", + ) def get_calculation_values(self): self.send_get_calculation_values() return self.recv_get_calculation_values() def send_get_calculation_values(self): - self._oprot.writeMessageBegin('get_calculation_values', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_calculation_values", TMessageType.CALL, self._seqid + ) args = get_calculation_values_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -762,7 +761,10 @@ def recv_get_calculation_values(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_calculation_values failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_calculation_values failed: unknown result", + ) def import_keypair(self, keyname, public_key): """ @@ -778,7 +780,7 @@ def import_keypair(self, keyname, public_key): return self.recv_import_keypair() def send_import_keypair(self, keyname, public_key): - self._oprot.writeMessageBegin('import_keypair', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("import_keypair", TMessageType.CALL, self._seqid) args = import_keypair_args() args.keyname = keyname args.public_key = public_key @@ -799,7 +801,10 @@ def recv_import_keypair(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "import_keypair failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "import_keypair failed: unknown result", + ) def get_vm_ports(self, openstack_id): """ @@ -814,7 +819,7 @@ def get_vm_ports(self, openstack_id): return self.recv_get_vm_ports() def send_get_vm_ports(self, openstack_id): - self._oprot.writeMessageBegin('get_vm_ports', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_vm_ports", TMessageType.CALL, self._seqid) args = get_vm_ports_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -836,7 +841,9 @@ def recv_get_vm_ports(self): return result.success if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result" + ) def add_udp_security_group(self, server_id): """ @@ -850,7 +857,9 @@ def add_udp_security_group(self, server_id): self.recv_add_udp_security_group() def send_add_udp_security_group(self, server_id): - self._oprot.writeMessageBegin('add_udp_security_group', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_udp_security_group", TMessageType.CALL, self._seqid + ) args = add_udp_security_group_args() args.server_id = server_id args.write(self._oprot) @@ -884,7 +893,7 @@ def get_flavors(self): return self.recv_get_flavors() def send_get_flavors(self): - self._oprot.writeMessageBegin('get_flavors', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_flavors", TMessageType.CALL, self._seqid) args = get_flavors_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -903,7 +912,9 @@ def recv_get_flavors(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result" + ) def get_images(self): """ @@ -915,7 +926,7 @@ def get_images(self): return self.recv_get_images() def send_get_images(self): - self._oprot.writeMessageBegin('get_images', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_images", TMessageType.CALL, self._seqid) args = get_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -934,7 +945,9 @@ def recv_get_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_images failed: unknown result" + ) def get_public_images(self): """ @@ -946,7 +959,9 @@ def get_public_images(self): return self.recv_get_public_images() def send_get_public_images(self): - self._oprot.writeMessageBegin('get_public_images', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_public_images", TMessageType.CALL, self._seqid + ) args = get_public_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -965,7 +980,10 @@ def recv_get_public_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_public_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_public_images failed: unknown result", + ) def get_private_images(self): """ @@ -977,7 +995,9 @@ def get_private_images(self): return self.recv_get_private_images() def send_get_private_images(self): - self._oprot.writeMessageBegin('get_private_images', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_private_images", TMessageType.CALL, self._seqid + ) args = get_private_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -996,7 +1016,10 @@ def recv_get_private_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_private_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_private_images failed: unknown result", + ) def get_image(self, openstack_id, ignore_not_active): """ @@ -1012,7 +1035,7 @@ def get_image(self, openstack_id, ignore_not_active): return self.recv_get_image() def send_get_image(self, openstack_id, ignore_not_active): - self._oprot.writeMessageBegin('get_image', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_image", TMessageType.CALL, self._seqid) args = get_image_args() args.openstack_id = openstack_id args.ignore_not_active = ignore_not_active @@ -1035,7 +1058,9 @@ def recv_get_image(self): return result.success if result.i is not None: raise result.i - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_image failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_image failed: unknown result" + ) def get_volume(self, volume_id): """ @@ -1047,7 +1072,7 @@ def get_volume(self, volume_id): return self.recv_get_volume() def send_get_volume(self, volume_id): - self._oprot.writeMessageBegin('get_volume', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_volume", TMessageType.CALL, self._seqid) args = get_volume_args() args.volume_id = volume_id args.write(self._oprot) @@ -1069,7 +1094,9 @@ def recv_get_volume(self): return result.success if result.v is not None: raise result.v - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_volume failed: unknown result" + ) def get_volumes_by_ids(self, volume_ids): """ @@ -1081,7 +1108,9 @@ def get_volumes_by_ids(self, volume_ids): return self.recv_get_volumes_by_ids() def send_get_volumes_by_ids(self, volume_ids): - self._oprot.writeMessageBegin('get_volumes_by_ids', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_volumes_by_ids", TMessageType.CALL, self._seqid + ) args = get_volumes_by_ids_args() args.volume_ids = volume_ids args.write(self._oprot) @@ -1101,7 +1130,10 @@ def recv_get_volumes_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volumes_by_ids failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_volumes_by_ids failed: unknown result", + ) def resize_volume(self, volume_id, size): """ @@ -1114,7 +1146,7 @@ def resize_volume(self, volume_id, size): self.recv_resize_volume() def send_resize_volume(self, volume_id, size): - self._oprot.writeMessageBegin('resize_volume', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("resize_volume", TMessageType.CALL, self._seqid) args = resize_volume_args() args.volume_id = volume_id args.size = size @@ -1150,7 +1182,7 @@ def delete_server(self, openstack_id): self.recv_delete_server() def send_delete_server(self, openstack_id): - self._oprot.writeMessageBegin('delete_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("delete_server", TMessageType.CALL, self._seqid) args = delete_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1174,7 +1206,18 @@ def recv_delete_server(self): raise result.c return - def start_server(self, flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys): + def start_server( + self, + flavor_name, + image_name, + public_key, + servername, + metadata, + volume_ids_path_new, + volume_ids_path_attach, + additional_keys, + research_environment, + ): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -1185,13 +1228,35 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - volume_ids_path_new - volume_ids_path_attach - additional_keys + - research_environment """ - self.send_start_server(flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys) + self.send_start_server( + flavor_name, + image_name, + public_key, + servername, + metadata, + volume_ids_path_new, + volume_ids_path_attach, + additional_keys, + research_environment, + ) return self.recv_start_server() - def send_start_server(self, flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys): - self._oprot.writeMessageBegin('start_server', TMessageType.CALL, self._seqid) + def send_start_server( + self, + flavor_name, + image_name, + public_key, + servername, + metadata, + volume_ids_path_new, + volume_ids_path_attach, + additional_keys, + research_environment, + ): + self._oprot.writeMessageBegin("start_server", TMessageType.CALL, self._seqid) args = start_server_args() args.flavor_name = flavor_name args.image_name = image_name @@ -1201,6 +1266,7 @@ def send_start_server(self, flavor_name, image_name, public_key, servername, met args.volume_ids_path_new = volume_ids_path_new args.volume_ids_path_attach = volume_ids_path_attach args.additional_keys = additional_keys + args.research_environment = research_environment args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -1228,14 +1294,18 @@ def recv_start_server(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "start_server failed: unknown result" + ) def is_bibigrid_available(self): self.send_is_bibigrid_available() return self.recv_is_bibigrid_available() def send_is_bibigrid_available(self): - self._oprot.writeMessageBegin('is_bibigrid_available', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "is_bibigrid_available", TMessageType.CALL, self._seqid + ) args = is_bibigrid_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1254,7 +1324,10 @@ def recv_is_bibigrid_available(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "is_bibigrid_available failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "is_bibigrid_available failed: unknown result", + ) def detach_ip_from_server(self, server_id, floating_ip): """ @@ -1267,7 +1340,9 @@ def detach_ip_from_server(self, server_id, floating_ip): self.recv_detach_ip_from_server() def send_detach_ip_from_server(self, server_id, floating_ip): - self._oprot.writeMessageBegin('detach_ip_from_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "detach_ip_from_server", TMessageType.CALL, self._seqid + ) args = detach_ip_from_server_args() args.server_id = server_id args.floating_ip = floating_ip @@ -1290,7 +1365,16 @@ def recv_detach_ip_from_server(self): raise result.s return - def start_server_with_custom_key(self, flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach): + def start_server_with_custom_key( + self, + flavor_name, + image_name, + servername, + metadata, + research_environment, + volume_ids_path_new, + volume_ids_path_attach, + ): """ Start a new server with custom key for ansible. @@ -1304,11 +1388,30 @@ def start_server_with_custom_key(self, flavor_name, image_name, servername, meta - volume_ids_path_attach """ - self.send_start_server_with_custom_key(flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach) + self.send_start_server_with_custom_key( + flavor_name, + image_name, + servername, + metadata, + research_environment, + volume_ids_path_new, + volume_ids_path_attach, + ) return self.recv_start_server_with_custom_key() - def send_start_server_with_custom_key(self, flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach): - self._oprot.writeMessageBegin('start_server_with_custom_key', TMessageType.CALL, self._seqid) + def send_start_server_with_custom_key( + self, + flavor_name, + image_name, + servername, + metadata, + research_environment, + volume_ids_path_new, + volume_ids_path_attach, + ): + self._oprot.writeMessageBegin( + "start_server_with_custom_key", TMessageType.CALL, self._seqid + ) args = start_server_with_custom_key_args() args.flavor_name = flavor_name args.image_name = image_name @@ -1344,7 +1447,10 @@ def recv_start_server_with_custom_key(self): raise result.f if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_with_custom_key failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "start_server_with_custom_key failed: unknown result", + ) def exist_server(self, name): """ @@ -1358,7 +1464,7 @@ def exist_server(self, name): return self.recv_exist_server() def send_exist_server(self, name): - self._oprot.writeMessageBegin('exist_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("exist_server", TMessageType.CALL, self._seqid) args = exist_server_args() args.name = name args.write(self._oprot) @@ -1378,9 +1484,20 @@ def recv_exist_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "exist_server failed: unknown result") - - def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): + raise TApplicationException( + TApplicationException.MISSING_RESULT, "exist_server failed: unknown result" + ) + + def create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): """ Create and deploy an ansible playbook @@ -1394,11 +1511,30 @@ def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, r - base_url """ - self.send_create_and_deploy_playbook(public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url) + self.send_create_and_deploy_playbook( + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ) return self.recv_create_and_deploy_playbook() - def send_create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): - self._oprot.writeMessageBegin('create_and_deploy_playbook', TMessageType.CALL, self._seqid) + def send_create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): + self._oprot.writeMessageBegin( + "create_and_deploy_playbook", TMessageType.CALL, self._seqid + ) args = create_and_deploy_playbook_args() args.public_key = public_key args.openstack_id = openstack_id @@ -1426,7 +1562,10 @@ def recv_create_and_deploy_playbook(self): return result.success if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_and_deploy_playbook failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_and_deploy_playbook failed: unknown result", + ) def get_playbook_logs(self, openstack_id): """ @@ -1440,7 +1579,9 @@ def get_playbook_logs(self, openstack_id): return self.recv_get_playbook_logs() def send_get_playbook_logs(self, openstack_id): - self._oprot.writeMessageBegin('get_playbook_logs', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_playbook_logs", TMessageType.CALL, self._seqid + ) args = get_playbook_logs_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1462,7 +1603,10 @@ def recv_get_playbook_logs(self): return result.success if result.p is not None: raise result.p - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_playbook_logs failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_playbook_logs failed: unknown result", + ) def has_forc(self): """ @@ -1473,7 +1617,7 @@ def has_forc(self): return self.recv_has_forc() def send_has_forc(self): - self._oprot.writeMessageBegin('has_forc', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("has_forc", TMessageType.CALL, self._seqid) args = has_forc_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1492,14 +1636,16 @@ def recv_has_forc(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "has_forc failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "has_forc failed: unknown result" + ) def get_forc_url(self): self.send_get_forc_url() return self.recv_get_forc_url() def send_get_forc_url(self): - self._oprot.writeMessageBegin('get_forc_url', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_forc_url", TMessageType.CALL, self._seqid) args = get_forc_url_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1518,7 +1664,9 @@ def recv_get_forc_url(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result" + ) def create_backend(self, owner, user_path, template, upstream_url): """ @@ -1535,7 +1683,7 @@ def create_backend(self, owner, user_path, template, upstream_url): return self.recv_create_backend() def send_create_backend(self, owner, user_path, template, upstream_url): - self._oprot.writeMessageBegin('create_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("create_backend", TMessageType.CALL, self._seqid) args = create_backend_args() args.owner = owner args.user_path = user_path @@ -1562,7 +1710,10 @@ def recv_create_backend(self): raise result.e if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_backend failed: unknown result", + ) def get_backends(self): """ @@ -1573,7 +1724,7 @@ def get_backends(self): return self.recv_get_backends() def send_get_backends(self): - self._oprot.writeMessageBegin('get_backends', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_backends", TMessageType.CALL, self._seqid) args = get_backends_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1594,7 +1745,9 @@ def recv_get_backends(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_backends failed: unknown result" + ) def get_backends_by_owner(self, owner): """ @@ -1608,7 +1761,9 @@ def get_backends_by_owner(self, owner): return self.recv_get_backends_by_owner() def send_get_backends_by_owner(self, owner): - self._oprot.writeMessageBegin('get_backends_by_owner', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backends_by_owner", TMessageType.CALL, self._seqid + ) args = get_backends_by_owner_args() args.owner = owner args.write(self._oprot) @@ -1630,7 +1785,10 @@ def recv_get_backends_by_owner(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_owner failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backends_by_owner failed: unknown result", + ) def get_backends_by_template(self, template): """ @@ -1644,7 +1802,9 @@ def get_backends_by_template(self, template): return self.recv_get_backends_by_template() def send_get_backends_by_template(self, template): - self._oprot.writeMessageBegin('get_backends_by_template', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backends_by_template", TMessageType.CALL, self._seqid + ) args = get_backends_by_template_args() args.template = template args.write(self._oprot) @@ -1666,7 +1826,10 @@ def recv_get_backends_by_template(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_template failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backends_by_template failed: unknown result", + ) def get_backend_by_id(self, id): """ @@ -1680,7 +1843,9 @@ def get_backend_by_id(self, id): return self.recv_get_backend_by_id() def send_get_backend_by_id(self, id): - self._oprot.writeMessageBegin('get_backend_by_id', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backend_by_id", TMessageType.CALL, self._seqid + ) args = get_backend_by_id_args() args.id = id args.write(self._oprot) @@ -1704,7 +1869,10 @@ def recv_get_backend_by_id(self): raise result.b if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backend_by_id failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backend_by_id failed: unknown result", + ) def delete_backend(self, id): """ @@ -1718,7 +1886,7 @@ def delete_backend(self, id): self.recv_delete_backend() def send_delete_backend(self, id): - self._oprot.writeMessageBegin('delete_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("delete_backend", TMessageType.CALL, self._seqid) args = delete_backend_args() args.id = id args.write(self._oprot) @@ -1753,7 +1921,9 @@ def add_user_to_backend(self, backend_id, user_id): return self.recv_add_user_to_backend() def send_add_user_to_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin('add_user_to_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_user_to_backend", TMessageType.CALL, self._seqid + ) args = add_user_to_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -1776,7 +1946,10 @@ def recv_add_user_to_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_user_to_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_user_to_backend failed: unknown result", + ) def get_users_from_backend(self, backend_id): """ @@ -1790,7 +1963,9 @@ def get_users_from_backend(self, backend_id): return self.recv_get_users_from_backend() def send_get_users_from_backend(self, backend_id): - self._oprot.writeMessageBegin('get_users_from_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_users_from_backend", TMessageType.CALL, self._seqid + ) args = get_users_from_backend_args() args.backend_id = backend_id args.write(self._oprot) @@ -1812,7 +1987,10 @@ def recv_get_users_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_users_from_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_users_from_backend failed: unknown result", + ) def delete_user_from_backend(self, backend_id, user_id): """ @@ -1827,7 +2005,9 @@ def delete_user_from_backend(self, backend_id, user_id): return self.recv_delete_user_from_backend() def send_delete_user_from_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin('delete_user_from_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_user_from_backend", TMessageType.CALL, self._seqid + ) args = delete_user_from_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -1850,14 +2030,19 @@ def recv_delete_user_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_user_from_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "delete_user_from_backend failed: unknown result", + ) def get_allowed_templates(self): self.send_get_allowed_templates() return self.recv_get_allowed_templates() def send_get_allowed_templates(self): - self._oprot.writeMessageBegin('get_allowed_templates', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_allowed_templates", TMessageType.CALL, self._seqid + ) args = get_allowed_templates_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1876,7 +2061,10 @@ def recv_get_allowed_templates(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_allowed_templates failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_allowed_templates failed: unknown result", + ) def get_servers(self): """ @@ -1888,7 +2076,7 @@ def get_servers(self): return self.recv_get_servers() def send_get_servers(self): - self._oprot.writeMessageBegin('get_servers', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_servers", TMessageType.CALL, self._seqid) args = get_servers_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1907,7 +2095,9 @@ def recv_get_servers(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_servers failed: unknown result" + ) def get_servers_by_ids(self, server_ids): """ @@ -1922,7 +2112,9 @@ def get_servers_by_ids(self, server_ids): return self.recv_get_servers_by_ids() def send_get_servers_by_ids(self, server_ids): - self._oprot.writeMessageBegin('get_servers_by_ids', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_servers_by_ids", TMessageType.CALL, self._seqid + ) args = get_servers_by_ids_args() args.server_ids = server_ids args.write(self._oprot) @@ -1942,7 +2134,10 @@ def recv_get_servers_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_ids failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_servers_by_ids failed: unknown result", + ) def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -1957,7 +2152,9 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): return self.recv_get_servers_by_bibigrid_id() def send_get_servers_by_bibigrid_id(self, bibigrid_id): - self._oprot.writeMessageBegin('get_servers_by_bibigrid_id', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_servers_by_bibigrid_id", TMessageType.CALL, self._seqid + ) args = get_servers_by_bibigrid_id_args() args.bibigrid_id = bibigrid_id args.write(self._oprot) @@ -1977,9 +2174,14 @@ def recv_get_servers_by_bibigrid_id(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_bibigrid_id failed: unknown result") - - def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_servers_by_bibigrid_id failed: unknown result", + ) + + def scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): """ Parameters: - cluster_id @@ -1991,11 +2193,17 @@ def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, st - batch_idx """ - self.send_scale_up_cluster(cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx) + self.send_scale_up_cluster( + cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ) return self.recv_scale_up_cluster() - def send_scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): - self._oprot.writeMessageBegin('scale_up_cluster', TMessageType.CALL, self._seqid) + def send_scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): + self._oprot.writeMessageBegin( + "scale_up_cluster", TMessageType.CALL, self._seqid + ) args = scale_up_cluster_args() args.cluster_id = cluster_id args.image_name = image_name @@ -2021,9 +2229,23 @@ def recv_scale_up_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "scale_up_cluster failed: unknown result") - - def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "scale_up_cluster failed: unknown result", + ) + + def add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): """ Parameters: - cluster_id @@ -2037,11 +2259,34 @@ def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_ - worker_idx """ - self.send_add_cluster_machine(cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx) + self.send_add_cluster_machine( + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ) return self.recv_add_cluster_machine() - def send_add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): - self._oprot.writeMessageBegin('add_cluster_machine', TMessageType.CALL, self._seqid) + def send_add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): + self._oprot.writeMessageBegin( + "add_cluster_machine", TMessageType.CALL, self._seqid + ) args = add_cluster_machine_args() args.cluster_id = cluster_id args.cluster_user = cluster_user @@ -2069,7 +2314,10 @@ def recv_add_cluster_machine(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_cluster_machine failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_cluster_machine failed: unknown result", + ) def get_cluster_info(self, cluster_id): """ @@ -2081,7 +2329,9 @@ def get_cluster_info(self, cluster_id): return self.recv_get_cluster_info() def send_get_cluster_info(self, cluster_id): - self._oprot.writeMessageBegin('get_cluster_info', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_cluster_info", TMessageType.CALL, self._seqid + ) args = get_cluster_info_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2103,7 +2353,10 @@ def recv_get_cluster_info(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_info failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_cluster_info failed: unknown result", + ) def get_cluster_status(self, cluster_id): """ @@ -2115,7 +2368,9 @@ def get_cluster_status(self, cluster_id): return self.recv_get_cluster_status() def send_get_cluster_status(self, cluster_id): - self._oprot.writeMessageBegin('get_cluster_status', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_cluster_status", TMessageType.CALL, self._seqid + ) args = get_cluster_status_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2137,7 +2392,10 @@ def recv_get_cluster_status(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_status failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_cluster_status failed: unknown result", + ) def get_server(self, openstack_id): """ @@ -2152,7 +2410,7 @@ def get_server(self, openstack_id): return self.recv_get_server() def send_get_server(self, openstack_id): - self._oprot.writeMessageBegin('get_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_server", TMessageType.CALL, self._seqid) args = get_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2174,7 +2432,9 @@ def recv_get_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_server failed: unknown result" + ) def stop_server(self, openstack_id): """ @@ -2189,7 +2449,7 @@ def stop_server(self, openstack_id): self.recv_stop_server() def send_stop_server(self, openstack_id): - self._oprot.writeMessageBegin('stop_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("stop_server", TMessageType.CALL, self._seqid) args = stop_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2230,8 +2490,10 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): self.send_create_snapshot(openstack_id, name, username, base_tags, description) return self.recv_create_snapshot() - def send_create_snapshot(self, openstack_id, name, username, base_tags, description): - self._oprot.writeMessageBegin('create_snapshot', TMessageType.CALL, self._seqid) + def send_create_snapshot( + self, openstack_id, name, username, base_tags, description + ): + self._oprot.writeMessageBegin("create_snapshot", TMessageType.CALL, self._seqid) args = create_snapshot_args() args.openstack_id = openstack_id args.name = name @@ -2259,7 +2521,10 @@ def recv_create_snapshot(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_snapshot failed: unknown result", + ) def get_limits(self): """ @@ -2273,7 +2538,7 @@ def get_limits(self): return self.recv_get_limits() def send_get_limits(self): - self._oprot.writeMessageBegin('get_limits', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_limits", TMessageType.CALL, self._seqid) args = get_limits_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2292,7 +2557,9 @@ def recv_get_limits(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_limits failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_limits failed: unknown result" + ) def start_cluster(self, public_key, master_instance, worker_instances, user): """ @@ -2307,7 +2574,7 @@ def start_cluster(self, public_key, master_instance, worker_instances, user): return self.recv_start_cluster() def send_start_cluster(self, public_key, master_instance, worker_instances, user): - self._oprot.writeMessageBegin('start_cluster', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("start_cluster", TMessageType.CALL, self._seqid) args = start_cluster_args() args.public_key = public_key args.master_instance = master_instance @@ -2330,7 +2597,9 @@ def recv_start_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result" + ) def terminate_cluster(self, cluster_id): """ @@ -2342,7 +2611,9 @@ def terminate_cluster(self, cluster_id): return self.recv_terminate_cluster() def send_terminate_cluster(self, cluster_id): - self._oprot.writeMessageBegin('terminate_cluster', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "terminate_cluster", TMessageType.CALL, self._seqid + ) args = terminate_cluster_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2364,7 +2635,10 @@ def recv_terminate_cluster(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "terminate_cluster failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "terminate_cluster failed: unknown result", + ) def delete_image(self, image_id): """ @@ -2379,7 +2653,7 @@ def delete_image(self, image_id): self.recv_delete_image() def send_delete_image(self, image_id): - self._oprot.writeMessageBegin('delete_image', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("delete_image", TMessageType.CALL, self._seqid) args = delete_image_args() args.image_id = image_id args.write(self._oprot) @@ -2414,7 +2688,7 @@ def detach_volume(self, volume_id, server_id): self.recv_detach_volume() def send_detach_volume(self, volume_id, server_id): - self._oprot.writeMessageBegin('detach_volume', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("detach_volume", TMessageType.CALL, self._seqid) args = detach_volume_args() args.volume_id = volume_id args.server_id = server_id @@ -2453,7 +2727,7 @@ def delete_volume(self, volume_id): self.recv_delete_volume() def send_delete_volume(self, volume_id): - self._oprot.writeMessageBegin('delete_volume', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("delete_volume", TMessageType.CALL, self._seqid) args = delete_volume_args() args.volume_id = volume_id args.write(self._oprot) @@ -2491,7 +2765,9 @@ def attach_volume_to_server(self, openstack_id, volume_id): return self.recv_attach_volume_to_server() def send_attach_volume_to_server(self, openstack_id, volume_id): - self._oprot.writeMessageBegin('attach_volume_to_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "attach_volume_to_server", TMessageType.CALL, self._seqid + ) args = attach_volume_to_server_args() args.openstack_id = openstack_id args.volume_id = volume_id @@ -2516,7 +2792,10 @@ def recv_attach_volume_to_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "attach_volume_to_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "attach_volume_to_server failed: unknown result", + ) def resume_server(self, openstack_id): """ @@ -2530,7 +2809,7 @@ def resume_server(self, openstack_id): self.recv_resume_server() def send_resume_server(self, openstack_id): - self._oprot.writeMessageBegin('resume_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("resume_server", TMessageType.CALL, self._seqid) args = resume_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2568,7 +2847,7 @@ def create_volume(self, volume_name, volume_storage, metadata): return self.recv_create_volume() def send_create_volume(self, volume_name, volume_storage, metadata): - self._oprot.writeMessageBegin('create_volume', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("create_volume", TMessageType.CALL, self._seqid) args = create_volume_args() args.volume_name = volume_name args.volume_storage = volume_storage @@ -2594,7 +2873,9 @@ def recv_create_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "create_volume failed: unknown result" + ) def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -2606,11 +2887,17 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ - self.send_create_volume_by_source_volume(volume_name, metadata, source_volume_id) + self.send_create_volume_by_source_volume( + volume_name, metadata, source_volume_id + ) return self.recv_create_volume_by_source_volume() - def send_create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): - self._oprot.writeMessageBegin('create_volume_by_source_volume', TMessageType.CALL, self._seqid) + def send_create_volume_by_source_volume( + self, volume_name, metadata, source_volume_id + ): + self._oprot.writeMessageBegin( + "create_volume_by_source_volume", TMessageType.CALL, self._seqid + ) args = create_volume_by_source_volume_args() args.volume_name = volume_name args.metadata = metadata @@ -2636,7 +2923,10 @@ def recv_create_volume_by_source_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_source_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_by_source_volume failed: unknown result", + ) def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -2652,7 +2942,9 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): return self.recv_create_volume_by_volume_snap() def send_create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - self._oprot.writeMessageBegin('create_volume_by_volume_snap', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "create_volume_by_volume_snap", TMessageType.CALL, self._seqid + ) args = create_volume_by_volume_snap_args() args.volume_name = volume_name args.metadata = metadata @@ -2678,7 +2970,10 @@ def recv_create_volume_by_volume_snap(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_volume_snap failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_by_volume_snap failed: unknown result", + ) def create_volume_snapshot(self, volume_id, name, description): """ @@ -2695,7 +2990,9 @@ def create_volume_snapshot(self, volume_id, name, description): return self.recv_create_volume_snapshot() def send_create_volume_snapshot(self, volume_id, name, description): - self._oprot.writeMessageBegin('create_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "create_volume_snapshot", TMessageType.CALL, self._seqid + ) args = create_volume_snapshot_args() args.volume_id = volume_id args.name = name @@ -2721,7 +3018,10 @@ def recv_create_volume_snapshot(self): raise result.e if result.r is not None: raise result.r - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_snapshot failed: unknown result", + ) def get_volume_snapshot(self, name_or_id): """ @@ -2736,7 +3036,9 @@ def get_volume_snapshot(self, name_or_id): return self.recv_get_volume_snapshot() def send_get_volume_snapshot(self, name_or_id): - self._oprot.writeMessageBegin('get_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_volume_snapshot", TMessageType.CALL, self._seqid + ) args = get_volume_snapshot_args() args.name_or_id = name_or_id args.write(self._oprot) @@ -2758,7 +3060,10 @@ def recv_get_volume_snapshot(self): return result.success if result.r is not None: raise result.r - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_volume_snapshot failed: unknown result", + ) def delete_volume_snapshot(self, snapshot_id): """ @@ -2772,7 +3077,9 @@ def delete_volume_snapshot(self, snapshot_id): self.recv_delete_volume_snapshot() def send_delete_volume_snapshot(self, snapshot_id): - self._oprot.writeMessageBegin('delete_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_volume_snapshot", TMessageType.CALL, self._seqid + ) args = delete_volume_snapshot_args() args.snapshot_id = snapshot_id args.write(self._oprot) @@ -2808,7 +3115,9 @@ def reboot_hard_server(self, openstack_id): self.recv_reboot_hard_server() def send_reboot_hard_server(self, openstack_id): - self._oprot.writeMessageBegin('reboot_hard_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "reboot_hard_server", TMessageType.CALL, self._seqid + ) args = reboot_hard_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2844,7 +3153,9 @@ def reboot_soft_server(self, openstack_id): self.recv_reboot_soft_server() def send_reboot_soft_server(self, openstack_id): - self._oprot.writeMessageBegin('reboot_soft_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "reboot_soft_server", TMessageType.CALL, self._seqid + ) args = reboot_soft_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2876,10 +3187,14 @@ def __init__(self, handler): self._processMap["is_version"] = Processor.process_is_version self._processMap["get_client_version"] = Processor.process_get_client_version self._processMap["get_gateway_ip"] = Processor.process_get_gateway_ip - self._processMap["get_calculation_values"] = Processor.process_get_calculation_values + self._processMap[ + "get_calculation_values" + ] = Processor.process_get_calculation_values self._processMap["import_keypair"] = Processor.process_import_keypair self._processMap["get_vm_ports"] = Processor.process_get_vm_ports - self._processMap["add_udp_security_group"] = Processor.process_add_udp_security_group + self._processMap[ + "add_udp_security_group" + ] = Processor.process_add_udp_security_group self._processMap["get_flavors"] = Processor.process_get_flavors self._processMap["get_images"] = Processor.process_get_images self._processMap["get_public_images"] = Processor.process_get_public_images @@ -2890,27 +3205,47 @@ def __init__(self, handler): self._processMap["resize_volume"] = Processor.process_resize_volume self._processMap["delete_server"] = Processor.process_delete_server self._processMap["start_server"] = Processor.process_start_server - self._processMap["is_bibigrid_available"] = Processor.process_is_bibigrid_available - self._processMap["detach_ip_from_server"] = Processor.process_detach_ip_from_server - self._processMap["start_server_with_custom_key"] = Processor.process_start_server_with_custom_key + self._processMap[ + "is_bibigrid_available" + ] = Processor.process_is_bibigrid_available + self._processMap[ + "detach_ip_from_server" + ] = Processor.process_detach_ip_from_server + self._processMap[ + "start_server_with_custom_key" + ] = Processor.process_start_server_with_custom_key self._processMap["exist_server"] = Processor.process_exist_server - self._processMap["create_and_deploy_playbook"] = Processor.process_create_and_deploy_playbook + self._processMap[ + "create_and_deploy_playbook" + ] = Processor.process_create_and_deploy_playbook self._processMap["get_playbook_logs"] = Processor.process_get_playbook_logs self._processMap["has_forc"] = Processor.process_has_forc self._processMap["get_forc_url"] = Processor.process_get_forc_url self._processMap["create_backend"] = Processor.process_create_backend self._processMap["get_backends"] = Processor.process_get_backends - self._processMap["get_backends_by_owner"] = Processor.process_get_backends_by_owner - self._processMap["get_backends_by_template"] = Processor.process_get_backends_by_template + self._processMap[ + "get_backends_by_owner" + ] = Processor.process_get_backends_by_owner + self._processMap[ + "get_backends_by_template" + ] = Processor.process_get_backends_by_template self._processMap["get_backend_by_id"] = Processor.process_get_backend_by_id self._processMap["delete_backend"] = Processor.process_delete_backend self._processMap["add_user_to_backend"] = Processor.process_add_user_to_backend - self._processMap["get_users_from_backend"] = Processor.process_get_users_from_backend - self._processMap["delete_user_from_backend"] = Processor.process_delete_user_from_backend - self._processMap["get_allowed_templates"] = Processor.process_get_allowed_templates + self._processMap[ + "get_users_from_backend" + ] = Processor.process_get_users_from_backend + self._processMap[ + "delete_user_from_backend" + ] = Processor.process_delete_user_from_backend + self._processMap[ + "get_allowed_templates" + ] = Processor.process_get_allowed_templates self._processMap["get_servers"] = Processor.process_get_servers self._processMap["get_servers_by_ids"] = Processor.process_get_servers_by_ids - self._processMap["get_servers_by_bibigrid_id"] = Processor.process_get_servers_by_bibigrid_id + self._processMap[ + "get_servers_by_bibigrid_id" + ] = Processor.process_get_servers_by_bibigrid_id self._processMap["scale_up_cluster"] = Processor.process_scale_up_cluster self._processMap["add_cluster_machine"] = Processor.process_add_cluster_machine self._processMap["get_cluster_info"] = Processor.process_get_cluster_info @@ -2924,14 +3259,24 @@ def __init__(self, handler): self._processMap["delete_image"] = Processor.process_delete_image self._processMap["detach_volume"] = Processor.process_detach_volume self._processMap["delete_volume"] = Processor.process_delete_volume - self._processMap["attach_volume_to_server"] = Processor.process_attach_volume_to_server + self._processMap[ + "attach_volume_to_server" + ] = Processor.process_attach_volume_to_server self._processMap["resume_server"] = Processor.process_resume_server self._processMap["create_volume"] = Processor.process_create_volume - self._processMap["create_volume_by_source_volume"] = Processor.process_create_volume_by_source_volume - self._processMap["create_volume_by_volume_snap"] = Processor.process_create_volume_by_volume_snap - self._processMap["create_volume_snapshot"] = Processor.process_create_volume_snapshot + self._processMap[ + "create_volume_by_source_volume" + ] = Processor.process_create_volume_by_source_volume + self._processMap[ + "create_volume_by_volume_snap" + ] = Processor.process_create_volume_by_volume_snap + self._processMap[ + "create_volume_snapshot" + ] = Processor.process_create_volume_snapshot self._processMap["get_volume_snapshot"] = Processor.process_get_volume_snapshot - self._processMap["delete_volume_snapshot"] = Processor.process_delete_volume_snapshot + self._processMap[ + "delete_volume_snapshot" + ] = Processor.process_delete_volume_snapshot self._processMap["reboot_hard_server"] = Processor.process_reboot_hard_server self._processMap["reboot_soft_server"] = Processor.process_reboot_soft_server self._on_message_begin = None @@ -2946,7 +3291,9 @@ def process(self, iprot, oprot): if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + x = TApplicationException( + TApplicationException.UNKNOWN_METHOD, "Unknown function %s" % (name) + ) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() @@ -2967,13 +3314,15 @@ def process_is_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("is_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -2990,13 +3339,15 @@ def process_get_client_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_client_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3013,13 +3364,15 @@ def process_get_gateway_ip(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_gateway_ip", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3036,13 +3389,15 @@ def process_get_calculation_values(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_calculation_values", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3059,13 +3414,15 @@ def process_import_keypair(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("import_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3085,13 +3442,15 @@ def process_get_vm_ports(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_vm_ports", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3114,13 +3473,15 @@ def process_add_udp_security_group(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_udp_security_group", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3137,13 +3498,15 @@ def process_get_flavors(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_flavors", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3160,13 +3523,15 @@ def process_get_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3183,13 +3548,15 @@ def process_get_public_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_public_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3206,13 +3573,15 @@ def process_get_private_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_private_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3224,7 +3593,9 @@ def process_get_image(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_image_result() try: - result.success = self._handler.get_image(args.openstack_id, args.ignore_not_active) + result.success = self._handler.get_image( + args.openstack_id, args.ignore_not_active + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3232,13 +3603,15 @@ def process_get_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.i = i except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3258,13 +3631,15 @@ def process_get_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3281,13 +3656,15 @@ def process_get_volumes_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volumes_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3307,13 +3684,15 @@ def process_resize_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("resize_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3336,13 +3715,15 @@ def process_delete_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3354,7 +3735,17 @@ def process_start_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_result() try: - result.success = self._handler.start_server(args.flavor_name, args.image_name, args.public_key, args.servername, args.metadata, args.volume_ids_path_new, args.volume_ids_path_attach, args.additional_keys) + result.success = self._handler.start_server( + args.flavor_name, + args.image_name, + args.public_key, + args.servername, + args.metadata, + args.volume_ids_path_new, + args.volume_ids_path_attach, + args.additional_keys, + args.research_environment, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3374,13 +3765,15 @@ def process_start_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3397,13 +3790,15 @@ def process_is_bibigrid_available(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("is_bibigrid_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3423,13 +3818,15 @@ def process_detach_ip_from_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("detach_ip_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3441,7 +3838,15 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_with_custom_key_result() try: - result.success = self._handler.start_server_with_custom_key(args.flavor_name, args.image_name, args.servername, args.metadata, args.research_environment, args.volume_ids_path_new, args.volume_ids_path_attach) + result.success = self._handler.start_server_with_custom_key( + args.flavor_name, + args.image_name, + args.servername, + args.metadata, + args.research_environment, + args.volume_ids_path_new, + args.volume_ids_path_attach, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3461,13 +3866,15 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_server_with_custom_key", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3484,13 +3891,15 @@ def process_exist_server(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("exist_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3502,7 +3911,15 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_and_deploy_playbook_result() try: - result.success = self._handler.create_and_deploy_playbook(args.public_key, args.openstack_id, args.conda_packages, args.research_environment_template, args.apt_packages, args.create_only_backend, args.base_url) + result.success = self._handler.create_and_deploy_playbook( + args.public_key, + args.openstack_id, + args.conda_packages, + args.research_environment_template, + args.apt_packages, + args.create_only_backend, + args.base_url, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3510,13 +3927,15 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_and_deploy_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3536,13 +3955,15 @@ def process_get_playbook_logs(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.p = p except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_playbook_logs", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3559,13 +3980,15 @@ def process_has_forc(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("has_forc", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3582,13 +4005,15 @@ def process_get_forc_url(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_forc_url", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3600,7 +4025,9 @@ def process_create_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_backend_result() try: - result.success = self._handler.create_backend(args.owner, args.user_path, args.template, args.upstream_url) + result.success = self._handler.create_backend( + args.owner, args.user_path, args.template, args.upstream_url + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3611,13 +4038,15 @@ def process_create_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3637,13 +4066,15 @@ def process_get_backends(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3663,13 +4094,15 @@ def process_get_backends_by_owner(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends_by_owner", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3689,13 +4122,15 @@ def process_get_backends_by_template(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3718,13 +4153,15 @@ def process_get_backend_by_id(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backend_by_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3744,13 +4181,15 @@ def process_delete_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3762,7 +4201,9 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_user_to_backend_result() try: - result.success = self._handler.add_user_to_backend(args.backend_id, args.user_id) + result.success = self._handler.add_user_to_backend( + args.backend_id, args.user_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3770,13 +4211,15 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_user_to_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3796,13 +4239,15 @@ def process_get_users_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_users_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3814,7 +4259,9 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_user_from_backend_result() try: - result.success = self._handler.delete_user_from_backend(args.backend_id, args.user_id) + result.success = self._handler.delete_user_from_backend( + args.backend_id, args.user_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3822,13 +4269,15 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_user_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3845,13 +4294,15 @@ def process_get_allowed_templates(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_allowed_templates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3868,13 +4319,15 @@ def process_get_servers(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3891,13 +4344,15 @@ def process_get_servers_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3914,13 +4369,15 @@ def process_get_servers_by_bibigrid_id(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers_by_bibigrid_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3932,18 +4389,28 @@ def process_scale_up_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = scale_up_cluster_result() try: - result.success = self._handler.scale_up_cluster(args.cluster_id, args.image_name, args.flavor_name, args.count, args.names, args.start_idx, args.batch_idx) + result.success = self._handler.scale_up_cluster( + args.cluster_id, + args.image_name, + args.flavor_name, + args.count, + args.names, + args.start_idx, + args.batch_idx, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("scale_up_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3955,18 +4422,30 @@ def process_add_cluster_machine(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_cluster_machine_result() try: - result.success = self._handler.add_cluster_machine(args.cluster_id, args.cluster_user, args.cluster_group_id, args.image_name, args.flavor_name, args.name, args.key_name, args.batch_idx, args.worker_idx) + result.success = self._handler.add_cluster_machine( + args.cluster_id, + args.cluster_user, + args.cluster_group_id, + args.image_name, + args.flavor_name, + args.name, + args.key_name, + args.batch_idx, + args.worker_idx, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_cluster_machine", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3986,13 +4465,15 @@ def process_get_cluster_info(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_cluster_info", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4012,13 +4493,15 @@ def process_get_cluster_status(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_cluster_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4038,13 +4521,15 @@ def process_get_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4067,13 +4552,15 @@ def process_stop_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("stop_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4085,7 +4572,13 @@ def process_create_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_snapshot_result() try: - result.success = self._handler.create_snapshot(args.openstack_id, args.name, args.username, args.base_tags, args.description) + result.success = self._handler.create_snapshot( + args.openstack_id, + args.name, + args.username, + args.base_tags, + args.description, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4096,13 +4589,15 @@ def process_create_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4119,13 +4614,15 @@ def process_get_limits(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_limits", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4137,18 +4634,22 @@ def process_start_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_cluster_result() try: - result.success = self._handler.start_cluster(args.public_key, args.master_instance, args.worker_instances, args.user) + result.success = self._handler.start_cluster( + args.public_key, args.master_instance, args.worker_instances, args.user + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4168,13 +4669,15 @@ def process_terminate_cluster(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("terminate_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4194,13 +4697,15 @@ def process_delete_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4226,13 +4731,15 @@ def process_detach_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("detach_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4255,13 +4762,15 @@ def process_delete_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4273,7 +4782,9 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = attach_volume_to_server_result() try: - result.success = self._handler.attach_volume_to_server(args.openstack_id, args.volume_id) + result.success = self._handler.attach_volume_to_server( + args.openstack_id, args.volume_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4284,13 +4795,15 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("attach_volume_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4313,13 +4826,15 @@ def process_resume_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("resume_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4331,7 +4846,9 @@ def process_create_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_result() try: - result.success = self._handler.create_volume(args.volume_name, args.volume_storage, args.metadata) + result.success = self._handler.create_volume( + args.volume_name, args.volume_storage, args.metadata + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4342,13 +4859,15 @@ def process_create_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4360,7 +4879,9 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_source_volume_result() try: - result.success = self._handler.create_volume_by_source_volume(args.volume_name, args.metadata, args.source_volume_id) + result.success = self._handler.create_volume_by_source_volume( + args.volume_name, args.metadata, args.source_volume_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4371,13 +4892,15 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_by_source_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4389,7 +4912,9 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_volume_snap_result() try: - result.success = self._handler.create_volume_by_volume_snap(args.volume_name, args.metadata, args.volume_snap_id) + result.success = self._handler.create_volume_by_volume_snap( + args.volume_name, args.metadata, args.volume_snap_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4400,13 +4925,15 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_by_volume_snap", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4418,7 +4945,9 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_snapshot_result() try: - result.success = self._handler.create_volume_snapshot(args.volume_id, args.name, args.description) + result.success = self._handler.create_volume_snapshot( + args.volume_id, args.name, args.description + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4429,13 +4958,15 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4455,13 +4986,15 @@ def process_get_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4484,13 +5017,15 @@ def process_delete_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4513,13 +5048,15 @@ def process_reboot_hard_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("reboot_hard_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4542,18 +5079,21 @@ def process_reboot_soft_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("reboot_soft_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() + # HELPER FUNCTIONS AND STRUCTURES @@ -4564,12 +5104,18 @@ class is_version_args(object): """ - - def __init__(self, version=None,): + def __init__( + self, + version=None, + ): self.version = version def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -4589,11 +5135,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_version_args') + oprot.writeStructBegin("is_version_args") if self.version is not None: - oprot.writeFieldBegin('version', TType.DOUBLE, 1) + oprot.writeFieldBegin("version", TType.DOUBLE, 1) oprot.writeDouble(self.version) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4603,19 +5151,26 @@ 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)) + 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) + + all_structs.append(is_version_args) is_version_args.thrift_spec = ( None, # 0 - (1, TType.DOUBLE, 'version', None, None, ), # 1 + ( + 1, + TType.DOUBLE, + "version", + None, + None, + ), # 1 ) @@ -4626,12 +5181,18 @@ class is_version_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -4651,11 +5212,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_version_result') + oprot.writeStructBegin("is_version_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4665,26 +5228,35 @@ 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)) + 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) + + all_structs.append(is_version_result) is_version_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) class get_client_version_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -4699,9 +5271,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_client_version_args') + oprot.writeStructBegin("get_client_version_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -4709,18 +5283,18 @@ 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)) + 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) + + all_structs.append(get_client_version_args) -get_client_version_args.thrift_spec = ( -) +get_client_version_args.thrift_spec = () class get_client_version_result(object): @@ -4730,12 +5304,18 @@ class get_client_version_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -4745,7 +5325,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -4755,12 +5339,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_client_version_result') + oprot.writeStructBegin("get_client_version_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.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4769,26 +5359,35 @@ 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)) + 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) + + all_structs.append(get_client_version_result) get_client_version_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) class get_gateway_ip_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -4803,9 +5402,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_gateway_ip_args') + oprot.writeStructBegin("get_gateway_ip_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -4813,18 +5414,18 @@ 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)) + 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) + + all_structs.append(get_gateway_ip_args) -get_gateway_ip_args.thrift_spec = ( -) +get_gateway_ip_args.thrift_spec = () class get_gateway_ip_result(object): @@ -4834,12 +5435,18 @@ class get_gateway_ip_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -4852,8 +5459,16 @@ def read(self, iprot): self.success = {} (_ktype33, _vtype34, _size32) = iprot.readMapBegin() for _i36 in range(_size32): - _key37 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val38 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key37 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val38 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key37] = _val38 iprot.readMapEnd() else: @@ -4865,15 +5480,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_gateway_ip_result') + oprot.writeStructBegin("get_gateway_ip_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter39, viter40 in self.success.items(): - oprot.writeString(kiter39.encode('utf-8') if sys.version_info[0] == 2 else kiter39) - oprot.writeString(viter40.encode('utf-8') if sys.version_info[0] == 2 else viter40) + oprot.writeString( + kiter39.encode("utf-8") if sys.version_info[0] == 2 else kiter39 + ) + oprot.writeString( + viter40.encode("utf-8") if sys.version_info[0] == 2 else viter40 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4883,26 +5504,35 @@ 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)) + 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) + + all_structs.append(get_gateway_ip_result) get_gateway_ip_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) class get_calculation_values_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -4917,9 +5547,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_calculation_values_args') + oprot.writeStructBegin("get_calculation_values_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -4927,18 +5559,18 @@ 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)) + 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) + + all_structs.append(get_calculation_values_args) -get_calculation_values_args.thrift_spec = ( -) +get_calculation_values_args.thrift_spec = () class get_calculation_values_result(object): @@ -4948,12 +5580,18 @@ class get_calculation_values_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -4966,8 +5604,16 @@ def read(self, iprot): self.success = {} (_ktype42, _vtype43, _size41) = iprot.readMapBegin() for _i45 in range(_size41): - _key46 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val47 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key46 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val47 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key46] = _val47 iprot.readMapEnd() else: @@ -4979,15 +5625,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_calculation_values_result') + oprot.writeStructBegin("get_calculation_values_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter48, viter49 in self.success.items(): - oprot.writeString(kiter48.encode('utf-8') if sys.version_info[0] == 2 else kiter48) - oprot.writeString(viter49.encode('utf-8') if sys.version_info[0] == 2 else viter49) + oprot.writeString( + kiter48.encode("utf-8") if sys.version_info[0] == 2 else kiter48 + ) + oprot.writeString( + viter49.encode("utf-8") if sys.version_info[0] == 2 else viter49 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4997,18 +5649,25 @@ 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)) + 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) + + all_structs.append(get_calculation_values_result) get_calculation_values_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -5020,13 +5679,20 @@ class import_keypair_args(object): """ - - def __init__(self, keyname=None, public_key=None,): + def __init__( + self, + keyname=None, + public_key=None, + ): self.keyname = keyname self.public_key = public_key def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5036,12 +5702,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.keyname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.keyname = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5051,16 +5725,26 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('import_keypair_args') + oprot.writeStructBegin("import_keypair_args") if self.keyname is not None: - oprot.writeFieldBegin('keyname', TType.STRING, 1) - oprot.writeString(self.keyname.encode('utf-8') if sys.version_info[0] == 2 else self.keyname) + oprot.writeFieldBegin("keyname", TType.STRING, 1) + oprot.writeString( + self.keyname.encode("utf-8") + if sys.version_info[0] == 2 + else self.keyname + ) oprot.writeFieldEnd() if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 2) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 2) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5069,20 +5753,33 @@ 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)) + 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) + + all_structs.append(import_keypair_args) import_keypair_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'keyname', 'UTF8', None, ), # 1 - (2, TType.STRING, 'public_key', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "keyname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 2 ) @@ -5093,12 +5790,18 @@ class import_keypair_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5108,7 +5811,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5118,12 +5825,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('import_keypair_result') + oprot.writeStructBegin("import_keypair_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.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5132,18 +5845,25 @@ 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)) + 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) + + all_structs.append(import_keypair_result) import_keypair_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -5154,12 +5874,18 @@ class get_vm_ports_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5169,7 +5895,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5179,12 +5909,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_vm_ports_args') + oprot.writeStructBegin("get_vm_ports_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5193,19 +5929,26 @@ 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)) + 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) + + all_structs.append(get_vm_ports_args) get_vm_ports_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -5217,13 +5960,20 @@ class get_vm_ports_result(object): """ - - def __init__(self, success=None, s=None,): + def __init__( + self, + success=None, + s=None, + ): self.success = success self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5236,8 +5986,16 @@ def read(self, iprot): self.success = {} (_ktype51, _vtype52, _size50) = iprot.readMapBegin() for _i54 in range(_size50): - _key55 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val56 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key55 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val56 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key55] = _val56 iprot.readMapEnd() else: @@ -5254,19 +6012,25 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_vm_ports_result') + oprot.writeStructBegin("get_vm_ports_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter57, viter58 in self.success.items(): - oprot.writeString(kiter57.encode('utf-8') if sys.version_info[0] == 2 else kiter57) - oprot.writeString(viter58.encode('utf-8') if sys.version_info[0] == 2 else viter58) + oprot.writeString( + kiter57.encode("utf-8") if sys.version_info[0] == 2 else kiter57 + ) + oprot.writeString( + viter58.encode("utf-8") if sys.version_info[0] == 2 else viter58 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5276,19 +6040,32 @@ 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)) + 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) + + all_structs.append(get_vm_ports_result) get_vm_ports_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -5299,12 +6076,18 @@ class add_udp_security_group_args(object): """ - - def __init__(self, server_id=None,): + def __init__( + self, + server_id=None, + ): self.server_id = server_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5314,7 +6097,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5324,12 +6111,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_udp_security_group_args') + oprot.writeStructBegin("add_udp_security_group_args") if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 1) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 1) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5338,19 +6131,26 @@ 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)) + 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) + + all_structs.append(add_udp_security_group_args) add_udp_security_group_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 ) @@ -5362,13 +6162,20 @@ class add_udp_security_group_result(object): """ - - def __init__(self, r=None, s=None,): + def __init__( + self, + r=None, + s=None, + ): self.r = r self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5393,15 +6200,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_udp_security_group_result') + oprot.writeStructBegin("add_udp_security_group_result") if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 2) + oprot.writeFieldBegin("s", TType.STRUCT, 2) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5411,28 +6220,43 @@ 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)) + 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) + + all_structs.append(add_udp_security_group_result) add_udp_security_group_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 2 ) class get_flavors_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5447,9 +6271,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_flavors_args') + oprot.writeStructBegin("get_flavors_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5457,18 +6283,18 @@ 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)) + 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) + + all_structs.append(get_flavors_args) -get_flavors_args.thrift_spec = ( -) +get_flavors_args.thrift_spec = () class get_flavors_result(object): @@ -5478,12 +6304,18 @@ class get_flavors_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5509,11 +6341,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_flavors_result') + oprot.writeStructBegin("get_flavors_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter65 in self.success: iter65.write(oprot) @@ -5526,26 +6360,35 @@ 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)) + 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) + + all_structs.append(get_flavors_result) get_flavors_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Flavor, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Flavor, None], False), + None, + ), # 0 ) class get_images_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5560,9 +6403,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_images_args') + oprot.writeStructBegin("get_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5570,18 +6415,18 @@ 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)) + 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) + + all_structs.append(get_images_args) -get_images_args.thrift_spec = ( -) +get_images_args.thrift_spec = () class get_images_result(object): @@ -5591,12 +6436,18 @@ class get_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5622,11 +6473,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_images_result') + oprot.writeStructBegin("get_images_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter72 in self.success: iter72.write(oprot) @@ -5639,26 +6492,35 @@ 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)) + 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) + + all_structs.append(get_images_result) get_images_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Image, None], False), + None, + ), # 0 ) class get_public_images_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5673,9 +6535,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_public_images_args') + oprot.writeStructBegin("get_public_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5683,18 +6547,18 @@ 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)) + 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) + + all_structs.append(get_public_images_args) -get_public_images_args.thrift_spec = ( -) +get_public_images_args.thrift_spec = () class get_public_images_result(object): @@ -5704,12 +6568,18 @@ class get_public_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5735,11 +6605,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_public_images_result') + oprot.writeStructBegin("get_public_images_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter79 in self.success: iter79.write(oprot) @@ -5752,26 +6624,35 @@ 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)) + 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) + + all_structs.append(get_public_images_result) get_public_images_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Image, None], False), + None, + ), # 0 ) class get_private_images_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5786,9 +6667,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_private_images_args') + oprot.writeStructBegin("get_private_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5796,18 +6679,18 @@ 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)) + 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) + + all_structs.append(get_private_images_args) -get_private_images_args.thrift_spec = ( -) +get_private_images_args.thrift_spec = () class get_private_images_result(object): @@ -5817,12 +6700,18 @@ class get_private_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5848,11 +6737,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_private_images_result') + oprot.writeStructBegin("get_private_images_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter86 in self.success: iter86.write(oprot) @@ -5865,18 +6756,25 @@ 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)) + 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) + + all_structs.append(get_private_images_result) get_private_images_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Image, None], False), + None, + ), # 0 ) @@ -5888,13 +6786,20 @@ class get_image_args(object): """ - - def __init__(self, openstack_id=None, ignore_not_active=None,): + def __init__( + self, + openstack_id=None, + ignore_not_active=None, + ): self.openstack_id = openstack_id self.ignore_not_active = ignore_not_active def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5904,7 +6809,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -5919,15 +6828,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_image_args') + oprot.writeStructBegin("get_image_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.ignore_not_active is not None: - oprot.writeFieldBegin('ignore_not_active', TType.BOOL, 2) + oprot.writeFieldBegin("ignore_not_active", TType.BOOL, 2) oprot.writeBool(self.ignore_not_active) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5937,20 +6852,33 @@ 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)) + 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) + + all_structs.append(get_image_args) get_image_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.BOOL, 'ignore_not_active', None, None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.BOOL, + "ignore_not_active", + None, + None, + ), # 2 ) @@ -5962,13 +6890,20 @@ class get_image_result(object): """ - - def __init__(self, success=None, i=None,): + def __init__( + self, + success=None, + i=None, + ): self.success = success self.i = i def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -5994,15 +6929,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_image_result') + oprot.writeStructBegin("get_image_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 1) + oprot.writeFieldBegin("i", TType.STRUCT, 1) self.i.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6012,19 +6949,32 @@ 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)) + 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) + + all_structs.append(get_image_result) get_image_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Image, None], None, ), # 0 - (1, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Image, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "i", + [ImageNotFoundException, None], + None, + ), # 1 ) @@ -6035,12 +6985,18 @@ class get_volume_args(object): """ - - def __init__(self, volume_id=None,): + def __init__( + self, + volume_id=None, + ): self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6050,7 +7006,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -6060,12 +7020,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_args') + oprot.writeStructBegin("get_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6074,19 +7040,26 @@ 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)) + 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) + + all_structs.append(get_volume_args) get_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 ) @@ -6098,13 +7071,20 @@ class get_volume_result(object): """ - - def __init__(self, success=None, v=None,): + def __init__( + self, + success=None, + v=None, + ): self.success = success self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6130,15 +7110,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_result') + oprot.writeStructBegin("get_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 1) + oprot.writeFieldBegin("v", TType.STRUCT, 1) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6148,19 +7130,32 @@ 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)) + 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) + + all_structs.append(get_volume_result) get_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 1 ) @@ -6171,12 +7166,18 @@ class get_volumes_by_ids_args(object): """ - - def __init__(self, volume_ids=None,): + def __init__( + self, + volume_ids=None, + ): self.volume_ids = volume_ids def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6189,7 +7190,11 @@ def read(self, iprot): self.volume_ids = [] (_etype90, _size87) = iprot.readListBegin() for _i91 in range(_size87): - _elem92 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem92 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.volume_ids.append(_elem92) iprot.readListEnd() else: @@ -6201,14 +7206,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volumes_by_ids_args') + oprot.writeStructBegin("get_volumes_by_ids_args") if self.volume_ids is not None: - oprot.writeFieldBegin('volume_ids', TType.LIST, 1) + oprot.writeFieldBegin("volume_ids", TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.volume_ids)) for iter93 in self.volume_ids: - oprot.writeString(iter93.encode('utf-8') if sys.version_info[0] == 2 else iter93) + oprot.writeString( + iter93.encode("utf-8") if sys.version_info[0] == 2 else iter93 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6218,19 +7227,26 @@ 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)) + 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) + + all_structs.append(get_volumes_by_ids_args) get_volumes_by_ids_args.thrift_spec = ( None, # 0 - (1, TType.LIST, 'volume_ids', (TType.STRING, 'UTF8', False), None, ), # 1 + ( + 1, + TType.LIST, + "volume_ids", + (TType.STRING, "UTF8", False), + None, + ), # 1 ) @@ -6241,12 +7257,18 @@ class get_volumes_by_ids_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6272,11 +7294,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volumes_by_ids_result') + oprot.writeStructBegin("get_volumes_by_ids_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter100 in self.success: iter100.write(oprot) @@ -6289,18 +7313,25 @@ 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)) + 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) + + all_structs.append(get_volumes_by_ids_result) get_volumes_by_ids_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Volume, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Volume, None], False), + None, + ), # 0 ) @@ -6312,13 +7343,20 @@ class resize_volume_args(object): """ - - def __init__(self, volume_id=None, size=None,): + def __init__( + self, + volume_id=None, + size=None, + ): self.volume_id = volume_id self.size = size def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6328,7 +7366,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -6343,15 +7385,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resize_volume_args') + oprot.writeStructBegin("resize_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin('size', TType.I32, 2) + oprot.writeFieldBegin("size", TType.I32, 2) oprot.writeI32(self.size) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6361,20 +7409,33 @@ 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)) + 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) + + all_structs.append(resize_volume_args) resize_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.I32, 'size', None, None, ), # 2 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "size", + None, + None, + ), # 2 ) @@ -6385,12 +7446,18 @@ class resize_volume_result(object): """ - - def __init__(self, v=None,): + def __init__( + self, + v=None, + ): self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6410,11 +7477,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resize_volume_result') + oprot.writeStructBegin("resize_volume_result") if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 1) + oprot.writeFieldBegin("v", TType.STRUCT, 1) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6424,19 +7493,26 @@ 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)) + 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) + + all_structs.append(resize_volume_result) resize_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 1 ) @@ -6447,12 +7523,18 @@ class delete_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6462,7 +7544,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -6472,12 +7558,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_server_args') + oprot.writeStructBegin("delete_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6486,19 +7578,26 @@ 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)) + 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) + + all_structs.append(delete_server_args) delete_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -6510,13 +7609,20 @@ class delete_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6541,15 +7647,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_server_result') + oprot.writeStructBegin("delete_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6559,20 +7667,33 @@ 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)) + 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) + + all_structs.append(delete_server_result) delete_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -6587,11 +7708,22 @@ class start_server_args(object): - volume_ids_path_new - volume_ids_path_attach - additional_keys + - research_environment """ - - def __init__(self, flavor_name=None, image_name=None, public_key=None, servername=None, metadata=None, volume_ids_path_new=None, volume_ids_path_attach=None, additional_keys=None,): + def __init__( + self, + flavor_name=None, + image_name=None, + public_key=None, + servername=None, + metadata=None, + volume_ids_path_new=None, + volume_ids_path_attach=None, + additional_keys=None, + research_environment=None, + ): self.flavor_name = flavor_name self.image_name = image_name self.public_key = public_key @@ -6600,9 +7732,14 @@ def __init__(self, flavor_name=None, image_name=None, public_key=None, servernam self.volume_ids_path_new = volume_ids_path_new self.volume_ids_path_attach = volume_ids_path_attach self.additional_keys = additional_keys + self.research_environment = research_environment def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6612,22 +7749,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: @@ -6635,8 +7788,16 @@ def read(self, iprot): self.metadata = {} (_ktype102, _vtype103, _size101) = iprot.readMapBegin() for _i105 in range(_size101): - _key106 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val107 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key106 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val107 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key106] = _val107 iprot.readMapEnd() else: @@ -6649,8 +7810,16 @@ def read(self, iprot): _elem113 = {} (_ktype115, _vtype116, _size114) = iprot.readMapBegin() for _i118 in range(_size114): - _key119 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val120 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key119 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val120 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem113[_key119] = _val120 iprot.readMapEnd() self.volume_ids_path_new.append(_elem113) @@ -6665,8 +7834,16 @@ def read(self, iprot): _elem126 = {} (_ktype128, _vtype129, _size127) = iprot.readMapBegin() for _i131 in range(_size127): - _key132 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val133 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key132 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val133 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem126[_key132] = _val133 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem126) @@ -6678,11 +7855,24 @@ def read(self, iprot): self.additional_keys = [] (_etype137, _size134) = iprot.readListBegin() for _i138 in range(_size134): - _elem139 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem139 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.additional_keys.append(_elem139) iprot.readListEnd() else: iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.research_environment = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -6690,62 +7880,110 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_server_args') + oprot.writeStructBegin("start_server_args") if self.flavor_name is not None: - oprot.writeFieldBegin('flavor_name', TType.STRING, 1) - oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) + oprot.writeFieldBegin("flavor_name", TType.STRING, 1) + oprot.writeString( + self.flavor_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.flavor_name + ) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin('image_name', TType.STRING, 2) - oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) + oprot.writeFieldBegin("image_name", TType.STRING, 2) + oprot.writeString( + self.image_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_name + ) oprot.writeFieldEnd() if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 3) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 3) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() if self.servername is not None: - oprot.writeFieldBegin('servername', TType.STRING, 4) - oprot.writeString(self.servername.encode('utf-8') if sys.version_info[0] == 2 else self.servername) + oprot.writeFieldBegin("servername", TType.STRING, 4) + oprot.writeString( + self.servername.encode("utf-8") + if sys.version_info[0] == 2 + else self.servername + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 5) + oprot.writeFieldBegin("metadata", TType.MAP, 5) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter140, viter141 in self.metadata.items(): - oprot.writeString(kiter140.encode('utf-8') if sys.version_info[0] == 2 else kiter140) - oprot.writeString(viter141.encode('utf-8') if sys.version_info[0] == 2 else viter141) + oprot.writeString( + kiter140.encode("utf-8") if sys.version_info[0] == 2 else kiter140 + ) + oprot.writeString( + viter141.encode("utf-8") if sys.version_info[0] == 2 else viter141 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 7) + oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 7) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter142 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter142)) for kiter143, viter144 in iter142.items(): - oprot.writeString(kiter143.encode('utf-8') if sys.version_info[0] == 2 else kiter143) - oprot.writeString(viter144.encode('utf-8') if sys.version_info[0] == 2 else viter144) + oprot.writeString( + kiter143.encode("utf-8") + if sys.version_info[0] == 2 + else kiter143 + ) + oprot.writeString( + viter144.encode("utf-8") + if sys.version_info[0] == 2 + else viter144 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 8) + oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 8) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter145 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter145)) for kiter146, viter147 in iter145.items(): - oprot.writeString(kiter146.encode('utf-8') if sys.version_info[0] == 2 else kiter146) - oprot.writeString(viter147.encode('utf-8') if sys.version_info[0] == 2 else viter147) + oprot.writeString( + kiter146.encode("utf-8") + if sys.version_info[0] == 2 + else kiter146 + ) + oprot.writeString( + viter147.encode("utf-8") + if sys.version_info[0] == 2 + else viter147 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.additional_keys is not None: - oprot.writeFieldBegin('additional_keys', TType.LIST, 9) + oprot.writeFieldBegin("additional_keys", TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.additional_keys)) for iter148 in self.additional_keys: - oprot.writeString(iter148.encode('utf-8') if sys.version_info[0] == 2 else iter148) + oprot.writeString( + iter148.encode("utf-8") if sys.version_info[0] == 2 else iter148 + ) oprot.writeListEnd() oprot.writeFieldEnd() + if self.research_environment is not None: + oprot.writeFieldBegin("research_environment", TType.STRING, 10) + oprot.writeString( + self.research_environment.encode("utf-8") + if sys.version_info[0] == 2 + else self.research_environment + ) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6753,27 +7991,83 @@ 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)) + 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) + + all_structs.append(start_server_args) start_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'flavor_name', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'public_key', 'UTF8', None, ), # 3 - (4, TType.STRING, 'servername', 'UTF8', None, ), # 4 - (5, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 5 + ( + 1, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "servername", + "UTF8", + None, + ), # 4 + ( + 5, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 5 None, # 6 - (7, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 7 - (8, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 8 - (9, TType.LIST, 'additional_keys', (TType.STRING, 'UTF8', False), None, ), # 9 + ( + 7, + TType.LIST, + "volume_ids_path_new", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 7 + ( + 8, + TType.LIST, + "volume_ids_path_attach", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 8 + ( + 9, + TType.LIST, + "additional_keys", + (TType.STRING, "UTF8", False), + None, + ), # 9 + ( + 10, + TType.STRING, + "research_environment", + "UTF8", + None, + ), # 10 ) @@ -6789,8 +8083,15 @@ class start_server_result(object): """ - - def __init__(self, success=None, e=None, r=None, i=None, f=None, o=None,): + def __init__( + self, + success=None, + e=None, + r=None, + i=None, + f=None, + o=None, + ): self.success = success self.e = e self.r = r @@ -6799,7 +8100,11 @@ def __init__(self, success=None, e=None, r=None, i=None, f=None, o=None,): self.o = o def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6809,7 +8114,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -6844,31 +8153,37 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_server_result') + oprot.writeStructBegin("start_server_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.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.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 5) + oprot.writeFieldBegin("i", TType.STRUCT, 5) self.i.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 6) + oprot.writeFieldBegin("f", TType.STRUCT, 6) self.f.write(oprot) oprot.writeFieldEnd() if self.o is not None: - oprot.writeFieldBegin('o', TType.STRUCT, 7) + oprot.writeFieldBegin("o", TType.STRUCT, 7) self.o.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6878,33 +8193,72 @@ 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)) + 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) + + all_structs.append(start_server_result) start_server_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [NameAlreadyUsedException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ResourceNotAvailableException, None], + None, + ), # 2 None, # 3 None, # 4 - (5, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 5 - (6, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 6 - (7, TType.STRUCT, 'o', [DefaultException, None], None, ), # 7 + ( + 5, + TType.STRUCT, + "i", + [ImageNotFoundException, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "f", + [FlavorNotFoundException, None], + None, + ), # 6 + ( + 7, + TType.STRUCT, + "o", + [DefaultException, None], + None, + ), # 7 ) class is_bibigrid_available_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6919,9 +8273,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_bibigrid_available_args') + oprot.writeStructBegin("is_bibigrid_available_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -6929,18 +8285,18 @@ 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)) + 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) + + all_structs.append(is_bibigrid_available_args) -is_bibigrid_available_args.thrift_spec = ( -) +is_bibigrid_available_args.thrift_spec = () class is_bibigrid_available_result(object): @@ -6950,12 +8306,18 @@ class is_bibigrid_available_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -6975,11 +8337,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_bibigrid_available_result') + oprot.writeStructBegin("is_bibigrid_available_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6989,18 +8353,25 @@ 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)) + 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) + + all_structs.append(is_bibigrid_available_result) is_bibigrid_available_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) @@ -7012,13 +8383,20 @@ class detach_ip_from_server_args(object): """ - - def __init__(self, server_id=None, floating_ip=None,): + def __init__( + self, + server_id=None, + floating_ip=None, + ): self.server_id = server_id self.floating_ip = floating_ip def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7028,12 +8406,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.floating_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.floating_ip = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7043,16 +8429,26 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_ip_from_server_args') + oprot.writeStructBegin("detach_ip_from_server_args") if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 1) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 1) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() if self.floating_ip is not None: - oprot.writeFieldBegin('floating_ip', TType.STRING, 2) - oprot.writeString(self.floating_ip.encode('utf-8') if sys.version_info[0] == 2 else self.floating_ip) + oprot.writeFieldBegin("floating_ip", TType.STRING, 2) + oprot.writeString( + self.floating_ip.encode("utf-8") + if sys.version_info[0] == 2 + else self.floating_ip + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7061,20 +8457,33 @@ 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)) + 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) + + all_structs.append(detach_ip_from_server_args) detach_ip_from_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'floating_ip', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "floating_ip", + "UTF8", + None, + ), # 2 ) @@ -7085,12 +8494,18 @@ class detach_ip_from_server_result(object): """ - - def __init__(self, s=None,): + def __init__( + self, + s=None, + ): self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7110,11 +8525,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_ip_from_server_result') + oprot.writeStructBegin("detach_ip_from_server_result") if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7124,19 +8541,26 @@ 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)) + 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) + + all_structs.append(detach_ip_from_server_result) detach_ip_from_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -7153,8 +8577,16 @@ class start_server_with_custom_key_args(object): """ - - def __init__(self, flavor_name=None, image_name=None, servername=None, metadata=None, research_environment=None, volume_ids_path_new=None, volume_ids_path_attach=None,): + def __init__( + self, + flavor_name=None, + image_name=None, + servername=None, + metadata=None, + research_environment=None, + volume_ids_path_new=None, + volume_ids_path_attach=None, + ): self.flavor_name = flavor_name self.image_name = image_name self.servername = servername @@ -7164,7 +8596,11 @@ def __init__(self, flavor_name=None, image_name=None, servername=None, metadata= self.volume_ids_path_attach = volume_ids_path_attach def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7174,17 +8610,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -7192,15 +8640,27 @@ def read(self, iprot): self.metadata = {} (_ktype150, _vtype151, _size149) = iprot.readMapBegin() for _i153 in range(_size149): - _key154 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val155 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key154 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val155 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key154] = _val155 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.research_environment = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.research_environment = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: @@ -7211,8 +8671,16 @@ def read(self, iprot): _elem161 = {} (_ktype163, _vtype164, _size162) = iprot.readMapBegin() for _i166 in range(_size162): - _key167 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val168 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key167 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val168 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem161[_key167] = _val168 iprot.readMapEnd() self.volume_ids_path_new.append(_elem161) @@ -7227,8 +8695,16 @@ def read(self, iprot): _elem174 = {} (_ktype176, _vtype177, _size175) = iprot.readMapBegin() for _i179 in range(_size175): - _key180 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val181 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key180 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val181 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem174[_key180] = _val181 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem174) @@ -7242,52 +8718,90 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_server_with_custom_key_args') + oprot.writeStructBegin("start_server_with_custom_key_args") if self.flavor_name is not None: - oprot.writeFieldBegin('flavor_name', TType.STRING, 1) - oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) + oprot.writeFieldBegin("flavor_name", TType.STRING, 1) + oprot.writeString( + self.flavor_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.flavor_name + ) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin('image_name', TType.STRING, 2) - oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) + oprot.writeFieldBegin("image_name", TType.STRING, 2) + oprot.writeString( + self.image_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_name + ) oprot.writeFieldEnd() if self.servername is not None: - oprot.writeFieldBegin('servername', TType.STRING, 3) - oprot.writeString(self.servername.encode('utf-8') if sys.version_info[0] == 2 else self.servername) + oprot.writeFieldBegin("servername", TType.STRING, 3) + oprot.writeString( + self.servername.encode("utf-8") + if sys.version_info[0] == 2 + else self.servername + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 4) + oprot.writeFieldBegin("metadata", TType.MAP, 4) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter182, viter183 in self.metadata.items(): - oprot.writeString(kiter182.encode('utf-8') if sys.version_info[0] == 2 else kiter182) - oprot.writeString(viter183.encode('utf-8') if sys.version_info[0] == 2 else viter183) + oprot.writeString( + kiter182.encode("utf-8") if sys.version_info[0] == 2 else kiter182 + ) + oprot.writeString( + viter183.encode("utf-8") if sys.version_info[0] == 2 else viter183 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.research_environment is not None: - oprot.writeFieldBegin('research_environment', TType.STRING, 5) - oprot.writeString(self.research_environment.encode('utf-8') if sys.version_info[0] == 2 else self.research_environment) + oprot.writeFieldBegin("research_environment", TType.STRING, 5) + oprot.writeString( + self.research_environment.encode("utf-8") + if sys.version_info[0] == 2 + else self.research_environment + ) oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 7) + oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 7) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter184 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter184)) for kiter185, viter186 in iter184.items(): - oprot.writeString(kiter185.encode('utf-8') if sys.version_info[0] == 2 else kiter185) - oprot.writeString(viter186.encode('utf-8') if sys.version_info[0] == 2 else viter186) + oprot.writeString( + kiter185.encode("utf-8") + if sys.version_info[0] == 2 + else kiter185 + ) + oprot.writeString( + viter186.encode("utf-8") + if sys.version_info[0] == 2 + else viter186 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 8) + oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 8) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter187 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter187)) for kiter188, viter189 in iter187.items(): - oprot.writeString(kiter188.encode('utf-8') if sys.version_info[0] == 2 else kiter188) - oprot.writeString(viter189.encode('utf-8') if sys.version_info[0] == 2 else viter189) + oprot.writeString( + kiter188.encode("utf-8") + if sys.version_info[0] == 2 + else kiter188 + ) + oprot.writeString( + viter189.encode("utf-8") + if sys.version_info[0] == 2 + else viter189 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -7298,26 +8812,69 @@ 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)) + 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) + + all_structs.append(start_server_with_custom_key_args) start_server_with_custom_key_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'flavor_name', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'servername', 'UTF8', None, ), # 3 - (4, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 - (5, TType.STRING, 'research_environment', 'UTF8', None, ), # 5 + ( + 1, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "servername", + "UTF8", + None, + ), # 3 + ( + 4, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "research_environment", + "UTF8", + None, + ), # 5 None, # 6 - (7, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 7 - (8, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 8 + ( + 7, + TType.LIST, + "volume_ids_path_new", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 7 + ( + 8, + TType.LIST, + "volume_ids_path_attach", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 8 ) @@ -7333,8 +8890,15 @@ class start_server_with_custom_key_result(object): """ - - def __init__(self, success=None, e=None, r=None, i=None, f=None, d=None,): + def __init__( + self, + success=None, + e=None, + r=None, + i=None, + f=None, + d=None, + ): self.success = success self.e = e self.r = r @@ -7343,7 +8907,11 @@ def __init__(self, success=None, e=None, r=None, i=None, f=None, d=None,): self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7353,7 +8921,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -7388,31 +8960,37 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_server_with_custom_key_result') + oprot.writeStructBegin("start_server_with_custom_key_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.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.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 3) + oprot.writeFieldBegin("i", TType.STRUCT, 3) self.i.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 4) + oprot.writeFieldBegin("f", TType.STRUCT, 4) self.f.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 5) + oprot.writeFieldBegin("d", TType.STRUCT, 5) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7422,23 +9000,60 @@ 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)) + 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) + + all_structs.append(start_server_with_custom_key_result) start_server_with_custom_key_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 - (3, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 3 - (4, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 4 - (5, TType.STRUCT, 'd', [DefaultException, None], None, ), # 5 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [NameAlreadyUsedException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ResourceNotAvailableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "i", + [ImageNotFoundException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "f", + [FlavorNotFoundException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 5 ) @@ -7449,12 +9064,18 @@ class exist_server_args(object): """ - - def __init__(self, name=None,): + def __init__( + self, + name=None, + ): self.name = name def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7464,7 +9085,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7474,12 +9099,16 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('exist_server_args') + oprot.writeStructBegin("exist_server_args") if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7488,19 +9117,26 @@ 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)) + 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) + + all_structs.append(exist_server_args) exist_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 ) @@ -7511,12 +9147,18 @@ class exist_server_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7536,11 +9178,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('exist_server_result') + oprot.writeStructBegin("exist_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7550,18 +9194,25 @@ 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)) + 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) + + all_structs.append(exist_server_result) exist_server_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) @@ -7578,8 +9229,16 @@ class create_and_deploy_playbook_args(object): """ - - def __init__(self, public_key=None, openstack_id=None, conda_packages=None, research_environment_template=None, apt_packages=None, create_only_backend=None, base_url=None,): + def __init__( + self, + public_key=None, + openstack_id=None, + conda_packages=None, + research_environment_template=None, + apt_packages=None, + create_only_backend=None, + base_url=None, + ): self.public_key = public_key self.openstack_id = openstack_id self.conda_packages = conda_packages @@ -7589,7 +9248,11 @@ def __init__(self, public_key=None, openstack_id=None, conda_packages=None, rese self.base_url = base_url def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7599,12 +9262,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: @@ -7620,7 +9291,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.research_environment_template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.research_environment_template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: @@ -7628,7 +9303,11 @@ def read(self, iprot): self.apt_packages = [] (_etype199, _size196) = iprot.readListBegin() for _i200 in range(_size196): - _elem201 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem201 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.apt_packages.append(_elem201) iprot.readListEnd() else: @@ -7640,7 +9319,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.base_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.base_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7650,42 +9333,62 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_and_deploy_playbook_args') + oprot.writeStructBegin("create_and_deploy_playbook_args") if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 1) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 1) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 2) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 2) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.conda_packages is not None: - oprot.writeFieldBegin('conda_packages', TType.LIST, 3) + oprot.writeFieldBegin("conda_packages", TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.conda_packages)) for iter202 in self.conda_packages: iter202.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.research_environment_template is not None: - oprot.writeFieldBegin('research_environment_template', TType.STRING, 4) - oprot.writeString(self.research_environment_template.encode('utf-8') if sys.version_info[0] == 2 else self.research_environment_template) + oprot.writeFieldBegin("research_environment_template", TType.STRING, 4) + oprot.writeString( + self.research_environment_template.encode("utf-8") + if sys.version_info[0] == 2 + else self.research_environment_template + ) oprot.writeFieldEnd() if self.apt_packages is not None: - oprot.writeFieldBegin('apt_packages', TType.LIST, 5) + oprot.writeFieldBegin("apt_packages", TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.apt_packages)) for iter203 in self.apt_packages: - oprot.writeString(iter203.encode('utf-8') if sys.version_info[0] == 2 else iter203) + oprot.writeString( + iter203.encode("utf-8") if sys.version_info[0] == 2 else iter203 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.create_only_backend is not None: - oprot.writeFieldBegin('create_only_backend', TType.BOOL, 6) + oprot.writeFieldBegin("create_only_backend", TType.BOOL, 6) oprot.writeBool(self.create_only_backend) oprot.writeFieldEnd() if self.base_url is not None: - oprot.writeFieldBegin('base_url', TType.STRING, 7) - oprot.writeString(self.base_url.encode('utf-8') if sys.version_info[0] == 2 else self.base_url) + oprot.writeFieldBegin("base_url", TType.STRING, 7) + oprot.writeString( + self.base_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.base_url + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7694,25 +9397,68 @@ 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)) + 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) + + all_structs.append(create_and_deploy_playbook_args) create_and_deploy_playbook_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 - (2, TType.STRING, 'openstack_id', 'UTF8', None, ), # 2 - (3, TType.LIST, 'conda_packages', (TType.STRUCT, [CondaPackage, None], False), None, ), # 3 - (4, TType.STRING, 'research_environment_template', 'UTF8', None, ), # 4 - (5, TType.LIST, 'apt_packages', (TType.STRING, 'UTF8', False), None, ), # 5 - (6, TType.BOOL, 'create_only_backend', None, None, ), # 6 - (7, TType.STRING, 'base_url', 'UTF8', None, ), # 7 + ( + 1, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "conda_packages", + (TType.STRUCT, [CondaPackage, None], False), + None, + ), # 3 + ( + 4, + TType.STRING, + "research_environment_template", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "apt_packages", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.BOOL, + "create_only_backend", + None, + None, + ), # 6 + ( + 7, + TType.STRING, + "base_url", + "UTF8", + None, + ), # 7 ) @@ -7724,13 +9470,20 @@ class create_and_deploy_playbook_result(object): """ - - def __init__(self, success=None, s=None,): + def __init__( + self, + success=None, + s=None, + ): self.success = success self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7755,15 +9508,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_and_deploy_playbook_result') + oprot.writeStructBegin("create_and_deploy_playbook_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeFieldBegin("success", TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7773,19 +9528,32 @@ 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)) + 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) + + all_structs.append(create_and_deploy_playbook_result) create_and_deploy_playbook_result.thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -7796,12 +9564,18 @@ class get_playbook_logs_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7811,7 +9585,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7821,12 +9599,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_playbook_logs_args') + oprot.writeStructBegin("get_playbook_logs_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7835,19 +9619,26 @@ 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)) + 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) + + all_structs.append(get_playbook_logs_args) get_playbook_logs_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -7859,13 +9650,20 @@ class get_playbook_logs_result(object): """ - - def __init__(self, success=None, p=None,): + def __init__( + self, + success=None, + p=None, + ): self.success = success self.p = p def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7891,15 +9689,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_playbook_logs_result') + oprot.writeStructBegin("get_playbook_logs_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.p is not None: - oprot.writeFieldBegin('p', TType.STRUCT, 1) + oprot.writeFieldBegin("p", TType.STRUCT, 1) self.p.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7909,27 +9709,42 @@ 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)) + 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) + + all_structs.append(get_playbook_logs_result) get_playbook_logs_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [PlaybookResult, None], None, ), # 0 - (1, TType.STRUCT, 'p', [PlaybookNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [PlaybookResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "p", + [PlaybookNotFoundException, None], + None, + ), # 1 ) class has_forc_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -7944,9 +9759,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('has_forc_args') + oprot.writeStructBegin("has_forc_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -7954,18 +9771,18 @@ 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)) + 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) + + all_structs.append(has_forc_args) -has_forc_args.thrift_spec = ( -) +has_forc_args.thrift_spec = () class has_forc_result(object): @@ -7975,12 +9792,18 @@ class has_forc_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8000,11 +9823,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('has_forc_result') + oprot.writeStructBegin("has_forc_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8014,26 +9839,35 @@ 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)) + 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) + + all_structs.append(has_forc_result) has_forc_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) class get_forc_url_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8048,9 +9882,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_forc_url_args') + oprot.writeStructBegin("get_forc_url_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -8058,18 +9894,18 @@ 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)) + 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) + + all_structs.append(get_forc_url_args) -get_forc_url_args.thrift_spec = ( -) +get_forc_url_args.thrift_spec = () class get_forc_url_result(object): @@ -8079,12 +9915,18 @@ class get_forc_url_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8094,7 +9936,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8104,12 +9950,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_forc_url_result') + oprot.writeStructBegin("get_forc_url_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.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8118,18 +9970,25 @@ 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)) + 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) + + all_structs.append(get_forc_url_result) get_forc_url_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -8143,15 +10002,24 @@ class create_backend_args(object): """ - - def __init__(self, owner=None, user_path=None, template=None, upstream_url=None,): + def __init__( + self, + owner=None, + user_path=None, + template=None, + upstream_url=None, + ): self.owner = owner self.user_path = user_path self.template = template self.upstream_url = upstream_url def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8161,22 +10029,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.owner = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_path = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_path = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.upstream_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.upstream_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8186,24 +10070,40 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_backend_args') + oprot.writeStructBegin("create_backend_args") if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 1) - oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) + oprot.writeFieldBegin("owner", TType.STRING, 1) + oprot.writeString( + self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner + ) oprot.writeFieldEnd() if self.user_path is not None: - oprot.writeFieldBegin('user_path', TType.STRING, 2) - oprot.writeString(self.user_path.encode('utf-8') if sys.version_info[0] == 2 else self.user_path) + oprot.writeFieldBegin("user_path", TType.STRING, 2) + oprot.writeString( + self.user_path.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_path + ) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin('template', TType.STRING, 3) - oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) + oprot.writeFieldBegin("template", TType.STRING, 3) + oprot.writeString( + self.template.encode("utf-8") + if sys.version_info[0] == 2 + else self.template + ) oprot.writeFieldEnd() if self.upstream_url is not None: - oprot.writeFieldBegin('upstream_url', TType.STRING, 4) - oprot.writeString(self.upstream_url.encode('utf-8') if sys.version_info[0] == 2 else self.upstream_url) + oprot.writeFieldBegin("upstream_url", TType.STRING, 4) + oprot.writeString( + self.upstream_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.upstream_url + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8212,22 +10112,47 @@ 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)) + 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) + + all_structs.append(create_backend_args) create_backend_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 - (2, TType.STRING, 'user_path', 'UTF8', None, ), # 2 - (3, TType.STRING, 'template', 'UTF8', None, ), # 3 - (4, TType.STRING, 'upstream_url', 'UTF8', None, ), # 4 + ( + 1, + TType.STRING, + "owner", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "user_path", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "template", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "upstream_url", + "UTF8", + None, + ), # 4 ) @@ -8240,14 +10165,22 @@ class create_backend_result(object): """ - - def __init__(self, success=None, e=None, d=None,): + def __init__( + self, + success=None, + e=None, + d=None, + ): self.success = success self.e = e self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8278,19 +10211,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_backend_result') + oprot.writeStructBegin("create_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 2) + oprot.writeFieldBegin("d", TType.STRUCT, 2) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8300,28 +10235,49 @@ 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)) + 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) + + all_structs.append(create_backend_result) create_backend_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 - (1, TType.STRUCT, 'e', [TemplateNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'd', [DefaultException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Backend, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [TemplateNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 2 ) class get_backends_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8336,9 +10292,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_args') + oprot.writeStructBegin("get_backends_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -8346,18 +10304,18 @@ 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)) + 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) + + all_structs.append(get_backends_args) -get_backends_args.thrift_spec = ( -) +get_backends_args.thrift_spec = () class get_backends_result(object): @@ -8368,13 +10326,20 @@ class get_backends_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8405,18 +10370,20 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_result') + oprot.writeStructBegin("get_backends_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter210 in self.success: iter210.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 1) + oprot.writeFieldBegin("d", TType.STRUCT, 1) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8426,19 +10393,32 @@ 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)) + 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) + + all_structs.append(get_backends_result) get_backends_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -8449,12 +10429,18 @@ class get_backends_by_owner_args(object): """ - - def __init__(self, owner=None,): + def __init__( + self, + owner=None, + ): self.owner = owner def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8464,7 +10450,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.owner = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8474,12 +10464,16 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_owner_args') + oprot.writeStructBegin("get_backends_by_owner_args") if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 1) - oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) + oprot.writeFieldBegin("owner", TType.STRING, 1) + oprot.writeString( + self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8488,19 +10482,26 @@ 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)) + 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) + + all_structs.append(get_backends_by_owner_args) get_backends_by_owner_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "owner", + "UTF8", + None, + ), # 1 ) @@ -8512,13 +10513,20 @@ class get_backends_by_owner_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8549,18 +10557,20 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_owner_result') + oprot.writeStructBegin("get_backends_by_owner_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter217 in self.success: iter217.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 1) + oprot.writeFieldBegin("d", TType.STRUCT, 1) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8570,19 +10580,32 @@ 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)) + 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) + + all_structs.append(get_backends_by_owner_result) get_backends_by_owner_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -8593,12 +10616,18 @@ class get_backends_by_template_args(object): """ - - def __init__(self, template=None,): + def __init__( + self, + template=None, + ): self.template = template def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8608,7 +10637,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8618,12 +10651,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_template_args') + oprot.writeStructBegin("get_backends_by_template_args") if self.template is not None: - oprot.writeFieldBegin('template', TType.STRING, 1) - oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) + oprot.writeFieldBegin("template", TType.STRING, 1) + oprot.writeString( + self.template.encode("utf-8") + if sys.version_info[0] == 2 + else self.template + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8632,19 +10671,26 @@ 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)) + 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) + + all_structs.append(get_backends_by_template_args) get_backends_by_template_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'template', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "template", + "UTF8", + None, + ), # 1 ) @@ -8656,13 +10702,20 @@ class get_backends_by_template_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8693,18 +10746,20 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_template_result') + oprot.writeStructBegin("get_backends_by_template_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter224 in self.success: iter224.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 1) + oprot.writeFieldBegin("d", TType.STRUCT, 1) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8714,19 +10769,32 @@ 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)) + 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) + + all_structs.append(get_backends_by_template_result) get_backends_by_template_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -8737,12 +10805,18 @@ class get_backend_by_id_args(object): """ - - def __init__(self, id=None,): + def __init__( + self, + id=None, + ): self.id = id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8762,11 +10836,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backend_by_id_args') + oprot.writeStructBegin("get_backend_by_id_args") if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeFieldBegin("id", TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8776,19 +10852,26 @@ 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)) + 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) + + all_structs.append(get_backend_by_id_args) get_backend_by_id_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 ) @@ -8801,14 +10884,22 @@ class get_backend_by_id_result(object): """ - - def __init__(self, success=None, b=None, d=None,): + def __init__( + self, + success=None, + b=None, + d=None, + ): self.success = success self.b = b self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8839,19 +10930,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backend_by_id_result') + oprot.writeStructBegin("get_backend_by_id_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 2) + oprot.writeFieldBegin("d", TType.STRUCT, 2) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8861,20 +10954,39 @@ 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)) + 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) + + all_structs.append(get_backend_by_id_result) get_backend_by_id_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'd', [DefaultException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Backend, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 2 ) @@ -8885,12 +10997,18 @@ class delete_backend_args(object): """ - - def __init__(self, id=None,): + def __init__( + self, + id=None, + ): self.id = id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8910,11 +11028,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_backend_args') + oprot.writeStructBegin("delete_backend_args") if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeFieldBegin("id", TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8924,19 +11044,26 @@ 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)) + 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) + + all_structs.append(delete_backend_args) delete_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 ) @@ -8947,12 +11074,18 @@ class delete_backend_result(object): """ - - def __init__(self, b=None,): + def __init__( + self, + b=None, + ): self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -8972,11 +11105,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_backend_result') + oprot.writeStructBegin("delete_backend_result") if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8986,19 +11121,26 @@ 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)) + 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) + + all_structs.append(delete_backend_result) delete_backend_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -9010,13 +11152,20 @@ class add_user_to_backend_args(object): """ - - def __init__(self, backend_id=None, user_id=None,): + def __init__( + self, + backend_id=None, + user_id=None, + ): self.backend_id = backend_id self.user_id = user_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9031,7 +11180,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9041,16 +11194,22 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_user_to_backend_args') + oprot.writeStructBegin("add_user_to_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin('user_id', TType.STRING, 2) - oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) + oprot.writeFieldBegin("user_id", TType.STRING, 2) + oprot.writeString( + self.user_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9059,20 +11218,33 @@ 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)) + 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) + + all_structs.append(add_user_to_backend_args) add_user_to_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 - (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 2 ) @@ -9084,13 +11256,20 @@ class add_user_to_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9103,8 +11282,16 @@ def read(self, iprot): self.success = {} (_ktype226, _vtype227, _size225) = iprot.readMapBegin() for _i229 in range(_size225): - _key230 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val231 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key230 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val231 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key230] = _val231 iprot.readMapEnd() else: @@ -9121,19 +11308,25 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_user_to_backend_result') + oprot.writeStructBegin("add_user_to_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter232, viter233 in self.success.items(): - oprot.writeString(kiter232.encode('utf-8') if sys.version_info[0] == 2 else kiter232) - oprot.writeString(viter233.encode('utf-8') if sys.version_info[0] == 2 else viter233) + oprot.writeString( + kiter232.encode("utf-8") if sys.version_info[0] == 2 else kiter232 + ) + oprot.writeString( + viter233.encode("utf-8") if sys.version_info[0] == 2 else viter233 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9143,19 +11336,32 @@ 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)) + 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) + + all_structs.append(add_user_to_backend_result) add_user_to_backend_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -9166,12 +11372,18 @@ class get_users_from_backend_args(object): """ - - def __init__(self, backend_id=None,): + def __init__( + self, + backend_id=None, + ): self.backend_id = backend_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9191,11 +11403,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_users_from_backend_args') + oprot.writeStructBegin("get_users_from_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9205,19 +11419,26 @@ 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)) + 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) + + all_structs.append(get_users_from_backend_args) get_users_from_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 ) @@ -9229,13 +11450,20 @@ class get_users_from_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9248,7 +11476,11 @@ def read(self, iprot): self.success = [] (_etype237, _size234) = iprot.readListBegin() for _i238 in range(_size234): - _elem239 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem239 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success.append(_elem239) iprot.readListEnd() else: @@ -9265,18 +11497,22 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_users_from_backend_result') + oprot.writeStructBegin("get_users_from_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter240 in self.success: - oprot.writeString(iter240.encode('utf-8') if sys.version_info[0] == 2 else iter240) + oprot.writeString( + iter240.encode("utf-8") if sys.version_info[0] == 2 else iter240 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9286,19 +11522,32 @@ 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)) + 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) + + all_structs.append(get_users_from_backend_result) get_users_from_backend_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -9310,13 +11559,20 @@ class delete_user_from_backend_args(object): """ - - def __init__(self, backend_id=None, user_id=None,): + def __init__( + self, + backend_id=None, + user_id=None, + ): self.backend_id = backend_id self.user_id = user_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9331,7 +11587,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9341,16 +11601,22 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_user_from_backend_args') + oprot.writeStructBegin("delete_user_from_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin('user_id', TType.STRING, 2) - oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) + oprot.writeFieldBegin("user_id", TType.STRING, 2) + oprot.writeString( + self.user_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9359,20 +11625,33 @@ 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)) + 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) + + all_structs.append(delete_user_from_backend_args) delete_user_from_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 - (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 2 ) @@ -9384,13 +11663,20 @@ class delete_user_from_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9403,8 +11689,16 @@ def read(self, iprot): self.success = {} (_ktype242, _vtype243, _size241) = iprot.readMapBegin() for _i245 in range(_size241): - _key246 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val247 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key246 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val247 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key246] = _val247 iprot.readMapEnd() else: @@ -9421,19 +11715,25 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_user_from_backend_result') + oprot.writeStructBegin("delete_user_from_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter248, viter249 in self.success.items(): - oprot.writeString(kiter248.encode('utf-8') if sys.version_info[0] == 2 else kiter248) - oprot.writeString(viter249.encode('utf-8') if sys.version_info[0] == 2 else viter249) + oprot.writeString( + kiter248.encode("utf-8") if sys.version_info[0] == 2 else kiter248 + ) + oprot.writeString( + viter249.encode("utf-8") if sys.version_info[0] == 2 else viter249 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9443,27 +11743,42 @@ 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)) + 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) + + all_structs.append(delete_user_from_backend_result) delete_user_from_backend_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) class get_allowed_templates_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9478,9 +11793,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_allowed_templates_args') + oprot.writeStructBegin("get_allowed_templates_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -9488,18 +11805,18 @@ 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)) + 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) + + all_structs.append(get_allowed_templates_args) -get_allowed_templates_args.thrift_spec = ( -) +get_allowed_templates_args.thrift_spec = () class get_allowed_templates_result(object): @@ -9509,12 +11826,18 @@ class get_allowed_templates_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9540,11 +11863,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_allowed_templates_result') + oprot.writeStructBegin("get_allowed_templates_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter256 in self.success: iter256.write(oprot) @@ -9557,26 +11882,35 @@ 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)) + 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) + + all_structs.append(get_allowed_templates_result) get_allowed_templates_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [ResearchEnvironmentTemplate, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [ResearchEnvironmentTemplate, None], False), + None, + ), # 0 ) class get_servers_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9591,9 +11925,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_args') + oprot.writeStructBegin("get_servers_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -9601,18 +11937,18 @@ 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)) + 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) + + all_structs.append(get_servers_args) -get_servers_args.thrift_spec = ( -) +get_servers_args.thrift_spec = () class get_servers_result(object): @@ -9622,12 +11958,18 @@ class get_servers_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9653,11 +11995,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_result') + oprot.writeStructBegin("get_servers_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter263 in self.success: iter263.write(oprot) @@ -9670,18 +12014,25 @@ 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)) + 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) + + all_structs.append(get_servers_result) get_servers_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -9692,12 +12043,18 @@ class get_servers_by_ids_args(object): """ - - def __init__(self, server_ids=None,): + def __init__( + self, + server_ids=None, + ): self.server_ids = server_ids def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9710,7 +12067,11 @@ def read(self, iprot): self.server_ids = [] (_etype267, _size264) = iprot.readListBegin() for _i268 in range(_size264): - _elem269 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem269 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.server_ids.append(_elem269) iprot.readListEnd() else: @@ -9722,14 +12083,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_ids_args') + oprot.writeStructBegin("get_servers_by_ids_args") if self.server_ids is not None: - oprot.writeFieldBegin('server_ids', TType.LIST, 1) + oprot.writeFieldBegin("server_ids", TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.server_ids)) for iter270 in self.server_ids: - oprot.writeString(iter270.encode('utf-8') if sys.version_info[0] == 2 else iter270) + oprot.writeString( + iter270.encode("utf-8") if sys.version_info[0] == 2 else iter270 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9739,19 +12104,26 @@ 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)) + 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) + + all_structs.append(get_servers_by_ids_args) get_servers_by_ids_args.thrift_spec = ( None, # 0 - (1, TType.LIST, 'server_ids', (TType.STRING, 'UTF8', False), None, ), # 1 + ( + 1, + TType.LIST, + "server_ids", + (TType.STRING, "UTF8", False), + None, + ), # 1 ) @@ -9762,12 +12134,18 @@ class get_servers_by_ids_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9793,11 +12171,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_ids_result') + oprot.writeStructBegin("get_servers_by_ids_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter277 in self.success: iter277.write(oprot) @@ -9810,18 +12190,25 @@ 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)) + 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) + + all_structs.append(get_servers_by_ids_result) get_servers_by_ids_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -9832,12 +12219,18 @@ class get_servers_by_bibigrid_id_args(object): """ - - def __init__(self, bibigrid_id=None,): + def __init__( + self, + bibigrid_id=None, + ): self.bibigrid_id = bibigrid_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9847,7 +12240,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.bibigrid_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.bibigrid_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9857,12 +12254,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_bibigrid_id_args') + oprot.writeStructBegin("get_servers_by_bibigrid_id_args") if self.bibigrid_id is not None: - oprot.writeFieldBegin('bibigrid_id', TType.STRING, 1) - oprot.writeString(self.bibigrid_id.encode('utf-8') if sys.version_info[0] == 2 else self.bibigrid_id) + oprot.writeFieldBegin("bibigrid_id", TType.STRING, 1) + oprot.writeString( + self.bibigrid_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.bibigrid_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9871,19 +12274,26 @@ 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)) + 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) + + all_structs.append(get_servers_by_bibigrid_id_args) get_servers_by_bibigrid_id_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'bibigrid_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "bibigrid_id", + "UTF8", + None, + ), # 1 ) @@ -9894,12 +12304,18 @@ class get_servers_by_bibigrid_id_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9925,11 +12341,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_bibigrid_id_result') + oprot.writeStructBegin("get_servers_by_bibigrid_id_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter284 in self.success: iter284.write(oprot) @@ -9942,18 +12360,25 @@ 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)) + 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) + + all_structs.append(get_servers_by_bibigrid_id_result) get_servers_by_bibigrid_id_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -9970,8 +12395,16 @@ class scale_up_cluster_args(object): """ - - def __init__(self, cluster_id=None, image_name=None, flavor_name=None, count=None, names=None, start_idx=None, batch_idx=None,): + def __init__( + self, + cluster_id=None, + image_name=None, + flavor_name=None, + count=None, + names=None, + start_idx=None, + batch_idx=None, + ): self.cluster_id = cluster_id self.image_name = image_name self.flavor_name = flavor_name @@ -9981,7 +12414,11 @@ def __init__(self, cluster_id=None, image_name=None, flavor_name=None, count=Non self.batch_idx = batch_idx def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -9991,17 +12428,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -10014,7 +12463,11 @@ def read(self, iprot): self.names = [] (_etype288, _size285) = iprot.readListBegin() for _i289 in range(_size285): - _elem290 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem290 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.names.append(_elem290) iprot.readListEnd() else: @@ -10036,38 +12489,54 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('scale_up_cluster_args') + oprot.writeStructBegin("scale_up_cluster_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin('image_name', TType.STRING, 2) - oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) + oprot.writeFieldBegin("image_name", TType.STRING, 2) + oprot.writeString( + self.image_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_name + ) oprot.writeFieldEnd() if self.flavor_name is not None: - oprot.writeFieldBegin('flavor_name', TType.STRING, 3) - oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) + oprot.writeFieldBegin("flavor_name", TType.STRING, 3) + oprot.writeString( + self.flavor_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.flavor_name + ) oprot.writeFieldEnd() if self.count is not None: - oprot.writeFieldBegin('count', TType.I32, 4) + oprot.writeFieldBegin("count", TType.I32, 4) oprot.writeI32(self.count) oprot.writeFieldEnd() if self.names is not None: - oprot.writeFieldBegin('names', TType.LIST, 5) + oprot.writeFieldBegin("names", TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.names)) for iter291 in self.names: - oprot.writeString(iter291.encode('utf-8') if sys.version_info[0] == 2 else iter291) + oprot.writeString( + iter291.encode("utf-8") if sys.version_info[0] == 2 else iter291 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.start_idx is not None: - oprot.writeFieldBegin('start_idx', TType.I32, 6) + oprot.writeFieldBegin("start_idx", TType.I32, 6) oprot.writeI32(self.start_idx) oprot.writeFieldEnd() if self.batch_idx is not None: - oprot.writeFieldBegin('batch_idx', TType.I32, 7) + oprot.writeFieldBegin("batch_idx", TType.I32, 7) oprot.writeI32(self.batch_idx) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10077,25 +12546,68 @@ 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)) + 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) + + all_structs.append(scale_up_cluster_args) scale_up_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'flavor_name', 'UTF8', None, ), # 3 - (4, TType.I32, 'count', None, None, ), # 4 - (5, TType.LIST, 'names', (TType.STRING, 'UTF8', False), None, ), # 5 - (6, TType.I32, 'start_idx', None, None, ), # 6 - (7, TType.I32, 'batch_idx', None, None, ), # 7 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "count", + None, + None, + ), # 4 + ( + 5, + TType.LIST, + "names", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.I32, + "start_idx", + None, + None, + ), # 6 + ( + 7, + TType.I32, + "batch_idx", + None, + None, + ), # 7 ) @@ -10106,12 +12618,18 @@ class scale_up_cluster_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10124,11 +12642,19 @@ def read(self, iprot): self.success = {} (_ktype293, _vtype294, _size292) = iprot.readMapBegin() for _i296 in range(_size292): - _key297 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key297 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _val298 = [] (_etype302, _size299) = iprot.readListBegin() for _i303 in range(_size299): - _elem304 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem304 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _val298.append(_elem304) iprot.readListEnd() self.success[_key297] = _val298 @@ -10142,17 +12668,23 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('scale_up_cluster_result') + oprot.writeStructBegin("scale_up_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.success)) for kiter305, viter306 in self.success.items(): - oprot.writeString(kiter305.encode('utf-8') if sys.version_info[0] == 2 else kiter305) + oprot.writeString( + kiter305.encode("utf-8") if sys.version_info[0] == 2 else kiter305 + ) oprot.writeListBegin(TType.STRING, len(viter306)) for iter307 in viter306: - oprot.writeString(iter307.encode('utf-8') if sys.version_info[0] == 2 else iter307) + oprot.writeString( + iter307.encode("utf-8") if sys.version_info[0] == 2 else iter307 + ) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -10163,18 +12695,25 @@ 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)) + 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) + + all_structs.append(scale_up_cluster_result) scale_up_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.LIST, (TType.STRING, 'UTF8', False), False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.LIST, (TType.STRING, "UTF8", False), False), + None, + ), # 0 ) @@ -10193,8 +12732,18 @@ class add_cluster_machine_args(object): """ - - def __init__(self, cluster_id=None, cluster_user=None, cluster_group_id=None, image_name=None, flavor_name=None, name=None, key_name=None, batch_idx=None, worker_idx=None,): + def __init__( + self, + cluster_id=None, + cluster_user=None, + cluster_group_id=None, + image_name=None, + flavor_name=None, + name=None, + key_name=None, + batch_idx=None, + worker_idx=None, + ): self.cluster_id = cluster_id self.cluster_user = cluster_user self.cluster_group_id = cluster_group_id @@ -10206,7 +12755,11 @@ def __init__(self, cluster_id=None, cluster_user=None, cluster_group_id=None, im self.worker_idx = worker_idx def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10216,37 +12769,65 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.cluster_user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_user = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.cluster_group_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_group_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.key_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 8: @@ -10266,43 +12847,71 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_cluster_machine_args') + oprot.writeStructBegin("add_cluster_machine_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() if self.cluster_user is not None: - oprot.writeFieldBegin('cluster_user', TType.STRING, 2) - oprot.writeString(self.cluster_user.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_user) + oprot.writeFieldBegin("cluster_user", TType.STRING, 2) + oprot.writeString( + self.cluster_user.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_user + ) oprot.writeFieldEnd() if self.cluster_group_id is not None: - oprot.writeFieldBegin('cluster_group_id', TType.STRING, 3) - oprot.writeString(self.cluster_group_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_group_id) + oprot.writeFieldBegin("cluster_group_id", TType.STRING, 3) + oprot.writeString( + self.cluster_group_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_group_id + ) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin('image_name', TType.STRING, 4) - oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) + oprot.writeFieldBegin("image_name", TType.STRING, 4) + oprot.writeString( + self.image_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_name + ) oprot.writeFieldEnd() if self.flavor_name is not None: - oprot.writeFieldBegin('flavor_name', TType.STRING, 5) - oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) + oprot.writeFieldBegin("flavor_name", TType.STRING, 5) + oprot.writeString( + self.flavor_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.flavor_name + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 6) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 6) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.key_name is not None: - oprot.writeFieldBegin('key_name', TType.STRING, 7) - oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) + oprot.writeFieldBegin("key_name", TType.STRING, 7) + oprot.writeString( + self.key_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.key_name + ) oprot.writeFieldEnd() if self.batch_idx is not None: - oprot.writeFieldBegin('batch_idx', TType.I32, 8) + oprot.writeFieldBegin("batch_idx", TType.I32, 8) oprot.writeI32(self.batch_idx) oprot.writeFieldEnd() if self.worker_idx is not None: - oprot.writeFieldBegin('worker_idx', TType.I32, 9) + oprot.writeFieldBegin("worker_idx", TType.I32, 9) oprot.writeI32(self.worker_idx) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10312,27 +12921,82 @@ 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)) + 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) + + all_structs.append(add_cluster_machine_args) add_cluster_machine_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'cluster_user', 'UTF8', None, ), # 2 - (3, TType.STRING, 'cluster_group_id', 'UTF8', None, ), # 3 - (4, TType.STRING, 'image_name', 'UTF8', None, ), # 4 - (5, TType.STRING, 'flavor_name', 'UTF8', None, ), # 5 - (6, TType.STRING, 'name', 'UTF8', None, ), # 6 - (7, TType.STRING, 'key_name', 'UTF8', None, ), # 7 - (8, TType.I32, 'batch_idx', None, None, ), # 8 - (9, TType.I32, 'worker_idx', None, None, ), # 9 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "cluster_user", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "cluster_group_id", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "name", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "key_name", + "UTF8", + None, + ), # 7 + ( + 8, + TType.I32, + "batch_idx", + None, + None, + ), # 8 + ( + 9, + TType.I32, + "worker_idx", + None, + None, + ), # 9 ) @@ -10343,12 +13007,18 @@ class add_cluster_machine_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10358,7 +13028,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10368,12 +13042,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_cluster_machine_result') + oprot.writeStructBegin("add_cluster_machine_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.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10382,18 +13062,25 @@ 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)) + 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) + + all_structs.append(add_cluster_machine_result) add_cluster_machine_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -10404,12 +13091,18 @@ class get_cluster_info_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10419,7 +13112,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10429,12 +13126,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_info_args') + oprot.writeStructBegin("get_cluster_info_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10443,19 +13146,26 @@ 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)) + 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) + + all_structs.append(get_cluster_info_args) get_cluster_info_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -10467,13 +13177,20 @@ class get_cluster_info_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10499,15 +13216,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_info_result') + oprot.writeStructBegin("get_cluster_info_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10517,19 +13236,32 @@ 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)) + 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) + + all_structs.append(get_cluster_info_result) get_cluster_info_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [ClusterInfo, None], None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [ClusterInfo, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -10540,12 +13272,18 @@ class get_cluster_status_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10555,7 +13293,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10565,12 +13307,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_status_args') + oprot.writeStructBegin("get_cluster_status_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10579,19 +13327,26 @@ 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)) + 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) + + all_structs.append(get_cluster_status_args) get_cluster_status_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -10603,13 +13358,20 @@ class get_cluster_status_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10622,8 +13384,16 @@ def read(self, iprot): self.success = {} (_ktype309, _vtype310, _size308) = iprot.readMapBegin() for _i312 in range(_size308): - _key313 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val314 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key313 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val314 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key313] = _val314 iprot.readMapEnd() else: @@ -10640,19 +13410,25 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_status_result') + oprot.writeStructBegin("get_cluster_status_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter315, viter316 in self.success.items(): - oprot.writeString(kiter315.encode('utf-8') if sys.version_info[0] == 2 else kiter315) - oprot.writeString(viter316.encode('utf-8') if sys.version_info[0] == 2 else viter316) + oprot.writeString( + kiter315.encode("utf-8") if sys.version_info[0] == 2 else kiter315 + ) + oprot.writeString( + viter316.encode("utf-8") if sys.version_info[0] == 2 else viter316 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10662,19 +13438,32 @@ 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)) + 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) + + all_structs.append(get_cluster_status_result) get_cluster_status_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -10685,12 +13474,18 @@ class get_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10700,7 +13495,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10710,12 +13509,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_server_args') + oprot.writeStructBegin("get_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10724,19 +13529,26 @@ 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)) + 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) + + all_structs.append(get_server_args) get_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -10748,13 +13560,20 @@ class get_server_result(object): """ - - def __init__(self, success=None, e=None,): + def __init__( + self, + success=None, + e=None, + ): self.success = success self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10780,15 +13599,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_server_result') + oprot.writeStructBegin("get_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10798,19 +13619,32 @@ 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)) + 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) + + all_structs.append(get_server_result) get_server_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [VM, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -10821,12 +13655,18 @@ class stop_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10836,7 +13676,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10846,12 +13690,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('stop_server_args') + oprot.writeStructBegin("stop_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10860,19 +13710,26 @@ 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)) + 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) + + all_structs.append(stop_server_args) stop_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -10884,13 +13741,20 @@ class stop_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10915,15 +13779,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('stop_server_result') + oprot.writeStructBegin("stop_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10933,20 +13799,33 @@ 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)) + 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) + + all_structs.append(stop_server_result) stop_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -10961,8 +13840,14 @@ class create_snapshot_args(object): """ - - def __init__(self, openstack_id=None, name=None, username=None, base_tags=None, description=None,): + def __init__( + self, + openstack_id=None, + name=None, + username=None, + base_tags=None, + description=None, + ): self.openstack_id = openstack_id self.name = name self.username = username @@ -10970,7 +13855,11 @@ def __init__(self, openstack_id=None, name=None, username=None, base_tags=None, self.description = description def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -10980,17 +13869,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.username = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -10998,14 +13899,22 @@ def read(self, iprot): self.base_tags = [] (_etype320, _size317) = iprot.readListBegin() for _i321 in range(_size317): - _elem322 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem322 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.base_tags.append(_elem322) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11015,31 +13924,49 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_snapshot_args') + oprot.writeStructBegin("create_snapshot_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 3) - oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) + oprot.writeFieldBegin("username", TType.STRING, 3) + oprot.writeString( + self.username.encode("utf-8") + if sys.version_info[0] == 2 + else self.username + ) oprot.writeFieldEnd() if self.base_tags is not None: - oprot.writeFieldBegin('base_tags', TType.LIST, 4) + oprot.writeFieldBegin("base_tags", TType.LIST, 4) oprot.writeListBegin(TType.STRING, len(self.base_tags)) for iter323 in self.base_tags: - oprot.writeString(iter323.encode('utf-8') if sys.version_info[0] == 2 else iter323) + oprot.writeString( + iter323.encode("utf-8") if sys.version_info[0] == 2 else iter323 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 5) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 5) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11048,23 +13975,54 @@ 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)) + 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) + + all_structs.append(create_snapshot_args) create_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'username', 'UTF8', None, ), # 3 - (4, TType.LIST, 'base_tags', (TType.STRING, 'UTF8', False), None, ), # 4 - (5, TType.STRING, 'description', 'UTF8', None, ), # 5 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "username", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "base_tags", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "description", + "UTF8", + None, + ), # 5 ) @@ -11077,14 +14035,22 @@ class create_snapshot_result(object): """ - - def __init__(self, success=None, e=None, c=None,): + def __init__( + self, + success=None, + e=None, + c=None, + ): self.success = success self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11094,7 +14060,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -11114,19 +14084,25 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_snapshot_result') + oprot.writeStructBegin("create_snapshot_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.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.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11136,28 +14112,49 @@ 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)) + 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) + + all_structs.append(create_snapshot_result) create_snapshot_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) class get_limits_args(object): - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11172,9 +14169,11 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_limits_args') + oprot.writeStructBegin("get_limits_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -11182,18 +14181,18 @@ 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)) + 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) + + all_structs.append(get_limits_args) -get_limits_args.thrift_spec = ( -) +get_limits_args.thrift_spec = () class get_limits_result(object): @@ -11203,12 +14202,18 @@ class get_limits_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11221,8 +14226,16 @@ def read(self, iprot): self.success = {} (_ktype325, _vtype326, _size324) = iprot.readMapBegin() for _i328 in range(_size324): - _key329 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val330 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key329 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val330 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key329] = _val330 iprot.readMapEnd() else: @@ -11234,15 +14247,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_limits_result') + oprot.writeStructBegin("get_limits_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter331, viter332 in self.success.items(): - oprot.writeString(kiter331.encode('utf-8') if sys.version_info[0] == 2 else kiter331) - oprot.writeString(viter332.encode('utf-8') if sys.version_info[0] == 2 else viter332) + oprot.writeString( + kiter331.encode("utf-8") if sys.version_info[0] == 2 else kiter331 + ) + oprot.writeString( + viter332.encode("utf-8") if sys.version_info[0] == 2 else viter332 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11252,18 +14271,25 @@ 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)) + 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) + + all_structs.append(get_limits_result) get_limits_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -11277,15 +14303,24 @@ class start_cluster_args(object): """ - - def __init__(self, public_key=None, master_instance=None, worker_instances=None, user=None,): + def __init__( + self, + public_key=None, + master_instance=None, + worker_instances=None, + user=None, + ): self.public_key = public_key self.master_instance = master_instance self.worker_instances = worker_instances self.user = user def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11295,7 +14330,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -11317,7 +14356,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11327,27 +14370,35 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_cluster_args') + oprot.writeStructBegin("start_cluster_args") if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 1) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 1) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() if self.master_instance is not None: - oprot.writeFieldBegin('master_instance', TType.STRUCT, 2) + oprot.writeFieldBegin("master_instance", TType.STRUCT, 2) self.master_instance.write(oprot) oprot.writeFieldEnd() if self.worker_instances is not None: - oprot.writeFieldBegin('worker_instances', TType.LIST, 3) + oprot.writeFieldBegin("worker_instances", TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.worker_instances)) for iter339 in self.worker_instances: iter339.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.user is not None: - oprot.writeFieldBegin('user', TType.STRING, 4) - oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user) + oprot.writeFieldBegin("user", TType.STRING, 4) + oprot.writeString( + self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11356,22 +14407,47 @@ 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)) + 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) + + all_structs.append(start_cluster_args) start_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 - (2, TType.STRUCT, 'master_instance', [ClusterInstance, None], None, ), # 2 - (3, TType.LIST, 'worker_instances', (TType.STRUCT, [ClusterInstance, None], False), None, ), # 3 - (4, TType.STRING, 'user', 'UTF8', None, ), # 4 + ( + 1, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRUCT, + "master_instance", + [ClusterInstance, None], + None, + ), # 2 + ( + 3, + TType.LIST, + "worker_instances", + (TType.STRUCT, [ClusterInstance, None], False), + None, + ), # 3 + ( + 4, + TType.STRING, + "user", + "UTF8", + None, + ), # 4 ) @@ -11382,12 +14458,18 @@ class start_cluster_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11400,8 +14482,16 @@ def read(self, iprot): self.success = {} (_ktype341, _vtype342, _size340) = iprot.readMapBegin() for _i344 in range(_size340): - _key345 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val346 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key345 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val346 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key345] = _val346 iprot.readMapEnd() else: @@ -11413,15 +14503,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_cluster_result') + oprot.writeStructBegin("start_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter347, viter348 in self.success.items(): - oprot.writeString(kiter347.encode('utf-8') if sys.version_info[0] == 2 else kiter347) - oprot.writeString(viter348.encode('utf-8') if sys.version_info[0] == 2 else viter348) + oprot.writeString( + kiter347.encode("utf-8") if sys.version_info[0] == 2 else kiter347 + ) + oprot.writeString( + viter348.encode("utf-8") if sys.version_info[0] == 2 else viter348 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11431,18 +14527,25 @@ 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)) + 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) + + all_structs.append(start_cluster_result) start_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -11453,12 +14556,18 @@ class terminate_cluster_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11468,7 +14577,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11478,12 +14591,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('terminate_cluster_args') + oprot.writeStructBegin("terminate_cluster_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11492,19 +14611,26 @@ 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)) + 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) + + all_structs.append(terminate_cluster_args) terminate_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -11516,13 +14642,20 @@ class terminate_cluster_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11535,8 +14668,16 @@ def read(self, iprot): self.success = {} (_ktype350, _vtype351, _size349) = iprot.readMapBegin() for _i353 in range(_size349): - _key354 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val355 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key354 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val355 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key354] = _val355 iprot.readMapEnd() else: @@ -11553,19 +14694,25 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('terminate_cluster_result') + oprot.writeStructBegin("terminate_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter356, viter357 in self.success.items(): - oprot.writeString(kiter356.encode('utf-8') if sys.version_info[0] == 2 else kiter356) - oprot.writeString(viter357.encode('utf-8') if sys.version_info[0] == 2 else viter357) + oprot.writeString( + kiter356.encode("utf-8") if sys.version_info[0] == 2 else kiter356 + ) + oprot.writeString( + viter357.encode("utf-8") if sys.version_info[0] == 2 else viter357 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11575,19 +14722,32 @@ 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)) + 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) + + all_structs.append(terminate_cluster_result) terminate_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -11598,12 +14758,18 @@ class delete_image_args(object): """ - - def __init__(self, image_id=None,): + def __init__( + self, + image_id=None, + ): self.image_id = image_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11613,7 +14779,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.image_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11623,12 +14793,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_image_args') + oprot.writeStructBegin("delete_image_args") if self.image_id is not None: - oprot.writeFieldBegin('image_id', TType.STRING, 1) - oprot.writeString(self.image_id.encode('utf-8') if sys.version_info[0] == 2 else self.image_id) + oprot.writeFieldBegin("image_id", TType.STRING, 1) + oprot.writeString( + self.image_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11637,19 +14813,26 @@ 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)) + 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) + + all_structs.append(delete_image_args) delete_image_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'image_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "image_id", + "UTF8", + None, + ), # 1 ) @@ -11660,12 +14843,18 @@ class delete_image_result(object): """ - - def __init__(self, e=None,): + def __init__( + self, + e=None, + ): self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11685,11 +14874,13 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_image_result') + oprot.writeStructBegin("delete_image_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11699,19 +14890,26 @@ 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)) + 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) + + all_structs.append(delete_image_result) delete_image_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ImageNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "e", + [ImageNotFoundException, None], + None, + ), # 1 ) @@ -11723,13 +14921,20 @@ class detach_volume_args(object): """ - - def __init__(self, volume_id=None, server_id=None,): + def __init__( + self, + volume_id=None, + server_id=None, + ): self.volume_id = volume_id self.server_id = server_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11739,12 +14944,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11754,16 +14967,26 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_volume_args') + oprot.writeStructBegin("detach_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 2) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 2) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11772,20 +14995,33 @@ 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)) + 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) + + all_structs.append(detach_volume_args) detach_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'server_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 2 ) @@ -11798,14 +15034,22 @@ class detach_volume_result(object): """ - - def __init__(self, e=None, c=None, v=None,): + def __init__( + self, + e=None, + c=None, + v=None, + ): self.e = e self.c = c self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11835,19 +15079,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_volume_result') + oprot.writeStructBegin("detach_volume_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 3) + oprot.writeFieldBegin("v", TType.STRUCT, 3) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11857,21 +15103,40 @@ 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)) + 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) + + all_structs.append(detach_volume_result) detach_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 - (3, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 3 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 3 ) @@ -11882,12 +15147,18 @@ class delete_volume_args(object): """ - - def __init__(self, volume_id=None,): + def __init__( + self, + volume_id=None, + ): self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11897,7 +15168,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11907,12 +15182,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_args') + oprot.writeStructBegin("delete_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11921,19 +15202,26 @@ 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)) + 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) + + all_structs.append(delete_volume_args) delete_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 ) @@ -11945,13 +15233,20 @@ class delete_volume_result(object): """ - - def __init__(self, c=None, v=None,): + def __init__( + self, + c=None, + v=None, + ): self.c = c self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -11976,15 +15271,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_result') + oprot.writeStructBegin("delete_volume_result") if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 2) + oprot.writeFieldBegin("v", TType.STRUCT, 2) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11994,20 +15291,33 @@ 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)) + 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) + + all_structs.append(delete_volume_result) delete_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 - (2, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 2 ) @@ -12019,13 +15329,20 @@ class attach_volume_to_server_args(object): """ - - def __init__(self, openstack_id=None, volume_id=None,): + def __init__( + self, + openstack_id=None, + volume_id=None, + ): self.openstack_id = openstack_id self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12035,12 +15352,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12050,16 +15375,26 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('attach_volume_to_server_args') + oprot.writeStructBegin("attach_volume_to_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 2) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 2) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12068,20 +15403,33 @@ 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)) + 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) + + all_structs.append(attach_volume_to_server_args) attach_volume_to_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'volume_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 2 ) @@ -12094,14 +15442,22 @@ class attach_volume_to_server_result(object): """ - - def __init__(self, success=None, e=None, c=None,): + def __init__( + self, + success=None, + e=None, + c=None, + ): self.success = success self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12114,8 +15470,16 @@ def read(self, iprot): self.success = {} (_ktype359, _vtype360, _size358) = iprot.readMapBegin() for _i362 in range(_size358): - _key363 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val364 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key363 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val364 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key363] = _val364 iprot.readMapEnd() else: @@ -12137,23 +15501,29 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('attach_volume_to_server_result') + oprot.writeStructBegin("attach_volume_to_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter365, viter366 in self.success.items(): - oprot.writeString(kiter365.encode('utf-8') if sys.version_info[0] == 2 else kiter365) - oprot.writeString(viter366.encode('utf-8') if sys.version_info[0] == 2 else viter366) + oprot.writeString( + kiter365.encode("utf-8") if sys.version_info[0] == 2 else kiter365 + ) + oprot.writeString( + viter366.encode("utf-8") if sys.version_info[0] == 2 else viter366 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12163,20 +15533,39 @@ 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)) + 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) + + all_structs.append(attach_volume_to_server_result) attach_volume_to_server_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [VolumeNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -12187,12 +15576,18 @@ class resume_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12202,7 +15597,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12212,12 +15611,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resume_server_args') + oprot.writeStructBegin("resume_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12226,19 +15631,26 @@ 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)) + 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) + + all_structs.append(resume_server_args) resume_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -12250,13 +15662,20 @@ class resume_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12281,15 +15700,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resume_server_result') + oprot.writeStructBegin("resume_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12299,20 +15720,33 @@ 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)) + 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) + + all_structs.append(resume_server_result) resume_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -12325,14 +15759,22 @@ class create_volume_args(object): """ - - def __init__(self, volume_name=None, volume_storage=None, metadata=None,): + def __init__( + self, + volume_name=None, + volume_storage=None, + metadata=None, + ): self.volume_name = volume_name self.volume_storage = volume_storage self.metadata = metadata def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12342,7 +15784,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -12355,8 +15801,16 @@ def read(self, iprot): self.metadata = {} (_ktype368, _vtype369, _size367) = iprot.readMapBegin() for _i371 in range(_size367): - _key372 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val373 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key372 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val373 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key372] = _val373 iprot.readMapEnd() else: @@ -12368,23 +15822,33 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_args') + oprot.writeStructBegin("create_volume_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.volume_storage is not None: - oprot.writeFieldBegin('volume_storage', TType.I32, 2) + oprot.writeFieldBegin("volume_storage", TType.I32, 2) oprot.writeI32(self.volume_storage) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 3) + oprot.writeFieldBegin("metadata", TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter374, viter375 in self.metadata.items(): - oprot.writeString(kiter374.encode('utf-8') if sys.version_info[0] == 2 else kiter374) - oprot.writeString(viter375.encode('utf-8') if sys.version_info[0] == 2 else viter375) + oprot.writeString( + kiter374.encode("utf-8") if sys.version_info[0] == 2 else kiter374 + ) + oprot.writeString( + viter375.encode("utf-8") if sys.version_info[0] == 2 else viter375 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12394,21 +15858,40 @@ 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)) + 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) + + all_structs.append(create_volume_args) create_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.I32, 'volume_storage', None, None, ), # 2 - (3, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "volume_storage", + None, + None, + ), # 2 + ( + 3, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 3 ) @@ -12421,14 +15904,22 @@ class create_volume_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12459,19 +15950,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_result') + oprot.writeStructBegin("create_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12481,20 +15974,39 @@ 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)) + 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) + + all_structs.append(create_volume_result) create_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -12507,14 +16019,22 @@ class create_volume_by_source_volume_args(object): """ - - def __init__(self, volume_name=None, metadata=None, source_volume_id=None,): + def __init__( + self, + volume_name=None, + metadata=None, + source_volume_id=None, + ): self.volume_name = volume_name self.metadata = metadata self.source_volume_id = source_volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12524,7 +16044,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -12532,15 +16056,27 @@ def read(self, iprot): self.metadata = {} (_ktype377, _vtype378, _size376) = iprot.readMapBegin() for _i380 in range(_size376): - _key381 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val382 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key381 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val382 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key381] = _val382 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.source_volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.source_volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12550,24 +16086,38 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_source_volume_args') + oprot.writeStructBegin("create_volume_by_source_volume_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 2) + oprot.writeFieldBegin("metadata", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter383, viter384 in self.metadata.items(): - oprot.writeString(kiter383.encode('utf-8') if sys.version_info[0] == 2 else kiter383) - oprot.writeString(viter384.encode('utf-8') if sys.version_info[0] == 2 else viter384) + oprot.writeString( + kiter383.encode("utf-8") if sys.version_info[0] == 2 else kiter383 + ) + oprot.writeString( + viter384.encode("utf-8") if sys.version_info[0] == 2 else viter384 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.source_volume_id is not None: - oprot.writeFieldBegin('source_volume_id', TType.STRING, 3) - oprot.writeString(self.source_volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.source_volume_id) + oprot.writeFieldBegin("source_volume_id", TType.STRING, 3) + oprot.writeString( + self.source_volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.source_volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12576,21 +16126,40 @@ 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)) + 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) + + all_structs.append(create_volume_by_source_volume_args) create_volume_by_source_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 - (3, TType.STRING, 'source_volume_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 + ( + 3, + TType.STRING, + "source_volume_id", + "UTF8", + None, + ), # 3 ) @@ -12603,14 +16172,22 @@ class create_volume_by_source_volume_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12641,19 +16218,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_source_volume_result') + oprot.writeStructBegin("create_volume_by_source_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12663,20 +16242,39 @@ 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)) + 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) + + all_structs.append(create_volume_by_source_volume_result) create_volume_by_source_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -12689,14 +16287,22 @@ class create_volume_by_volume_snap_args(object): """ - - def __init__(self, volume_name=None, metadata=None, volume_snap_id=None,): + def __init__( + self, + volume_name=None, + metadata=None, + volume_snap_id=None, + ): self.volume_name = volume_name self.metadata = metadata self.volume_snap_id = volume_snap_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12706,7 +16312,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -12714,15 +16324,27 @@ def read(self, iprot): self.metadata = {} (_ktype386, _vtype387, _size385) = iprot.readMapBegin() for _i389 in range(_size385): - _key390 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val391 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key390 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val391 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key390] = _val391 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.volume_snap_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_snap_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12732,24 +16354,38 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_volume_snap_args') + oprot.writeStructBegin("create_volume_by_volume_snap_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 2) + oprot.writeFieldBegin("metadata", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter392, viter393 in self.metadata.items(): - oprot.writeString(kiter392.encode('utf-8') if sys.version_info[0] == 2 else kiter392) - oprot.writeString(viter393.encode('utf-8') if sys.version_info[0] == 2 else viter393) + oprot.writeString( + kiter392.encode("utf-8") if sys.version_info[0] == 2 else kiter392 + ) + oprot.writeString( + viter393.encode("utf-8") if sys.version_info[0] == 2 else viter393 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.volume_snap_id is not None: - oprot.writeFieldBegin('volume_snap_id', TType.STRING, 3) - oprot.writeString(self.volume_snap_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_snap_id) + oprot.writeFieldBegin("volume_snap_id", TType.STRING, 3) + oprot.writeString( + self.volume_snap_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_snap_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12758,21 +16394,40 @@ 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)) + 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) + + all_structs.append(create_volume_by_volume_snap_args) create_volume_by_volume_snap_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 - (3, TType.STRING, 'volume_snap_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 + ( + 3, + TType.STRING, + "volume_snap_id", + "UTF8", + None, + ), # 3 ) @@ -12785,14 +16440,22 @@ class create_volume_by_volume_snap_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12823,19 +16486,21 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_volume_snap_result') + oprot.writeStructBegin("create_volume_by_volume_snap_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12845,20 +16510,39 @@ 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)) + 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) + + all_structs.append(create_volume_by_volume_snap_result) create_volume_by_volume_snap_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -12871,14 +16555,22 @@ class create_volume_snapshot_args(object): """ - - def __init__(self, volume_id=None, name=None, description=None,): + def __init__( + self, + volume_id=None, + name=None, + description=None, + ): self.volume_id = volume_id self.name = name self.description = description def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12888,17 +16580,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12908,20 +16612,32 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_snapshot_args') + oprot.writeStructBegin("create_volume_snapshot_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 3) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 3) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12930,21 +16646,40 @@ 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)) + 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) + + all_structs.append(create_volume_snapshot_args) create_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "description", + "UTF8", + None, + ), # 3 ) @@ -12957,14 +16692,22 @@ class create_volume_snapshot_result(object): """ - - def __init__(self, success=None, e=None, r=None,): + def __init__( + self, + success=None, + e=None, + r=None, + ): self.success = success self.e = e self.r = r def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -12974,7 +16717,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -12994,19 +16741,25 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_snapshot_result') + oprot.writeStructBegin("create_volume_snapshot_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.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.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13016,20 +16769,39 @@ 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)) + 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) + + all_structs.append(create_volume_snapshot_result) create_volume_snapshot_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [DefaultException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [VolumeNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 2 ) @@ -13040,12 +16812,18 @@ class get_volume_snapshot_args(object): """ - - def __init__(self, name_or_id=None,): + def __init__( + self, + name_or_id=None, + ): self.name_or_id = name_or_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -13055,7 +16833,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13065,12 +16847,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_snapshot_args') + oprot.writeStructBegin("get_volume_snapshot_args") if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 1) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 1) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13079,19 +16867,26 @@ 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)) + 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) + + all_structs.append(get_volume_snapshot_args) get_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'name_or_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 1 ) @@ -13103,13 +16898,20 @@ class get_volume_snapshot_result(object): """ - - def __init__(self, success=None, r=None,): + def __init__( + self, + success=None, + r=None, + ): self.success = success self.r = r def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -13135,15 +16937,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_snapshot_result') + oprot.writeStructBegin("get_volume_snapshot_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13153,19 +16957,32 @@ 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)) + 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) + + all_structs.append(get_volume_snapshot_result) get_volume_snapshot_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Snapshot, None], None, ), # 0 - (1, TType.STRUCT, 'r', [ResourceNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Snapshot, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [ResourceNotFoundException, None], + None, + ), # 1 ) @@ -13176,12 +16993,18 @@ class delete_volume_snapshot_args(object): """ - - def __init__(self, snapshot_id=None,): + def __init__( + self, + snapshot_id=None, + ): self.snapshot_id = snapshot_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -13191,7 +17014,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.snapshot_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.snapshot_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13201,12 +17028,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_snapshot_args') + oprot.writeStructBegin("delete_volume_snapshot_args") if self.snapshot_id is not None: - oprot.writeFieldBegin('snapshot_id', TType.STRING, 1) - oprot.writeString(self.snapshot_id.encode('utf-8') if sys.version_info[0] == 2 else self.snapshot_id) + oprot.writeFieldBegin("snapshot_id", TType.STRING, 1) + oprot.writeString( + self.snapshot_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.snapshot_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13215,19 +17048,26 @@ 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)) + 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) + + all_structs.append(delete_volume_snapshot_args) delete_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'snapshot_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "snapshot_id", + "UTF8", + None, + ), # 1 ) @@ -13239,13 +17079,20 @@ class delete_volume_snapshot_result(object): """ - - def __init__(self, c=None, e=None,): + def __init__( + self, + c=None, + e=None, + ): self.c = c self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -13270,15 +17117,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_snapshot_result') + oprot.writeStructBegin("delete_volume_snapshot_result") if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 2) + oprot.writeFieldBegin("e", TType.STRUCT, 2) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13288,20 +17137,33 @@ 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)) + 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) + + all_structs.append(delete_volume_snapshot_result) delete_volume_snapshot_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 - (2, TType.STRUCT, 'e', [DefaultException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "e", + [DefaultException, None], + None, + ), # 2 ) @@ -13312,12 +17174,18 @@ class reboot_hard_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -13327,7 +17195,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13337,12 +17209,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_hard_server_args') + oprot.writeStructBegin("reboot_hard_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13351,19 +17229,26 @@ 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)) + 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) + + all_structs.append(reboot_hard_server_args) reboot_hard_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -13375,13 +17260,20 @@ class reboot_hard_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -13406,15 +17298,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_hard_server_result') + oprot.writeStructBegin("reboot_hard_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13424,20 +17318,33 @@ 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)) + 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) + + all_structs.append(reboot_hard_server_result) reboot_hard_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -13448,12 +17355,18 @@ class reboot_soft_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -13463,7 +17376,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13473,12 +17390,18 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_soft_server_args') + oprot.writeStructBegin("reboot_soft_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13487,19 +17410,26 @@ 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)) + 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) + + all_structs.append(reboot_soft_server_args) reboot_soft_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -13511,13 +17441,20 @@ class reboot_soft_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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() @@ -13542,15 +17479,17 @@ def read(self, iprot): 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])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_soft_server_result') + oprot.writeStructBegin("reboot_soft_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13560,20 +17499,33 @@ 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)) + 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) + + all_structs.append(reboot_soft_server_result) reboot_soft_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) fix_spec(all_structs) del all_structs