From d8b6c94794bcac80371febcb180c0dbc0539a284 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 19:06:16 +0000 Subject: [PATCH 1/2] feat(Dependencies): Update dependency openstacksdk to v2 | datasource | package | from | to | | ---------- | ------------ | ----- | ----- | | pypi | openstacksdk | 1.5.0 | 2.0.0 | --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 75fa0df..a2d9268 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ setuptools==68.2.2 thrift==0.16.0 python-keystoneclient==5.2.0 -openstacksdk==1.5.0 +openstacksdk==2.0.0 deprecated==1.2.14 Click==8.1.7 ansible==8.5.0 From 382db3f2de9c6fb80c0ab4ef8319c06629e0b206 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 4 Dec 2023 16:32:56 +0000 Subject: [PATCH 2/2] feat(Openstack Connector): Updated keys to OS-SDK v2 --- simple_vm_client/VirtualMachineService-remote | 884 +- simple_vm_client/VirtualMachineService.py | 8765 +++++------------ simple_vm_client/constants.py | 2 +- .../openstack_connector.py | 8 +- simple_vm_client/ttypes.py | 3005 ++---- 5 files changed, 3242 insertions(+), 9422 deletions(-) diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index 9c49441..0bc1e72 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -1,128 +1,100 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.16.0) +# Autogenerated by Thrift Compiler (0.19.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import pprint import sys - +import pprint if sys.version_info[0] > 2: from urllib.parse import urlparse else: from urlparse import urlparse - +from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient from thrift.protocol.TBinaryProtocol import TBinaryProtocol -from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport -from VirtualMachineService import VirtualMachineService -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(" add_metadata_to_server(string openstack_id, metadata)") - 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( - " string open_port_range_for_vm_in_project(int range_start, int range_stop, string openstack_id, string ethertype, string protocol)" - ) - print(" void delete_security_group_rule(string openstack_id)") - 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, additional_security_group_ids)" - ) - 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, additional_security_group_ids)" - ) - 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("") +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(' add_metadata_to_server(string openstack_id, metadata)') + 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(' string open_port_range_for_vm_in_project(int range_start, int range_stop, string openstack_id, string ethertype, string protocol)') + print(' void delete_security_group_rule(string openstack_id)') + 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, additional_security_group_ids)') + 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, additional_security_group_ids)') + 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 @@ -132,16 +104,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]) @@ -149,49 +121,42 @@ 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: @@ -202,659 +167,392 @@ 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 == "add_metadata_to_server": +elif cmd == 'add_metadata_to_server': if len(args) != 2: - print("add_metadata_to_server requires 2 args") + print('add_metadata_to_server requires 2 args') sys.exit(1) - pp.pprint( - client.add_metadata_to_server( - args[0], - eval(args[1]), - ) - ) + pp.pprint(client.add_metadata_to_server(args[0], eval(args[1]),)) -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 == "open_port_range_for_vm_in_project": +elif cmd == 'open_port_range_for_vm_in_project': if len(args) != 5: - print("open_port_range_for_vm_in_project requires 5 args") - sys.exit(1) - pp.pprint( - client.open_port_range_for_vm_in_project( - eval(args[0]), - eval(args[1]), - args[2], - args[3], - args[4], - ) - ) - -elif cmd == "delete_security_group_rule": + print('open_port_range_for_vm_in_project requires 5 args') + sys.exit(1) + pp.pprint(client.open_port_range_for_vm_in_project(eval(args[0]), eval(args[1]), args[2], args[3], args[4],)) + +elif cmd == 'delete_security_group_rule': if len(args) != 1: - print("delete_security_group_rule requires 1 args") + print('delete_security_group_rule requires 1 args') sys.exit(1) - pp.pprint( - client.delete_security_group_rule( - args[0], - ) - ) + pp.pprint(client.delete_security_group_rule(args[0],)) -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": +elif cmd == 'start_server': if len(args) != 10: - print("start_server requires 10 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], - eval(args[9]), - ) - ) - -elif cmd == "is_bibigrid_available": + print('start_server requires 10 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], eval(args[9]),)) + +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) != 8: - print("start_server_with_custom_key requires 8 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]), - eval(args[7]), - ) - ) - -elif cmd == "exist_server": + print('start_server_with_custom_key requires 8 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]), eval(args[7]),)) + +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 461f7e0..1c42581 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -1,19 +1,20 @@ # -# Autogenerated by Thrift Compiler (0.16.0) +# Autogenerated by Thrift Compiler (0.19.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import logging -import sys - -from thrift.Thrift import TApplicationException, TMessageType, TProcessor, TType -from thrift.transport import TTransport +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec -from ttypes import * +import sys +import logging +from ttypes import * +from thrift.Thrift import TProcessor +from thrift.transport import TTransport all_structs = [] @@ -22,13 +23,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): """ @@ -36,12 +37,14 @@ 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 @@ -56,6 +59,7 @@ def import_keypair(self, keyname, public_key): - public_key: The public key """ + pass def get_vm_ports(self, openstack_id): """ @@ -66,6 +70,7 @@ def get_vm_ports(self, openstack_id): - openstack_id: Id of server """ + pass def add_udp_security_group(self, server_id): """ @@ -75,6 +80,7 @@ def add_udp_security_group(self, server_id): - server_id: OpenStack id of the server """ + pass def add_metadata_to_server(self, openstack_id, metadata): """ @@ -86,6 +92,7 @@ def add_metadata_to_server(self, openstack_id, metadata): - metadata """ + pass def get_flavors(self): """ @@ -93,6 +100,7 @@ def get_flavors(self): Returns: List of flavor instances. """ + pass def get_images(self): """ @@ -100,6 +108,7 @@ def get_images(self): Returns: List of Image instances. """ + pass def get_public_images(self): """ @@ -107,6 +116,7 @@ def get_public_images(self): Returns: List of public Image instances. """ + pass def get_private_images(self): """ @@ -114,6 +124,7 @@ def get_private_images(self): Returns: List of private Image instances. """ + pass def get_image(self, openstack_id, ignore_not_active): """ @@ -125,6 +136,7 @@ def get_image(self, openstack_id, ignore_not_active): - ignore_not_active """ + pass def get_volume(self, volume_id): """ @@ -132,6 +144,7 @@ def get_volume(self, volume_id): - volume_id """ + pass def get_volumes_by_ids(self, volume_ids): """ @@ -139,6 +152,7 @@ def get_volumes_by_ids(self, volume_ids): - volume_ids """ + pass def resize_volume(self, volume_id, size): """ @@ -147,10 +161,9 @@ def resize_volume(self, volume_id, size): - size """ + pass - def open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): + def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): """ Creates/Updates a security group for a vm with a specific port range for a project @@ -162,6 +175,7 @@ def open_port_range_for_vm_in_project( - protocol """ + pass def delete_security_group_rule(self, openstack_id): """ @@ -169,6 +183,7 @@ def delete_security_group_rule(self, openstack_id): - openstack_id """ + pass def delete_server(self, openstack_id): """ @@ -179,20 +194,9 @@ 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, - research_environment, - additional_security_group_ids, - ): + def start_server(self, flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys, research_environment, additional_security_group_ids): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -207,6 +211,7 @@ def start_server( - additional_security_group_ids """ + pass def is_bibigrid_available(self): pass @@ -218,18 +223,9 @@ 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, - additional_security_group_ids, - ): + def start_server_with_custom_key(self, flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids): """ Start a new server with custom key for ansible. @@ -244,6 +240,7 @@ def start_server_with_custom_key( - additional_security_group_ids """ + pass def exist_server(self, name): """ @@ -253,17 +250,9 @@ 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 @@ -277,6 +266,7 @@ def create_and_deploy_playbook( - base_url """ + pass def get_playbook_logs(self, openstack_id): """ @@ -286,12 +276,14 @@ 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 @@ -307,12 +299,14 @@ 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): """ @@ -322,6 +316,7 @@ def get_backends_by_owner(self, owner): - owner """ + pass def get_backends_by_template(self, template): """ @@ -331,6 +326,7 @@ def get_backends_by_template(self, template): - template """ + pass def get_backend_by_id(self, id): """ @@ -340,6 +336,7 @@ def get_backend_by_id(self, id): - id """ + pass def delete_backend(self, id): """ @@ -349,6 +346,7 @@ def delete_backend(self, id): - id """ + pass def add_user_to_backend(self, backend_id, user_id): """ @@ -359,6 +357,7 @@ def add_user_to_backend(self, backend_id, user_id): - user_id """ + pass def get_users_from_backend(self, backend_id): """ @@ -368,6 +367,7 @@ def get_users_from_backend(self, backend_id): - backend_id """ + pass def delete_user_from_backend(self, backend_id, user_id): """ @@ -378,6 +378,7 @@ def delete_user_from_backend(self, backend_id, user_id): - user_id """ + pass def get_allowed_templates(self): pass @@ -388,6 +389,7 @@ def get_servers(self): Returns: List of server instances. """ + pass def get_servers_by_ids(self, server_ids): """ @@ -398,6 +400,7 @@ def get_servers_by_ids(self, server_ids): - server_ids """ + pass def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -408,10 +411,9 @@ 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 @@ -423,19 +425,9 @@ def scale_up_cluster( - 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 @@ -449,6 +441,7 @@ def add_cluster_machine( - worker_idx """ + pass def get_cluster_info(self, cluster_id): """ @@ -456,6 +449,7 @@ def get_cluster_info(self, cluster_id): - cluster_id """ + pass def get_cluster_status(self, cluster_id): """ @@ -463,6 +457,7 @@ def get_cluster_status(self, cluster_id): - cluster_id """ + pass def get_server(self, openstack_id): """ @@ -473,6 +468,7 @@ def get_server(self, openstack_id): - openstack_id: Id of the server. """ + pass def stop_server(self, openstack_id): """ @@ -483,6 +479,7 @@ def stop_server(self, openstack_id): - openstack_id: Id of the server. """ + pass def create_snapshot(self, openstack_id, name, username, base_tags, description): """ @@ -498,6 +495,7 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): - description: Description of the new snapshot """ + pass def get_limits(self): """ @@ -507,6 +505,7 @@ def get_limits(self): 'totalInstancesUsed': totalInstancesUsed} """ + pass def start_cluster(self, public_key, master_instance, worker_instances, user): """ @@ -517,6 +516,7 @@ def start_cluster(self, public_key, master_instance, worker_instances, user): - user """ + pass def terminate_cluster(self, cluster_id): """ @@ -524,6 +524,7 @@ def terminate_cluster(self, cluster_id): - cluster_id """ + pass def delete_image(self, image_id): """ @@ -534,6 +535,7 @@ def delete_image(self, image_id): - image_id: Id of image """ + pass def detach_volume(self, volume_id, server_id): """ @@ -544,6 +546,7 @@ 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): """ @@ -553,6 +556,7 @@ def delete_volume(self, volume_id): - volume_id """ + pass def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -564,6 +568,7 @@ def attach_volume_to_server(self, openstack_id, volume_id): - volume_id: Id of volume """ + pass def resume_server(self, openstack_id): """ @@ -573,6 +578,7 @@ def resume_server(self, openstack_id): - openstack_id: Id of the server """ + pass def create_volume(self, volume_name, volume_storage, metadata): """ @@ -584,6 +590,7 @@ 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): """ @@ -595,6 +602,7 @@ 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): """ @@ -606,6 +614,7 @@ 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): """ @@ -618,6 +627,7 @@ def create_volume_snapshot(self, volume_id, name, description): - description: Description for the volume snapshot """ + pass def get_volume_snapshot(self, name_or_id): """ @@ -628,6 +638,7 @@ 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): """ @@ -637,6 +648,7 @@ def delete_volume_snapshot(self, snapshot_id): - snapshot_id """ + pass def reboot_hard_server(self, openstack_id): """ @@ -646,6 +658,7 @@ def reboot_hard_server(self, openstack_id): - openstack_id: Id of the server """ + pass def reboot_soft_server(self, openstack_id): """ @@ -655,6 +668,7 @@ def reboot_soft_server(self, openstack_id): - openstack_id: Id of the server """ + pass class Client(Iface): @@ -662,7 +676,6 @@ 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: @@ -679,7 +692,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) @@ -699,9 +712,7 @@ 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): """ @@ -713,9 +724,7 @@ 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() @@ -734,10 +743,7 @@ 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): """ @@ -748,7 +754,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() @@ -767,19 +773,14 @@ 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() @@ -798,10 +799,7 @@ 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): """ @@ -817,7 +815,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 @@ -838,10 +836,7 @@ 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): """ @@ -856,7 +851,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) @@ -878,9 +873,7 @@ 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): """ @@ -894,9 +887,7 @@ 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) @@ -934,9 +925,7 @@ def add_metadata_to_server(self, openstack_id, metadata): return self.recv_add_metadata_to_server() def send_add_metadata_to_server(self, openstack_id, metadata): - self._oprot.writeMessageBegin( - "add_metadata_to_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_metadata_to_server', TMessageType.CALL, self._seqid) args = add_metadata_to_server_args() args.openstack_id = openstack_id args.metadata = metadata @@ -961,10 +950,7 @@ def recv_add_metadata_to_server(self): raise result.r if result.s is not None: raise result.s - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "add_metadata_to_server failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_metadata_to_server failed: unknown result") def get_flavors(self): """ @@ -976,7 +962,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() @@ -995,9 +981,7 @@ 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): """ @@ -1009,7 +993,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() @@ -1028,9 +1012,7 @@ 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): """ @@ -1042,9 +1024,7 @@ 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() @@ -1063,10 +1043,7 @@ 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): """ @@ -1078,9 +1055,7 @@ 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() @@ -1099,10 +1074,7 @@ 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): """ @@ -1118,7 +1090,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 @@ -1141,9 +1113,7 @@ 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): """ @@ -1155,7 +1125,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) @@ -1177,9 +1147,7 @@ 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): """ @@ -1191,9 +1159,7 @@ 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) @@ -1213,10 +1179,7 @@ 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): """ @@ -1229,7 +1192,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 @@ -1252,9 +1215,7 @@ def recv_resize_volume(self): raise result.v return - def open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): + def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): """ Creates/Updates a security group for a vm with a specific port range for a project @@ -1266,17 +1227,11 @@ def open_port_range_for_vm_in_project( - protocol """ - self.send_open_port_range_for_vm_in_project( - range_start, range_stop, openstack_id, ethertype, protocol - ) + self.send_open_port_range_for_vm_in_project(range_start, range_stop, openstack_id, ethertype, protocol) return self.recv_open_port_range_for_vm_in_project() - def send_open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): - self._oprot.writeMessageBegin( - "open_port_range_for_vm_in_project", TMessageType.CALL, self._seqid - ) + def send_open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): + self._oprot.writeMessageBegin('open_port_range_for_vm_in_project', TMessageType.CALL, self._seqid) args = open_port_range_for_vm_in_project_args() args.range_start = range_start args.range_stop = range_stop @@ -1306,10 +1261,7 @@ def recv_open_port_range_for_vm_in_project(self): raise result.v if result.o is not None: raise result.o - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "open_port_range_for_vm_in_project failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "open_port_range_for_vm_in_project failed: unknown result") def delete_security_group_rule(self, openstack_id): """ @@ -1321,9 +1273,7 @@ def delete_security_group_rule(self, openstack_id): self.recv_delete_security_group_rule() def send_delete_security_group_rule(self, openstack_id): - self._oprot.writeMessageBegin( - "delete_security_group_rule", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_security_group_rule', TMessageType.CALL, self._seqid) args = delete_security_group_rule_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1343,6 +1293,8 @@ def recv_delete_security_group_rule(self): iprot.readMessageEnd() if result.e is not None: raise result.e + if result.f is not None: + raise result.f return def delete_server(self, openstack_id): @@ -1358,7 +1310,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) @@ -1382,19 +1334,7 @@ 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, - research_environment, - additional_security_group_ids, - ): + def start_server(self, flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys, research_environment, additional_security_group_ids): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -1409,34 +1349,11 @@ def start_server( - additional_security_group_ids """ - self.send_start_server( - flavor_name, - image_name, - public_key, - servername, - metadata, - volume_ids_path_new, - volume_ids_path_attach, - additional_keys, - research_environment, - additional_security_group_ids, - ) + self.send_start_server(flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys, research_environment, additional_security_group_ids) 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, - research_environment, - additional_security_group_ids, - ): - 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, additional_security_group_ids): + self._oprot.writeMessageBegin('start_server', TMessageType.CALL, self._seqid) args = start_server_args() args.flavor_name = flavor_name args.image_name = image_name @@ -1475,18 +1392,14 @@ 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() @@ -1505,10 +1418,7 @@ 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): """ @@ -1521,9 +1431,7 @@ 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 @@ -1546,17 +1454,7 @@ 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, - additional_security_group_ids, - ): + def start_server_with_custom_key(self, flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids): """ Start a new server with custom key for ansible. @@ -1571,32 +1469,11 @@ def start_server_with_custom_key( - additional_security_group_ids """ - self.send_start_server_with_custom_key( - flavor_name, - image_name, - servername, - metadata, - research_environment, - volume_ids_path_new, - volume_ids_path_attach, - additional_security_group_ids, - ) + self.send_start_server_with_custom_key(flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids) 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, - additional_security_group_ids, - ): - 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, additional_security_group_ids): + 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 @@ -1633,10 +1510,7 @@ 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): """ @@ -1650,7 +1524,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) @@ -1670,20 +1544,9 @@ 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 @@ -1697,30 +1560,11 @@ def create_and_deploy_playbook( - 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 @@ -1748,10 +1592,7 @@ 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): """ @@ -1765,9 +1606,7 @@ 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) @@ -1789,10 +1628,7 @@ 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): """ @@ -1803,7 +1639,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() @@ -1822,16 +1658,14 @@ 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() @@ -1850,9 +1684,7 @@ 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): """ @@ -1869,7 +1701,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 @@ -1896,10 +1728,7 @@ 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): """ @@ -1910,7 +1739,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() @@ -1931,9 +1760,7 @@ 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): """ @@ -1947,9 +1774,7 @@ 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) @@ -1971,10 +1796,7 @@ 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): """ @@ -1988,9 +1810,7 @@ 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) @@ -2012,10 +1832,7 @@ 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): """ @@ -2029,9 +1846,7 @@ 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) @@ -2055,10 +1870,7 @@ 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): """ @@ -2072,7 +1884,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) @@ -2107,9 +1919,7 @@ 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 @@ -2132,10 +1942,7 @@ 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): """ @@ -2149,9 +1956,7 @@ 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) @@ -2173,10 +1978,7 @@ 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): """ @@ -2191,9 +1993,7 @@ 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 @@ -2216,19 +2016,14 @@ 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() @@ -2247,10 +2042,7 @@ 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): """ @@ -2262,7 +2054,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() @@ -2281,9 +2073,7 @@ 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): """ @@ -2298,9 +2088,7 @@ 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) @@ -2320,10 +2108,7 @@ 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): """ @@ -2338,9 +2123,7 @@ 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) @@ -2360,14 +2143,9 @@ 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 @@ -2379,17 +2157,11 @@ def scale_up_cluster( - 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 @@ -2415,23 +2187,9 @@ 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 @@ -2445,34 +2203,11 @@ def add_cluster_machine( - 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 @@ -2500,10 +2235,7 @@ 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): """ @@ -2515,9 +2247,7 @@ 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) @@ -2539,10 +2269,7 @@ 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): """ @@ -2554,9 +2281,7 @@ 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) @@ -2578,10 +2303,7 @@ 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): """ @@ -2596,7 +2318,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) @@ -2618,9 +2340,7 @@ 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): """ @@ -2635,7 +2355,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) @@ -2676,10 +2396,8 @@ 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 @@ -2707,10 +2425,7 @@ 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): """ @@ -2724,7 +2439,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() @@ -2743,9 +2458,7 @@ 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): """ @@ -2760,7 +2473,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 @@ -2783,9 +2496,7 @@ 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): """ @@ -2797,9 +2508,7 @@ 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) @@ -2821,10 +2530,7 @@ 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): """ @@ -2839,7 +2545,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) @@ -2874,7 +2580,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 @@ -2913,7 +2619,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) @@ -2951,9 +2657,7 @@ 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 @@ -2978,10 +2682,7 @@ 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): """ @@ -2995,7 +2696,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) @@ -3033,7 +2734,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 @@ -3059,9 +2760,7 @@ 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): """ @@ -3073,17 +2772,11 @@ 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 @@ -3109,10 +2802,7 @@ 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): """ @@ -3128,9 +2818,7 @@ 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 @@ -3156,10 +2844,7 @@ 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): """ @@ -3176,9 +2861,7 @@ 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 @@ -3204,10 +2887,7 @@ 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): """ @@ -3222,9 +2902,7 @@ 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) @@ -3246,10 +2924,7 @@ 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): """ @@ -3263,9 +2938,7 @@ 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) @@ -3301,9 +2974,7 @@ 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) @@ -3339,9 +3010,7 @@ 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) @@ -3373,17 +3042,11 @@ 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_metadata_to_server" - ] = Processor.process_add_metadata_to_server + self._processMap["add_udp_security_group"] = Processor.process_add_udp_security_group + self._processMap["add_metadata_to_server"] = Processor.process_add_metadata_to_server 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 @@ -3392,55 +3055,31 @@ def __init__(self, handler): self._processMap["get_volume"] = Processor.process_get_volume self._processMap["get_volumes_by_ids"] = Processor.process_get_volumes_by_ids self._processMap["resize_volume"] = Processor.process_resize_volume - self._processMap[ - "open_port_range_for_vm_in_project" - ] = Processor.process_open_port_range_for_vm_in_project - self._processMap[ - "delete_security_group_rule" - ] = Processor.process_delete_security_group_rule + self._processMap["open_port_range_for_vm_in_project"] = Processor.process_open_port_range_for_vm_in_project + self._processMap["delete_security_group_rule"] = Processor.process_delete_security_group_rule 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 @@ -3454,24 +3093,14 @@ 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 @@ -3486,9 +3115,7 @@ 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() @@ -3509,15 +3136,13 @@ 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() @@ -3534,15 +3159,13 @@ 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() @@ -3559,15 +3182,13 @@ 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() @@ -3584,15 +3205,13 @@ 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() @@ -3609,15 +3228,13 @@ 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() @@ -3637,15 +3254,13 @@ 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() @@ -3668,15 +3283,13 @@ 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() @@ -3688,9 +3301,7 @@ def process_add_metadata_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_metadata_to_server_result() try: - result.success = self._handler.add_metadata_to_server( - args.openstack_id, args.metadata - ) + result.success = self._handler.add_metadata_to_server(args.openstack_id, args.metadata) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3701,15 +3312,13 @@ def process_add_metadata_to_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("add_metadata_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3726,15 +3335,13 @@ 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() @@ -3751,15 +3358,13 @@ 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() @@ -3776,15 +3381,13 @@ 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() @@ -3801,15 +3404,13 @@ 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() @@ -3821,9 +3422,7 @@ 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 @@ -3831,15 +3430,13 @@ 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() @@ -3859,15 +3456,13 @@ 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() @@ -3884,15 +3479,13 @@ 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() @@ -3912,15 +3505,13 @@ 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() @@ -3932,13 +3523,7 @@ def process_open_port_range_for_vm_in_project(self, seqid, iprot, oprot): iprot.readMessageEnd() result = open_port_range_for_vm_in_project_result() try: - result.success = self._handler.open_port_range_for_vm_in_project( - args.range_start, - args.range_stop, - args.openstack_id, - args.ethertype, - args.protocol, - ) + result.success = self._handler.open_port_range_for_vm_in_project(args.range_start, args.range_stop, args.openstack_id, args.ethertype, args.protocol) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3952,15 +3537,13 @@ def process_open_port_range_for_vm_in_project(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("open_port_range_for_vm_in_project", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3979,16 +3562,17 @@ def process_delete_security_group_rule(self, seqid, iprot, oprot): except SecurityGroupRuleNotFoundException as e: msg_type = TMessageType.REPLY result.e = e + except DefaultException as f: + msg_type = TMessageType.REPLY + result.f = f 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_security_group_rule", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4011,15 +3595,13 @@ 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() @@ -4031,18 +3613,7 @@ 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, - args.research_environment, - args.additional_security_group_ids, - ) + 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, args.additional_security_group_ids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4062,15 +3633,13 @@ 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() @@ -4087,15 +3656,13 @@ 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() @@ -4115,15 +3682,13 @@ 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() @@ -4135,16 +3700,7 @@ 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, - args.additional_security_group_ids, - ) + 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, args.additional_security_group_ids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4164,15 +3720,13 @@ 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() @@ -4189,15 +3743,13 @@ 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() @@ -4209,15 +3761,7 @@ 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 @@ -4225,15 +3769,13 @@ 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() @@ -4253,15 +3795,13 @@ 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() @@ -4278,15 +3818,13 @@ 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() @@ -4303,15 +3841,13 @@ 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() @@ -4323,9 +3859,7 @@ 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 @@ -4336,15 +3870,13 @@ 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() @@ -4364,15 +3896,13 @@ 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() @@ -4392,15 +3922,13 @@ 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() @@ -4420,15 +3948,13 @@ 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() @@ -4451,15 +3977,13 @@ 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() @@ -4479,15 +4003,13 @@ 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() @@ -4499,9 +4021,7 @@ 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 @@ -4509,15 +4029,13 @@ 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() @@ -4537,15 +4055,13 @@ 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() @@ -4557,9 +4073,7 @@ 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 @@ -4567,15 +4081,13 @@ 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() @@ -4592,15 +4104,13 @@ 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() @@ -4617,15 +4127,13 @@ 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() @@ -4642,15 +4150,13 @@ 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() @@ -4667,15 +4173,13 @@ 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() @@ -4687,28 +4191,18 @@ 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() @@ -4720,30 +4214,18 @@ 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() @@ -4763,15 +4245,13 @@ 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() @@ -4791,15 +4271,13 @@ 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() @@ -4819,15 +4297,13 @@ 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() @@ -4850,15 +4326,13 @@ 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() @@ -4870,13 +4344,7 @@ 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 @@ -4887,15 +4355,13 @@ 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() @@ -4912,15 +4378,13 @@ 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() @@ -4932,22 +4396,18 @@ 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() @@ -4967,15 +4427,13 @@ 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() @@ -4995,15 +4453,13 @@ 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() @@ -5029,15 +4485,13 @@ 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() @@ -5060,15 +4514,13 @@ 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() @@ -5080,9 +4532,7 @@ 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 @@ -5093,15 +4543,13 @@ 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() @@ -5124,15 +4572,13 @@ 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() @@ -5144,9 +4590,7 @@ 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 @@ -5157,15 +4601,13 @@ 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() @@ -5177,9 +4619,7 @@ 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 @@ -5190,15 +4630,13 @@ 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() @@ -5210,9 +4648,7 @@ 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 @@ -5223,15 +4659,13 @@ 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() @@ -5243,9 +4677,7 @@ 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 @@ -5256,15 +4688,13 @@ 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() @@ -5284,15 +4714,13 @@ 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() @@ -5315,15 +4743,13 @@ 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() @@ -5346,15 +4772,13 @@ 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() @@ -5377,21 +4801,18 @@ 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 @@ -5402,18 +4823,12 @@ 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() @@ -5433,13 +4848,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_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() @@ -5449,26 +4862,19 @@ 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 ) @@ -5479,18 +4885,12 @@ 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() @@ -5510,13 +4910,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_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() @@ -5526,35 +4924,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_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() @@ -5569,11 +4958,9 @@ 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() @@ -5581,18 +4968,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): @@ -5602,18 +4989,12 @@ 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() @@ -5623,11 +5004,7 @@ 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: @@ -5637,18 +5014,12 @@ 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() @@ -5657,35 +5028,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_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() @@ -5700,11 +5062,9 @@ 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() @@ -5712,18 +5072,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): @@ -5733,18 +5093,12 @@ 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() @@ -5757,16 +5111,8 @@ 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: @@ -5778,21 +5124,15 @@ 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() @@ -5802,35 +5142,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_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() @@ -5845,11 +5176,9 @@ 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() @@ -5857,18 +5186,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): @@ -5878,18 +5207,12 @@ 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() @@ -5902,16 +5225,8 @@ 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: @@ -5923,21 +5238,15 @@ 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() @@ -5947,25 +5256,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_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 ) @@ -5977,20 +5279,13 @@ 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() @@ -6000,20 +5295,12 @@ 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: @@ -6023,26 +5310,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("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() @@ -6051,33 +5328,20 @@ 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 ) @@ -6088,18 +5352,12 @@ 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() @@ -6109,11 +5367,7 @@ 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: @@ -6123,18 +5377,12 @@ 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() @@ -6143,25 +5391,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(import_keypair_result) import_keypair_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -6172,18 +5413,12 @@ 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() @@ -6193,11 +5428,7 @@ 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: @@ -6207,18 +5438,12 @@ 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() @@ -6227,26 +5452,19 @@ 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 ) @@ -6258,20 +5476,13 @@ 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() @@ -6284,16 +5495,8 @@ 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: @@ -6310,25 +5513,19 @@ 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() @@ -6338,32 +5535,19 @@ 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 ) @@ -6374,18 +5558,12 @@ 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() @@ -6395,11 +5573,7 @@ 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: @@ -6409,18 +5583,12 @@ 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() @@ -6429,26 +5597,19 @@ 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 ) @@ -6460,20 +5621,13 @@ 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() @@ -6498,17 +5652,15 @@ 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() @@ -6518,33 +5670,20 @@ 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 ) @@ -6556,20 +5695,13 @@ class add_metadata_to_server_args(object): """ - def __init__( - self, - openstack_id=None, - metadata=None, - ): + + def __init__(self, openstack_id=None, metadata=None,): self.openstack_id = openstack_id 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() @@ -6579,11 +5711,7 @@ 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: @@ -6591,16 +5719,8 @@ def read(self, iprot): self.metadata = {} (_ktype60, _vtype61, _size59) = iprot.readMapBegin() for _i63 in range(_size59): - _key64 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val65 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key64 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val65 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key64] = _val65 iprot.readMapEnd() else: @@ -6612,29 +5732,19 @@ 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_metadata_to_server_args") + oprot.writeStructBegin('add_metadata_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.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 kiter66, viter67 in self.metadata.items(): - oprot.writeString( - kiter66.encode("utf-8") if sys.version_info[0] == 2 else kiter66 - ) - oprot.writeString( - viter67.encode("utf-8") if sys.version_info[0] == 2 else viter67 - ) + oprot.writeString(kiter66.encode('utf-8') if sys.version_info[0] == 2 else kiter66) + oprot.writeString(viter67.encode('utf-8') if sys.version_info[0] == 2 else viter67) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6644,33 +5754,20 @@ 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_metadata_to_server_args) add_metadata_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 ) @@ -6683,22 +5780,14 @@ class add_metadata_to_server_result(object): """ - def __init__( - self, - success=None, - r=None, - s=None, - ): + + def __init__(self, success=None, r=None, s=None,): self.success = success 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() @@ -6711,16 +5800,8 @@ def read(self, iprot): self.success = {} (_ktype69, _vtype70, _size68) = iprot.readMapBegin() for _i72 in range(_size68): - _key73 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val74 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key73 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val74 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key73] = _val74 iprot.readMapEnd() else: @@ -6742,29 +5823,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("add_metadata_to_server_result") + oprot.writeStructBegin('add_metadata_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 kiter75, viter76 in self.success.items(): - oprot.writeString( - kiter75.encode("utf-8") if sys.version_info[0] == 2 else kiter75 - ) - oprot.writeString( - viter76.encode("utf-8") if sys.version_info[0] == 2 else viter76 - ) + oprot.writeString(kiter75.encode('utf-8') if sys.version_info[0] == 2 else kiter75) + oprot.writeString(viter76.encode('utf-8') if sys.version_info[0] == 2 else viter76) oprot.writeMapEnd() 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.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 2) + oprot.writeFieldBegin('s', TType.STRUCT, 2) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6774,49 +5849,28 @@ 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_metadata_to_server_result) add_metadata_to_server_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 2 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (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() @@ -6831,11 +5885,9 @@ 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() @@ -6843,18 +5895,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): @@ -6864,18 +5916,12 @@ 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() @@ -6901,13 +5947,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_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 iter83 in self.success: iter83.write(oprot) @@ -6920,35 +5964,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_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() @@ -6963,11 +5998,9 @@ 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() @@ -6975,18 +6008,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): @@ -6996,18 +6029,12 @@ 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() @@ -7033,13 +6060,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_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 iter90 in self.success: iter90.write(oprot) @@ -7052,35 +6077,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_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() @@ -7095,11 +6111,9 @@ 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() @@ -7107,18 +6121,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): @@ -7128,18 +6142,12 @@ 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() @@ -7165,13 +6173,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_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 iter97 in self.success: iter97.write(oprot) @@ -7184,35 +6190,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_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() @@ -7227,11 +6224,9 @@ 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() @@ -7239,18 +6234,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): @@ -7260,18 +6255,12 @@ 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() @@ -7297,13 +6286,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_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 iter104 in self.success: iter104.write(oprot) @@ -7316,25 +6303,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_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 ) @@ -7346,20 +6326,13 @@ 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() @@ -7369,11 +6342,7 @@ 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: @@ -7388,21 +6357,15 @@ 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() @@ -7412,33 +6375,20 @@ 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 ) @@ -7450,20 +6400,13 @@ 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() @@ -7489,17 +6432,15 @@ 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() @@ -7509,32 +6450,19 @@ 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 ) @@ -7545,18 +6473,12 @@ 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() @@ -7566,11 +6488,7 @@ 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: @@ -7580,18 +6498,12 @@ 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() @@ -7600,26 +6512,19 @@ 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 ) @@ -7631,20 +6536,13 @@ 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() @@ -7670,17 +6568,15 @@ 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() @@ -7690,32 +6586,19 @@ 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 ) @@ -7726,18 +6609,12 @@ 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() @@ -7750,11 +6627,7 @@ def read(self, iprot): self.volume_ids = [] (_etype108, _size105) = iprot.readListBegin() for _i109 in range(_size105): - _elem110 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem110 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.volume_ids.append(_elem110) iprot.readListEnd() else: @@ -7766,18 +6639,14 @@ 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 iter111 in self.volume_ids: - oprot.writeString( - iter111.encode("utf-8") if sys.version_info[0] == 2 else iter111 - ) + oprot.writeString(iter111.encode('utf-8') if sys.version_info[0] == 2 else iter111) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7787,26 +6656,19 @@ 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 ) @@ -7817,18 +6679,12 @@ 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() @@ -7854,13 +6710,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_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 iter118 in self.success: iter118.write(oprot) @@ -7873,25 +6727,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_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 ) @@ -7903,20 +6750,13 @@ 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() @@ -7926,11 +6766,7 @@ 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: @@ -7945,21 +6781,15 @@ 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() @@ -7969,33 +6799,20 @@ 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 ) @@ -8006,18 +6823,12 @@ 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() @@ -8037,13 +6848,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("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() @@ -8053,26 +6862,19 @@ 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 ) @@ -8087,14 +6889,8 @@ class open_port_range_for_vm_in_project_args(object): """ - def __init__( - self, - range_start=None, - range_stop=None, - openstack_id=None, - ethertype="IPv4", - protocol="TCP", - ): + + def __init__(self, range_start=None, range_stop=None, openstack_id=None, ethertype="IPv4", protocol="TCP",): self.range_start = range_start self.range_stop = range_stop self.openstack_id = openstack_id @@ -8102,11 +6898,7 @@ def __init__( self.protocol = protocol 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() @@ -8126,29 +6918,17 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: 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 == 4: if ftype == TType.STRING: - self.ethertype = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ethertype = 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.protocol = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.protocol = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -8158,42 +6938,28 @@ 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("open_port_range_for_vm_in_project_args") + oprot.writeStructBegin('open_port_range_for_vm_in_project_args') if self.range_start is not None: - oprot.writeFieldBegin("range_start", TType.I32, 1) + oprot.writeFieldBegin('range_start', TType.I32, 1) oprot.writeI32(self.range_start) oprot.writeFieldEnd() if self.range_stop is not None: - oprot.writeFieldBegin("range_stop", TType.I32, 2) + oprot.writeFieldBegin('range_stop', TType.I32, 2) oprot.writeI32(self.range_stop) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 3) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 3) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.ethertype is not None: - oprot.writeFieldBegin("ethertype", TType.STRING, 4) - oprot.writeString( - self.ethertype.encode("utf-8") - if sys.version_info[0] == 2 - else self.ethertype - ) + oprot.writeFieldBegin('ethertype', TType.STRING, 4) + oprot.writeString(self.ethertype.encode('utf-8') if sys.version_info[0] == 2 else self.ethertype) oprot.writeFieldEnd() if self.protocol is not None: - oprot.writeFieldBegin("protocol", TType.STRING, 5) - oprot.writeString( - self.protocol.encode("utf-8") - if sys.version_info[0] == 2 - else self.protocol - ) + oprot.writeFieldBegin('protocol', TType.STRING, 5) + oprot.writeString(self.protocol.encode('utf-8') if sys.version_info[0] == 2 else self.protocol) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8202,54 +6968,23 @@ 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(open_port_range_for_vm_in_project_args) open_port_range_for_vm_in_project_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I32, - "range_start", - None, - None, - ), # 1 - ( - 2, - TType.I32, - "range_stop", - None, - None, - ), # 2 - ( - 3, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "ethertype", - "UTF8", - "IPv4", - ), # 4 - ( - 5, - TType.STRING, - "protocol", - "UTF8", - "TCP", - ), # 5 + (1, TType.I32, 'range_start', None, None, ), # 1 + (2, TType.I32, 'range_stop', None, None, ), # 2 + (3, TType.STRING, 'openstack_id', 'UTF8', None, ), # 3 + (4, TType.STRING, 'ethertype', 'UTF8', "IPv4", ), # 4 + (5, TType.STRING, 'protocol', 'UTF8', "TCP", ), # 5 ) @@ -8263,24 +6998,15 @@ class open_port_range_for_vm_in_project_result(object): """ - def __init__( - self, - success=None, - e=None, - v=None, - o=None, - ): + + def __init__(self, success=None, e=None, v=None, o=None,): self.success = success self.e = e self.v = v 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() @@ -8290,11 +7016,7 @@ 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: @@ -8319,29 +7041,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("open_port_range_for_vm_in_project_result") + oprot.writeStructBegin('open_port_range_for_vm_in_project_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.v is not None: - oprot.writeFieldBegin("v", TType.STRUCT, 2) + oprot.writeFieldBegin('v', TType.STRUCT, 2) self.v.write(oprot) oprot.writeFieldEnd() if self.o is not None: - oprot.writeFieldBegin("o", TType.STRUCT, 3) + oprot.writeFieldBegin('o', TType.STRUCT, 3) self.o.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8351,46 +7067,21 @@ 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(open_port_range_for_vm_in_project_result) open_port_range_for_vm_in_project_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "v", - [DefaultException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "o", - [OpenStackConflictException, None], - None, - ), # 3 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'v', [DefaultException, None], None, ), # 2 + (3, TType.STRUCT, 'o', [OpenStackConflictException, None], None, ), # 3 ) @@ -8401,18 +7092,12 @@ class delete_security_group_rule_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() @@ -8422,11 +7107,7 @@ 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: @@ -8436,18 +7117,12 @@ 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_security_group_rule_args") + oprot.writeStructBegin('delete_security_group_rule_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() @@ -8456,26 +7131,19 @@ 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_security_group_rule_args) delete_security_group_rule_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -8483,21 +7151,17 @@ class delete_security_group_rule_result(object): """ Attributes: - e + - f """ - def __init__( - self, - e=None, - ): + + def __init__(self, e=None, f=None,): self.e = e + self.f = f 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() @@ -8510,6 +7174,11 @@ def read(self, iprot): self.e = SecurityGroupRuleNotFoundException.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.f = DefaultException.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -8517,15 +7186,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_security_group_rule_result") + oprot.writeStructBegin('delete_security_group_rule_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.f is not None: + oprot.writeFieldBegin('f', TType.STRUCT, 2) + self.f.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8533,26 +7204,20 @@ 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_security_group_rule_result) delete_security_group_rule_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [SecurityGroupRuleNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 'e', [SecurityGroupRuleNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'f', [DefaultException, None], None, ), # 2 ) @@ -8563,18 +7228,12 @@ 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() @@ -8584,11 +7243,7 @@ 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: @@ -8598,18 +7253,12 @@ 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() @@ -8618,26 +7267,19 @@ 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 ) @@ -8649,20 +7291,13 @@ 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() @@ -8687,17 +7322,15 @@ 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() @@ -8707,33 +7340,20 @@ 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 ) @@ -8753,19 +7373,8 @@ class start_server_args(object): """ - 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, - additional_security_group_ids=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, additional_security_group_ids=None,): self.flavor_name = flavor_name self.image_name = image_name self.public_key = public_key @@ -8778,11 +7387,7 @@ def __init__( self.additional_security_group_ids = additional_security_group_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() @@ -8792,38 +7397,22 @@ 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: @@ -8831,16 +7420,8 @@ def read(self, iprot): self.metadata = {} (_ktype120, _vtype121, _size119) = iprot.readMapBegin() for _i123 in range(_size119): - _key124 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val125 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key124 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val125 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key124] = _val125 iprot.readMapEnd() else: @@ -8853,16 +7434,8 @@ def read(self, iprot): _elem131 = {} (_ktype133, _vtype134, _size132) = iprot.readMapBegin() for _i136 in range(_size132): - _key137 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val138 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key137 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val138 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem131[_key137] = _val138 iprot.readMapEnd() self.volume_ids_path_new.append(_elem131) @@ -8877,16 +7450,8 @@ def read(self, iprot): _elem144 = {} (_ktype146, _vtype147, _size145) = iprot.readMapBegin() for _i149 in range(_size145): - _key150 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val151 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key150 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val151 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem144[_key150] = _val151 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem144) @@ -8898,22 +7463,14 @@ def read(self, iprot): self.additional_keys = [] (_etype155, _size152) = iprot.readListBegin() for _i156 in range(_size152): - _elem157 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem157 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_keys.append(_elem157) 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() - ) + 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 == 11: @@ -8921,11 +7478,7 @@ def read(self, iprot): self.additional_security_group_ids = [] (_etype161, _size158) = iprot.readListBegin() for _i162 in range(_size158): - _elem163 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem163 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_security_group_ids.append(_elem163) iprot.readListEnd() else: @@ -8937,117 +7490,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("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 kiter164, viter165 in self.metadata.items(): - oprot.writeString( - kiter164.encode("utf-8") if sys.version_info[0] == 2 else kiter164 - ) - oprot.writeString( - viter165.encode("utf-8") if sys.version_info[0] == 2 else viter165 - ) + oprot.writeString(kiter164.encode('utf-8') if sys.version_info[0] == 2 else kiter164) + oprot.writeString(viter165.encode('utf-8') if sys.version_info[0] == 2 else viter165) 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 iter166 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter166)) for kiter167, viter168 in iter166.items(): - oprot.writeString( - kiter167.encode("utf-8") - if sys.version_info[0] == 2 - else kiter167 - ) - oprot.writeString( - viter168.encode("utf-8") - if sys.version_info[0] == 2 - else viter168 - ) + oprot.writeString(kiter167.encode('utf-8') if sys.version_info[0] == 2 else kiter167) + oprot.writeString(viter168.encode('utf-8') if sys.version_info[0] == 2 else viter168) 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 iter169 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter169)) for kiter170, viter171 in iter169.items(): - oprot.writeString( - kiter170.encode("utf-8") - if sys.version_info[0] == 2 - else kiter170 - ) - oprot.writeString( - viter171.encode("utf-8") - if sys.version_info[0] == 2 - else viter171 - ) + oprot.writeString(kiter170.encode('utf-8') if sys.version_info[0] == 2 else kiter170) + oprot.writeString(viter171.encode('utf-8') if sys.version_info[0] == 2 else viter171) 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 iter172 in self.additional_keys: - oprot.writeString( - iter172.encode("utf-8") if sys.version_info[0] == 2 else iter172 - ) + oprot.writeString(iter172.encode('utf-8') if sys.version_info[0] == 2 else iter172) 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.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() if self.additional_security_group_ids is not None: - oprot.writeFieldBegin("additional_security_group_ids", TType.LIST, 11) + oprot.writeFieldBegin('additional_security_group_ids', TType.LIST, 11) oprot.writeListBegin(TType.STRING, len(self.additional_security_group_ids)) for iter173 in self.additional_security_group_ids: - oprot.writeString( - iter173.encode("utf-8") if sys.version_info[0] == 2 else iter173 - ) + oprot.writeString(iter173.encode('utf-8') if sys.version_info[0] == 2 else iter173) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9057,90 +7564,29 @@ 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 - ( - 10, - TType.STRING, - "research_environment", - "UTF8", - None, - ), # 10 - ( - 11, - TType.LIST, - "additional_security_group_ids", - (TType.STRING, "UTF8", False), - None, - ), # 11 + (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 + (11, TType.LIST, 'additional_security_group_ids', (TType.STRING, 'UTF8', False), None, ), # 11 ) @@ -9156,15 +7602,8 @@ 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 @@ -9173,11 +7612,7 @@ def __init__( 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() @@ -9187,11 +7622,7 @@ 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: @@ -9226,37 +7657,31 @@ 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() @@ -9266,72 +7691,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(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() @@ -9346,11 +7732,9 @@ 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() @@ -9358,18 +7742,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): @@ -9379,18 +7763,12 @@ 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() @@ -9410,13 +7788,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_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() @@ -9426,25 +7802,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_result) is_bibigrid_available_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -9456,20 +7825,13 @@ 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() @@ -9479,20 +7841,12 @@ 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: @@ -9502,26 +7856,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("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() @@ -9530,33 +7874,20 @@ 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 ) @@ -9567,18 +7898,12 @@ 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() @@ -9598,13 +7923,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("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() @@ -9614,26 +7937,19 @@ 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 ) @@ -9651,17 +7967,8 @@ 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, - additional_security_group_ids=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, additional_security_group_ids=None,): self.flavor_name = flavor_name self.image_name = image_name self.servername = servername @@ -9672,11 +7979,7 @@ def __init__( self.additional_security_group_ids = additional_security_group_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() @@ -9686,29 +7989,17 @@ 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: @@ -9716,27 +8007,15 @@ def read(self, iprot): self.metadata = {} (_ktype175, _vtype176, _size174) = iprot.readMapBegin() for _i178 in range(_size174): - _key179 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val180 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key179 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val180 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key179] = _val180 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: @@ -9747,16 +8026,8 @@ def read(self, iprot): _elem186 = {} (_ktype188, _vtype189, _size187) = iprot.readMapBegin() for _i191 in range(_size187): - _key192 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val193 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key192 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val193 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem186[_key192] = _val193 iprot.readMapEnd() self.volume_ids_path_new.append(_elem186) @@ -9771,16 +8042,8 @@ def read(self, iprot): _elem199 = {} (_ktype201, _vtype202, _size200) = iprot.readMapBegin() for _i204 in range(_size200): - _key205 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val206 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key205 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val206 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem199[_key205] = _val206 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem199) @@ -9792,11 +8055,7 @@ def read(self, iprot): self.additional_security_group_ids = [] (_etype210, _size207) = iprot.readListBegin() for _i211 in range(_size207): - _elem212 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem212 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_security_group_ids.append(_elem212) iprot.readListEnd() else: @@ -9808,100 +8067,60 @@ 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 kiter213, viter214 in self.metadata.items(): - oprot.writeString( - kiter213.encode("utf-8") if sys.version_info[0] == 2 else kiter213 - ) - oprot.writeString( - viter214.encode("utf-8") if sys.version_info[0] == 2 else viter214 - ) + oprot.writeString(kiter213.encode('utf-8') if sys.version_info[0] == 2 else kiter213) + oprot.writeString(viter214.encode('utf-8') if sys.version_info[0] == 2 else viter214) 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 iter215 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter215)) for kiter216, viter217 in iter215.items(): - oprot.writeString( - kiter216.encode("utf-8") - if sys.version_info[0] == 2 - else kiter216 - ) - oprot.writeString( - viter217.encode("utf-8") - if sys.version_info[0] == 2 - else viter217 - ) + oprot.writeString(kiter216.encode('utf-8') if sys.version_info[0] == 2 else kiter216) + oprot.writeString(viter217.encode('utf-8') if sys.version_info[0] == 2 else viter217) 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 iter218 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter218)) for kiter219, viter220 in iter218.items(): - oprot.writeString( - kiter219.encode("utf-8") - if sys.version_info[0] == 2 - else kiter219 - ) - oprot.writeString( - viter220.encode("utf-8") - if sys.version_info[0] == 2 - else viter220 - ) + oprot.writeString(kiter219.encode('utf-8') if sys.version_info[0] == 2 else kiter219) + oprot.writeString(viter220.encode('utf-8') if sys.version_info[0] == 2 else viter220) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.additional_security_group_ids is not None: - oprot.writeFieldBegin("additional_security_group_ids", TType.LIST, 9) + oprot.writeFieldBegin('additional_security_group_ids', TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.additional_security_group_ids)) for iter221 in self.additional_security_group_ids: - oprot.writeString( - iter221.encode("utf-8") if sys.version_info[0] == 2 else iter221 - ) + oprot.writeString(iter221.encode('utf-8') if sys.version_info[0] == 2 else iter221) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9911,76 +8130,27 @@ 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 - ( - 9, - TType.LIST, - "additional_security_group_ids", - (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_security_group_ids', (TType.STRING, 'UTF8', False), None, ), # 9 ) @@ -9996,15 +8166,8 @@ 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 @@ -10013,11 +8176,7 @@ def __init__( 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() @@ -10027,11 +8186,7 @@ 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: @@ -10066,37 +8221,31 @@ 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() @@ -10106,60 +8255,23 @@ 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 ) @@ -10170,18 +8282,12 @@ 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() @@ -10191,11 +8297,7 @@ 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: @@ -10205,16 +8307,12 @@ 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() @@ -10223,26 +8321,19 @@ 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 ) @@ -10253,18 +8344,12 @@ 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() @@ -10284,13 +8369,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("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() @@ -10300,25 +8383,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(exist_server_result) exist_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -10335,16 +8411,8 @@ 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 @@ -10354,11 +8422,7 @@ def __init__( 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() @@ -10368,20 +8432,12 @@ 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: @@ -10397,11 +8453,7 @@ 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: @@ -10409,11 +8461,7 @@ def read(self, iprot): self.apt_packages = [] (_etype231, _size228) = iprot.readListBegin() for _i232 in range(_size228): - _elem233 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem233 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.apt_packages.append(_elem233) iprot.readListEnd() else: @@ -10425,11 +8473,7 @@ 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: @@ -10439,62 +8483,42 @@ 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 iter234 in self.conda_packages: iter234.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 iter235 in self.apt_packages: - oprot.writeString( - iter235.encode("utf-8") if sys.version_info[0] == 2 else iter235 - ) + oprot.writeString(iter235.encode('utf-8') if sys.version_info[0] == 2 else iter235) 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() @@ -10503,68 +8527,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(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 ) @@ -10576,20 +8557,13 @@ 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() @@ -10614,17 +8588,15 @@ 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() @@ -10634,32 +8606,19 @@ 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 ) @@ -10670,18 +8629,12 @@ 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() @@ -10691,11 +8644,7 @@ 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: @@ -10705,18 +8654,12 @@ 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() @@ -10725,26 +8668,19 @@ 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 ) @@ -10756,20 +8692,13 @@ 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() @@ -10795,17 +8724,15 @@ 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() @@ -10815,42 +8742,27 @@ 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() @@ -10865,11 +8777,9 @@ 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() @@ -10877,18 +8787,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): @@ -10898,18 +8808,12 @@ 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() @@ -10929,13 +8833,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_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() @@ -10945,35 +8847,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(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() @@ -10988,11 +8881,9 @@ 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() @@ -11000,18 +8891,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): @@ -11021,18 +8912,12 @@ 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() @@ -11042,11 +8927,7 @@ 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: @@ -11056,18 +8937,12 @@ 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() @@ -11076,25 +8951,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_result) get_forc_url_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -11108,24 +8976,15 @@ 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() @@ -11135,38 +8994,22 @@ 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: @@ -11176,40 +9019,24 @@ 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() @@ -11218,47 +9045,22 @@ 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 ) @@ -11271,22 +9073,14 @@ 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() @@ -11317,21 +9111,19 @@ 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() @@ -11341,49 +9133,28 @@ 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() @@ -11398,11 +9169,9 @@ 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() @@ -11410,18 +9179,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): @@ -11432,20 +9201,13 @@ 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() @@ -11476,20 +9238,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_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 iter242 in self.success: iter242.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() @@ -11499,32 +9259,19 @@ 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 ) @@ -11535,18 +9282,12 @@ 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() @@ -11556,11 +9297,7 @@ 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: @@ -11570,16 +9307,12 @@ 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() @@ -11588,26 +9321,19 @@ 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 ) @@ -11619,20 +9345,13 @@ 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() @@ -11663,20 +9382,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_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 iter249 in self.success: iter249.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() @@ -11686,32 +9403,19 @@ 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 ) @@ -11722,18 +9426,12 @@ 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() @@ -11743,11 +9441,7 @@ 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: @@ -11757,18 +9451,12 @@ 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() @@ -11777,26 +9465,19 @@ 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 ) @@ -11808,20 +9489,13 @@ 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() @@ -11852,20 +9526,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_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 iter256 in self.success: iter256.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() @@ -11875,32 +9547,19 @@ 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 ) @@ -11911,18 +9570,12 @@ 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() @@ -11942,13 +9595,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_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() @@ -11958,26 +9609,19 @@ 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 ) @@ -11990,22 +9634,14 @@ 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() @@ -12036,21 +9672,19 @@ 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() @@ -12060,39 +9694,20 @@ 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 ) @@ -12103,18 +9718,12 @@ 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() @@ -12134,13 +9743,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("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() @@ -12150,26 +9757,19 @@ 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 ) @@ -12180,18 +9780,12 @@ 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() @@ -12211,13 +9805,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("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() @@ -12227,26 +9819,19 @@ 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 ) @@ -12258,20 +9843,13 @@ 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() @@ -12286,11 +9864,7 @@ 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: @@ -12300,22 +9874,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("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() @@ -12324,33 +9892,20 @@ 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 ) @@ -12362,20 +9917,13 @@ 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() @@ -12388,16 +9936,8 @@ def read(self, iprot): self.success = {} (_ktype258, _vtype259, _size257) = iprot.readMapBegin() for _i261 in range(_size257): - _key262 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val263 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key262 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val263 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key262] = _val263 iprot.readMapEnd() else: @@ -12414,25 +9954,19 @@ 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 kiter264, viter265 in self.success.items(): - oprot.writeString( - kiter264.encode("utf-8") if sys.version_info[0] == 2 else kiter264 - ) - oprot.writeString( - viter265.encode("utf-8") if sys.version_info[0] == 2 else viter265 - ) + oprot.writeString(kiter264.encode('utf-8') if sys.version_info[0] == 2 else kiter264) + oprot.writeString(viter265.encode('utf-8') if sys.version_info[0] == 2 else viter265) 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() @@ -12442,32 +9976,19 @@ 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 ) @@ -12478,18 +9999,12 @@ 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() @@ -12509,13 +10024,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_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() @@ -12525,26 +10038,19 @@ 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 ) @@ -12556,20 +10062,13 @@ 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() @@ -12582,11 +10081,7 @@ def read(self, iprot): self.success = [] (_etype269, _size266) = iprot.readListBegin() for _i270 in range(_size266): - _elem271 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem271 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem271) iprot.readListEnd() else: @@ -12603,22 +10098,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_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 iter272 in self.success: - oprot.writeString( - iter272.encode("utf-8") if sys.version_info[0] == 2 else iter272 - ) + oprot.writeString(iter272.encode('utf-8') if sys.version_info[0] == 2 else iter272) 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() @@ -12628,32 +10119,19 @@ 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 ) @@ -12665,20 +10143,13 @@ 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() @@ -12693,11 +10164,7 @@ 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: @@ -12707,22 +10174,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("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() @@ -12731,33 +10192,20 @@ 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 ) @@ -12769,20 +10217,13 @@ 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() @@ -12795,16 +10236,8 @@ def read(self, iprot): self.success = {} (_ktype274, _vtype275, _size273) = iprot.readMapBegin() for _i277 in range(_size273): - _key278 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val279 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key278 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val279 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key278] = _val279 iprot.readMapEnd() else: @@ -12821,25 +10254,19 @@ 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 kiter280, viter281 in self.success.items(): - oprot.writeString( - kiter280.encode("utf-8") if sys.version_info[0] == 2 else kiter280 - ) - oprot.writeString( - viter281.encode("utf-8") if sys.version_info[0] == 2 else viter281 - ) + oprot.writeString(kiter280.encode('utf-8') if sys.version_info[0] == 2 else kiter280) + oprot.writeString(viter281.encode('utf-8') if sys.version_info[0] == 2 else viter281) 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() @@ -12849,42 +10276,27 @@ 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() @@ -12899,11 +10311,9 @@ 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() @@ -12911,18 +10321,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): @@ -12932,18 +10342,12 @@ 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() @@ -12969,13 +10373,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_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 iter288 in self.success: iter288.write(oprot) @@ -12988,35 +10390,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_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() @@ -13031,11 +10424,9 @@ 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() @@ -13043,18 +10434,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): @@ -13064,18 +10455,12 @@ 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() @@ -13101,13 +10486,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_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 iter295 in self.success: iter295.write(oprot) @@ -13120,25 +10503,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_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 ) @@ -13149,18 +10525,12 @@ 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() @@ -13173,11 +10543,7 @@ def read(self, iprot): self.server_ids = [] (_etype299, _size296) = iprot.readListBegin() for _i300 in range(_size296): - _elem301 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem301 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.server_ids.append(_elem301) iprot.readListEnd() else: @@ -13189,18 +10555,14 @@ 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 iter302 in self.server_ids: - oprot.writeString( - iter302.encode("utf-8") if sys.version_info[0] == 2 else iter302 - ) + oprot.writeString(iter302.encode('utf-8') if sys.version_info[0] == 2 else iter302) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13210,26 +10572,19 @@ 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 ) @@ -13240,18 +10595,12 @@ 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() @@ -13277,13 +10626,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_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 iter309 in self.success: iter309.write(oprot) @@ -13296,25 +10643,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_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 ) @@ -13325,18 +10665,12 @@ 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() @@ -13346,11 +10680,7 @@ 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: @@ -13360,18 +10690,12 @@ 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() @@ -13380,26 +10704,19 @@ 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 ) @@ -13410,18 +10727,12 @@ 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() @@ -13447,13 +10758,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_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 iter316 in self.success: iter316.write(oprot) @@ -13466,25 +10775,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_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 ) @@ -13501,16 +10803,8 @@ 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 @@ -13520,11 +10814,7 @@ def __init__( 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() @@ -13534,29 +10824,17 @@ 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: @@ -13569,11 +10847,7 @@ def read(self, iprot): self.names = [] (_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.names.append(_elem322) iprot.readListEnd() else: @@ -13595,54 +10869,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("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 iter323 in self.names: - 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.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() @@ -13652,68 +10910,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_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 ) @@ -13724,18 +10939,12 @@ 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() @@ -13748,19 +10957,11 @@ 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() - ) + _key329 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _val330 = [] (_etype334, _size331) = iprot.readListBegin() for _i335 in range(_size331): - _elem336 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem336 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _val330.append(_elem336) iprot.readListEnd() self.success[_key329] = _val330 @@ -13774,23 +10975,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("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 kiter337, viter338 in self.success.items(): - oprot.writeString( - kiter337.encode("utf-8") if sys.version_info[0] == 2 else kiter337 - ) + oprot.writeString(kiter337.encode('utf-8') if sys.version_info[0] == 2 else kiter337) oprot.writeListBegin(TType.STRING, len(viter338)) for iter339 in viter338: - oprot.writeString( - iter339.encode("utf-8") if sys.version_info[0] == 2 else iter339 - ) + oprot.writeString(iter339.encode('utf-8') if sys.version_info[0] == 2 else iter339) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -13801,25 +10996,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(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 ) @@ -13838,18 +11026,8 @@ 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 @@ -13861,11 +11039,7 @@ def __init__( 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() @@ -13875,65 +11049,37 @@ 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: @@ -13953,71 +11099,43 @@ 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() @@ -14027,82 +11145,27 @@ 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 ) @@ -14113,18 +11176,12 @@ 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() @@ -14134,11 +11191,7 @@ 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: @@ -14148,18 +11201,12 @@ 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() @@ -14168,25 +11215,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(add_cluster_machine_result) add_cluster_machine_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -14197,18 +11237,12 @@ 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() @@ -14218,11 +11252,7 @@ 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: @@ -14232,18 +11262,12 @@ 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() @@ -14252,26 +11276,19 @@ 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 ) @@ -14283,20 +11300,13 @@ 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() @@ -14322,17 +11332,15 @@ 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() @@ -14342,32 +11350,19 @@ 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 ) @@ -14378,18 +11373,12 @@ 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() @@ -14399,11 +11388,7 @@ 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: @@ -14413,18 +11398,12 @@ 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() @@ -14433,26 +11412,19 @@ 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 ) @@ -14464,20 +11436,13 @@ 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() @@ -14490,16 +11455,8 @@ 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: @@ -14516,25 +11473,19 @@ 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 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() 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() @@ -14544,32 +11495,19 @@ 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 ) @@ -14580,18 +11518,12 @@ 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() @@ -14601,11 +11533,7 @@ 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: @@ -14615,18 +11543,12 @@ 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() @@ -14635,26 +11557,19 @@ 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 ) @@ -14666,20 +11581,13 @@ 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() @@ -14705,17 +11613,15 @@ 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() @@ -14725,32 +11631,19 @@ 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 ) @@ -14761,18 +11654,12 @@ 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() @@ -14782,11 +11669,7 @@ 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: @@ -14796,18 +11679,12 @@ 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() @@ -14816,26 +11693,19 @@ 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 ) @@ -14847,20 +11717,13 @@ 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() @@ -14885,17 +11748,15 @@ 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() @@ -14905,33 +11766,20 @@ 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 ) @@ -14946,14 +11794,8 @@ 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 @@ -14961,11 +11803,7 @@ def __init__( 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() @@ -14975,29 +11813,17 @@ 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: @@ -15005,22 +11831,14 @@ def read(self, iprot): self.base_tags = [] (_etype352, _size349) = iprot.readListBegin() for _i353 in range(_size349): - _elem354 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem354 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.base_tags.append(_elem354) 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: @@ -15030,49 +11848,31 @@ 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 iter355 in self.base_tags: - oprot.writeString( - iter355.encode("utf-8") if sys.version_info[0] == 2 else iter355 - ) + oprot.writeString(iter355.encode('utf-8') if sys.version_info[0] == 2 else iter355) 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() @@ -15081,54 +11881,23 @@ 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 ) @@ -15141,22 +11910,14 @@ 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() @@ -15166,11 +11927,7 @@ 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: @@ -15190,25 +11947,19 @@ 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() @@ -15218,49 +11969,28 @@ 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() @@ -15275,11 +12005,9 @@ 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() @@ -15287,18 +12015,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): @@ -15308,18 +12036,12 @@ 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() @@ -15332,16 +12054,8 @@ def read(self, iprot): self.success = {} (_ktype357, _vtype358, _size356) = iprot.readMapBegin() for _i360 in range(_size356): - _key361 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val362 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key361 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val362 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key361] = _val362 iprot.readMapEnd() else: @@ -15353,21 +12067,15 @@ 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 kiter363, viter364 in self.success.items(): - oprot.writeString( - kiter363.encode("utf-8") if sys.version_info[0] == 2 else kiter363 - ) - oprot.writeString( - viter364.encode("utf-8") if sys.version_info[0] == 2 else viter364 - ) + oprot.writeString(kiter363.encode('utf-8') if sys.version_info[0] == 2 else kiter363) + oprot.writeString(viter364.encode('utf-8') if sys.version_info[0] == 2 else viter364) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15377,25 +12085,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_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 ) @@ -15409,24 +12110,15 @@ 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() @@ -15436,11 +12128,7 @@ 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: @@ -15462,11 +12150,7 @@ 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: @@ -15476,35 +12160,27 @@ 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 iter371 in self.worker_instances: iter371.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() @@ -15513,47 +12189,22 @@ 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 ) @@ -15564,18 +12215,12 @@ 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() @@ -15588,16 +12233,8 @@ def read(self, iprot): self.success = {} (_ktype373, _vtype374, _size372) = iprot.readMapBegin() for _i376 in range(_size372): - _key377 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val378 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key377 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val378 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key377] = _val378 iprot.readMapEnd() else: @@ -15609,21 +12246,15 @@ 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 kiter379, viter380 in self.success.items(): - oprot.writeString( - kiter379.encode("utf-8") if sys.version_info[0] == 2 else kiter379 - ) - oprot.writeString( - viter380.encode("utf-8") if sys.version_info[0] == 2 else viter380 - ) + oprot.writeString(kiter379.encode('utf-8') if sys.version_info[0] == 2 else kiter379) + oprot.writeString(viter380.encode('utf-8') if sys.version_info[0] == 2 else viter380) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15633,25 +12264,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(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 ) @@ -15662,18 +12286,12 @@ 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() @@ -15683,11 +12301,7 @@ 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: @@ -15697,18 +12311,12 @@ 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() @@ -15717,26 +12325,19 @@ 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 ) @@ -15748,20 +12349,13 @@ 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() @@ -15774,16 +12368,8 @@ def read(self, iprot): self.success = {} (_ktype382, _vtype383, _size381) = iprot.readMapBegin() for _i385 in range(_size381): - _key386 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val387 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key386 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val387 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key386] = _val387 iprot.readMapEnd() else: @@ -15800,25 +12386,19 @@ 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 kiter388, viter389 in self.success.items(): - oprot.writeString( - kiter388.encode("utf-8") if sys.version_info[0] == 2 else kiter388 - ) - oprot.writeString( - viter389.encode("utf-8") if sys.version_info[0] == 2 else viter389 - ) + oprot.writeString(kiter388.encode('utf-8') if sys.version_info[0] == 2 else kiter388) + oprot.writeString(viter389.encode('utf-8') if sys.version_info[0] == 2 else viter389) 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() @@ -15828,32 +12408,19 @@ 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 ) @@ -15864,18 +12431,12 @@ 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() @@ -15885,11 +12446,7 @@ 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: @@ -15899,18 +12456,12 @@ 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() @@ -15919,26 +12470,19 @@ 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 ) @@ -15949,18 +12493,12 @@ 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() @@ -15980,13 +12518,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("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() @@ -15996,26 +12532,19 @@ 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 ) @@ -16027,20 +12556,13 @@ 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() @@ -16050,20 +12572,12 @@ 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: @@ -16073,26 +12587,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("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() @@ -16101,33 +12605,20 @@ 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 ) @@ -16140,22 +12631,14 @@ 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() @@ -16185,21 +12668,19 @@ 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() @@ -16209,40 +12690,21 @@ 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 ) @@ -16253,18 +12715,12 @@ 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() @@ -16274,11 +12730,7 @@ 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: @@ -16288,18 +12740,12 @@ 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() @@ -16308,26 +12754,19 @@ 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 ) @@ -16339,20 +12778,13 @@ 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() @@ -16377,17 +12809,15 @@ 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() @@ -16397,33 +12827,20 @@ 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 ) @@ -16435,20 +12852,13 @@ 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() @@ -16458,20 +12868,12 @@ 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: @@ -16481,26 +12883,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("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() @@ -16509,33 +12901,20 @@ 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 ) @@ -16548,22 +12927,14 @@ 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() @@ -16576,16 +12947,8 @@ def read(self, iprot): self.success = {} (_ktype391, _vtype392, _size390) = iprot.readMapBegin() for _i394 in range(_size390): - _key395 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val396 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key395 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val396 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key395] = _val396 iprot.readMapEnd() else: @@ -16607,29 +12970,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("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 kiter397, viter398 in self.success.items(): - oprot.writeString( - kiter397.encode("utf-8") if sys.version_info[0] == 2 else kiter397 - ) - oprot.writeString( - viter398.encode("utf-8") if sys.version_info[0] == 2 else viter398 - ) + oprot.writeString(kiter397.encode('utf-8') if sys.version_info[0] == 2 else kiter397) + oprot.writeString(viter398.encode('utf-8') if sys.version_info[0] == 2 else viter398) 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() @@ -16639,39 +12996,20 @@ 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 ) @@ -16682,18 +13020,12 @@ 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() @@ -16703,11 +13035,7 @@ 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: @@ -16717,18 +13045,12 @@ 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() @@ -16737,26 +13059,19 @@ 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 ) @@ -16768,20 +13083,13 @@ 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() @@ -16806,17 +13114,15 @@ 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() @@ -16826,33 +13132,20 @@ 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 ) @@ -16865,22 +13158,14 @@ 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() @@ -16890,11 +13175,7 @@ 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: @@ -16907,16 +13188,8 @@ def read(self, iprot): self.metadata = {} (_ktype400, _vtype401, _size399) = iprot.readMapBegin() for _i403 in range(_size399): - _key404 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val405 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key404 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val405 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key404] = _val405 iprot.readMapEnd() else: @@ -16928,33 +13201,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("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 kiter406, viter407 in self.metadata.items(): - oprot.writeString( - kiter406.encode("utf-8") if sys.version_info[0] == 2 else kiter406 - ) - oprot.writeString( - viter407.encode("utf-8") if sys.version_info[0] == 2 else viter407 - ) + oprot.writeString(kiter406.encode('utf-8') if sys.version_info[0] == 2 else kiter406) + oprot.writeString(viter407.encode('utf-8') if sys.version_info[0] == 2 else viter407) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -16964,40 +13227,21 @@ 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 ) @@ -17010,22 +13254,14 @@ 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() @@ -17056,21 +13292,19 @@ 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() @@ -17080,39 +13314,20 @@ 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 ) @@ -17125,22 +13340,14 @@ 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() @@ -17150,11 +13357,7 @@ 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: @@ -17162,27 +13365,15 @@ def read(self, iprot): self.metadata = {} (_ktype409, _vtype410, _size408) = iprot.readMapBegin() for _i412 in range(_size408): - _key413 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val414 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key413 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val414 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key413] = _val414 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: @@ -17192,38 +13383,24 @@ 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 kiter415, viter416 in self.metadata.items(): - oprot.writeString( - kiter415.encode("utf-8") if sys.version_info[0] == 2 else kiter415 - ) - oprot.writeString( - viter416.encode("utf-8") if sys.version_info[0] == 2 else viter416 - ) + oprot.writeString(kiter415.encode('utf-8') if sys.version_info[0] == 2 else kiter415) + oprot.writeString(viter416.encode('utf-8') if sys.version_info[0] == 2 else viter416) 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() @@ -17232,40 +13409,21 @@ 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 ) @@ -17278,22 +13436,14 @@ 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() @@ -17324,21 +13474,19 @@ 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() @@ -17348,39 +13496,20 @@ 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 ) @@ -17393,22 +13522,14 @@ 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() @@ -17418,11 +13539,7 @@ 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: @@ -17430,27 +13547,15 @@ def read(self, iprot): self.metadata = {} (_ktype418, _vtype419, _size417) = iprot.readMapBegin() for _i421 in range(_size417): - _key422 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val423 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key422 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val423 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key422] = _val423 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: @@ -17460,38 +13565,24 @@ 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 kiter424, viter425 in self.metadata.items(): - oprot.writeString( - kiter424.encode("utf-8") if sys.version_info[0] == 2 else kiter424 - ) - oprot.writeString( - viter425.encode("utf-8") if sys.version_info[0] == 2 else viter425 - ) + oprot.writeString(kiter424.encode('utf-8') if sys.version_info[0] == 2 else kiter424) + oprot.writeString(viter425.encode('utf-8') if sys.version_info[0] == 2 else viter425) 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() @@ -17500,40 +13591,21 @@ 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 ) @@ -17546,22 +13618,14 @@ 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() @@ -17592,21 +13656,19 @@ 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() @@ -17616,39 +13678,20 @@ 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 ) @@ -17661,22 +13704,14 @@ 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() @@ -17686,29 +13721,17 @@ 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: @@ -17718,32 +13741,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("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() @@ -17752,40 +13763,21 @@ 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 ) @@ -17798,22 +13790,14 @@ 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() @@ -17823,11 +13807,7 @@ 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: @@ -17847,25 +13827,19 @@ 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() @@ -17875,39 +13849,20 @@ 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 ) @@ -17918,18 +13873,12 @@ 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() @@ -17939,11 +13888,7 @@ 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: @@ -17953,18 +13898,12 @@ 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() @@ -17973,26 +13912,19 @@ 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 ) @@ -18004,20 +13936,13 @@ 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() @@ -18043,17 +13968,15 @@ 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() @@ -18063,32 +13986,19 @@ 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 ) @@ -18099,18 +14009,12 @@ 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() @@ -18120,11 +14024,7 @@ 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: @@ -18134,18 +14034,12 @@ 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() @@ -18154,26 +14048,19 @@ 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 ) @@ -18185,20 +14072,13 @@ 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() @@ -18223,17 +14103,15 @@ 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() @@ -18243,33 +14121,20 @@ 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 ) @@ -18280,18 +14145,12 @@ 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() @@ -18301,11 +14160,7 @@ 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: @@ -18315,18 +14170,12 @@ 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() @@ -18335,26 +14184,19 @@ 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 ) @@ -18366,20 +14208,13 @@ 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() @@ -18404,17 +14239,15 @@ 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() @@ -18424,33 +14257,20 @@ 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 ) @@ -18461,18 +14281,12 @@ 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() @@ -18482,11 +14296,7 @@ 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: @@ -18496,18 +14306,12 @@ 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() @@ -18516,26 +14320,19 @@ 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 ) @@ -18547,20 +14344,13 @@ 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() @@ -18585,17 +14375,15 @@ 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() @@ -18605,33 +14393,20 @@ 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 diff --git a/simple_vm_client/constants.py b/simple_vm_client/constants.py index 6a03e2f..2ba6b64 100644 --- a/simple_vm_client/constants.py +++ b/simple_vm_client/constants.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.16.0) +# Autogenerated by Thrift Compiler (0.19.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index cff9d49..2e36e02 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -969,10 +969,10 @@ def get_limits(self) -> dict[str, str]: "current_used_cores": str(limits["total_cores_used"]), "current_used_vms": str(limits["total_instances_used"]), "current_used_ram": str(math.ceil(limits["total_ram_used"] / 1024)), - "volume_counter_limit": str(limits["maxTotalVolumes"]), - "volume_storage_limit": str(limits["maxTotalVolumeGigabytes"]), - "current_used_volumes": str(limits["totalVolumesUsed"]), - "current_used_volume_storage": str(limits["totalGigabytesUsed"]), + "volume_counter_limit": str(limits["max_total_volumes"]), + "volume_storage_limit": str(limits["max_total_volume_gigabytes"]), + "current_used_volumes": str(limits["total_volumes_used"]), + "current_used_volume_storage": str(limits["total_gigabytes_used"]), } def exist_server(self, name: str) -> bool: diff --git a/simple_vm_client/ttypes.py b/simple_vm_client/ttypes.py index d1230a8..e1a24eb 100644 --- a/simple_vm_client/ttypes.py +++ b/simple_vm_client/ttypes.py @@ -1,18 +1,18 @@ # -# Autogenerated by Thrift Compiler (0.16.0) +# Autogenerated by Thrift Compiler (0.19.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import sys - +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException -from thrift.Thrift import TException, TType -from thrift.transport import TTransport from thrift.TRecursive import fix_spec +import sys + +from thrift.transport import TTransport all_structs = [] @@ -27,14 +27,8 @@ class Backend(object): """ - def __init__( - self, - id=None, - owner=None, - location_url=None, - template=None, - template_version=None, - ): + + def __init__(self, id=None, owner=None, location_url=None, template=None, template_version=None,): self.id = id self.owner = owner self.location_url = location_url @@ -42,11 +36,7 @@ def __init__( self.template_version = template_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() @@ -61,38 +51,22 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: 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 == 3: if ftype == TType.STRING: - self.location_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.location_url = 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.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 == 5: if ftype == TType.STRING: - self.template_version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -102,44 +76,28 @@ 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("Backend") + oprot.writeStructBegin('Backend') if self.id is not None: - oprot.writeFieldBegin("id", TType.I64, 1) + oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() if self.owner is not None: - oprot.writeFieldBegin("owner", TType.STRING, 2) - oprot.writeString( - self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner - ) + oprot.writeFieldBegin('owner', TType.STRING, 2) + oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) oprot.writeFieldEnd() if self.location_url is not None: - oprot.writeFieldBegin("location_url", TType.STRING, 3) - oprot.writeString( - self.location_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.location_url - ) + oprot.writeFieldBegin('location_url', TType.STRING, 3) + oprot.writeString(self.location_url.encode('utf-8') if sys.version_info[0] == 2 else self.location_url) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin("template", TType.STRING, 4) - oprot.writeString( - self.template.encode("utf-8") - if sys.version_info[0] == 2 - else self.template - ) + oprot.writeFieldBegin('template', TType.STRING, 4) + oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) oprot.writeFieldEnd() if self.template_version is not None: - oprot.writeFieldBegin("template_version", TType.STRING, 5) - oprot.writeString( - self.template_version.encode("utf-8") - if sys.version_info[0] == 2 - else self.template_version - ) + oprot.writeFieldBegin('template_version', TType.STRING, 5) + oprot.writeString(self.template_version.encode('utf-8') if sys.version_info[0] == 2 else self.template_version) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -148,8 +106,9 @@ 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__ @@ -175,20 +134,8 @@ class ResearchEnvironmentTemplate(object): """ - def __init__( - self, - template_name=None, - title=None, - description=None, - logo_url=None, - info_url=None, - port=None, - incompatible_versions=None, - is_maintained=None, - information_for_display=None, - min_ram=0, - min_cores=0, - ): + + def __init__(self, template_name=None, title=None, description=None, logo_url=None, info_url=None, port=None, incompatible_versions=None, is_maintained=None, information_for_display=None, min_ram=0, min_cores=0,): self.template_name = template_name self.title = title self.description = description @@ -206,11 +153,7 @@ def __init__( self.min_cores = min_cores 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() @@ -220,47 +163,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_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.title = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.title = 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) elif fid == 4: if ftype == TType.STRING: - self.logo_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.logo_url = 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.info_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.info_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: @@ -273,11 +196,7 @@ def read(self, iprot): self.incompatible_versions = [] (_etype3, _size0) = iprot.readListBegin() for _i4 in range(_size0): - _elem5 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem5 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.incompatible_versions.append(_elem5) iprot.readListEnd() else: @@ -292,16 +211,8 @@ def read(self, iprot): self.information_for_display = {} (_ktype7, _vtype8, _size6) = iprot.readMapBegin() for _i10 in range(_size6): - _key11 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val12 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key11 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.information_for_display[_key11] = _val12 iprot.readMapEnd() else: @@ -323,86 +234,58 @@ 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("ResearchEnvironmentTemplate") + oprot.writeStructBegin('ResearchEnvironmentTemplate') if self.template_name is not None: - oprot.writeFieldBegin("template_name", TType.STRING, 1) - oprot.writeString( - self.template_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.template_name - ) + oprot.writeFieldBegin('template_name', TType.STRING, 1) + oprot.writeString(self.template_name.encode('utf-8') if sys.version_info[0] == 2 else self.template_name) oprot.writeFieldEnd() if self.title is not None: - oprot.writeFieldBegin("title", TType.STRING, 2) - oprot.writeString( - self.title.encode("utf-8") if sys.version_info[0] == 2 else self.title - ) + oprot.writeFieldBegin('title', TType.STRING, 2) + oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) 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() if self.logo_url is not None: - oprot.writeFieldBegin("logo_url", TType.STRING, 4) - oprot.writeString( - self.logo_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.logo_url - ) + oprot.writeFieldBegin('logo_url', TType.STRING, 4) + oprot.writeString(self.logo_url.encode('utf-8') if sys.version_info[0] == 2 else self.logo_url) oprot.writeFieldEnd() if self.info_url is not None: - oprot.writeFieldBegin("info_url", TType.STRING, 5) - oprot.writeString( - self.info_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.info_url - ) + oprot.writeFieldBegin('info_url', TType.STRING, 5) + oprot.writeString(self.info_url.encode('utf-8') if sys.version_info[0] == 2 else self.info_url) oprot.writeFieldEnd() if self.port is not None: - oprot.writeFieldBegin("port", TType.I32, 6) + oprot.writeFieldBegin('port', TType.I32, 6) oprot.writeI32(self.port) oprot.writeFieldEnd() if self.incompatible_versions is not None: - oprot.writeFieldBegin("incompatible_versions", TType.LIST, 7) + oprot.writeFieldBegin('incompatible_versions', TType.LIST, 7) oprot.writeListBegin(TType.STRING, len(self.incompatible_versions)) for iter13 in self.incompatible_versions: - oprot.writeString( - iter13.encode("utf-8") if sys.version_info[0] == 2 else iter13 - ) + oprot.writeString(iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13) oprot.writeListEnd() oprot.writeFieldEnd() if self.is_maintained is not None: - oprot.writeFieldBegin("is_maintained", TType.BOOL, 8) + oprot.writeFieldBegin('is_maintained', TType.BOOL, 8) oprot.writeBool(self.is_maintained) oprot.writeFieldEnd() if self.information_for_display is not None: - oprot.writeFieldBegin("information_for_display", TType.MAP, 9) - oprot.writeMapBegin( - TType.STRING, TType.STRING, len(self.information_for_display) - ) + oprot.writeFieldBegin('information_for_display', TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.information_for_display)) for kiter14, viter15 in self.information_for_display.items(): - oprot.writeString( - kiter14.encode("utf-8") if sys.version_info[0] == 2 else kiter14 - ) - oprot.writeString( - viter15.encode("utf-8") if sys.version_info[0] == 2 else viter15 - ) + oprot.writeString(kiter14.encode('utf-8') if sys.version_info[0] == 2 else kiter14) + oprot.writeString(viter15.encode('utf-8') if sys.version_info[0] == 2 else viter15) oprot.writeMapEnd() oprot.writeFieldEnd() if self.min_ram is not None: - oprot.writeFieldBegin("min_ram", TType.I32, 10) + oprot.writeFieldBegin('min_ram', TType.I32, 10) oprot.writeI32(self.min_ram) oprot.writeFieldEnd() if self.min_cores is not None: - oprot.writeFieldBegin("min_cores", TType.I32, 11) + oprot.writeFieldBegin('min_cores', TType.I32, 11) oprot.writeI32(self.min_cores) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -412,8 +295,9 @@ 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__ @@ -433,14 +317,8 @@ class CondaPackage(object): """ - def __init__( - self, - build=None, - build_number=None, - name=None, - version=None, - home=None, - ): + + def __init__(self, build=None, build_number=None, name=None, version=None, home=None,): self.build = build self.build_number = build_number self.name = name @@ -448,11 +326,7 @@ def __init__( self.home = home 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() @@ -462,47 +336,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.build = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.build = 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.build_number = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.build_number = 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.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 == 4: if ftype == TType.STRING: - self.version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.version = 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.home = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.home = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -512,44 +366,28 @@ 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("CondaPackage") + oprot.writeStructBegin('CondaPackage') if self.build is not None: - oprot.writeFieldBegin("build", TType.STRING, 1) - oprot.writeString( - self.build.encode("utf-8") if sys.version_info[0] == 2 else self.build - ) + oprot.writeFieldBegin('build', TType.STRING, 1) + oprot.writeString(self.build.encode('utf-8') if sys.version_info[0] == 2 else self.build) oprot.writeFieldEnd() if self.build_number is not None: - oprot.writeFieldBegin("build_number", TType.STRING, 2) - oprot.writeString( - self.build_number.encode("utf-8") - if sys.version_info[0] == 2 - else self.build_number - ) + oprot.writeFieldBegin('build_number', TType.STRING, 2) + oprot.writeString(self.build_number.encode('utf-8') if sys.version_info[0] == 2 else self.build_number) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 3) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 3) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.version is not None: - oprot.writeFieldBegin("version", TType.STRING, 4) - oprot.writeString( - self.version.encode("utf-8") - if sys.version_info[0] == 2 - else self.version - ) + oprot.writeFieldBegin('version', TType.STRING, 4) + oprot.writeString(self.version.encode('utf-8') if sys.version_info[0] == 2 else self.version) oprot.writeFieldEnd() if self.home is not None: - oprot.writeFieldBegin("home", TType.STRING, 5) - oprot.writeString( - self.home.encode("utf-8") if sys.version_info[0] == 2 else self.home - ) + oprot.writeFieldBegin('home', TType.STRING, 5) + oprot.writeString(self.home.encode('utf-8') if sys.version_info[0] == 2 else self.home) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -558,8 +396,9 @@ 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__ @@ -583,18 +422,8 @@ class ClusterInfo(object): """ - def __init__( - self, - launch_date=None, - group_id=None, - network_id=None, - public_ip=None, - subnet_id=None, - user=None, - inst_counter=None, - cluster_id=None, - key_name=None, - ): + + def __init__(self, launch_date=None, group_id=None, network_id=None, public_ip=None, subnet_id=None, user=None, inst_counter=None, cluster_id=None, key_name=None,): self.launch_date = launch_date self.group_id = group_id self.network_id = network_id @@ -606,11 +435,7 @@ def __init__( self.key_name = key_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() @@ -620,56 +445,32 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.launch_date = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.launch_date = 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.group_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.group_id = 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.network_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.network_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.public_ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_ip = 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.subnet_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.subnet_id = 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.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) elif fid == 7: @@ -679,20 +480,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: 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 == 9: 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) else: @@ -702,76 +495,44 @@ 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("ClusterInfo") + oprot.writeStructBegin('ClusterInfo') if self.launch_date is not None: - oprot.writeFieldBegin("launch_date", TType.STRING, 1) - oprot.writeString( - self.launch_date.encode("utf-8") - if sys.version_info[0] == 2 - else self.launch_date - ) + oprot.writeFieldBegin('launch_date', TType.STRING, 1) + oprot.writeString(self.launch_date.encode('utf-8') if sys.version_info[0] == 2 else self.launch_date) oprot.writeFieldEnd() if self.group_id is not None: - oprot.writeFieldBegin("group_id", TType.STRING, 2) - oprot.writeString( - self.group_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.group_id - ) + oprot.writeFieldBegin('group_id', TType.STRING, 2) + oprot.writeString(self.group_id.encode('utf-8') if sys.version_info[0] == 2 else self.group_id) oprot.writeFieldEnd() if self.network_id is not None: - oprot.writeFieldBegin("network_id", TType.STRING, 3) - oprot.writeString( - self.network_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.network_id - ) + oprot.writeFieldBegin('network_id', TType.STRING, 3) + oprot.writeString(self.network_id.encode('utf-8') if sys.version_info[0] == 2 else self.network_id) oprot.writeFieldEnd() if self.public_ip is not None: - oprot.writeFieldBegin("public_ip", TType.STRING, 4) - oprot.writeString( - self.public_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.public_ip - ) + oprot.writeFieldBegin('public_ip', TType.STRING, 4) + oprot.writeString(self.public_ip.encode('utf-8') if sys.version_info[0] == 2 else self.public_ip) oprot.writeFieldEnd() if self.subnet_id is not None: - oprot.writeFieldBegin("subnet_id", TType.STRING, 5) - oprot.writeString( - self.subnet_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.subnet_id - ) + oprot.writeFieldBegin('subnet_id', TType.STRING, 5) + oprot.writeString(self.subnet_id.encode('utf-8') if sys.version_info[0] == 2 else self.subnet_id) oprot.writeFieldEnd() if self.user is not None: - oprot.writeFieldBegin("user", TType.STRING, 6) - oprot.writeString( - self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user - ) + oprot.writeFieldBegin('user', TType.STRING, 6) + oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user) oprot.writeFieldEnd() if self.inst_counter is not None: - oprot.writeFieldBegin("inst_counter", TType.I32, 7) + oprot.writeFieldBegin('inst_counter', TType.I32, 7) oprot.writeI32(self.inst_counter) oprot.writeFieldEnd() if self.cluster_id is not None: - oprot.writeFieldBegin("cluster_id", TType.STRING, 8) - oprot.writeString( - self.cluster_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_id - ) + oprot.writeFieldBegin('cluster_id', TType.STRING, 8) + oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) oprot.writeFieldEnd() if self.key_name is not None: - oprot.writeFieldBegin("key_name", TType.STRING, 9) - oprot.writeString( - self.key_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.key_name - ) + oprot.writeFieldBegin('key_name', TType.STRING, 9) + oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -780,8 +541,9 @@ 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__ @@ -804,17 +566,8 @@ class Volume(object): """ - def __init__( - self, - id=None, - name=None, - description=None, - status=None, - created_at=None, - device=None, - size=None, - server_id=None, - ): + + def __init__(self, id=None, name=None, description=None, status=None, created_at=None, device=None, size=None, server_id=None,): self.id = id self.name = name self.description = description @@ -825,11 +578,7 @@ def __init__( 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() @@ -839,56 +588,32 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.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) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = 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.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = 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.device = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.device = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -898,11 +623,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: 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: @@ -912,62 +633,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("Volume") + oprot.writeStructBegin('Volume') if self.id is not None: - oprot.writeFieldBegin("id", TType.STRING, 1) - oprot.writeString( - self.id.encode("utf-8") if sys.version_info[0] == 2 else self.id - ) + oprot.writeFieldBegin('id', TType.STRING, 1) + oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.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() if self.status is not None: - oprot.writeFieldBegin("status", TType.STRING, 4) - oprot.writeString( - self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status - ) + oprot.writeFieldBegin('status', TType.STRING, 4) + oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin("created_at", TType.STRING, 5) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 5) + oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) oprot.writeFieldEnd() if self.device is not None: - oprot.writeFieldBegin("device", TType.STRING, 6) - oprot.writeString( - self.device.encode("utf-8") if sys.version_info[0] == 2 else self.device - ) + oprot.writeFieldBegin('device', TType.STRING, 6) + oprot.writeString(self.device.encode('utf-8') if sys.version_info[0] == 2 else self.device) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin("size", TType.I32, 7) + oprot.writeFieldBegin('size', TType.I32, 7) oprot.writeI32(self.size) oprot.writeFieldEnd() if self.server_id is not None: - oprot.writeFieldBegin("server_id", TType.STRING, 8) - oprot.writeString( - self.server_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.server_id - ) + oprot.writeFieldBegin('server_id', TType.STRING, 8) + oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -976,8 +675,9 @@ 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__ @@ -1001,16 +701,8 @@ class Snapshot(object): """ - def __init__( - self, - id=None, - name=None, - description=None, - status=None, - created_at=None, - size=None, - volume_id=None, - ): + + def __init__(self, id=None, name=None, description=None, status=None, created_at=None, size=None, volume_id=None,): self.id = id self.name = name self.description = description @@ -1020,11 +712,7 @@ def __init__( 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() @@ -1034,47 +722,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.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) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = 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.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: @@ -1084,11 +752,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: 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: @@ -1098,56 +762,36 @@ 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("Snapshot") + oprot.writeStructBegin('Snapshot') if self.id is not None: - oprot.writeFieldBegin("id", TType.STRING, 1) - oprot.writeString( - self.id.encode("utf-8") if sys.version_info[0] == 2 else self.id - ) + oprot.writeFieldBegin('id', TType.STRING, 1) + oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.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() if self.status is not None: - oprot.writeFieldBegin("status", TType.STRING, 4) - oprot.writeString( - self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status - ) + oprot.writeFieldBegin('status', TType.STRING, 4) + oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin("created_at", TType.STRING, 5) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 5) + oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin("size", TType.I32, 6) + oprot.writeFieldBegin('size', TType.I32, 6) oprot.writeI32(self.size) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 7) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 7) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1156,8 +800,9 @@ 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__ @@ -1180,15 +825,8 @@ class Flavor(object): """ - def __init__( - self, - vcpus=None, - ram=None, - disk=None, - name=None, - description=None, - ephemeral_disk=None, - ): + + def __init__(self, vcpus=None, ram=None, disk=None, name=None, description=None, ephemeral_disk=None,): self.vcpus = vcpus self.ram = ram self.disk = disk @@ -1197,11 +835,7 @@ def __init__( self.ephemeral_disk = ephemeral_disk 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() @@ -1226,20 +860,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: 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 == 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) elif fid == 6: @@ -1254,39 +880,31 @@ 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("Flavor") + oprot.writeStructBegin('Flavor') if self.vcpus is not None: - oprot.writeFieldBegin("vcpus", TType.I32, 1) + oprot.writeFieldBegin('vcpus', TType.I32, 1) oprot.writeI32(self.vcpus) oprot.writeFieldEnd() if self.ram is not None: - oprot.writeFieldBegin("ram", TType.I32, 2) + oprot.writeFieldBegin('ram', TType.I32, 2) oprot.writeI32(self.ram) oprot.writeFieldEnd() if self.disk is not None: - oprot.writeFieldBegin("disk", TType.I32, 3) + oprot.writeFieldBegin('disk', TType.I32, 3) oprot.writeI32(self.disk) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 4) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 4) + 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, 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() if self.ephemeral_disk is not None: - oprot.writeFieldBegin("ephemeral_disk", TType.I32, 6) + oprot.writeFieldBegin('ephemeral_disk', TType.I32, 6) oprot.writeI32(self.ephemeral_disk) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1294,18 +912,19 @@ def write(self, oprot): def validate(self): if self.vcpus is None: - raise TProtocolException(message="Required field vcpus is unset!") + raise TProtocolException(message='Required field vcpus is unset!') if self.ram is None: - raise TProtocolException(message="Required field ram is unset!") + raise TProtocolException(message='Required field ram is unset!') if self.disk is None: - raise TProtocolException(message="Required field disk is unset!") + raise TProtocolException(message='Required field disk is unset!') if self.name is None: - raise TProtocolException(message="Required field name is unset!") + raise TProtocolException(message='Required field name is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -1333,20 +952,8 @@ class Image(object): """ - def __init__( - self, - name=None, - min_disk=None, - min_ram=None, - status=None, - created_at=None, - updated_at=None, - openstack_id=None, - description=None, - tags=None, - is_snapshot=None, - os_version=None, - ): + + def __init__(self, name=None, min_disk=None, min_ram=None, status=None, created_at=None, updated_at=None, openstack_id=None, description=None, tags=None, is_snapshot=None, os_version=None,): self.name = name self.min_disk = min_disk self.min_ram = min_ram @@ -1360,11 +967,7 @@ def __init__( self.os_version = os_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() @@ -1374,11 +977,7 @@ 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) elif fid == 2: @@ -1393,47 +992,27 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = 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.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = 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.updated_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.updated_at = 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.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 == 8: 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) elif fid == 9: @@ -1441,11 +1020,7 @@ def read(self, iprot): self.tags = [] (_etype19, _size16) = iprot.readListBegin() for _i20 in range(_size16): - _elem21 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem21 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.tags.append(_elem21) iprot.readListEnd() else: @@ -1457,11 +1032,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: - self.os_version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.os_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1471,105 +1042,78 @@ 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("Image") + oprot.writeStructBegin('Image') 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() if self.min_disk is not None: - oprot.writeFieldBegin("min_disk", TType.I32, 2) + oprot.writeFieldBegin('min_disk', TType.I32, 2) oprot.writeI32(self.min_disk) oprot.writeFieldEnd() if self.min_ram is not None: - oprot.writeFieldBegin("min_ram", TType.I32, 3) + oprot.writeFieldBegin('min_ram', TType.I32, 3) oprot.writeI32(self.min_ram) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin("status", TType.STRING, 4) - oprot.writeString( - self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status - ) + oprot.writeFieldBegin('status', TType.STRING, 4) + oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin("created_at", TType.STRING, 5) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 5) + oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) oprot.writeFieldEnd() if self.updated_at is not None: - oprot.writeFieldBegin("updated_at", TType.STRING, 6) - oprot.writeString( - self.updated_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.updated_at - ) + oprot.writeFieldBegin('updated_at', TType.STRING, 6) + oprot.writeString(self.updated_at.encode('utf-8') if sys.version_info[0] == 2 else self.updated_at) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 7) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 7) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin("description", TType.STRING, 8) - oprot.writeString( - self.description.encode("utf-8") - if sys.version_info[0] == 2 - else self.description - ) + oprot.writeFieldBegin('description', TType.STRING, 8) + oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) oprot.writeFieldEnd() if self.tags is not None: - oprot.writeFieldBegin("tags", TType.LIST, 9) + oprot.writeFieldBegin('tags', TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.tags)) for iter22 in self.tags: - oprot.writeString( - iter22.encode("utf-8") if sys.version_info[0] == 2 else iter22 - ) + oprot.writeString(iter22.encode('utf-8') if sys.version_info[0] == 2 else iter22) oprot.writeListEnd() oprot.writeFieldEnd() if self.is_snapshot is not None: - oprot.writeFieldBegin("is_snapshot", TType.BOOL, 10) + oprot.writeFieldBegin('is_snapshot', TType.BOOL, 10) oprot.writeBool(self.is_snapshot) oprot.writeFieldEnd() if self.os_version is not None: - oprot.writeFieldBegin("os_version", TType.STRING, 11) - oprot.writeString( - self.os_version.encode("utf-8") - if sys.version_info[0] == 2 - else self.os_version - ) + oprot.writeFieldBegin('os_version', TType.STRING, 11) + oprot.writeString(self.os_version.encode('utf-8') if sys.version_info[0] == 2 else self.os_version) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.name is None: - raise TProtocolException(message="Required field name is unset!") + raise TProtocolException(message='Required field name is unset!') if self.min_disk is None: - raise TProtocolException(message="Required field min_disk is unset!") + raise TProtocolException(message='Required field min_disk is unset!') if self.min_ram is None: - raise TProtocolException(message="Required field min_ram is unset!") + raise TProtocolException(message='Required field min_ram is unset!') if self.status is None: - raise TProtocolException(message="Required field status is unset!") + raise TProtocolException(message='Required field status is unset!') if self.openstack_id is None: - raise TProtocolException(message="Required field openstack_id is unset!") + raise TProtocolException(message='Required field openstack_id is unset!') if self.tags is None: - raise TProtocolException(message="Required field tags is unset!") + raise TProtocolException(message='Required field tags is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -1598,21 +1142,8 @@ class VM(object): """ - def __init__( - self, - flavor=None, - image=None, - metadata=None, - project_id=None, - keyname=None, - openstack_id=None, - name=None, - created_at=None, - floating_ip=None, - fixed_ip=None, - task_state=None, - vm_state=None, - ): + + def __init__(self, flavor=None, image=None, metadata=None, project_id=None, keyname=None, openstack_id=None, name=None, created_at=None, floating_ip=None, fixed_ip=None, task_state=None, vm_state=None,): self.flavor = flavor self.image = image self.metadata = metadata @@ -1627,11 +1158,7 @@ def __init__( self.vm_state = vm_state 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() @@ -1656,99 +1183,55 @@ def read(self, iprot): self.metadata = {} (_ktype24, _vtype25, _size23) = iprot.readMapBegin() for _i27 in range(_size23): - _key28 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val29 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key28 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val29 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key28] = _val29 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.project_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.project_id = 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.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 == 6: 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 == 7: 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 == 8: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: 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) elif fid == 10: if ftype == TType.STRING: - self.fixed_ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.fixed_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: - self.task_state = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.task_state = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: - self.vm_state = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.vm_state = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1758,122 +1241,83 @@ 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("VM") + oprot.writeStructBegin('VM') if self.flavor is not None: - oprot.writeFieldBegin("flavor", TType.STRUCT, 1) + oprot.writeFieldBegin('flavor', TType.STRUCT, 1) self.flavor.write(oprot) oprot.writeFieldEnd() if self.image is not None: - oprot.writeFieldBegin("image", TType.STRUCT, 2) + oprot.writeFieldBegin('image', TType.STRUCT, 2) self.image.write(oprot) 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 kiter30, viter31 in self.metadata.items(): - oprot.writeString( - kiter30.encode("utf-8") if sys.version_info[0] == 2 else kiter30 - ) - oprot.writeString( - viter31.encode("utf-8") if sys.version_info[0] == 2 else viter31 - ) + oprot.writeString(kiter30.encode('utf-8') if sys.version_info[0] == 2 else kiter30) + oprot.writeString(viter31.encode('utf-8') if sys.version_info[0] == 2 else viter31) oprot.writeMapEnd() oprot.writeFieldEnd() if self.project_id is not None: - oprot.writeFieldBegin("project_id", TType.STRING, 4) - oprot.writeString( - self.project_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.project_id - ) + oprot.writeFieldBegin('project_id', TType.STRING, 4) + oprot.writeString(self.project_id.encode('utf-8') if sys.version_info[0] == 2 else self.project_id) oprot.writeFieldEnd() if self.keyname is not None: - oprot.writeFieldBegin("keyname", TType.STRING, 5) - oprot.writeString( - self.keyname.encode("utf-8") - if sys.version_info[0] == 2 - else self.keyname - ) + oprot.writeFieldBegin('keyname', TType.STRING, 5) + oprot.writeString(self.keyname.encode('utf-8') if sys.version_info[0] == 2 else self.keyname) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 6) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 6) + 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, 7) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 7) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin("created_at", TType.STRING, 8) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 8) + oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) oprot.writeFieldEnd() if self.floating_ip is not None: - oprot.writeFieldBegin("floating_ip", TType.STRING, 9) - oprot.writeString( - self.floating_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.floating_ip - ) + oprot.writeFieldBegin('floating_ip', TType.STRING, 9) + oprot.writeString(self.floating_ip.encode('utf-8') if sys.version_info[0] == 2 else self.floating_ip) oprot.writeFieldEnd() if self.fixed_ip is not None: - oprot.writeFieldBegin("fixed_ip", TType.STRING, 10) - oprot.writeString( - self.fixed_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.fixed_ip - ) + oprot.writeFieldBegin('fixed_ip', TType.STRING, 10) + oprot.writeString(self.fixed_ip.encode('utf-8') if sys.version_info[0] == 2 else self.fixed_ip) oprot.writeFieldEnd() if self.task_state is not None: - oprot.writeFieldBegin("task_state", TType.STRING, 11) - oprot.writeString( - self.task_state.encode("utf-8") - if sys.version_info[0] == 2 - else self.task_state - ) + oprot.writeFieldBegin('task_state', TType.STRING, 11) + oprot.writeString(self.task_state.encode('utf-8') if sys.version_info[0] == 2 else self.task_state) oprot.writeFieldEnd() if self.vm_state is not None: - oprot.writeFieldBegin("vm_state", TType.STRING, 12) - oprot.writeString( - self.vm_state.encode("utf-8") - if sys.version_info[0] == 2 - else self.vm_state - ) + oprot.writeFieldBegin('vm_state', TType.STRING, 12) + oprot.writeString(self.vm_state.encode('utf-8') if sys.version_info[0] == 2 else self.vm_state) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.keyname is None: - raise TProtocolException(message="Required field keyname is unset!") + raise TProtocolException(message='Required field keyname is unset!') if self.openstack_id is None: - raise TProtocolException(message="Required field openstack_id is unset!") + raise TProtocolException(message='Required field openstack_id is unset!') if self.name is None: - raise TProtocolException(message="Required field name is unset!") + raise TProtocolException(message='Required field name is unset!') if self.created_at is None: - raise TProtocolException(message="Required field created_at is unset!") + raise TProtocolException(message='Required field created_at is unset!') if self.fixed_ip is None: - raise TProtocolException(message="Required field fixed_ip is unset!") + raise TProtocolException(message='Required field fixed_ip is unset!') if self.vm_state is None: - raise TProtocolException(message="Required field vm_state is unset!") + raise TProtocolException(message='Required field vm_state is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -1891,22 +1335,14 @@ class ClusterInstance(object): """ - def __init__( - self, - type=None, - image=None, - count=None, - ): + + def __init__(self, type=None, image=None, count=None,): self.type = type self.image = image self.count = count 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() @@ -1916,20 +1352,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.type = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.type = 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 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -1944,25 +1372,19 @@ 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("ClusterInstance") + oprot.writeStructBegin('ClusterInstance') if self.type is not None: - oprot.writeFieldBegin("type", TType.STRING, 1) - oprot.writeString( - self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type - ) + oprot.writeFieldBegin('type', TType.STRING, 1) + oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type) oprot.writeFieldEnd() if self.image is not None: - oprot.writeFieldBegin("image", TType.STRING, 2) - oprot.writeString( - self.image.encode("utf-8") if sys.version_info[0] == 2 else self.image - ) + oprot.writeFieldBegin('image', TType.STRING, 2) + oprot.writeString(self.image.encode('utf-8') if sys.version_info[0] == 2 else self.image) oprot.writeFieldEnd() if self.count is not None: - oprot.writeFieldBegin("count", TType.I32, 3) + oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1970,14 +1392,15 @@ def write(self, oprot): def validate(self): if self.type is None: - raise TProtocolException(message="Required field type is unset!") + raise TProtocolException(message='Required field type is unset!') if self.image is None: - raise TProtocolException(message="Required field image is unset!") + raise TProtocolException(message='Required field image is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -1997,22 +1420,14 @@ class PlaybookResult(object): """ - def __init__( - self, - status=None, - stdout=None, - stderr=None, - ): + + def __init__(self, status=None, stdout=None, stderr=None,): self.status = status self.stdout = stdout self.stderr = stderr 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() @@ -2027,20 +1442,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.stdout = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.stdout = 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.stderr = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.stderr = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2050,42 +1457,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("PlaybookResult") + oprot.writeStructBegin('PlaybookResult') if self.status is not None: - oprot.writeFieldBegin("status", TType.I32, 1) + oprot.writeFieldBegin('status', TType.I32, 1) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.stdout is not None: - oprot.writeFieldBegin("stdout", TType.STRING, 2) - oprot.writeString( - self.stdout.encode("utf-8") if sys.version_info[0] == 2 else self.stdout - ) + oprot.writeFieldBegin('stdout', TType.STRING, 2) + oprot.writeString(self.stdout.encode('utf-8') if sys.version_info[0] == 2 else self.stdout) oprot.writeFieldEnd() if self.stderr is not None: - oprot.writeFieldBegin("stderr", TType.STRING, 3) - oprot.writeString( - self.stderr.encode("utf-8") if sys.version_info[0] == 2 else self.stderr - ) + oprot.writeFieldBegin('stderr', TType.STRING, 3) + oprot.writeString(self.stderr.encode('utf-8') if sys.version_info[0] == 2 else self.stderr) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.status is None: - raise TProtocolException(message="Required field status is unset!") + raise TProtocolException(message='Required field status is unset!') if self.stdout is None: - raise TProtocolException(message="Required field stdout is unset!") + raise TProtocolException(message='Required field stdout is unset!') if self.stderr is None: - raise TProtocolException(message="Required field stderr is unset!") + raise TProtocolException(message='Required field stderr is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -2103,17 +1505,11 @@ class ResourceNotFoundException(TException): """ - def __init__( - self, - message=None, - resource_type=None, - name_or_id=None, - ): - super(ResourceNotFoundException, self).__setattr__("message", message) - super(ResourceNotFoundException, self).__setattr__( - "resource_type", resource_type - ) - super(ResourceNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, resource_type=None, name_or_id=None,): + super(ResourceNotFoundException, self).__setattr__('message', message) + super(ResourceNotFoundException, self).__setattr__('resource_type', resource_type) + super(ResourceNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2122,21 +1518,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.resource_type, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.resource_type, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2148,29 +1534,17 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - resource_type = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + resource_type = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2185,34 +1559,20 @@ def read(cls, 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("ResourceNotFoundException") + oprot.writeStructBegin('ResourceNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.resource_type is not None: - oprot.writeFieldBegin("resource_type", TType.STRING, 2) - oprot.writeString( - self.resource_type.encode("utf-8") - if sys.version_info[0] == 2 - else self.resource_type - ) + oprot.writeFieldBegin('resource_type', TType.STRING, 2) + oprot.writeString(self.resource_type.encode('utf-8') if sys.version_info[0] == 2 else self.resource_type) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 3) - 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, 3) + 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() @@ -2224,8 +1584,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -2241,11 +1602,9 @@ class ResourceNotAvailableException(TException): """ - def __init__( - self, - message=None, - ): - super(ResourceNotAvailableException, self).__setattr__("message", message) + + def __init__(self, message=None,): + super(ResourceNotAvailableException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2254,15 +1613,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2272,11 +1627,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2289,18 +1640,12 @@ def read(cls, 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("ResourceNotAvailableException") + oprot.writeStructBegin('ResourceNotAvailableException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2312,8 +1657,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -2330,13 +1676,10 @@ class TemplateNotFoundException(TException): """ - def __init__( - self, - message=None, - template=None, - ): - super(TemplateNotFoundException, self).__setattr__("message", message) - super(TemplateNotFoundException, self).__setattr__("template", template) + + def __init__(self, message=None, template=None,): + super(TemplateNotFoundException, self).__setattr__('message', message) + super(TemplateNotFoundException, self).__setattr__('template', template) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2345,20 +1688,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.template, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.template, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2369,20 +1703,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2396,26 +1722,16 @@ def read(cls, 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("TemplateNotFoundException") + oprot.writeStructBegin('TemplateNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin("template", TType.STRING, 2) - oprot.writeString( - self.template.encode("utf-8") - if sys.version_info[0] == 2 - else self.template - ) + oprot.writeFieldBegin('template', TType.STRING, 2) + oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2427,8 +1743,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -2445,13 +1762,10 @@ class NameAlreadyUsedException(TException): """ - def __init__( - self, - message=None, - name=None, - ): - super(NameAlreadyUsedException, self).__setattr__("message", message) - super(NameAlreadyUsedException, self).__setattr__("name", name) + + def __init__(self, message=None, name=None,): + super(NameAlreadyUsedException, self).__setattr__('message', message) + super(NameAlreadyUsedException, self).__setattr__('name', name) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2460,20 +1774,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2484,20 +1789,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2511,24 +1808,16 @@ def read(cls, 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("NameAlreadyUsedException") + oprot.writeStructBegin('NameAlreadyUsedException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) 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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2540,8 +1829,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -2558,13 +1848,10 @@ class ServerNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(ServerNotFoundException, self).__setattr__("message", message) - super(ServerNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, name_or_id=None,): + super(ServerNotFoundException, self).__setattr__('message', message) + super(ServerNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2573,20 +1860,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2597,20 +1875,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2624,26 +1894,16 @@ def read(cls, 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("ServerNotFoundException") + oprot.writeStructBegin('ServerNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -2655,8 +1915,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -2673,15 +1934,10 @@ class SecurityGroupRuleNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(SecurityGroupRuleNotFoundException, self).__setattr__("message", message) - super(SecurityGroupRuleNotFoundException, self).__setattr__( - "name_or_id", name_or_id - ) + + def __init__(self, message=None, name_or_id=None,): + super(SecurityGroupRuleNotFoundException, self).__setattr__('message', message) + super(SecurityGroupRuleNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2690,20 +1946,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2714,20 +1961,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2741,26 +1980,16 @@ def read(cls, 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("SecurityGroupRuleNotFoundException") + oprot.writeStructBegin('SecurityGroupRuleNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -2772,8 +2001,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -2790,13 +2020,10 @@ class FlavorNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(FlavorNotFoundException, self).__setattr__("message", message) - super(FlavorNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, name_or_id=None,): + super(FlavorNotFoundException, self).__setattr__('message', message) + super(FlavorNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2805,20 +2032,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2829,20 +2047,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2856,26 +2066,16 @@ def read(cls, 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("FlavorNotFoundException") + oprot.writeStructBegin('FlavorNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -2887,8 +2087,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -2905,13 +2106,10 @@ class VolumeNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(VolumeNotFoundException, self).__setattr__("message", message) - super(VolumeNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, name_or_id=None,): + super(VolumeNotFoundException, self).__setattr__('message', message) + super(VolumeNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2920,20 +2118,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2944,20 +2133,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2971,26 +2152,16 @@ def read(cls, 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("VolumeNotFoundException") + oprot.writeStructBegin('VolumeNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -3002,8 +2173,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -3020,13 +2192,10 @@ class SnapshotNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(SnapshotNotFoundException, self).__setattr__("message", message) - super(SnapshotNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, name_or_id=None,): + super(SnapshotNotFoundException, self).__setattr__('message', message) + super(SnapshotNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3035,20 +2204,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3059,20 +2219,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3086,26 +2238,16 @@ def read(cls, 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("SnapshotNotFoundException") + oprot.writeStructBegin('SnapshotNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -3117,8 +2259,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -3135,13 +2278,10 @@ class ImageNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(ImageNotFoundException, self).__setattr__("message", message) - super(ImageNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, name_or_id=None,): + super(ImageNotFoundException, self).__setattr__('message', message) + super(ImageNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3150,20 +2290,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3174,20 +2305,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3201,26 +2324,16 @@ def read(cls, 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("ImageNotFoundException") + oprot.writeStructBegin('ImageNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -3232,8 +2345,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -3250,13 +2364,10 @@ class ClusterNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(ClusterNotFoundException, self).__setattr__("message", message) - super(ClusterNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, name_or_id=None,): + super(ClusterNotFoundException, self).__setattr__('message', message) + super(ClusterNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3265,20 +2376,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3289,20 +2391,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3316,26 +2410,16 @@ def read(cls, 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("ClusterNotFoundException") + oprot.writeStructBegin('ClusterNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -3347,8 +2431,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -3365,13 +2450,10 @@ class BackendNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(BackendNotFoundException, self).__setattr__("message", message) - super(BackendNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, name_or_id=None,): + super(BackendNotFoundException, self).__setattr__('message', message) + super(BackendNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3380,20 +2462,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3404,20 +2477,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3431,26 +2496,16 @@ def read(cls, 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("BackendNotFoundException") + oprot.writeStructBegin('BackendNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -3462,8 +2517,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -3480,13 +2536,10 @@ class PlaybookNotFoundException(TException): """ - def __init__( - self, - message=None, - name_or_id=None, - ): - super(PlaybookNotFoundException, self).__setattr__("message", message) - super(PlaybookNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, name_or_id=None,): + super(PlaybookNotFoundException, self).__setattr__('message', message) + super(PlaybookNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3495,20 +2548,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3519,20 +2563,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = 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: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3546,26 +2582,16 @@ def read(cls, 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("PlaybookNotFoundException") + oprot.writeStructBegin('PlaybookNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - 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, 2) + 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() @@ -3577,8 +2603,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -3594,11 +2621,9 @@ class DefaultException(TException): """ - def __init__( - self, - message=None, - ): - super(DefaultException, self).__setattr__("message", message) + + def __init__(self, message=None,): + super(DefaultException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3607,15 +2632,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3625,11 +2646,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3642,18 +2659,12 @@ def read(cls, 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("DefaultException") + oprot.writeStructBegin('DefaultException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3665,8 +2676,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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__ @@ -3684,11 +2696,9 @@ class OpenStackConflictException(TException): """ - def __init__( - self, - message=None, - ): - super(OpenStackConflictException, self).__setattr__("message", message) + + def __init__(self, message=None,): + super(OpenStackConflictException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3697,15 +2707,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3715,11 +2721,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3732,18 +2734,12 @@ def read(cls, 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("OpenStackConflictException") + oprot.writeStructBegin('OpenStackConflictException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3755,875 +2751,226 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + 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(Backend) Backend.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "owner", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "location_url", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "template", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "template_version", - "UTF8", - None, - ), # 5 + (1, TType.I64, 'id', None, None, ), # 1 + (2, TType.STRING, 'owner', 'UTF8', None, ), # 2 + (3, TType.STRING, 'location_url', 'UTF8', None, ), # 3 + (4, TType.STRING, 'template', 'UTF8', None, ), # 4 + (5, TType.STRING, 'template_version', 'UTF8', None, ), # 5 ) all_structs.append(ResearchEnvironmentTemplate) ResearchEnvironmentTemplate.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "template_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "title", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "description", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "logo_url", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "info_url", - "UTF8", - None, - ), # 5 - ( - 6, - TType.I32, - "port", - None, - None, - ), # 6 - ( - 7, - TType.LIST, - "incompatible_versions", - (TType.STRING, "UTF8", False), - None, - ), # 7 - ( - 8, - TType.BOOL, - "is_maintained", - None, - None, - ), # 8 - ( - 9, - TType.MAP, - "information_for_display", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 9 - ( - 10, - TType.I32, - "min_ram", - None, - 0, - ), # 10 - ( - 11, - TType.I32, - "min_cores", - None, - 0, - ), # 11 + (1, TType.STRING, 'template_name', 'UTF8', None, ), # 1 + (2, TType.STRING, 'title', 'UTF8', None, ), # 2 + (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + (4, TType.STRING, 'logo_url', 'UTF8', None, ), # 4 + (5, TType.STRING, 'info_url', 'UTF8', None, ), # 5 + (6, TType.I32, 'port', None, None, ), # 6 + (7, TType.LIST, 'incompatible_versions', (TType.STRING, 'UTF8', False), None, ), # 7 + (8, TType.BOOL, 'is_maintained', None, None, ), # 8 + (9, TType.MAP, 'information_for_display', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 9 + (10, TType.I32, 'min_ram', None, 0, ), # 10 + (11, TType.I32, 'min_cores', None, 0, ), # 11 ) all_structs.append(CondaPackage) CondaPackage.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "build", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "build_number", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "name", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "version", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "home", - "UTF8", - None, - ), # 5 + (1, TType.STRING, 'build', 'UTF8', None, ), # 1 + (2, TType.STRING, 'build_number', 'UTF8', None, ), # 2 + (3, TType.STRING, 'name', 'UTF8', None, ), # 3 + (4, TType.STRING, 'version', 'UTF8', None, ), # 4 + (5, TType.STRING, 'home', 'UTF8', None, ), # 5 ) all_structs.append(ClusterInfo) ClusterInfo.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "launch_date", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "group_id", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "network_id", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "public_ip", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "subnet_id", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "user", - "UTF8", - None, - ), # 6 - ( - 7, - TType.I32, - "inst_counter", - None, - None, - ), # 7 - ( - 8, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 8 - ( - 9, - TType.STRING, - "key_name", - "UTF8", - None, - ), # 9 + (1, TType.STRING, 'launch_date', 'UTF8', None, ), # 1 + (2, TType.STRING, 'group_id', 'UTF8', None, ), # 2 + (3, TType.STRING, 'network_id', 'UTF8', None, ), # 3 + (4, TType.STRING, 'public_ip', 'UTF8', None, ), # 4 + (5, TType.STRING, 'subnet_id', 'UTF8', None, ), # 5 + (6, TType.STRING, 'user', 'UTF8', None, ), # 6 + (7, TType.I32, 'inst_counter', None, None, ), # 7 + (8, TType.STRING, 'cluster_id', 'UTF8', None, ), # 8 + (9, TType.STRING, 'key_name', 'UTF8', None, ), # 9 ) all_structs.append(Volume) Volume.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "description", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "status", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "device", - "UTF8", - None, - ), # 6 - ( - 7, - TType.I32, - "size", - None, - None, - ), # 7 - ( - 8, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 8 + (1, TType.STRING, 'id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + (4, TType.STRING, 'status', 'UTF8', None, ), # 4 + (5, TType.STRING, 'created_at', 'UTF8', None, ), # 5 + (6, TType.STRING, 'device', 'UTF8', None, ), # 6 + (7, TType.I32, 'size', None, None, ), # 7 + (8, TType.STRING, 'server_id', 'UTF8', None, ), # 8 ) all_structs.append(Snapshot) Snapshot.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "description", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "status", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 5 - ( - 6, - TType.I32, - "size", - None, - None, - ), # 6 - ( - 7, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 7 + (1, TType.STRING, 'id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + (4, TType.STRING, 'status', 'UTF8', None, ), # 4 + (5, TType.STRING, 'created_at', 'UTF8', None, ), # 5 + (6, TType.I32, 'size', None, None, ), # 6 + (7, TType.STRING, 'volume_id', 'UTF8', None, ), # 7 ) all_structs.append(Flavor) Flavor.thrift_spec = ( None, # 0 - ( - 1, - TType.I32, - "vcpus", - None, - None, - ), # 1 - ( - 2, - TType.I32, - "ram", - None, - None, - ), # 2 - ( - 3, - TType.I32, - "disk", - None, - None, - ), # 3 - ( - 4, - TType.STRING, - "name", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "description", - "UTF8", - None, - ), # 5 - ( - 6, - TType.I32, - "ephemeral_disk", - None, - None, - ), # 6 + (1, TType.I32, 'vcpus', None, None, ), # 1 + (2, TType.I32, 'ram', None, None, ), # 2 + (3, TType.I32, 'disk', None, None, ), # 3 + (4, TType.STRING, 'name', 'UTF8', None, ), # 4 + (5, TType.STRING, 'description', 'UTF8', None, ), # 5 + (6, TType.I32, 'ephemeral_disk', None, None, ), # 6 ) all_structs.append(Image) Image.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.I32, - "min_disk", - None, - None, - ), # 2 - ( - 3, - TType.I32, - "min_ram", - None, - None, - ), # 3 - ( - 4, - TType.STRING, - "status", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "updated_at", - "UTF8", - None, - ), # 6 - ( - 7, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 7 - ( - 8, - TType.STRING, - "description", - "UTF8", - None, - ), # 8 - ( - 9, - TType.LIST, - "tags", - (TType.STRING, "UTF8", False), - None, - ), # 9 - ( - 10, - TType.BOOL, - "is_snapshot", - None, - None, - ), # 10 - ( - 11, - TType.STRING, - "os_version", - "UTF8", - None, - ), # 11 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 + (2, TType.I32, 'min_disk', None, None, ), # 2 + (3, TType.I32, 'min_ram', None, None, ), # 3 + (4, TType.STRING, 'status', 'UTF8', None, ), # 4 + (5, TType.STRING, 'created_at', 'UTF8', None, ), # 5 + (6, TType.STRING, 'updated_at', 'UTF8', None, ), # 6 + (7, TType.STRING, 'openstack_id', 'UTF8', None, ), # 7 + (8, TType.STRING, 'description', 'UTF8', None, ), # 8 + (9, TType.LIST, 'tags', (TType.STRING, 'UTF8', False), None, ), # 9 + (10, TType.BOOL, 'is_snapshot', None, None, ), # 10 + (11, TType.STRING, 'os_version', 'UTF8', None, ), # 11 ) all_structs.append(VM) VM.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "flavor", - [Flavor, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "image", - [Image, None], - None, - ), # 2 - ( - 3, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 3 - ( - 4, - TType.STRING, - "project_id", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "keyname", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 6 - ( - 7, - TType.STRING, - "name", - "UTF8", - None, - ), # 7 - ( - 8, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 8 - ( - 9, - TType.STRING, - "floating_ip", - "UTF8", - None, - ), # 9 - ( - 10, - TType.STRING, - "fixed_ip", - "UTF8", - None, - ), # 10 - ( - 11, - TType.STRING, - "task_state", - "UTF8", - None, - ), # 11 - ( - 12, - TType.STRING, - "vm_state", - "UTF8", - None, - ), # 12 + (1, TType.STRUCT, 'flavor', [Flavor, None], None, ), # 1 + (2, TType.STRUCT, 'image', [Image, None], None, ), # 2 + (3, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 + (4, TType.STRING, 'project_id', 'UTF8', None, ), # 4 + (5, TType.STRING, 'keyname', 'UTF8', None, ), # 5 + (6, TType.STRING, 'openstack_id', 'UTF8', None, ), # 6 + (7, TType.STRING, 'name', 'UTF8', None, ), # 7 + (8, TType.STRING, 'created_at', 'UTF8', None, ), # 8 + (9, TType.STRING, 'floating_ip', 'UTF8', None, ), # 9 + (10, TType.STRING, 'fixed_ip', 'UTF8', None, ), # 10 + (11, TType.STRING, 'task_state', 'UTF8', None, ), # 11 + (12, TType.STRING, 'vm_state', 'UTF8', None, ), # 12 ) all_structs.append(ClusterInstance) ClusterInstance.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "type", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image", - "UTF8", - None, - ), # 2 - ( - 3, - TType.I32, - "count", - None, - None, - ), # 3 + (1, TType.STRING, 'type', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image', 'UTF8', None, ), # 2 + (3, TType.I32, 'count', None, None, ), # 3 ) all_structs.append(PlaybookResult) PlaybookResult.thrift_spec = ( None, # 0 - ( - 1, - TType.I32, - "status", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "stdout", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "stderr", - "UTF8", - None, - ), # 3 + (1, TType.I32, 'status', None, None, ), # 1 + (2, TType.STRING, 'stdout', 'UTF8', None, ), # 2 + (3, TType.STRING, 'stderr', 'UTF8', None, ), # 3 ) all_structs.append(ResourceNotFoundException) ResourceNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "resource_type", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'resource_type', 'UTF8', None, ), # 2 + (3, TType.STRING, 'name_or_id', 'UTF8', None, ), # 3 ) all_structs.append(ResourceNotAvailableException) ResourceNotAvailableException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) all_structs.append(TemplateNotFoundException) TemplateNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "template", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'template', 'UTF8', None, ), # 2 ) all_structs.append(NameAlreadyUsedException) NameAlreadyUsedException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 ) all_structs.append(ServerNotFoundException) ServerNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(SecurityGroupRuleNotFoundException) SecurityGroupRuleNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(FlavorNotFoundException) FlavorNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(VolumeNotFoundException) VolumeNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(SnapshotNotFoundException) SnapshotNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(ImageNotFoundException) ImageNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(ClusterNotFoundException) ClusterNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(BackendNotFoundException) BackendNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(PlaybookNotFoundException) PlaybookNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(DefaultException) DefaultException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) all_structs.append(OpenStackConflictException) OpenStackConflictException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) fix_spec(all_structs) del all_structs