diff --git a/portal_client.thrift b/portal_client.thrift index 5c5bb8c..0b0bdee 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -27,6 +27,7 @@ struct ResearchEnvironmentTemplate{ 9: optional map information_for_display 10: optional int min_ram = 0 11: optional int min_cores = 0 +12: optional string securitygroup_name } struct CondaPackage{ @@ -340,7 +341,16 @@ service VirtualMachineService { ) + /** + * Adds template security group to a server + */ + void add_research_environment_security_group( + /** OpenStack id of the server*/ + 1:string server_id,2:string security_group_name) + throws (1:DefaultException r,2:ServerNotFoundException s + + ) /** * Add metadata to a server. * Returns: List of flavor instances. diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 4733c19..7b05f1b 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -321,9 +321,21 @@ def open_port_range_for_vm_in_project( protocol=protocol, ) + def add_research_environment_security_group( + self, server_id: str, security_group_name: str + ) -> None: + return self.openstack_connector.add_research_environment_security_group( + server_id=server_id, security_group_name=security_group_name + ) + def add_udp_security_group(self, server_id: str) -> None: return self.openstack_connector.add_udp_security_group(server_id=server_id) + def add_metadata_to_server(self, openstack_id: str, metadata): + self.openstack_connector.add_metadata_to_server( + server_id=openstack_id, metadata=metadata + ) + def start_server( self, flavor_name: str, diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index 0bc1e72..e4f7487 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -7,94 +7,125 @@ # options string: py # -import sys import pprint +import sys + if sys.version_info[0] > 2: from urllib.parse import urlparse else: from urlparse import urlparse -from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient -from thrift.protocol.TBinaryProtocol import TBinaryProtocol +from thrift.protocol.TBinaryProtocol import TBinaryProtocol +from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport from VirtualMachineService import VirtualMachineService -from VirtualMachineService.ttypes import * - -if len(sys.argv) <= 1 or sys.argv[1] == '--help': - print('') - print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]') - print('') - print('Functions:') - print(' bool is_version(double version)') - print(' string get_client_version()') - print(' get_gateway_ip()') - print(' get_calculation_values()') - print(' string import_keypair(string keyname, string public_key)') - print(' get_vm_ports(string openstack_id)') - print(' void add_udp_security_group(string server_id)') - print(' 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('') + +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( + " void add_research_environment_security_group(string server_id, string security_group_name)" + ) + 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 @@ -104,16 +135,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]) @@ -121,42 +152,49 @@ if sys.argv[argi] == '-u': port = 80 uri = url[2] if url[4]: - uri += '?%s' % url[4] + uri += "?%s" % url[4] http = True argi += 2 -if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': +if sys.argv[argi] == "-f" or sys.argv[argi] == "-framed": framed = True argi += 1 -if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': +if sys.argv[argi] == "-s" or sys.argv[argi] == "-ssl": ssl = True argi += 1 -if sys.argv[argi] == '-novalidate': +if sys.argv[argi] == "-novalidate": validate = False argi += 1 -if sys.argv[argi] == '-ca_certs': - ca_certs = sys.argv[argi+1] +if sys.argv[argi] == "-ca_certs": + ca_certs = sys.argv[argi + 1] argi += 2 -if sys.argv[argi] == '-keyfile': - keyfile = sys.argv[argi+1] +if sys.argv[argi] == "-keyfile": + keyfile = sys.argv[argi + 1] argi += 2 -if sys.argv[argi] == '-certfile': - certfile = sys.argv[argi+1] +if sys.argv[argi] == "-certfile": + certfile = sys.argv[argi + 1] argi += 2 cmd = sys.argv[argi] -args = sys.argv[argi + 1:] +args = sys.argv[argi + 1 :] if http: transport = THttpClient.THttpClient(host, port, uri) else: if ssl: - socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) + socket = TSSLSocket.TSSLSocket( + host, + port, + validate=validate, + ca_certs=ca_certs, + keyfile=keyfile, + certfile=certfile, + ) else: socket = TSocket.TSocket(host, port) if framed: @@ -167,392 +205,670 @@ 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], + ) + ) + +elif cmd == "add_research_environment_security_group": + if len(args) != 2: + print("add_research_environment_security_group requires 2 args") sys.exit(1) - pp.pprint(client.add_udp_security_group(args[0],)) + pp.pprint( + client.add_research_environment_security_group( + args[0], + args[1], + ) + ) -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 091e974..11ffa7b 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -6,16 +6,15 @@ # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -from thrift.TRecursive import fix_spec +import logging +import sys +from thrift.Thrift import TApplicationException, TMessageType, TProcessor, TType +from thrift.transport import TTransport +from thrift.TRecursive import fix_spec -import sys -import logging from .ttypes import * -from thrift.Thrift import TProcessor -from thrift.transport import TTransport + all_structs = [] @@ -24,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): """ @@ -38,14 +37,12 @@ def get_client_version(self): Returns Version of the client """ - pass def get_gateway_ip(self): """ Gets the gateway ip. """ - pass def get_calculation_values(self): pass @@ -60,7 +57,6 @@ def import_keypair(self, keyname, public_key): - public_key: The public key """ - pass def get_vm_ports(self, openstack_id): """ @@ -71,7 +67,6 @@ def get_vm_ports(self, openstack_id): - openstack_id: Id of server """ - pass def add_udp_security_group(self, server_id): """ @@ -81,7 +76,16 @@ def add_udp_security_group(self, server_id): - server_id: OpenStack id of the server """ - pass + + def add_research_environment_security_group(self, server_id, security_group_name): + """ + Adds template security group to a server + + Parameters: + - server_id: OpenStack id of the server + - security_group_name + + """ def add_metadata_to_server(self, openstack_id, metadata): """ @@ -93,7 +97,6 @@ def add_metadata_to_server(self, openstack_id, metadata): - metadata """ - pass def get_flavors(self): """ @@ -101,7 +104,6 @@ def get_flavors(self): Returns: List of flavor instances. """ - pass def get_images(self): """ @@ -109,7 +111,6 @@ def get_images(self): Returns: List of Image instances. """ - pass def get_public_images(self): """ @@ -117,7 +118,6 @@ def get_public_images(self): Returns: List of public Image instances. """ - pass def get_private_images(self): """ @@ -125,7 +125,6 @@ def get_private_images(self): Returns: List of private Image instances. """ - pass def get_image(self, openstack_id, ignore_not_active): """ @@ -137,7 +136,6 @@ def get_image(self, openstack_id, ignore_not_active): - ignore_not_active """ - pass def get_volume(self, volume_id): """ @@ -145,7 +143,6 @@ def get_volume(self, volume_id): - volume_id """ - pass def get_volumes_by_ids(self, volume_ids): """ @@ -153,7 +150,6 @@ def get_volumes_by_ids(self, volume_ids): - volume_ids """ - pass def resize_volume(self, volume_id, size): """ @@ -162,9 +158,10 @@ 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 @@ -176,7 +173,6 @@ def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_i - protocol """ - pass def delete_security_group_rule(self, openstack_id): """ @@ -184,7 +180,6 @@ def delete_security_group_rule(self, openstack_id): - openstack_id """ - pass def delete_server(self, openstack_id): """ @@ -195,9 +190,20 @@ 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. @@ -212,7 +218,6 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - additional_security_group_ids """ - pass def is_bibigrid_available(self): pass @@ -224,9 +229,18 @@ 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. @@ -241,7 +255,6 @@ def start_server_with_custom_key(self, flavor_name, image_name, servername, meta - additional_security_group_ids """ - pass def exist_server(self, name): """ @@ -251,9 +264,17 @@ def exist_server(self, name): - name """ - pass - def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): + def create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): """ Create and deploy an ansible playbook @@ -267,7 +288,6 @@ def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, r - base_url """ - pass def get_playbook_logs(self, openstack_id): """ @@ -277,14 +297,12 @@ def get_playbook_logs(self, openstack_id): - openstack_id """ - pass def has_forc(self): """ Get boolean if client has backend url configured """ - pass def get_forc_url(self): pass @@ -300,14 +318,12 @@ def create_backend(self, owner, user_path, template, upstream_url): - upstream_url """ - pass def get_backends(self): """ Get all backends """ - pass def get_backends_by_owner(self, owner): """ @@ -317,7 +333,6 @@ def get_backends_by_owner(self, owner): - owner """ - pass def get_backends_by_template(self, template): """ @@ -327,7 +342,6 @@ def get_backends_by_template(self, template): - template """ - pass def get_backend_by_id(self, id): """ @@ -337,7 +351,6 @@ def get_backend_by_id(self, id): - id """ - pass def delete_backend(self, id): """ @@ -347,7 +360,6 @@ def delete_backend(self, id): - id """ - pass def add_user_to_backend(self, backend_id, user_id): """ @@ -358,7 +370,6 @@ def add_user_to_backend(self, backend_id, user_id): - user_id """ - pass def get_users_from_backend(self, backend_id): """ @@ -368,7 +379,6 @@ def get_users_from_backend(self, backend_id): - backend_id """ - pass def delete_user_from_backend(self, backend_id, user_id): """ @@ -379,7 +389,6 @@ def delete_user_from_backend(self, backend_id, user_id): - user_id """ - pass def get_allowed_templates(self): pass @@ -390,7 +399,6 @@ def get_servers(self): Returns: List of server instances. """ - pass def get_servers_by_ids(self, server_ids): """ @@ -401,7 +409,6 @@ def get_servers_by_ids(self, server_ids): - server_ids """ - pass def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -412,9 +419,10 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): - bibigrid_id """ - pass - def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): + def scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): """ Parameters: - cluster_id @@ -426,9 +434,19 @@ def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, st - batch_idx """ - pass - def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): + def add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): """ Parameters: - cluster_id @@ -442,7 +460,6 @@ def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_ - worker_idx """ - pass def get_cluster_info(self, cluster_id): """ @@ -450,7 +467,6 @@ def get_cluster_info(self, cluster_id): - cluster_id """ - pass def get_cluster_status(self, cluster_id): """ @@ -458,7 +474,6 @@ def get_cluster_status(self, cluster_id): - cluster_id """ - pass def get_server(self, openstack_id): """ @@ -469,7 +484,6 @@ def get_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def stop_server(self, openstack_id): """ @@ -480,7 +494,6 @@ def stop_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def create_snapshot(self, openstack_id, name, username, base_tags, description): """ @@ -496,7 +509,6 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): - description: Description of the new snapshot """ - pass def get_limits(self): """ @@ -506,7 +518,6 @@ def get_limits(self): 'totalInstancesUsed': totalInstancesUsed} """ - pass def start_cluster(self, public_key, master_instance, worker_instances, user): """ @@ -517,7 +528,6 @@ def start_cluster(self, public_key, master_instance, worker_instances, user): - user """ - pass def terminate_cluster(self, cluster_id): """ @@ -525,7 +535,6 @@ def terminate_cluster(self, cluster_id): - cluster_id """ - pass def delete_image(self, image_id): """ @@ -536,7 +545,6 @@ def delete_image(self, image_id): - image_id: Id of image """ - pass def detach_volume(self, volume_id, server_id): """ @@ -547,7 +555,6 @@ def detach_volume(self, volume_id, server_id): - server_id: Id of the server where the volume is attached """ - pass def delete_volume(self, volume_id): """ @@ -557,7 +564,6 @@ def delete_volume(self, volume_id): - volume_id """ - pass def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -569,7 +575,6 @@ def attach_volume_to_server(self, openstack_id, volume_id): - volume_id: Id of volume """ - pass def resume_server(self, openstack_id): """ @@ -579,7 +584,6 @@ def resume_server(self, openstack_id): - openstack_id: Id of the server """ - pass def create_volume(self, volume_name, volume_storage, metadata): """ @@ -591,7 +595,6 @@ def create_volume(self, volume_name, volume_storage, metadata): - metadata: Metadata for the new volume """ - pass def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -603,7 +606,6 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ - pass def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -615,7 +617,6 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - volume_snap_id: ID of volume snapshot """ - pass def create_volume_snapshot(self, volume_id, name, description): """ @@ -628,7 +629,6 @@ def create_volume_snapshot(self, volume_id, name, description): - description: Description for the volume snapshot """ - pass def get_volume_snapshot(self, name_or_id): """ @@ -639,7 +639,6 @@ def get_volume_snapshot(self, name_or_id): - name_or_id: Name or ID of volume snapshot """ - pass def delete_volume_snapshot(self, snapshot_id): """ @@ -649,7 +648,6 @@ def delete_volume_snapshot(self, snapshot_id): - snapshot_id """ - pass def reboot_hard_server(self, openstack_id): """ @@ -659,7 +657,6 @@ def reboot_hard_server(self, openstack_id): - openstack_id: Id of the server """ - pass def reboot_soft_server(self, openstack_id): """ @@ -669,7 +666,6 @@ def reboot_soft_server(self, openstack_id): - openstack_id: Id of the server """ - pass class Client(Iface): @@ -677,6 +673,7 @@ class Client(Iface): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ + def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: @@ -693,7 +690,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) @@ -713,7 +710,9 @@ def recv_is_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "is_version failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "is_version failed: unknown result" + ) def get_client_version(self): """ @@ -725,7 +724,9 @@ def get_client_version(self): return self.recv_get_client_version() def send_get_client_version(self): - self._oprot.writeMessageBegin('get_client_version', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_client_version", TMessageType.CALL, self._seqid + ) args = get_client_version_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -744,7 +745,10 @@ def recv_get_client_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_client_version failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_client_version failed: unknown result", + ) def get_gateway_ip(self): """ @@ -755,7 +759,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() @@ -774,14 +778,19 @@ def recv_get_gateway_ip(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_gateway_ip failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_gateway_ip failed: unknown result", + ) def get_calculation_values(self): self.send_get_calculation_values() return self.recv_get_calculation_values() def send_get_calculation_values(self): - self._oprot.writeMessageBegin('get_calculation_values', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_calculation_values", TMessageType.CALL, self._seqid + ) args = get_calculation_values_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -800,7 +809,10 @@ def recv_get_calculation_values(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_calculation_values failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_calculation_values failed: unknown result", + ) def import_keypair(self, keyname, public_key): """ @@ -816,7 +828,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 @@ -837,7 +849,10 @@ def recv_import_keypair(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "import_keypair failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "import_keypair failed: unknown result", + ) def get_vm_ports(self, openstack_id): """ @@ -852,7 +867,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) @@ -874,7 +889,9 @@ def recv_get_vm_ports(self): return result.success if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result" + ) def add_udp_security_group(self, server_id): """ @@ -888,7 +905,9 @@ def add_udp_security_group(self, server_id): self.recv_add_udp_security_group() def send_add_udp_security_group(self, server_id): - self._oprot.writeMessageBegin('add_udp_security_group', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_udp_security_group", TMessageType.CALL, self._seqid + ) args = add_udp_security_group_args() args.server_id = server_id args.write(self._oprot) @@ -912,6 +931,50 @@ def recv_add_udp_security_group(self): raise result.s return + def add_research_environment_security_group(self, server_id, security_group_name): + """ + Adds template security group to a server + + Parameters: + - server_id: OpenStack id of the server + - security_group_name + + """ + self.send_add_research_environment_security_group( + server_id, security_group_name + ) + self.recv_add_research_environment_security_group() + + def send_add_research_environment_security_group( + self, server_id, security_group_name + ): + self._oprot.writeMessageBegin( + "add_research_environment_security_group", TMessageType.CALL, self._seqid + ) + args = add_research_environment_security_group_args() + args.server_id = server_id + args.security_group_name = security_group_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_research_environment_security_group(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_research_environment_security_group_result() + result.read(iprot) + iprot.readMessageEnd() + if result.r is not None: + raise result.r + if result.s is not None: + raise result.s + return + def add_metadata_to_server(self, openstack_id, metadata): """ Add metadata to a server. @@ -926,7 +989,9 @@ 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 @@ -951,7 +1016,10 @@ 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): """ @@ -963,7 +1031,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() @@ -982,7 +1050,9 @@ def recv_get_flavors(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result" + ) def get_images(self): """ @@ -994,7 +1064,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() @@ -1013,7 +1083,9 @@ def recv_get_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_images failed: unknown result" + ) def get_public_images(self): """ @@ -1025,7 +1097,9 @@ def get_public_images(self): return self.recv_get_public_images() def send_get_public_images(self): - self._oprot.writeMessageBegin('get_public_images', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_public_images", TMessageType.CALL, self._seqid + ) args = get_public_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1044,7 +1118,10 @@ def recv_get_public_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_public_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_public_images failed: unknown result", + ) def get_private_images(self): """ @@ -1056,7 +1133,9 @@ def get_private_images(self): return self.recv_get_private_images() def send_get_private_images(self): - self._oprot.writeMessageBegin('get_private_images', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_private_images", TMessageType.CALL, self._seqid + ) args = get_private_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1075,7 +1154,10 @@ def recv_get_private_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_private_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_private_images failed: unknown result", + ) def get_image(self, openstack_id, ignore_not_active): """ @@ -1091,7 +1173,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 @@ -1114,7 +1196,9 @@ def recv_get_image(self): return result.success if result.i is not None: raise result.i - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_image failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_image failed: unknown result" + ) def get_volume(self, volume_id): """ @@ -1126,7 +1210,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) @@ -1148,7 +1232,9 @@ def recv_get_volume(self): return result.success if result.v is not None: raise result.v - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_volume failed: unknown result" + ) def get_volumes_by_ids(self, volume_ids): """ @@ -1160,7 +1246,9 @@ def get_volumes_by_ids(self, volume_ids): return self.recv_get_volumes_by_ids() def send_get_volumes_by_ids(self, volume_ids): - self._oprot.writeMessageBegin('get_volumes_by_ids', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_volumes_by_ids", TMessageType.CALL, self._seqid + ) args = get_volumes_by_ids_args() args.volume_ids = volume_ids args.write(self._oprot) @@ -1180,7 +1268,10 @@ def recv_get_volumes_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volumes_by_ids failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_volumes_by_ids failed: unknown result", + ) def resize_volume(self, volume_id, size): """ @@ -1193,7 +1284,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 @@ -1216,7 +1307,9 @@ 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 @@ -1228,11 +1321,17 @@ def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_i - 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 @@ -1262,7 +1361,10 @@ 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): """ @@ -1274,7 +1376,9 @@ 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) @@ -1311,7 +1415,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) @@ -1335,7 +1439,19 @@ 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. @@ -1350,11 +1466,34 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - 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 @@ -1393,14 +1532,18 @@ def recv_start_server(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "start_server failed: unknown result" + ) def is_bibigrid_available(self): self.send_is_bibigrid_available() return self.recv_is_bibigrid_available() def send_is_bibigrid_available(self): - self._oprot.writeMessageBegin('is_bibigrid_available', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "is_bibigrid_available", TMessageType.CALL, self._seqid + ) args = is_bibigrid_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1419,7 +1562,10 @@ def recv_is_bibigrid_available(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "is_bibigrid_available failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "is_bibigrid_available failed: unknown result", + ) def detach_ip_from_server(self, server_id, floating_ip): """ @@ -1432,7 +1578,9 @@ def detach_ip_from_server(self, server_id, floating_ip): self.recv_detach_ip_from_server() def send_detach_ip_from_server(self, server_id, floating_ip): - self._oprot.writeMessageBegin('detach_ip_from_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "detach_ip_from_server", TMessageType.CALL, self._seqid + ) args = detach_ip_from_server_args() args.server_id = server_id args.floating_ip = floating_ip @@ -1455,7 +1603,17 @@ 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. @@ -1470,11 +1628,32 @@ def start_server_with_custom_key(self, flavor_name, image_name, servername, meta - 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 @@ -1511,7 +1690,10 @@ def recv_start_server_with_custom_key(self): raise result.f if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_with_custom_key failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "start_server_with_custom_key failed: unknown result", + ) def exist_server(self, name): """ @@ -1525,7 +1707,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) @@ -1545,9 +1727,20 @@ def recv_exist_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "exist_server failed: unknown result") + 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): + 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 @@ -1561,11 +1754,30 @@ def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, r - base_url """ - self.send_create_and_deploy_playbook(public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url) + self.send_create_and_deploy_playbook( + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ) return self.recv_create_and_deploy_playbook() - def send_create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): - self._oprot.writeMessageBegin('create_and_deploy_playbook', TMessageType.CALL, self._seqid) + def send_create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): + self._oprot.writeMessageBegin( + "create_and_deploy_playbook", TMessageType.CALL, self._seqid + ) args = create_and_deploy_playbook_args() args.public_key = public_key args.openstack_id = openstack_id @@ -1593,7 +1805,10 @@ def recv_create_and_deploy_playbook(self): return result.success if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_and_deploy_playbook failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_and_deploy_playbook failed: unknown result", + ) def get_playbook_logs(self, openstack_id): """ @@ -1607,7 +1822,9 @@ def get_playbook_logs(self, openstack_id): return self.recv_get_playbook_logs() def send_get_playbook_logs(self, openstack_id): - self._oprot.writeMessageBegin('get_playbook_logs', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_playbook_logs", TMessageType.CALL, self._seqid + ) args = get_playbook_logs_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1629,7 +1846,10 @@ def recv_get_playbook_logs(self): return result.success if result.p is not None: raise result.p - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_playbook_logs failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_playbook_logs failed: unknown result", + ) def has_forc(self): """ @@ -1640,7 +1860,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() @@ -1659,14 +1879,16 @@ def recv_has_forc(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "has_forc failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "has_forc failed: unknown result" + ) def get_forc_url(self): self.send_get_forc_url() return self.recv_get_forc_url() def send_get_forc_url(self): - self._oprot.writeMessageBegin('get_forc_url', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_forc_url", TMessageType.CALL, self._seqid) args = get_forc_url_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1685,7 +1907,9 @@ def recv_get_forc_url(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result" + ) def create_backend(self, owner, user_path, template, upstream_url): """ @@ -1702,7 +1926,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 @@ -1729,7 +1953,10 @@ def recv_create_backend(self): raise result.e if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_backend failed: unknown result", + ) def get_backends(self): """ @@ -1740,7 +1967,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() @@ -1761,7 +1988,9 @@ def recv_get_backends(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_backends failed: unknown result" + ) def get_backends_by_owner(self, owner): """ @@ -1775,7 +2004,9 @@ def get_backends_by_owner(self, owner): return self.recv_get_backends_by_owner() def send_get_backends_by_owner(self, owner): - self._oprot.writeMessageBegin('get_backends_by_owner', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backends_by_owner", TMessageType.CALL, self._seqid + ) args = get_backends_by_owner_args() args.owner = owner args.write(self._oprot) @@ -1797,7 +2028,10 @@ def recv_get_backends_by_owner(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_owner failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backends_by_owner failed: unknown result", + ) def get_backends_by_template(self, template): """ @@ -1811,7 +2045,9 @@ def get_backends_by_template(self, template): return self.recv_get_backends_by_template() def send_get_backends_by_template(self, template): - self._oprot.writeMessageBegin('get_backends_by_template', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backends_by_template", TMessageType.CALL, self._seqid + ) args = get_backends_by_template_args() args.template = template args.write(self._oprot) @@ -1833,7 +2069,10 @@ def recv_get_backends_by_template(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_template failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backends_by_template failed: unknown result", + ) def get_backend_by_id(self, id): """ @@ -1847,7 +2086,9 @@ def get_backend_by_id(self, id): return self.recv_get_backend_by_id() def send_get_backend_by_id(self, id): - self._oprot.writeMessageBegin('get_backend_by_id', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backend_by_id", TMessageType.CALL, self._seqid + ) args = get_backend_by_id_args() args.id = id args.write(self._oprot) @@ -1871,7 +2112,10 @@ def recv_get_backend_by_id(self): raise result.b if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backend_by_id failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backend_by_id failed: unknown result", + ) def delete_backend(self, id): """ @@ -1885,7 +2129,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) @@ -1920,7 +2164,9 @@ def add_user_to_backend(self, backend_id, user_id): return self.recv_add_user_to_backend() def send_add_user_to_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin('add_user_to_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_user_to_backend", TMessageType.CALL, self._seqid + ) args = add_user_to_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -1943,7 +2189,10 @@ def recv_add_user_to_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_user_to_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_user_to_backend failed: unknown result", + ) def get_users_from_backend(self, backend_id): """ @@ -1957,7 +2206,9 @@ def get_users_from_backend(self, backend_id): return self.recv_get_users_from_backend() def send_get_users_from_backend(self, backend_id): - self._oprot.writeMessageBegin('get_users_from_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_users_from_backend", TMessageType.CALL, self._seqid + ) args = get_users_from_backend_args() args.backend_id = backend_id args.write(self._oprot) @@ -1979,7 +2230,10 @@ def recv_get_users_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_users_from_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_users_from_backend failed: unknown result", + ) def delete_user_from_backend(self, backend_id, user_id): """ @@ -1994,7 +2248,9 @@ def delete_user_from_backend(self, backend_id, user_id): return self.recv_delete_user_from_backend() def send_delete_user_from_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin('delete_user_from_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_user_from_backend", TMessageType.CALL, self._seqid + ) args = delete_user_from_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -2017,14 +2273,19 @@ def recv_delete_user_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_user_from_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "delete_user_from_backend failed: unknown result", + ) def get_allowed_templates(self): self.send_get_allowed_templates() return self.recv_get_allowed_templates() def send_get_allowed_templates(self): - self._oprot.writeMessageBegin('get_allowed_templates', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_allowed_templates", TMessageType.CALL, self._seqid + ) args = get_allowed_templates_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2043,7 +2304,10 @@ def recv_get_allowed_templates(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_allowed_templates failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_allowed_templates failed: unknown result", + ) def get_servers(self): """ @@ -2055,7 +2319,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() @@ -2074,7 +2338,9 @@ def recv_get_servers(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_servers failed: unknown result" + ) def get_servers_by_ids(self, server_ids): """ @@ -2089,7 +2355,9 @@ def get_servers_by_ids(self, server_ids): return self.recv_get_servers_by_ids() def send_get_servers_by_ids(self, server_ids): - self._oprot.writeMessageBegin('get_servers_by_ids', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_servers_by_ids", TMessageType.CALL, self._seqid + ) args = get_servers_by_ids_args() args.server_ids = server_ids args.write(self._oprot) @@ -2109,7 +2377,10 @@ def recv_get_servers_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_ids failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_servers_by_ids failed: unknown result", + ) def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -2124,7 +2395,9 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): return self.recv_get_servers_by_bibigrid_id() def send_get_servers_by_bibigrid_id(self, bibigrid_id): - self._oprot.writeMessageBegin('get_servers_by_bibigrid_id', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_servers_by_bibigrid_id", TMessageType.CALL, self._seqid + ) args = get_servers_by_bibigrid_id_args() args.bibigrid_id = bibigrid_id args.write(self._oprot) @@ -2144,9 +2417,14 @@ def recv_get_servers_by_bibigrid_id(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_bibigrid_id failed: unknown result") + 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): + def scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): """ Parameters: - cluster_id @@ -2158,11 +2436,17 @@ def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, st - batch_idx """ - self.send_scale_up_cluster(cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx) + self.send_scale_up_cluster( + cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ) return self.recv_scale_up_cluster() - def send_scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): - self._oprot.writeMessageBegin('scale_up_cluster', TMessageType.CALL, self._seqid) + def send_scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): + self._oprot.writeMessageBegin( + "scale_up_cluster", TMessageType.CALL, self._seqid + ) args = scale_up_cluster_args() args.cluster_id = cluster_id args.image_name = image_name @@ -2188,9 +2472,23 @@ def recv_scale_up_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "scale_up_cluster failed: unknown result") + 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): + 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 @@ -2204,11 +2502,34 @@ def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_ - worker_idx """ - self.send_add_cluster_machine(cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx) + self.send_add_cluster_machine( + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ) return self.recv_add_cluster_machine() - def send_add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): - self._oprot.writeMessageBegin('add_cluster_machine', TMessageType.CALL, self._seqid) + def send_add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): + self._oprot.writeMessageBegin( + "add_cluster_machine", TMessageType.CALL, self._seqid + ) args = add_cluster_machine_args() args.cluster_id = cluster_id args.cluster_user = cluster_user @@ -2236,7 +2557,10 @@ def recv_add_cluster_machine(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_cluster_machine failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_cluster_machine failed: unknown result", + ) def get_cluster_info(self, cluster_id): """ @@ -2248,7 +2572,9 @@ def get_cluster_info(self, cluster_id): return self.recv_get_cluster_info() def send_get_cluster_info(self, cluster_id): - self._oprot.writeMessageBegin('get_cluster_info', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_cluster_info", TMessageType.CALL, self._seqid + ) args = get_cluster_info_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2270,7 +2596,10 @@ def recv_get_cluster_info(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_info failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_cluster_info failed: unknown result", + ) def get_cluster_status(self, cluster_id): """ @@ -2282,7 +2611,9 @@ def get_cluster_status(self, cluster_id): return self.recv_get_cluster_status() def send_get_cluster_status(self, cluster_id): - self._oprot.writeMessageBegin('get_cluster_status', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_cluster_status", TMessageType.CALL, self._seqid + ) args = get_cluster_status_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2304,7 +2635,10 @@ def recv_get_cluster_status(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_status failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_cluster_status failed: unknown result", + ) def get_server(self, openstack_id): """ @@ -2319,7 +2653,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) @@ -2341,7 +2675,9 @@ def recv_get_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_server failed: unknown result" + ) def stop_server(self, openstack_id): """ @@ -2356,7 +2692,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) @@ -2397,8 +2733,10 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): self.send_create_snapshot(openstack_id, name, username, base_tags, description) return self.recv_create_snapshot() - def send_create_snapshot(self, openstack_id, name, username, base_tags, description): - self._oprot.writeMessageBegin('create_snapshot', TMessageType.CALL, self._seqid) + def send_create_snapshot( + self, openstack_id, name, username, base_tags, description + ): + self._oprot.writeMessageBegin("create_snapshot", TMessageType.CALL, self._seqid) args = create_snapshot_args() args.openstack_id = openstack_id args.name = name @@ -2426,7 +2764,10 @@ def recv_create_snapshot(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_snapshot failed: unknown result", + ) def get_limits(self): """ @@ -2440,7 +2781,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() @@ -2459,7 +2800,9 @@ def recv_get_limits(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_limits failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_limits failed: unknown result" + ) def start_cluster(self, public_key, master_instance, worker_instances, user): """ @@ -2474,7 +2817,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 @@ -2497,7 +2840,9 @@ def recv_start_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result" + ) def terminate_cluster(self, cluster_id): """ @@ -2509,7 +2854,9 @@ def terminate_cluster(self, cluster_id): return self.recv_terminate_cluster() def send_terminate_cluster(self, cluster_id): - self._oprot.writeMessageBegin('terminate_cluster', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "terminate_cluster", TMessageType.CALL, self._seqid + ) args = terminate_cluster_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2531,7 +2878,10 @@ def recv_terminate_cluster(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "terminate_cluster failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "terminate_cluster failed: unknown result", + ) def delete_image(self, image_id): """ @@ -2546,7 +2896,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) @@ -2581,7 +2931,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 @@ -2620,7 +2970,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) @@ -2658,7 +3008,9 @@ def attach_volume_to_server(self, openstack_id, volume_id): return self.recv_attach_volume_to_server() def send_attach_volume_to_server(self, openstack_id, volume_id): - self._oprot.writeMessageBegin('attach_volume_to_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "attach_volume_to_server", TMessageType.CALL, self._seqid + ) args = attach_volume_to_server_args() args.openstack_id = openstack_id args.volume_id = volume_id @@ -2683,7 +3035,10 @@ def recv_attach_volume_to_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "attach_volume_to_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "attach_volume_to_server failed: unknown result", + ) def resume_server(self, openstack_id): """ @@ -2697,7 +3052,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) @@ -2735,7 +3090,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 @@ -2761,7 +3116,9 @@ def recv_create_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "create_volume failed: unknown result" + ) def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -2773,11 +3130,17 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ - self.send_create_volume_by_source_volume(volume_name, metadata, source_volume_id) + self.send_create_volume_by_source_volume( + volume_name, metadata, source_volume_id + ) return self.recv_create_volume_by_source_volume() - def send_create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): - self._oprot.writeMessageBegin('create_volume_by_source_volume', TMessageType.CALL, self._seqid) + def send_create_volume_by_source_volume( + self, volume_name, metadata, source_volume_id + ): + self._oprot.writeMessageBegin( + "create_volume_by_source_volume", TMessageType.CALL, self._seqid + ) args = create_volume_by_source_volume_args() args.volume_name = volume_name args.metadata = metadata @@ -2803,7 +3166,10 @@ def recv_create_volume_by_source_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_source_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_by_source_volume failed: unknown result", + ) def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -2819,7 +3185,9 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): return self.recv_create_volume_by_volume_snap() def send_create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - self._oprot.writeMessageBegin('create_volume_by_volume_snap', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "create_volume_by_volume_snap", TMessageType.CALL, self._seqid + ) args = create_volume_by_volume_snap_args() args.volume_name = volume_name args.metadata = metadata @@ -2845,7 +3213,10 @@ def recv_create_volume_by_volume_snap(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_volume_snap failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_by_volume_snap failed: unknown result", + ) def create_volume_snapshot(self, volume_id, name, description): """ @@ -2862,7 +3233,9 @@ def create_volume_snapshot(self, volume_id, name, description): return self.recv_create_volume_snapshot() def send_create_volume_snapshot(self, volume_id, name, description): - self._oprot.writeMessageBegin('create_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "create_volume_snapshot", TMessageType.CALL, self._seqid + ) args = create_volume_snapshot_args() args.volume_id = volume_id args.name = name @@ -2888,7 +3261,10 @@ def recv_create_volume_snapshot(self): raise result.e if result.r is not None: raise result.r - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_snapshot failed: unknown result", + ) def get_volume_snapshot(self, name_or_id): """ @@ -2903,7 +3279,9 @@ def get_volume_snapshot(self, name_or_id): return self.recv_get_volume_snapshot() def send_get_volume_snapshot(self, name_or_id): - self._oprot.writeMessageBegin('get_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_volume_snapshot", TMessageType.CALL, self._seqid + ) args = get_volume_snapshot_args() args.name_or_id = name_or_id args.write(self._oprot) @@ -2925,7 +3303,10 @@ def recv_get_volume_snapshot(self): return result.success if result.r is not None: raise result.r - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_volume_snapshot failed: unknown result", + ) def delete_volume_snapshot(self, snapshot_id): """ @@ -2939,7 +3320,9 @@ def delete_volume_snapshot(self, snapshot_id): self.recv_delete_volume_snapshot() def send_delete_volume_snapshot(self, snapshot_id): - self._oprot.writeMessageBegin('delete_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_volume_snapshot", TMessageType.CALL, self._seqid + ) args = delete_volume_snapshot_args() args.snapshot_id = snapshot_id args.write(self._oprot) @@ -2975,7 +3358,9 @@ def reboot_hard_server(self, openstack_id): self.recv_reboot_hard_server() def send_reboot_hard_server(self, openstack_id): - self._oprot.writeMessageBegin('reboot_hard_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "reboot_hard_server", TMessageType.CALL, self._seqid + ) args = reboot_hard_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3011,7 +3396,9 @@ def reboot_soft_server(self, openstack_id): self.recv_reboot_soft_server() def send_reboot_soft_server(self, openstack_id): - self._oprot.writeMessageBegin('reboot_soft_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "reboot_soft_server", TMessageType.CALL, self._seqid + ) args = reboot_soft_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3043,11 +3430,20 @@ 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_research_environment_security_group"] = ( + Processor.process_add_research_environment_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 @@ -3056,31 +3452,55 @@ 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 @@ -3094,14 +3514,24 @@ def __init__(self, handler): self._processMap["delete_image"] = Processor.process_delete_image self._processMap["detach_volume"] = Processor.process_detach_volume self._processMap["delete_volume"] = Processor.process_delete_volume - self._processMap["attach_volume_to_server"] = Processor.process_attach_volume_to_server + self._processMap["attach_volume_to_server"] = ( + Processor.process_attach_volume_to_server + ) self._processMap["resume_server"] = Processor.process_resume_server self._processMap["create_volume"] = Processor.process_create_volume - self._processMap["create_volume_by_source_volume"] = Processor.process_create_volume_by_source_volume - self._processMap["create_volume_by_volume_snap"] = Processor.process_create_volume_by_volume_snap - self._processMap["create_volume_snapshot"] = Processor.process_create_volume_snapshot + self._processMap["create_volume_by_source_volume"] = ( + Processor.process_create_volume_by_source_volume + ) + self._processMap["create_volume_by_volume_snap"] = ( + Processor.process_create_volume_by_volume_snap + ) + self._processMap["create_volume_snapshot"] = ( + Processor.process_create_volume_snapshot + ) self._processMap["get_volume_snapshot"] = Processor.process_get_volume_snapshot - self._processMap["delete_volume_snapshot"] = Processor.process_delete_volume_snapshot + self._processMap["delete_volume_snapshot"] = ( + Processor.process_delete_volume_snapshot + ) self._processMap["reboot_hard_server"] = Processor.process_reboot_hard_server self._processMap["reboot_soft_server"] = Processor.process_reboot_soft_server self._on_message_begin = None @@ -3116,7 +3546,9 @@ def process(self, iprot, oprot): if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + x = TApplicationException( + TApplicationException.UNKNOWN_METHOD, "Unknown function %s" % (name) + ) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() @@ -3137,13 +3569,15 @@ def process_is_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("is_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3160,13 +3594,15 @@ def process_get_client_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_client_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3183,13 +3619,15 @@ def process_get_gateway_ip(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_gateway_ip", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3206,13 +3644,15 @@ def process_get_calculation_values(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_calculation_values", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3229,13 +3669,15 @@ def process_import_keypair(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("import_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3255,13 +3697,15 @@ def process_get_vm_ports(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_vm_ports", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3284,25 +3728,64 @@ 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() oprot.trans.flush() + def process_add_research_environment_security_group(self, seqid, iprot, oprot): + args = add_research_environment_security_group_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_research_environment_security_group_result() + try: + self._handler.add_research_environment_security_group( + args.server_id, args.security_group_name + ) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except DefaultException as r: + msg_type = TMessageType.REPLY + result.r = r + except ServerNotFoundException as s: + msg_type = TMessageType.REPLY + result.s = s + except TApplicationException as ex: + logging.exception("TApplication exception in handler") + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception("Unexpected exception in handler") + msg_type = TMessageType.EXCEPTION + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) + oprot.writeMessageBegin( + "add_research_environment_security_group", msg_type, seqid + ) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_add_metadata_to_server(self, seqid, iprot, oprot): args = add_metadata_to_server_args() args.read(iprot) 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 @@ -3313,13 +3796,15 @@ 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() @@ -3336,13 +3821,15 @@ def process_get_flavors(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_flavors", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3359,13 +3846,15 @@ def process_get_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3382,13 +3871,15 @@ def process_get_public_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_public_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3405,13 +3896,15 @@ def process_get_private_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_private_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3423,7 +3916,9 @@ def process_get_image(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_image_result() try: - result.success = self._handler.get_image(args.openstack_id, args.ignore_not_active) + result.success = self._handler.get_image( + args.openstack_id, args.ignore_not_active + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3431,13 +3926,15 @@ def process_get_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.i = i except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3457,13 +3954,15 @@ def process_get_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3480,13 +3979,15 @@ def process_get_volumes_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volumes_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3506,13 +4007,15 @@ def process_resize_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("resize_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3524,7 +4027,13 @@ 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 @@ -3538,13 +4047,15 @@ 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() @@ -3567,13 +4078,15 @@ def process_delete_security_group_rule(self, seqid, iprot, oprot): 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() @@ -3596,13 +4109,15 @@ def process_delete_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3614,7 +4129,18 @@ 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 @@ -3634,13 +4160,15 @@ def process_start_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3657,13 +4185,15 @@ def process_is_bibigrid_available(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("is_bibigrid_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3683,13 +4213,15 @@ def process_detach_ip_from_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("detach_ip_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3701,7 +4233,16 @@ 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 @@ -3721,13 +4262,15 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_server_with_custom_key", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3744,13 +4287,15 @@ def process_exist_server(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("exist_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3762,7 +4307,15 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_and_deploy_playbook_result() try: - result.success = self._handler.create_and_deploy_playbook(args.public_key, args.openstack_id, args.conda_packages, args.research_environment_template, args.apt_packages, args.create_only_backend, args.base_url) + result.success = self._handler.create_and_deploy_playbook( + args.public_key, + args.openstack_id, + args.conda_packages, + args.research_environment_template, + args.apt_packages, + args.create_only_backend, + args.base_url, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3770,13 +4323,15 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_and_deploy_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3796,13 +4351,15 @@ def process_get_playbook_logs(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.p = p except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_playbook_logs", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3819,13 +4376,15 @@ def process_has_forc(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("has_forc", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3842,13 +4401,15 @@ def process_get_forc_url(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_forc_url", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3860,7 +4421,9 @@ def process_create_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_backend_result() try: - result.success = self._handler.create_backend(args.owner, args.user_path, args.template, args.upstream_url) + result.success = self._handler.create_backend( + args.owner, args.user_path, args.template, args.upstream_url + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3871,13 +4434,15 @@ def process_create_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3897,13 +4462,15 @@ def process_get_backends(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3923,13 +4490,15 @@ def process_get_backends_by_owner(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends_by_owner", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3949,13 +4518,15 @@ def process_get_backends_by_template(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3978,13 +4549,15 @@ def process_get_backend_by_id(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backend_by_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4004,13 +4577,15 @@ def process_delete_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4022,7 +4597,9 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_user_to_backend_result() try: - result.success = self._handler.add_user_to_backend(args.backend_id, args.user_id) + result.success = self._handler.add_user_to_backend( + args.backend_id, args.user_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4030,13 +4607,15 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_user_to_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4056,13 +4635,15 @@ def process_get_users_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_users_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4074,7 +4655,9 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_user_from_backend_result() try: - result.success = self._handler.delete_user_from_backend(args.backend_id, args.user_id) + result.success = self._handler.delete_user_from_backend( + args.backend_id, args.user_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4082,13 +4665,15 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_user_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4105,13 +4690,15 @@ def process_get_allowed_templates(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_allowed_templates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4128,13 +4715,15 @@ def process_get_servers(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4151,13 +4740,15 @@ def process_get_servers_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4174,13 +4765,15 @@ def process_get_servers_by_bibigrid_id(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers_by_bibigrid_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4192,18 +4785,28 @@ def process_scale_up_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = scale_up_cluster_result() try: - result.success = self._handler.scale_up_cluster(args.cluster_id, args.image_name, args.flavor_name, args.count, args.names, args.start_idx, args.batch_idx) + result.success = self._handler.scale_up_cluster( + args.cluster_id, + args.image_name, + args.flavor_name, + args.count, + args.names, + args.start_idx, + args.batch_idx, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("scale_up_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4215,18 +4818,30 @@ def process_add_cluster_machine(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_cluster_machine_result() try: - result.success = self._handler.add_cluster_machine(args.cluster_id, args.cluster_user, args.cluster_group_id, args.image_name, args.flavor_name, args.name, args.key_name, args.batch_idx, args.worker_idx) + result.success = self._handler.add_cluster_machine( + args.cluster_id, + args.cluster_user, + args.cluster_group_id, + args.image_name, + args.flavor_name, + args.name, + args.key_name, + args.batch_idx, + args.worker_idx, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_cluster_machine", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4246,13 +4861,15 @@ def process_get_cluster_info(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_cluster_info", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4272,13 +4889,15 @@ def process_get_cluster_status(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_cluster_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4298,13 +4917,15 @@ def process_get_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4327,13 +4948,15 @@ def process_stop_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("stop_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4345,7 +4968,13 @@ def process_create_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_snapshot_result() try: - result.success = self._handler.create_snapshot(args.openstack_id, args.name, args.username, args.base_tags, args.description) + result.success = self._handler.create_snapshot( + args.openstack_id, + args.name, + args.username, + args.base_tags, + args.description, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4356,13 +4985,15 @@ def process_create_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4379,13 +5010,15 @@ def process_get_limits(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_limits", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4397,18 +5030,22 @@ def process_start_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_cluster_result() try: - result.success = self._handler.start_cluster(args.public_key, args.master_instance, args.worker_instances, args.user) + result.success = self._handler.start_cluster( + args.public_key, args.master_instance, args.worker_instances, args.user + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4428,13 +5065,15 @@ def process_terminate_cluster(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("terminate_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4454,13 +5093,15 @@ def process_delete_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4486,13 +5127,15 @@ def process_detach_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("detach_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4515,13 +5158,15 @@ def process_delete_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4533,7 +5178,9 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = attach_volume_to_server_result() try: - result.success = self._handler.attach_volume_to_server(args.openstack_id, args.volume_id) + result.success = self._handler.attach_volume_to_server( + args.openstack_id, args.volume_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4544,13 +5191,15 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("attach_volume_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4573,13 +5222,15 @@ def process_resume_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("resume_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4591,7 +5242,9 @@ def process_create_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_result() try: - result.success = self._handler.create_volume(args.volume_name, args.volume_storage, args.metadata) + result.success = self._handler.create_volume( + args.volume_name, args.volume_storage, args.metadata + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4602,13 +5255,15 @@ def process_create_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4620,7 +5275,9 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_source_volume_result() try: - result.success = self._handler.create_volume_by_source_volume(args.volume_name, args.metadata, args.source_volume_id) + result.success = self._handler.create_volume_by_source_volume( + args.volume_name, args.metadata, args.source_volume_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4631,13 +5288,15 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_by_source_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4649,7 +5308,9 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_volume_snap_result() try: - result.success = self._handler.create_volume_by_volume_snap(args.volume_name, args.metadata, args.volume_snap_id) + result.success = self._handler.create_volume_by_volume_snap( + args.volume_name, args.metadata, args.volume_snap_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4660,13 +5321,15 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_by_volume_snap", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4678,7 +5341,9 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_snapshot_result() try: - result.success = self._handler.create_volume_snapshot(args.volume_id, args.name, args.description) + result.success = self._handler.create_volume_snapshot( + args.volume_id, args.name, args.description + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4689,13 +5354,15 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4715,13 +5382,15 @@ def process_get_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4744,13 +5413,15 @@ def process_delete_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4773,13 +5444,15 @@ def process_reboot_hard_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("reboot_hard_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4802,18 +5475,21 @@ def process_reboot_soft_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("reboot_soft_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() + # HELPER FUNCTIONS AND STRUCTURES @@ -4824,12 +5500,18 @@ class is_version_args(object): """ - - def __init__(self, version=None,): + def __init__( + self, + version=None, + ): self.version = version def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -4849,11 +5531,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_version_args') + oprot.writeStructBegin("is_version_args") if self.version is not None: - oprot.writeFieldBegin('version', TType.DOUBLE, 1) + oprot.writeFieldBegin("version", TType.DOUBLE, 1) oprot.writeDouble(self.version) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4863,19 +5547,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(is_version_args) is_version_args.thrift_spec = ( None, # 0 - (1, TType.DOUBLE, 'version', None, None, ), # 1 + ( + 1, + TType.DOUBLE, + "version", + None, + None, + ), # 1 ) @@ -4886,12 +5577,18 @@ class is_version_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -4911,11 +5608,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_version_result') + oprot.writeStructBegin("is_version_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4925,26 +5624,36 @@ 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() @@ -4959,9 +5668,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_client_version_args') + oprot.writeStructBegin("get_client_version_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -4969,18 +5680,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): @@ -4990,12 +5701,18 @@ class get_client_version_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5005,7 +5722,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5015,12 +5736,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_client_version_result') + oprot.writeStructBegin("get_client_version_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5029,26 +5756,36 @@ 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() @@ -5063,9 +5800,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_gateway_ip_args') + oprot.writeStructBegin("get_gateway_ip_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5073,18 +5812,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): @@ -5094,12 +5833,18 @@ class get_gateway_ip_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5112,8 +5857,16 @@ def read(self, iprot): self.success = {} (_ktype33, _vtype34, _size32) = iprot.readMapBegin() for _i36 in range(_size32): - _key37 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val38 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key37 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val38 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key37] = _val38 iprot.readMapEnd() else: @@ -5125,15 +5878,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_gateway_ip_result') + oprot.writeStructBegin("get_gateway_ip_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter39, viter40 in self.success.items(): - oprot.writeString(kiter39.encode('utf-8') if sys.version_info[0] == 2 else kiter39) - oprot.writeString(viter40.encode('utf-8') if sys.version_info[0] == 2 else viter40) + oprot.writeString( + kiter39.encode("utf-8") if sys.version_info[0] == 2 else kiter39 + ) + oprot.writeString( + viter40.encode("utf-8") if sys.version_info[0] == 2 else viter40 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5143,26 +5902,36 @@ 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() @@ -5177,9 +5946,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_calculation_values_args') + oprot.writeStructBegin("get_calculation_values_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5187,18 +5958,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): @@ -5208,12 +5979,18 @@ class get_calculation_values_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5226,8 +6003,16 @@ def read(self, iprot): self.success = {} (_ktype42, _vtype43, _size41) = iprot.readMapBegin() for _i45 in range(_size41): - _key46 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val47 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key46 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val47 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key46] = _val47 iprot.readMapEnd() else: @@ -5239,15 +6024,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_calculation_values_result') + oprot.writeStructBegin("get_calculation_values_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter48, viter49 in self.success.items(): - oprot.writeString(kiter48.encode('utf-8') if sys.version_info[0] == 2 else kiter48) - oprot.writeString(viter49.encode('utf-8') if sys.version_info[0] == 2 else viter49) + oprot.writeString( + kiter48.encode("utf-8") if sys.version_info[0] == 2 else kiter48 + ) + oprot.writeString( + viter49.encode("utf-8") if sys.version_info[0] == 2 else viter49 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5257,18 +6048,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_calculation_values_result) get_calculation_values_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -5280,13 +6078,20 @@ class import_keypair_args(object): """ - - def __init__(self, keyname=None, public_key=None,): + def __init__( + self, + keyname=None, + public_key=None, + ): self.keyname = keyname self.public_key = public_key def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5296,12 +6101,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.keyname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.keyname = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5311,16 +6124,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('import_keypair_args') + oprot.writeStructBegin("import_keypair_args") if self.keyname is not None: - oprot.writeFieldBegin('keyname', TType.STRING, 1) - oprot.writeString(self.keyname.encode('utf-8') if sys.version_info[0] == 2 else self.keyname) + oprot.writeFieldBegin("keyname", TType.STRING, 1) + oprot.writeString( + self.keyname.encode("utf-8") + if sys.version_info[0] == 2 + else self.keyname + ) oprot.writeFieldEnd() if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 2) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 2) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5329,20 +6152,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(import_keypair_args) import_keypair_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'keyname', 'UTF8', None, ), # 1 - (2, TType.STRING, 'public_key', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "keyname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 2 ) @@ -5353,12 +6189,18 @@ class import_keypair_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5368,7 +6210,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5378,12 +6224,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('import_keypair_result') + oprot.writeStructBegin("import_keypair_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5392,18 +6244,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(import_keypair_result) import_keypair_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -5414,12 +6273,18 @@ class get_vm_ports_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5429,7 +6294,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5439,12 +6308,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_vm_ports_args') + oprot.writeStructBegin("get_vm_ports_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5453,19 +6328,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_vm_ports_args) get_vm_ports_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -5477,13 +6359,20 @@ class get_vm_ports_result(object): """ - - def __init__(self, success=None, s=None,): + def __init__( + self, + success=None, + s=None, + ): self.success = success self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5496,8 +6385,16 @@ def read(self, iprot): self.success = {} (_ktype51, _vtype52, _size50) = iprot.readMapBegin() for _i54 in range(_size50): - _key55 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val56 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key55 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val56 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key55] = _val56 iprot.readMapEnd() else: @@ -5514,19 +6411,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_vm_ports_result') + oprot.writeStructBegin("get_vm_ports_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter57, viter58 in self.success.items(): - oprot.writeString(kiter57.encode('utf-8') if sys.version_info[0] == 2 else kiter57) - oprot.writeString(viter58.encode('utf-8') if sys.version_info[0] == 2 else viter58) + oprot.writeString( + kiter57.encode("utf-8") if sys.version_info[0] == 2 else kiter57 + ) + oprot.writeString( + viter58.encode("utf-8") if sys.version_info[0] == 2 else viter58 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5536,35 +6439,54 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) -all_structs.append(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 -) -class add_udp_security_group_args(object): +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 +) + + +class add_udp_security_group_args(object): """ Attributes: - server_id: OpenStack id of the server """ - - 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() @@ -5574,7 +6496,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5584,12 +6510,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_udp_security_group_args') + oprot.writeStructBegin("add_udp_security_group_args") if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 1) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 1) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5598,19 +6530,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_udp_security_group_args) add_udp_security_group_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 ) @@ -5622,13 +6561,20 @@ class add_udp_security_group_result(object): """ - - def __init__(self, r=None, s=None,): + def __init__( + self, + r=None, + s=None, + ): self.r = r self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5653,15 +6599,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_udp_security_group_result') + oprot.writeStructBegin("add_udp_security_group_result") if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 2) + oprot.writeFieldBegin("s", TType.STRUCT, 2) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5671,20 +6619,241 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_udp_security_group_result) add_udp_security_group_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 2 +) + + +class add_research_environment_security_group_args(object): + """ + Attributes: + - server_id: OpenStack id of the server + - security_group_name + + """ + + def __init__( + self, + server_id=None, + security_group_name=None, + ): + self.server_id = server_id + self.security_group_name = security_group_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 + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.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.security_group_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) + return + oprot.writeStructBegin("add_research_environment_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.writeFieldEnd() + if self.security_group_name is not None: + oprot.writeFieldBegin("security_group_name", TType.STRING, 2) + oprot.writeString( + self.security_group_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.security_group_name + ) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + 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)) + + 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_research_environment_security_group_args) +add_research_environment_security_group_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "security_group_name", + "UTF8", + None, + ), # 2 +) + + +class add_research_environment_security_group_result(object): + """ + Attributes: + - r + - s + + """ + + 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 + ): + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.r = DefaultException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.s = ServerNotFoundException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) + return + oprot.writeStructBegin("add_research_environment_security_group_result") + if self.r is not None: + oprot.writeFieldBegin("r", TType.STRUCT, 1) + self.r.write(oprot) + oprot.writeFieldEnd() + if self.s is not None: + oprot.writeFieldBegin("s", TType.STRUCT, 2) + self.s.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + 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)) + + 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_research_environment_security_group_result) +add_research_environment_security_group_result.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 2 ) @@ -5696,13 +6865,20 @@ 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() @@ -5712,7 +6888,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -5720,8 +6900,16 @@ 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: @@ -5733,19 +6921,29 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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() @@ -5755,20 +6953,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_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 ) @@ -5781,14 +6992,22 @@ 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() @@ -5801,8 +7020,16 @@ 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: @@ -5824,23 +7051,29 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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() @@ -5850,28 +7083,50 @@ 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() @@ -5886,9 +7141,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_flavors_args') + oprot.writeStructBegin("get_flavors_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5896,18 +7153,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): @@ -5917,12 +7174,18 @@ class get_flavors_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5948,11 +7211,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_flavors_result') + oprot.writeStructBegin("get_flavors_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter83 in self.success: iter83.write(oprot) @@ -5965,26 +7230,36 @@ 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() @@ -5999,9 +7274,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_images_args') + oprot.writeStructBegin("get_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -6009,18 +7286,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): @@ -6030,12 +7307,18 @@ class get_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6061,11 +7344,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_images_result') + oprot.writeStructBegin("get_images_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter90 in self.success: iter90.write(oprot) @@ -6078,26 +7363,36 @@ 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() @@ -6112,9 +7407,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_public_images_args') + oprot.writeStructBegin("get_public_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -6122,18 +7419,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): @@ -6143,12 +7440,18 @@ class get_public_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6174,11 +7477,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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) @@ -6191,26 +7496,36 @@ 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() @@ -6225,9 +7540,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_private_images_args') + oprot.writeStructBegin("get_private_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -6235,18 +7552,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): @@ -6256,12 +7573,18 @@ class get_private_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6287,11 +7610,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_private_images_result') + oprot.writeStructBegin("get_private_images_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter104 in self.success: iter104.write(oprot) @@ -6304,18 +7629,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_private_images_result) get_private_images_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Image, None], False), + None, + ), # 0 ) @@ -6327,13 +7659,20 @@ class get_image_args(object): """ - - def __init__(self, openstack_id=None, ignore_not_active=None,): + def __init__( + self, + openstack_id=None, + ignore_not_active=None, + ): self.openstack_id = openstack_id self.ignore_not_active = ignore_not_active def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6343,7 +7682,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -6358,15 +7701,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_image_args') + oprot.writeStructBegin("get_image_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.ignore_not_active is not None: - oprot.writeFieldBegin('ignore_not_active', TType.BOOL, 2) + oprot.writeFieldBegin("ignore_not_active", TType.BOOL, 2) oprot.writeBool(self.ignore_not_active) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6376,20 +7725,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_image_args) get_image_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.BOOL, 'ignore_not_active', None, None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.BOOL, + "ignore_not_active", + None, + None, + ), # 2 ) @@ -6401,13 +7763,20 @@ class get_image_result(object): """ - - def __init__(self, success=None, i=None,): + def __init__( + self, + success=None, + i=None, + ): self.success = success self.i = i def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6433,15 +7802,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_image_result') + oprot.writeStructBegin("get_image_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 1) + oprot.writeFieldBegin("i", TType.STRUCT, 1) self.i.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6451,19 +7822,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_image_result) get_image_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Image, None], None, ), # 0 - (1, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Image, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "i", + [ImageNotFoundException, None], + None, + ), # 1 ) @@ -6474,12 +7858,18 @@ class get_volume_args(object): """ - - def __init__(self, volume_id=None,): + def __init__( + self, + volume_id=None, + ): self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6489,7 +7879,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -6499,12 +7893,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_args') + oprot.writeStructBegin("get_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6513,19 +7913,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volume_args) get_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 ) @@ -6537,13 +7944,20 @@ class get_volume_result(object): """ - - def __init__(self, success=None, v=None,): + def __init__( + self, + success=None, + v=None, + ): self.success = success self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6569,15 +7983,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_result') + oprot.writeStructBegin("get_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 1) + oprot.writeFieldBegin("v", TType.STRUCT, 1) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6587,19 +8003,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volume_result) get_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 1 ) @@ -6610,12 +8039,18 @@ class get_volumes_by_ids_args(object): """ - - def __init__(self, volume_ids=None,): + def __init__( + self, + volume_ids=None, + ): self.volume_ids = volume_ids def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6628,7 +8063,11 @@ 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: @@ -6640,14 +8079,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volumes_by_ids_args') + oprot.writeStructBegin("get_volumes_by_ids_args") if self.volume_ids is not None: - oprot.writeFieldBegin('volume_ids', TType.LIST, 1) + oprot.writeFieldBegin("volume_ids", TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.volume_ids)) for 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() @@ -6657,19 +8100,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volumes_by_ids_args) get_volumes_by_ids_args.thrift_spec = ( None, # 0 - (1, TType.LIST, 'volume_ids', (TType.STRING, 'UTF8', False), None, ), # 1 + ( + 1, + TType.LIST, + "volume_ids", + (TType.STRING, "UTF8", False), + None, + ), # 1 ) @@ -6680,12 +8130,18 @@ class get_volumes_by_ids_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6711,11 +8167,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volumes_by_ids_result') + oprot.writeStructBegin("get_volumes_by_ids_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter118 in self.success: iter118.write(oprot) @@ -6728,18 +8186,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volumes_by_ids_result) get_volumes_by_ids_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Volume, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Volume, None], False), + None, + ), # 0 ) @@ -6751,13 +8216,20 @@ class resize_volume_args(object): """ - - def __init__(self, volume_id=None, size=None,): + def __init__( + self, + volume_id=None, + size=None, + ): self.volume_id = volume_id self.size = size def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6767,7 +8239,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -6782,15 +8258,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resize_volume_args') + oprot.writeStructBegin("resize_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin('size', TType.I32, 2) + oprot.writeFieldBegin("size", TType.I32, 2) oprot.writeI32(self.size) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6800,20 +8282,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(resize_volume_args) resize_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.I32, 'size', None, None, ), # 2 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "size", + None, + None, + ), # 2 ) @@ -6824,12 +8319,18 @@ class resize_volume_result(object): """ - - def __init__(self, v=None,): + def __init__( + self, + v=None, + ): self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6849,11 +8350,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resize_volume_result') + oprot.writeStructBegin("resize_volume_result") if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 1) + oprot.writeFieldBegin("v", TType.STRUCT, 1) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6863,19 +8366,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(resize_volume_result) resize_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 1 ) @@ -6890,8 +8400,14 @@ 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 @@ -6899,7 +8415,11 @@ def __init__(self, range_start=None, range_stop=None, openstack_id=None, etherty 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() @@ -6919,17 +8439,29 @@ 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: @@ -6939,28 +8471,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('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() @@ -6969,23 +8515,54 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(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 ) @@ -6999,15 +8576,24 @@ 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() @@ -7017,7 +8603,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -7042,23 +8632,29 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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() @@ -7068,21 +8664,46 @@ 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 ) @@ -7093,12 +8714,18 @@ 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() @@ -7108,7 +8735,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7118,12 +8749,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_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() @@ -7132,19 +8769,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_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 ) @@ -7165,7 +8809,11 @@ def __init__( 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() @@ -7190,11 +8838,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_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: @@ -7208,15 +8858,16 @@ 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 @@ -7244,12 +8895,18 @@ class delete_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7259,7 +8916,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7269,12 +8930,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_server_args') + oprot.writeStructBegin("delete_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7283,19 +8950,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_server_args) delete_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -7307,13 +8981,20 @@ class delete_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7338,15 +9019,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_server_result') + oprot.writeStructBegin("delete_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7356,20 +9039,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_server_result) delete_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -7389,8 +9085,19 @@ 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 @@ -7403,7 +9110,11 @@ def __init__(self, flavor_name=None, image_name=None, public_key=None, servernam 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() @@ -7413,22 +9124,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: @@ -7436,8 +9163,16 @@ 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: @@ -7450,8 +9185,16 @@ 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) @@ -7466,8 +9209,16 @@ 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) @@ -7479,14 +9230,22 @@ 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: @@ -7494,7 +9253,11 @@ 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: @@ -7506,71 +9269,117 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7580,29 +9389,90 @@ 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 ) @@ -7618,8 +9488,15 @@ class start_server_result(object): """ - - def __init__(self, success=None, e=None, r=None, i=None, f=None, o=None,): + def __init__( + self, + success=None, + e=None, + r=None, + i=None, + f=None, + o=None, + ): self.success = success self.e = e self.r = r @@ -7628,7 +9505,11 @@ def __init__(self, success=None, e=None, r=None, i=None, f=None, o=None,): self.o = o def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7638,7 +9519,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -7673,31 +9558,37 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_server_result') + oprot.writeStructBegin("start_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 5) + oprot.writeFieldBegin("i", TType.STRUCT, 5) self.i.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 6) + oprot.writeFieldBegin("f", TType.STRUCT, 6) self.f.write(oprot) oprot.writeFieldEnd() if self.o is not None: - oprot.writeFieldBegin('o', TType.STRUCT, 7) + oprot.writeFieldBegin("o", TType.STRUCT, 7) self.o.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7707,33 +9598,73 @@ 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() @@ -7748,9 +9679,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_bibigrid_available_args') + oprot.writeStructBegin("is_bibigrid_available_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -7758,18 +9691,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): @@ -7779,12 +9712,18 @@ class is_bibigrid_available_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7804,11 +9743,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_bibigrid_available_result') + oprot.writeStructBegin("is_bibigrid_available_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7818,18 +9759,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(is_bibigrid_available_result) is_bibigrid_available_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) @@ -7841,13 +9789,20 @@ class detach_ip_from_server_args(object): """ - - def __init__(self, server_id=None, floating_ip=None,): + def __init__( + self, + server_id=None, + floating_ip=None, + ): self.server_id = server_id self.floating_ip = floating_ip def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7857,12 +9812,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.floating_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.floating_ip = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7872,16 +9835,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_ip_from_server_args') + oprot.writeStructBegin("detach_ip_from_server_args") if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 1) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 1) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() if self.floating_ip is not None: - oprot.writeFieldBegin('floating_ip', TType.STRING, 2) - oprot.writeString(self.floating_ip.encode('utf-8') if sys.version_info[0] == 2 else self.floating_ip) + oprot.writeFieldBegin("floating_ip", TType.STRING, 2) + oprot.writeString( + self.floating_ip.encode("utf-8") + if sys.version_info[0] == 2 + else self.floating_ip + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7890,20 +9863,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(detach_ip_from_server_args) detach_ip_from_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'floating_ip', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "floating_ip", + "UTF8", + None, + ), # 2 ) @@ -7914,12 +9900,18 @@ class detach_ip_from_server_result(object): """ - - def __init__(self, s=None,): + def __init__( + self, + s=None, + ): self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7939,11 +9931,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_ip_from_server_result') + oprot.writeStructBegin("detach_ip_from_server_result") if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7953,19 +9947,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(detach_ip_from_server_result) detach_ip_from_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -7983,8 +9984,17 @@ 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 @@ -7995,7 +10005,11 @@ def __init__(self, flavor_name=None, image_name=None, servername=None, metadata= 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() @@ -8005,17 +10019,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -8023,15 +10049,27 @@ 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: @@ -8042,8 +10080,16 @@ 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) @@ -8058,8 +10104,16 @@ 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) @@ -8071,7 +10125,11 @@ 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: @@ -8083,60 +10141,100 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8146,27 +10244,76 @@ 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 ) @@ -8182,8 +10329,15 @@ class start_server_with_custom_key_result(object): """ - - def __init__(self, success=None, e=None, r=None, i=None, f=None, d=None,): + def __init__( + self, + success=None, + e=None, + r=None, + i=None, + f=None, + d=None, + ): self.success = success self.e = e self.r = r @@ -8192,7 +10346,11 @@ def __init__(self, success=None, e=None, r=None, i=None, f=None, d=None,): self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8202,7 +10360,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -8237,31 +10399,37 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_server_with_custom_key_result') + oprot.writeStructBegin("start_server_with_custom_key_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 3) + oprot.writeFieldBegin("i", TType.STRUCT, 3) self.i.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 4) + oprot.writeFieldBegin("f", TType.STRUCT, 4) self.f.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 5) + oprot.writeFieldBegin("d", TType.STRUCT, 5) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8271,23 +10439,60 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_server_with_custom_key_result) start_server_with_custom_key_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 - (3, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 3 - (4, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 4 - (5, TType.STRUCT, 'd', [DefaultException, None], None, ), # 5 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [NameAlreadyUsedException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ResourceNotAvailableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "i", + [ImageNotFoundException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "f", + [FlavorNotFoundException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 5 ) @@ -8298,12 +10503,18 @@ class exist_server_args(object): """ - - def __init__(self, name=None,): + def __init__( + self, + name=None, + ): self.name = name def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8313,7 +10524,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8323,12 +10538,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('exist_server_args') + oprot.writeStructBegin("exist_server_args") if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8337,19 +10556,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(exist_server_args) exist_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 ) @@ -8360,12 +10586,18 @@ class exist_server_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8385,11 +10617,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('exist_server_result') + oprot.writeStructBegin("exist_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8399,18 +10633,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(exist_server_result) exist_server_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) @@ -8427,8 +10668,16 @@ class create_and_deploy_playbook_args(object): """ - - def __init__(self, public_key=None, openstack_id=None, conda_packages=None, research_environment_template=None, apt_packages=None, create_only_backend=None, base_url=None,): + def __init__( + self, + public_key=None, + openstack_id=None, + conda_packages=None, + research_environment_template=None, + apt_packages=None, + create_only_backend=None, + base_url=None, + ): self.public_key = public_key self.openstack_id = openstack_id self.conda_packages = conda_packages @@ -8438,7 +10687,11 @@ def __init__(self, public_key=None, openstack_id=None, conda_packages=None, rese self.base_url = base_url def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8448,12 +10701,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: @@ -8469,7 +10730,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.research_environment_template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.research_environment_template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: @@ -8477,7 +10742,11 @@ 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: @@ -8489,7 +10758,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.base_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.base_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8499,42 +10772,62 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_and_deploy_playbook_args') + oprot.writeStructBegin("create_and_deploy_playbook_args") if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 1) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 1) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 2) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 2) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.conda_packages is not None: - oprot.writeFieldBegin('conda_packages', TType.LIST, 3) + oprot.writeFieldBegin("conda_packages", TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.conda_packages)) for 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() @@ -8543,25 +10836,68 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_and_deploy_playbook_args) create_and_deploy_playbook_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 - (2, TType.STRING, 'openstack_id', 'UTF8', None, ), # 2 - (3, TType.LIST, 'conda_packages', (TType.STRUCT, [CondaPackage, None], False), None, ), # 3 - (4, TType.STRING, 'research_environment_template', 'UTF8', None, ), # 4 - (5, TType.LIST, 'apt_packages', (TType.STRING, 'UTF8', False), None, ), # 5 - (6, TType.BOOL, 'create_only_backend', None, None, ), # 6 - (7, TType.STRING, 'base_url', 'UTF8', None, ), # 7 + ( + 1, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "conda_packages", + (TType.STRUCT, [CondaPackage, None], False), + None, + ), # 3 + ( + 4, + TType.STRING, + "research_environment_template", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "apt_packages", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.BOOL, + "create_only_backend", + None, + None, + ), # 6 + ( + 7, + TType.STRING, + "base_url", + "UTF8", + None, + ), # 7 ) @@ -8573,13 +10909,20 @@ class create_and_deploy_playbook_result(object): """ - - def __init__(self, success=None, s=None,): + def __init__( + self, + success=None, + s=None, + ): self.success = success self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8604,15 +10947,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_and_deploy_playbook_result') + oprot.writeStructBegin("create_and_deploy_playbook_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeFieldBegin("success", TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8622,19 +10967,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_and_deploy_playbook_result) create_and_deploy_playbook_result.thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -8645,12 +11003,18 @@ class get_playbook_logs_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8660,7 +11024,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8670,12 +11038,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_playbook_logs_args') + oprot.writeStructBegin("get_playbook_logs_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8684,19 +11058,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_playbook_logs_args) get_playbook_logs_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -8708,13 +11089,20 @@ class get_playbook_logs_result(object): """ - - def __init__(self, success=None, p=None,): + def __init__( + self, + success=None, + p=None, + ): self.success = success self.p = p def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8740,15 +11128,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_playbook_logs_result') + oprot.writeStructBegin("get_playbook_logs_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.p is not None: - oprot.writeFieldBegin('p', TType.STRUCT, 1) + oprot.writeFieldBegin("p", TType.STRUCT, 1) self.p.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8758,27 +11148,43 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(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() @@ -8793,9 +11199,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('has_forc_args') + oprot.writeStructBegin("has_forc_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -8803,18 +11211,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): @@ -8824,12 +11232,18 @@ class has_forc_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8849,11 +11263,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('has_forc_result') + oprot.writeStructBegin("has_forc_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8863,26 +11279,36 @@ 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() @@ -8897,9 +11323,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_forc_url_args') + oprot.writeStructBegin("get_forc_url_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -8907,18 +11335,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): @@ -8928,12 +11356,18 @@ class get_forc_url_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8943,7 +11377,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8953,12 +11391,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_forc_url_result') + oprot.writeStructBegin("get_forc_url_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8967,18 +11411,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_forc_url_result) get_forc_url_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -8992,15 +11443,24 @@ class create_backend_args(object): """ - - def __init__(self, owner=None, user_path=None, template=None, upstream_url=None,): + def __init__( + self, + owner=None, + user_path=None, + template=None, + upstream_url=None, + ): self.owner = owner self.user_path = user_path self.template = template self.upstream_url = upstream_url def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9010,22 +11470,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.owner = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_path = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_path = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.upstream_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.upstream_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9035,24 +11511,40 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_backend_args') + oprot.writeStructBegin("create_backend_args") if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 1) - oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) + oprot.writeFieldBegin("owner", TType.STRING, 1) + oprot.writeString( + self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner + ) oprot.writeFieldEnd() if self.user_path is not None: - oprot.writeFieldBegin('user_path', TType.STRING, 2) - oprot.writeString(self.user_path.encode('utf-8') if sys.version_info[0] == 2 else self.user_path) + oprot.writeFieldBegin("user_path", TType.STRING, 2) + oprot.writeString( + self.user_path.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_path + ) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin('template', TType.STRING, 3) - oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) + oprot.writeFieldBegin("template", TType.STRING, 3) + oprot.writeString( + self.template.encode("utf-8") + if sys.version_info[0] == 2 + else self.template + ) oprot.writeFieldEnd() if self.upstream_url is not None: - oprot.writeFieldBegin('upstream_url', TType.STRING, 4) - oprot.writeString(self.upstream_url.encode('utf-8') if sys.version_info[0] == 2 else self.upstream_url) + oprot.writeFieldBegin("upstream_url", TType.STRING, 4) + oprot.writeString( + self.upstream_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.upstream_url + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9061,22 +11553,47 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_backend_args) create_backend_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 - (2, TType.STRING, 'user_path', 'UTF8', None, ), # 2 - (3, TType.STRING, 'template', 'UTF8', None, ), # 3 - (4, TType.STRING, 'upstream_url', 'UTF8', None, ), # 4 + ( + 1, + TType.STRING, + "owner", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "user_path", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "template", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "upstream_url", + "UTF8", + None, + ), # 4 ) @@ -9089,14 +11606,22 @@ class create_backend_result(object): """ - - def __init__(self, success=None, e=None, d=None,): + def __init__( + self, + success=None, + e=None, + d=None, + ): self.success = success self.e = e self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9127,19 +11652,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_backend_result') + oprot.writeStructBegin("create_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 2) + oprot.writeFieldBegin("d", TType.STRUCT, 2) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9149,28 +11676,50 @@ 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() @@ -9185,9 +11734,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_args') + oprot.writeStructBegin("get_backends_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -9195,18 +11746,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): @@ -9217,13 +11768,20 @@ class get_backends_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9254,18 +11812,20 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_result') + oprot.writeStructBegin("get_backends_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for 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() @@ -9275,19 +11835,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_result) get_backends_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -9298,12 +11871,18 @@ class get_backends_by_owner_args(object): """ - - def __init__(self, owner=None,): + def __init__( + self, + owner=None, + ): self.owner = owner def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9313,7 +11892,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.owner = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9323,12 +11906,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_owner_args') + oprot.writeStructBegin("get_backends_by_owner_args") if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 1) - oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) + oprot.writeFieldBegin("owner", TType.STRING, 1) + oprot.writeString( + self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9337,19 +11924,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_by_owner_args) get_backends_by_owner_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "owner", + "UTF8", + None, + ), # 1 ) @@ -9361,13 +11955,20 @@ class get_backends_by_owner_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9398,18 +11999,20 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_owner_result') + oprot.writeStructBegin("get_backends_by_owner_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for 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() @@ -9419,19 +12022,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_by_owner_result) get_backends_by_owner_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -9442,12 +12058,18 @@ class get_backends_by_template_args(object): """ - - def __init__(self, template=None,): + def __init__( + self, + template=None, + ): self.template = template def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9457,7 +12079,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9467,12 +12093,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_template_args') + oprot.writeStructBegin("get_backends_by_template_args") if self.template is not None: - oprot.writeFieldBegin('template', TType.STRING, 1) - oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) + oprot.writeFieldBegin("template", TType.STRING, 1) + oprot.writeString( + self.template.encode("utf-8") + if sys.version_info[0] == 2 + else self.template + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9481,19 +12113,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_by_template_args) get_backends_by_template_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'template', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "template", + "UTF8", + None, + ), # 1 ) @@ -9505,13 +12144,20 @@ class get_backends_by_template_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9542,18 +12188,20 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_template_result') + oprot.writeStructBegin("get_backends_by_template_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for 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() @@ -9563,19 +12211,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_by_template_result) get_backends_by_template_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -9586,12 +12247,18 @@ class get_backend_by_id_args(object): """ - - def __init__(self, id=None,): + def __init__( + self, + id=None, + ): self.id = id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9611,11 +12278,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backend_by_id_args') + oprot.writeStructBegin("get_backend_by_id_args") if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeFieldBegin("id", TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9625,19 +12294,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backend_by_id_args) get_backend_by_id_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 ) @@ -9650,14 +12326,22 @@ class get_backend_by_id_result(object): """ - - def __init__(self, success=None, b=None, d=None,): + def __init__( + self, + success=None, + b=None, + d=None, + ): self.success = success self.b = b self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9688,19 +12372,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backend_by_id_result') + oprot.writeStructBegin("get_backend_by_id_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 2) + oprot.writeFieldBegin("d", TType.STRUCT, 2) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9710,20 +12396,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backend_by_id_result) get_backend_by_id_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'd', [DefaultException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Backend, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 2 ) @@ -9734,12 +12439,18 @@ class delete_backend_args(object): """ - - def __init__(self, id=None,): + def __init__( + self, + id=None, + ): self.id = id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9759,11 +12470,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_backend_args') + oprot.writeStructBegin("delete_backend_args") if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeFieldBegin("id", TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9773,19 +12486,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_backend_args) delete_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 ) @@ -9796,12 +12516,18 @@ class delete_backend_result(object): """ - - def __init__(self, b=None,): + def __init__( + self, + b=None, + ): self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9821,11 +12547,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_backend_result') + oprot.writeStructBegin("delete_backend_result") if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9835,19 +12563,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_backend_result) delete_backend_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -9859,13 +12594,20 @@ class add_user_to_backend_args(object): """ - - def __init__(self, backend_id=None, user_id=None,): + def __init__( + self, + backend_id=None, + user_id=None, + ): self.backend_id = backend_id self.user_id = user_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9880,7 +12622,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9890,16 +12636,22 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_user_to_backend_args') + oprot.writeStructBegin("add_user_to_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin('user_id', TType.STRING, 2) - oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) + oprot.writeFieldBegin("user_id", TType.STRING, 2) + oprot.writeString( + self.user_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9908,20 +12660,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_user_to_backend_args) add_user_to_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 - (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 2 ) @@ -9933,13 +12698,20 @@ class add_user_to_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9952,8 +12724,16 @@ 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: @@ -9970,19 +12750,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_user_to_backend_result') + oprot.writeStructBegin("add_user_to_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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() @@ -9992,19 +12778,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_user_to_backend_result) add_user_to_backend_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -10015,12 +12814,18 @@ class get_users_from_backend_args(object): """ - - def __init__(self, backend_id=None,): + def __init__( + self, + backend_id=None, + ): self.backend_id = backend_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10040,11 +12845,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_users_from_backend_args') + oprot.writeStructBegin("get_users_from_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10054,19 +12861,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_users_from_backend_args) get_users_from_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 ) @@ -10078,13 +12892,20 @@ class get_users_from_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10097,7 +12918,11 @@ 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: @@ -10114,18 +12939,22 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_users_from_backend_result') + oprot.writeStructBegin("get_users_from_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for 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() @@ -10135,19 +12964,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_users_from_backend_result) get_users_from_backend_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -10159,13 +13001,20 @@ class delete_user_from_backend_args(object): """ - - def __init__(self, backend_id=None, user_id=None,): + def __init__( + self, + backend_id=None, + user_id=None, + ): self.backend_id = backend_id self.user_id = user_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10180,7 +13029,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10190,16 +13043,22 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_user_from_backend_args') + oprot.writeStructBegin("delete_user_from_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin('user_id', TType.STRING, 2) - oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) + oprot.writeFieldBegin("user_id", TType.STRING, 2) + oprot.writeString( + self.user_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10208,20 +13067,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_user_from_backend_args) delete_user_from_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 - (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 2 ) @@ -10233,13 +13105,20 @@ class delete_user_from_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10252,8 +13131,16 @@ 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: @@ -10270,19 +13157,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_user_from_backend_result') + oprot.writeStructBegin("delete_user_from_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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() @@ -10292,27 +13185,43 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(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() @@ -10327,9 +13236,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_allowed_templates_args') + oprot.writeStructBegin("get_allowed_templates_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -10337,18 +13248,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): @@ -10358,12 +13269,18 @@ class get_allowed_templates_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10389,11 +13306,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_allowed_templates_result') + oprot.writeStructBegin("get_allowed_templates_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter288 in self.success: iter288.write(oprot) @@ -10406,26 +13325,36 @@ 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() @@ -10440,9 +13369,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_args') + oprot.writeStructBegin("get_servers_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -10450,18 +13381,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): @@ -10471,12 +13402,18 @@ class get_servers_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10502,11 +13439,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_result') + oprot.writeStructBegin("get_servers_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter295 in self.success: iter295.write(oprot) @@ -10519,18 +13458,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_result) get_servers_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -10541,12 +13487,18 @@ class get_servers_by_ids_args(object): """ - - def __init__(self, server_ids=None,): + def __init__( + self, + server_ids=None, + ): self.server_ids = server_ids def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10559,7 +13511,11 @@ 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: @@ -10571,14 +13527,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_ids_args') + oprot.writeStructBegin("get_servers_by_ids_args") if self.server_ids is not None: - oprot.writeFieldBegin('server_ids', TType.LIST, 1) + oprot.writeFieldBegin("server_ids", TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.server_ids)) for 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() @@ -10588,19 +13548,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_by_ids_args) get_servers_by_ids_args.thrift_spec = ( None, # 0 - (1, TType.LIST, 'server_ids', (TType.STRING, 'UTF8', False), None, ), # 1 + ( + 1, + TType.LIST, + "server_ids", + (TType.STRING, "UTF8", False), + None, + ), # 1 ) @@ -10611,12 +13578,18 @@ class get_servers_by_ids_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10642,11 +13615,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_ids_result') + oprot.writeStructBegin("get_servers_by_ids_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter309 in self.success: iter309.write(oprot) @@ -10659,18 +13634,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_by_ids_result) get_servers_by_ids_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -10681,12 +13663,18 @@ class get_servers_by_bibigrid_id_args(object): """ - - def __init__(self, bibigrid_id=None,): + def __init__( + self, + bibigrid_id=None, + ): self.bibigrid_id = bibigrid_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10696,7 +13684,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.bibigrid_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.bibigrid_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10706,12 +13698,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_bibigrid_id_args') + oprot.writeStructBegin("get_servers_by_bibigrid_id_args") if self.bibigrid_id is not None: - oprot.writeFieldBegin('bibigrid_id', TType.STRING, 1) - oprot.writeString(self.bibigrid_id.encode('utf-8') if sys.version_info[0] == 2 else self.bibigrid_id) + oprot.writeFieldBegin("bibigrid_id", TType.STRING, 1) + oprot.writeString( + self.bibigrid_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.bibigrid_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10720,19 +13718,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_by_bibigrid_id_args) get_servers_by_bibigrid_id_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'bibigrid_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "bibigrid_id", + "UTF8", + None, + ), # 1 ) @@ -10743,12 +13748,18 @@ class get_servers_by_bibigrid_id_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10774,11 +13785,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_bibigrid_id_result') + oprot.writeStructBegin("get_servers_by_bibigrid_id_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter316 in self.success: iter316.write(oprot) @@ -10791,18 +13804,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_by_bibigrid_id_result) get_servers_by_bibigrid_id_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -10819,8 +13839,16 @@ class scale_up_cluster_args(object): """ - - def __init__(self, cluster_id=None, image_name=None, flavor_name=None, count=None, names=None, start_idx=None, batch_idx=None,): + def __init__( + self, + cluster_id=None, + image_name=None, + flavor_name=None, + count=None, + names=None, + start_idx=None, + batch_idx=None, + ): self.cluster_id = cluster_id self.image_name = image_name self.flavor_name = flavor_name @@ -10830,7 +13858,11 @@ def __init__(self, cluster_id=None, image_name=None, flavor_name=None, count=Non self.batch_idx = batch_idx def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10840,17 +13872,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -10863,7 +13907,11 @@ 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: @@ -10885,38 +13933,54 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('scale_up_cluster_args') + oprot.writeStructBegin("scale_up_cluster_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin('image_name', TType.STRING, 2) - oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) + oprot.writeFieldBegin("image_name", TType.STRING, 2) + oprot.writeString( + self.image_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_name + ) oprot.writeFieldEnd() if self.flavor_name is not None: - oprot.writeFieldBegin('flavor_name', TType.STRING, 3) - oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) + oprot.writeFieldBegin("flavor_name", TType.STRING, 3) + oprot.writeString( + self.flavor_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.flavor_name + ) oprot.writeFieldEnd() if self.count is not None: - oprot.writeFieldBegin('count', TType.I32, 4) + oprot.writeFieldBegin("count", TType.I32, 4) oprot.writeI32(self.count) oprot.writeFieldEnd() if self.names is not None: - oprot.writeFieldBegin('names', TType.LIST, 5) + oprot.writeFieldBegin("names", TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.names)) for 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() @@ -10926,25 +13990,68 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(scale_up_cluster_args) scale_up_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'flavor_name', 'UTF8', None, ), # 3 - (4, TType.I32, 'count', None, None, ), # 4 - (5, TType.LIST, 'names', (TType.STRING, 'UTF8', False), None, ), # 5 - (6, TType.I32, 'start_idx', None, None, ), # 6 - (7, TType.I32, 'batch_idx', None, None, ), # 7 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "count", + None, + None, + ), # 4 + ( + 5, + TType.LIST, + "names", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.I32, + "start_idx", + None, + None, + ), # 6 + ( + 7, + TType.I32, + "batch_idx", + None, + None, + ), # 7 ) @@ -10955,12 +14062,18 @@ class scale_up_cluster_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10973,11 +14086,19 @@ 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 @@ -10991,17 +14112,23 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('scale_up_cluster_result') + oprot.writeStructBegin("scale_up_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.success)) for 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() @@ -11012,18 +14139,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(scale_up_cluster_result) scale_up_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.LIST, (TType.STRING, 'UTF8', False), False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.LIST, (TType.STRING, "UTF8", False), False), + None, + ), # 0 ) @@ -11042,8 +14176,18 @@ class add_cluster_machine_args(object): """ - - def __init__(self, cluster_id=None, cluster_user=None, cluster_group_id=None, image_name=None, flavor_name=None, name=None, key_name=None, batch_idx=None, worker_idx=None,): + def __init__( + self, + cluster_id=None, + cluster_user=None, + cluster_group_id=None, + image_name=None, + flavor_name=None, + name=None, + key_name=None, + batch_idx=None, + worker_idx=None, + ): self.cluster_id = cluster_id self.cluster_user = cluster_user self.cluster_group_id = cluster_group_id @@ -11055,7 +14199,11 @@ def __init__(self, cluster_id=None, cluster_user=None, cluster_group_id=None, im self.worker_idx = worker_idx def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11065,37 +14213,65 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.cluster_user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_user = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.cluster_group_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_group_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.key_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 8: @@ -11115,43 +14291,71 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_cluster_machine_args') + oprot.writeStructBegin("add_cluster_machine_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() if self.cluster_user is not None: - oprot.writeFieldBegin('cluster_user', TType.STRING, 2) - oprot.writeString(self.cluster_user.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_user) + oprot.writeFieldBegin("cluster_user", TType.STRING, 2) + oprot.writeString( + self.cluster_user.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_user + ) oprot.writeFieldEnd() if self.cluster_group_id is not None: - oprot.writeFieldBegin('cluster_group_id', TType.STRING, 3) - oprot.writeString(self.cluster_group_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_group_id) + oprot.writeFieldBegin("cluster_group_id", TType.STRING, 3) + oprot.writeString( + self.cluster_group_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_group_id + ) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin('image_name', TType.STRING, 4) - oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) + oprot.writeFieldBegin("image_name", TType.STRING, 4) + oprot.writeString( + self.image_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_name + ) oprot.writeFieldEnd() if self.flavor_name is not None: - oprot.writeFieldBegin('flavor_name', TType.STRING, 5) - oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) + oprot.writeFieldBegin("flavor_name", TType.STRING, 5) + oprot.writeString( + self.flavor_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.flavor_name + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 6) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 6) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.key_name is not None: - oprot.writeFieldBegin('key_name', TType.STRING, 7) - oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) + oprot.writeFieldBegin("key_name", TType.STRING, 7) + oprot.writeString( + self.key_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.key_name + ) oprot.writeFieldEnd() if self.batch_idx is not None: - oprot.writeFieldBegin('batch_idx', TType.I32, 8) + oprot.writeFieldBegin("batch_idx", TType.I32, 8) oprot.writeI32(self.batch_idx) oprot.writeFieldEnd() if self.worker_idx is not None: - oprot.writeFieldBegin('worker_idx', TType.I32, 9) + oprot.writeFieldBegin("worker_idx", TType.I32, 9) oprot.writeI32(self.worker_idx) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11161,27 +14365,82 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_cluster_machine_args) add_cluster_machine_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'cluster_user', 'UTF8', None, ), # 2 - (3, TType.STRING, 'cluster_group_id', 'UTF8', None, ), # 3 - (4, TType.STRING, 'image_name', 'UTF8', None, ), # 4 - (5, TType.STRING, 'flavor_name', 'UTF8', None, ), # 5 - (6, TType.STRING, 'name', 'UTF8', None, ), # 6 - (7, TType.STRING, 'key_name', 'UTF8', None, ), # 7 - (8, TType.I32, 'batch_idx', None, None, ), # 8 - (9, TType.I32, 'worker_idx', None, None, ), # 9 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "cluster_user", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "cluster_group_id", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "name", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "key_name", + "UTF8", + None, + ), # 7 + ( + 8, + TType.I32, + "batch_idx", + None, + None, + ), # 8 + ( + 9, + TType.I32, + "worker_idx", + None, + None, + ), # 9 ) @@ -11192,12 +14451,18 @@ class add_cluster_machine_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11207,7 +14472,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11217,12 +14486,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_cluster_machine_result') + oprot.writeStructBegin("add_cluster_machine_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11231,18 +14506,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_cluster_machine_result) add_cluster_machine_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -11253,12 +14535,18 @@ class get_cluster_info_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11268,7 +14556,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11278,12 +14570,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_info_args') + oprot.writeStructBegin("get_cluster_info_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11292,19 +14590,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_cluster_info_args) get_cluster_info_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -11316,13 +14621,20 @@ class get_cluster_info_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11348,15 +14660,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_info_result') + oprot.writeStructBegin("get_cluster_info_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11366,19 +14680,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_cluster_info_result) get_cluster_info_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [ClusterInfo, None], None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [ClusterInfo, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -11389,12 +14716,18 @@ class get_cluster_status_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11404,7 +14737,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11414,12 +14751,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_status_args') + oprot.writeStructBegin("get_cluster_status_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11428,19 +14771,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_cluster_status_args) get_cluster_status_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -11452,13 +14802,20 @@ class get_cluster_status_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11471,8 +14828,16 @@ def read(self, iprot): self.success = {} (_ktype341, _vtype342, _size340) = iprot.readMapBegin() for _i344 in range(_size340): - _key345 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val346 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key345 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val346 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key345] = _val346 iprot.readMapEnd() else: @@ -11489,19 +14854,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_status_result') + oprot.writeStructBegin("get_cluster_status_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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() @@ -11511,19 +14882,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_cluster_status_result) get_cluster_status_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -11534,12 +14918,18 @@ class get_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11549,7 +14939,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11559,12 +14953,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_server_args') + oprot.writeStructBegin("get_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11573,19 +14973,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_server_args) get_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -11597,13 +15004,20 @@ class get_server_result(object): """ - - def __init__(self, success=None, e=None,): + def __init__( + self, + success=None, + e=None, + ): self.success = success self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11629,15 +15043,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_server_result') + oprot.writeStructBegin("get_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11647,19 +15063,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_server_result) get_server_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [VM, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -11670,12 +15099,18 @@ class stop_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11685,7 +15120,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11695,12 +15134,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('stop_server_args') + oprot.writeStructBegin("stop_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11709,19 +15154,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(stop_server_args) stop_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -11733,13 +15185,20 @@ class stop_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11764,15 +15223,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('stop_server_result') + oprot.writeStructBegin("stop_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11782,20 +15243,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(stop_server_result) stop_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -11810,8 +15284,14 @@ class create_snapshot_args(object): """ - - def __init__(self, openstack_id=None, name=None, username=None, base_tags=None, description=None,): + def __init__( + self, + openstack_id=None, + name=None, + username=None, + base_tags=None, + description=None, + ): self.openstack_id = openstack_id self.name = name self.username = username @@ -11819,7 +15299,11 @@ def __init__(self, openstack_id=None, name=None, username=None, base_tags=None, self.description = description def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11829,17 +15313,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.username = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -11847,14 +15343,22 @@ 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: @@ -11864,31 +15368,49 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_snapshot_args') + oprot.writeStructBegin("create_snapshot_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 3) - oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) + oprot.writeFieldBegin("username", TType.STRING, 3) + oprot.writeString( + self.username.encode("utf-8") + if sys.version_info[0] == 2 + else self.username + ) oprot.writeFieldEnd() if self.base_tags is not None: - oprot.writeFieldBegin('base_tags', TType.LIST, 4) + oprot.writeFieldBegin("base_tags", TType.LIST, 4) oprot.writeListBegin(TType.STRING, len(self.base_tags)) for 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() @@ -11897,23 +15419,54 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_snapshot_args) create_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'username', 'UTF8', None, ), # 3 - (4, TType.LIST, 'base_tags', (TType.STRING, 'UTF8', False), None, ), # 4 - (5, TType.STRING, 'description', 'UTF8', None, ), # 5 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "username", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "base_tags", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "description", + "UTF8", + None, + ), # 5 ) @@ -11926,14 +15479,22 @@ class create_snapshot_result(object): """ - - def __init__(self, success=None, e=None, c=None,): + def __init__( + self, + success=None, + e=None, + c=None, + ): self.success = success self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11943,7 +15504,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -11963,19 +15528,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_snapshot_result') + oprot.writeStructBegin("create_snapshot_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11985,28 +15556,50 @@ 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() @@ -12021,9 +15614,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_limits_args') + oprot.writeStructBegin("get_limits_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -12031,18 +15626,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): @@ -12052,12 +15647,18 @@ class get_limits_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12070,8 +15671,16 @@ 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: @@ -12083,15 +15692,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_limits_result') + oprot.writeStructBegin("get_limits_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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() @@ -12101,18 +15716,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_limits_result) get_limits_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -12126,15 +15748,24 @@ class start_cluster_args(object): """ - - def __init__(self, public_key=None, master_instance=None, worker_instances=None, user=None,): + def __init__( + self, + public_key=None, + master_instance=None, + worker_instances=None, + user=None, + ): self.public_key = public_key self.master_instance = master_instance self.worker_instances = worker_instances self.user = user def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12144,7 +15775,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -12166,7 +15801,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12176,27 +15815,35 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_cluster_args') + oprot.writeStructBegin("start_cluster_args") if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 1) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 1) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() if self.master_instance is not None: - oprot.writeFieldBegin('master_instance', TType.STRUCT, 2) + oprot.writeFieldBegin("master_instance", TType.STRUCT, 2) self.master_instance.write(oprot) oprot.writeFieldEnd() if self.worker_instances is not None: - oprot.writeFieldBegin('worker_instances', TType.LIST, 3) + oprot.writeFieldBegin("worker_instances", TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.worker_instances)) for 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() @@ -12205,22 +15852,47 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_cluster_args) start_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 - (2, TType.STRUCT, 'master_instance', [ClusterInstance, None], None, ), # 2 - (3, TType.LIST, 'worker_instances', (TType.STRUCT, [ClusterInstance, None], False), None, ), # 3 - (4, TType.STRING, 'user', 'UTF8', None, ), # 4 + ( + 1, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRUCT, + "master_instance", + [ClusterInstance, None], + None, + ), # 2 + ( + 3, + TType.LIST, + "worker_instances", + (TType.STRUCT, [ClusterInstance, None], False), + None, + ), # 3 + ( + 4, + TType.STRING, + "user", + "UTF8", + None, + ), # 4 ) @@ -12231,12 +15903,18 @@ class start_cluster_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12249,8 +15927,16 @@ 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: @@ -12262,15 +15948,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_cluster_result') + oprot.writeStructBegin("start_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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() @@ -12280,18 +15972,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_cluster_result) start_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -12302,12 +16001,18 @@ class terminate_cluster_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12317,7 +16022,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12327,12 +16036,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('terminate_cluster_args') + oprot.writeStructBegin("terminate_cluster_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12341,19 +16056,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(terminate_cluster_args) terminate_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -12365,13 +16087,20 @@ class terminate_cluster_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12384,8 +16113,16 @@ 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: @@ -12402,19 +16139,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('terminate_cluster_result') + oprot.writeStructBegin("terminate_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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() @@ -12424,19 +16167,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(terminate_cluster_result) terminate_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -12447,12 +16203,18 @@ class delete_image_args(object): """ - - def __init__(self, image_id=None,): + def __init__( + self, + image_id=None, + ): self.image_id = image_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12462,7 +16224,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.image_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12472,12 +16238,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_image_args') + oprot.writeStructBegin("delete_image_args") if self.image_id is not None: - oprot.writeFieldBegin('image_id', TType.STRING, 1) - oprot.writeString(self.image_id.encode('utf-8') if sys.version_info[0] == 2 else self.image_id) + oprot.writeFieldBegin("image_id", TType.STRING, 1) + oprot.writeString( + self.image_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12486,19 +16258,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_image_args) delete_image_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'image_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "image_id", + "UTF8", + None, + ), # 1 ) @@ -12509,12 +16288,18 @@ class delete_image_result(object): """ - - def __init__(self, e=None,): + def __init__( + self, + e=None, + ): self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12534,11 +16319,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_image_result') + oprot.writeStructBegin("delete_image_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12548,19 +16335,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_image_result) delete_image_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ImageNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "e", + [ImageNotFoundException, None], + None, + ), # 1 ) @@ -12572,13 +16366,20 @@ class detach_volume_args(object): """ - - def __init__(self, volume_id=None, server_id=None,): + def __init__( + self, + volume_id=None, + server_id=None, + ): self.volume_id = volume_id self.server_id = server_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12588,12 +16389,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12603,16 +16412,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_volume_args') + oprot.writeStructBegin("detach_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 2) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 2) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12621,20 +16440,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(detach_volume_args) detach_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'server_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 2 ) @@ -12647,14 +16479,22 @@ class detach_volume_result(object): """ - - def __init__(self, e=None, c=None, v=None,): + def __init__( + self, + e=None, + c=None, + v=None, + ): self.e = e self.c = c self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12684,19 +16524,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_volume_result') + oprot.writeStructBegin("detach_volume_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 3) + oprot.writeFieldBegin("v", TType.STRUCT, 3) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12706,21 +16548,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(detach_volume_result) detach_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 - (3, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 3 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 3 ) @@ -12731,12 +16592,18 @@ class delete_volume_args(object): """ - - def __init__(self, volume_id=None,): + def __init__( + self, + volume_id=None, + ): self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12746,7 +16613,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12756,12 +16627,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_args') + oprot.writeStructBegin("delete_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12770,19 +16647,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_volume_args) delete_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 ) @@ -12794,13 +16678,20 @@ class delete_volume_result(object): """ - - def __init__(self, c=None, v=None,): + def __init__( + self, + c=None, + v=None, + ): self.c = c self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12825,15 +16716,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_result') + oprot.writeStructBegin("delete_volume_result") if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 2) + oprot.writeFieldBegin("v", TType.STRUCT, 2) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12843,20 +16736,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_volume_result) delete_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 - (2, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 2 ) @@ -12868,13 +16774,20 @@ class attach_volume_to_server_args(object): """ - - def __init__(self, openstack_id=None, volume_id=None,): + def __init__( + self, + openstack_id=None, + volume_id=None, + ): self.openstack_id = openstack_id self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12884,12 +16797,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12899,16 +16820,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('attach_volume_to_server_args') + oprot.writeStructBegin("attach_volume_to_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 2) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 2) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12917,20 +16848,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(attach_volume_to_server_args) attach_volume_to_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'volume_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 2 ) @@ -12943,14 +16887,22 @@ class attach_volume_to_server_result(object): """ - - def __init__(self, success=None, e=None, c=None,): + def __init__( + self, + success=None, + e=None, + c=None, + ): self.success = success self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12963,8 +16915,16 @@ 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: @@ -12986,23 +16946,29 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('attach_volume_to_server_result') + oprot.writeStructBegin("attach_volume_to_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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() @@ -13012,20 +16978,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(attach_volume_to_server_result) attach_volume_to_server_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [VolumeNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -13036,12 +17021,18 @@ class resume_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13051,7 +17042,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13061,12 +17056,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resume_server_args') + oprot.writeStructBegin("resume_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13075,19 +17076,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(resume_server_args) resume_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -13099,13 +17107,20 @@ class resume_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13130,15 +17145,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resume_server_result') + oprot.writeStructBegin("resume_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13148,20 +17165,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(resume_server_result) resume_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -13174,14 +17204,22 @@ class create_volume_args(object): """ - - def __init__(self, volume_name=None, volume_storage=None, metadata=None,): + def __init__( + self, + volume_name=None, + volume_storage=None, + metadata=None, + ): self.volume_name = volume_name self.volume_storage = volume_storage self.metadata = metadata def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13191,7 +17229,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -13204,8 +17246,16 @@ 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: @@ -13217,23 +17267,33 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_args') + oprot.writeStructBegin("create_volume_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.volume_storage is not None: - oprot.writeFieldBegin('volume_storage', TType.I32, 2) + oprot.writeFieldBegin("volume_storage", TType.I32, 2) oprot.writeI32(self.volume_storage) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 3) + oprot.writeFieldBegin("metadata", TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for 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() @@ -13243,21 +17303,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_args) create_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.I32, 'volume_storage', None, None, ), # 2 - (3, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "volume_storage", + None, + None, + ), # 2 + ( + 3, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 3 ) @@ -13270,14 +17349,22 @@ class create_volume_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13308,19 +17395,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_result') + oprot.writeStructBegin("create_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13330,20 +17419,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_result) create_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -13356,14 +17464,22 @@ class create_volume_by_source_volume_args(object): """ - - def __init__(self, volume_name=None, metadata=None, source_volume_id=None,): + def __init__( + self, + volume_name=None, + metadata=None, + source_volume_id=None, + ): self.volume_name = volume_name self.metadata = metadata self.source_volume_id = source_volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13373,7 +17489,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -13381,15 +17501,27 @@ 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: @@ -13399,24 +17531,38 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_source_volume_args') + oprot.writeStructBegin("create_volume_by_source_volume_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 2) + oprot.writeFieldBegin("metadata", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for 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() @@ -13425,21 +17571,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_by_source_volume_args) create_volume_by_source_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 - (3, TType.STRING, 'source_volume_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 + ( + 3, + TType.STRING, + "source_volume_id", + "UTF8", + None, + ), # 3 ) @@ -13452,14 +17617,22 @@ class create_volume_by_source_volume_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13490,19 +17663,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_source_volume_result') + oprot.writeStructBegin("create_volume_by_source_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13512,20 +17687,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_by_source_volume_result) create_volume_by_source_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -13538,14 +17732,22 @@ class create_volume_by_volume_snap_args(object): """ - - def __init__(self, volume_name=None, metadata=None, volume_snap_id=None,): + def __init__( + self, + volume_name=None, + metadata=None, + volume_snap_id=None, + ): self.volume_name = volume_name self.metadata = metadata self.volume_snap_id = volume_snap_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13555,7 +17757,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -13563,15 +17769,27 @@ 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: @@ -13581,24 +17799,38 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_volume_snap_args') + oprot.writeStructBegin("create_volume_by_volume_snap_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 2) + oprot.writeFieldBegin("metadata", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for 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() @@ -13607,21 +17839,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_by_volume_snap_args) create_volume_by_volume_snap_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 - (3, TType.STRING, 'volume_snap_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 + ( + 3, + TType.STRING, + "volume_snap_id", + "UTF8", + None, + ), # 3 ) @@ -13634,14 +17885,22 @@ class create_volume_by_volume_snap_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13672,19 +17931,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_volume_snap_result') + oprot.writeStructBegin("create_volume_by_volume_snap_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13694,20 +17955,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_by_volume_snap_result) create_volume_by_volume_snap_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -13720,14 +18000,22 @@ class create_volume_snapshot_args(object): """ - - def __init__(self, volume_id=None, name=None, description=None,): + def __init__( + self, + volume_id=None, + name=None, + description=None, + ): self.volume_id = volume_id self.name = name self.description = description def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13737,17 +18025,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13757,20 +18057,32 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_snapshot_args') + oprot.writeStructBegin("create_volume_snapshot_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 3) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 3) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13779,21 +18091,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_snapshot_args) create_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "description", + "UTF8", + None, + ), # 3 ) @@ -13806,14 +18137,22 @@ class create_volume_snapshot_result(object): """ - - def __init__(self, success=None, e=None, r=None,): + def __init__( + self, + success=None, + e=None, + r=None, + ): self.success = success self.e = e self.r = r def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13823,7 +18162,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -13843,19 +18186,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_snapshot_result') + oprot.writeStructBegin("create_volume_snapshot_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13865,20 +18214,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_snapshot_result) create_volume_snapshot_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [DefaultException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [VolumeNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 2 ) @@ -13889,12 +18257,18 @@ class get_volume_snapshot_args(object): """ - - def __init__(self, name_or_id=None,): + def __init__( + self, + name_or_id=None, + ): self.name_or_id = name_or_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13904,7 +18278,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13914,12 +18292,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_snapshot_args') + oprot.writeStructBegin("get_volume_snapshot_args") if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 1) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 1) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13928,19 +18312,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volume_snapshot_args) get_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'name_or_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 1 ) @@ -13952,13 +18343,20 @@ class get_volume_snapshot_result(object): """ - - def __init__(self, success=None, r=None,): + def __init__( + self, + success=None, + r=None, + ): self.success = success self.r = r def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13984,15 +18382,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_snapshot_result') + oprot.writeStructBegin("get_volume_snapshot_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14002,19 +18402,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volume_snapshot_result) get_volume_snapshot_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Snapshot, None], None, ), # 0 - (1, TType.STRUCT, 'r', [ResourceNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Snapshot, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [ResourceNotFoundException, None], + None, + ), # 1 ) @@ -14025,12 +18438,18 @@ class delete_volume_snapshot_args(object): """ - - def __init__(self, snapshot_id=None,): + def __init__( + self, + snapshot_id=None, + ): self.snapshot_id = snapshot_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14040,7 +18459,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.snapshot_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.snapshot_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14050,12 +18473,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_snapshot_args') + oprot.writeStructBegin("delete_volume_snapshot_args") if self.snapshot_id is not None: - oprot.writeFieldBegin('snapshot_id', TType.STRING, 1) - oprot.writeString(self.snapshot_id.encode('utf-8') if sys.version_info[0] == 2 else self.snapshot_id) + oprot.writeFieldBegin("snapshot_id", TType.STRING, 1) + oprot.writeString( + self.snapshot_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.snapshot_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14064,19 +18493,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_volume_snapshot_args) delete_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'snapshot_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "snapshot_id", + "UTF8", + None, + ), # 1 ) @@ -14088,13 +18524,20 @@ class delete_volume_snapshot_result(object): """ - - def __init__(self, c=None, e=None,): + def __init__( + self, + c=None, + e=None, + ): self.c = c self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14119,15 +18562,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_snapshot_result') + oprot.writeStructBegin("delete_volume_snapshot_result") if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 2) + oprot.writeFieldBegin("e", TType.STRUCT, 2) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14137,20 +18582,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_volume_snapshot_result) delete_volume_snapshot_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 - (2, TType.STRUCT, 'e', [DefaultException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "e", + [DefaultException, None], + None, + ), # 2 ) @@ -14161,12 +18619,18 @@ class reboot_hard_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14176,7 +18640,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14186,12 +18654,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_hard_server_args') + oprot.writeStructBegin("reboot_hard_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14200,19 +18674,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(reboot_hard_server_args) reboot_hard_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -14224,13 +18705,20 @@ class reboot_hard_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14255,15 +18743,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_hard_server_result') + oprot.writeStructBegin("reboot_hard_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14273,20 +18763,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(reboot_hard_server_result) reboot_hard_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -14297,12 +18800,18 @@ class reboot_soft_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14312,7 +18821,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14322,12 +18835,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_soft_server_args') + oprot.writeStructBegin("reboot_soft_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14336,19 +18855,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(reboot_soft_server_args) reboot_soft_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -14360,13 +18886,20 @@ class reboot_soft_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14391,15 +18924,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_soft_server_result') + oprot.writeStructBegin("reboot_soft_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14409,20 +18944,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(reboot_soft_server_result) reboot_soft_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) fix_spec(all_structs) del all_structs diff --git a/simple_vm_client/forc_connector/template/template.py b/simple_vm_client/forc_connector/template/template.py index 9bbf8c2..d93138e 100644 --- a/simple_vm_client/forc_connector/template/template.py +++ b/simple_vm_client/forc_connector/template/template.py @@ -148,16 +148,16 @@ def _process_template_metadata( self._update_forc_allowed(template_metadata) if template_metadata.template_name not in self._loaded_resenv_metadata: - self._loaded_resenv_metadata[ - template_metadata.template_name - ] = template_metadata + self._loaded_resenv_metadata[template_metadata.template_name] = ( + template_metadata + ) elif ( self._loaded_resenv_metadata[template_metadata.template_name] != template_metadata ): - self._loaded_resenv_metadata[ - template_metadata.template_name - ] = template_metadata + self._loaded_resenv_metadata[template_metadata.template_name] = ( + template_metadata + ) def update_playbooks(self) -> None: if not self.GITHUB_PLAYBOOKS_REPO: @@ -233,6 +233,7 @@ def _add_forc_allowed_template(self, metadata: ResearchEnvironmentMetadata) -> N info_url=metadata.info_url, port=int(metadata.port), incompatible_versions=metadata.incompatible_versions, + securitygroup_name=metadata.securitygroup_name, is_maintained=metadata.is_maintained, information_for_display=metadata.information_for_display, min_ram=metadata.min_ram, diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index 2c58543..a201193 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -887,6 +887,16 @@ def is_security_group_in_use(self, security_group_id): # If none of the above are true, the security group is no longer in use return False + def get_research_environment_security_group(self, security_group_name: str): + security_group = self.openstack_connection.get_security_group( + name_or_id=security_group_name + ) + if not security_group: + raise DefaultException( + message=f"Security Group {security_group_name} not found" + ) + return security_group + def get_or_create_research_environment_security_group( self, resenv_metadata: ResearchEnvironmentMetadata ): @@ -1370,6 +1380,23 @@ def create_deactivate_update_script(self) -> str: ) return deactivate_update_script + def add_research_environment_security_group( + self, server_id: str, security_group_name: str + ): + logger.info(f"Setting up {security_group_name} security group for {server_id}") + server = self.get_server(openstack_id=server_id) + security_group = self.get_research_environment_security_group( + security_group_name=security_group_name + ) + self.openstack_connection.compute.add_security_group_to_server( + server=server, security_group=security_group + ) + + def add_metadata_to_server(self, server_id, metadata): + server = self.get_server(openstack_id=server_id) + + self.openstack_connection.compute.set_server_metadata(server, **metadata) + def add_udp_security_group(self, server_id): logger.info(f"Setting up UDP security group for {server_id}") server = self.get_server(openstack_id=server_id) diff --git a/simple_vm_client/ttypes.py b/simple_vm_client/ttypes.py index e1a24eb..003b338 100644 --- a/simple_vm_client/ttypes.py +++ b/simple_vm_client/ttypes.py @@ -6,13 +6,13 @@ # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -from thrift.TRecursive import fix_spec - import sys +from thrift.protocol.TProtocol import TProtocolException +from thrift.Thrift import TException, TType from thrift.transport import TTransport +from thrift.TRecursive import fix_spec + all_structs = [] @@ -27,8 +27,14 @@ 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 @@ -36,7 +42,11 @@ def __init__(self, id=None, owner=None, location_url=None, template=None, templa 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() @@ -51,22 +61,38 @@ 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: @@ -76,28 +102,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('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() @@ -106,9 +148,8 @@ 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__ @@ -131,11 +172,25 @@ class ResearchEnvironmentTemplate(object): - information_for_display - min_ram - min_cores + - securitygroup_name """ - - 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, + securitygroup_name=None, + ): self.template_name = template_name self.title = title self.description = description @@ -151,9 +206,14 @@ def __init__(self, template_name=None, title=None, description=None, logo_url=No if min_cores is self.thrift_spec[11][4]: min_cores = 0 self.min_cores = min_cores + self.securitygroup_name = securitygroup_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() @@ -163,27 +223,47 @@ 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: @@ -196,7 +276,11 @@ 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: @@ -211,8 +295,16 @@ 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: @@ -227,6 +319,15 @@ def read(self, iprot): self.min_cores = iprot.readI32() else: iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.securitygroup_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -234,60 +335,96 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() + if self.securitygroup_name is not None: + oprot.writeFieldBegin("securitygroup_name", TType.STRING, 12) + oprot.writeString( + self.securitygroup_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.securitygroup_name + ) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -295,9 +432,8 @@ 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__ @@ -317,8 +453,14 @@ 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 @@ -326,7 +468,11 @@ def __init__(self, build=None, build_number=None, name=None, version=None, home= 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() @@ -336,27 +482,47 @@ 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: @@ -366,28 +532,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('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() @@ -396,9 +578,8 @@ 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__ @@ -422,8 +603,18 @@ 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 @@ -435,7 +626,11 @@ def __init__(self, launch_date=None, group_id=None, network_id=None, public_ip=N 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() @@ -445,32 +640,56 @@ 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: @@ -480,12 +699,20 @@ 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: @@ -495,44 +722,76 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -541,9 +800,8 @@ 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__ @@ -566,8 +824,17 @@ 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 @@ -578,7 +845,11 @@ def __init__(self, id=None, name=None, description=None, status=None, created_at 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() @@ -588,32 +859,56 @@ 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: @@ -623,7 +918,11 @@ 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: @@ -633,40 +932,62 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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() @@ -675,9 +996,8 @@ 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__ @@ -701,8 +1021,16 @@ 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 @@ -712,7 +1040,11 @@ def __init__(self, id=None, name=None, description=None, status=None, created_at 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() @@ -722,27 +1054,47 @@ 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: @@ -752,7 +1104,11 @@ 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: @@ -762,36 +1118,56 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -800,9 +1176,8 @@ 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__ @@ -825,8 +1200,15 @@ 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 @@ -835,7 +1217,11 @@ def __init__(self, vcpus=None, ram=None, disk=None, name=None, description=None, 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() @@ -860,12 +1246,20 @@ 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: @@ -880,31 +1274,39 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -912,19 +1314,18 @@ 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__ @@ -952,8 +1353,20 @@ 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 @@ -967,7 +1380,11 @@ def __init__(self, name=None, min_disk=None, min_ram=None, status=None, created_ 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() @@ -977,7 +1394,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -992,27 +1413,47 @@ 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: @@ -1020,7 +1461,11 @@ 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: @@ -1032,7 +1477,11 @@ 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: @@ -1042,78 +1491,105 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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__ @@ -1142,8 +1618,21 @@ 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 @@ -1158,7 +1647,11 @@ def __init__(self, flavor=None, image=None, metadata=None, project_id=None, keyn 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() @@ -1183,55 +1676,99 @@ 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: @@ -1241,83 +1778,122 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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__ @@ -1335,14 +1911,22 @@ 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() @@ -1352,12 +1936,20 @@ 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: @@ -1372,19 +1964,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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() @@ -1392,15 +1990,14 @@ 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__ @@ -1420,14 +2017,22 @@ 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() @@ -1442,12 +2047,20 @@ 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: @@ -1457,37 +2070,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('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__ @@ -1505,11 +2123,17 @@ 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") @@ -1518,11 +2142,21 @@ 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 @@ -1534,17 +2168,29 @@ 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: @@ -1559,20 +2205,34 @@ 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() @@ -1584,9 +2244,8 @@ 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__ @@ -1602,9 +2261,11 @@ 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") @@ -1613,11 +2274,15 @@ 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 @@ -1627,7 +2292,11 @@ 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: @@ -1640,12 +2309,18 @@ 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() @@ -1657,9 +2332,8 @@ 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__ @@ -1676,10 +2350,13 @@ 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") @@ -1688,11 +2365,20 @@ 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 @@ -1703,12 +2389,20 @@ 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: @@ -1722,16 +2416,26 @@ 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() @@ -1743,9 +2447,8 @@ 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__ @@ -1762,10 +2465,13 @@ 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") @@ -1774,11 +2480,20 @@ 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 @@ -1789,12 +2504,20 @@ 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: @@ -1808,16 +2531,24 @@ 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() @@ -1829,9 +2560,8 @@ 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__ @@ -1848,10 +2578,13 @@ 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") @@ -1860,11 +2593,20 @@ 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 @@ -1875,12 +2617,20 @@ 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: @@ -1894,16 +2644,26 @@ 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() @@ -1915,9 +2675,8 @@ 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__ @@ -1934,10 +2693,15 @@ 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") @@ -1946,11 +2710,20 @@ 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 @@ -1961,12 +2734,20 @@ 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: @@ -1980,16 +2761,26 @@ 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() @@ -2001,9 +2792,8 @@ 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__ @@ -2020,10 +2810,13 @@ 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") @@ -2032,11 +2825,20 @@ 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 @@ -2047,12 +2849,20 @@ 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: @@ -2066,16 +2876,26 @@ 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() @@ -2087,9 +2907,8 @@ 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__ @@ -2106,10 +2925,13 @@ 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") @@ -2118,11 +2940,20 @@ 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 @@ -2133,12 +2964,20 @@ 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: @@ -2152,16 +2991,26 @@ 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() @@ -2173,9 +3022,8 @@ 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__ @@ -2192,10 +3040,13 @@ 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") @@ -2204,11 +3055,20 @@ 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 @@ -2219,12 +3079,20 @@ 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: @@ -2238,16 +3106,26 @@ 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() @@ -2259,9 +3137,8 @@ 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__ @@ -2278,10 +3155,13 @@ 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") @@ -2290,11 +3170,20 @@ 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 @@ -2305,12 +3194,20 @@ 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: @@ -2324,16 +3221,26 @@ 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() @@ -2345,9 +3252,8 @@ 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__ @@ -2364,10 +3270,13 @@ 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") @@ -2376,11 +3285,20 @@ 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 @@ -2391,12 +3309,20 @@ 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: @@ -2410,16 +3336,26 @@ 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() @@ -2431,9 +3367,8 @@ 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__ @@ -2450,10 +3385,13 @@ 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") @@ -2462,11 +3400,20 @@ 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 @@ -2477,12 +3424,20 @@ 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: @@ -2496,16 +3451,26 @@ 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() @@ -2517,9 +3482,8 @@ 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__ @@ -2536,10 +3500,13 @@ 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") @@ -2548,11 +3515,20 @@ 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 @@ -2563,12 +3539,20 @@ 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: @@ -2582,16 +3566,26 @@ 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() @@ -2603,9 +3597,8 @@ 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__ @@ -2621,9 +3614,11 @@ 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") @@ -2632,11 +3627,15 @@ 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 @@ -2646,7 +3645,11 @@ 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: @@ -2659,12 +3662,18 @@ 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() @@ -2676,9 +3685,8 @@ 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__ @@ -2696,9 +3704,11 @@ 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") @@ -2707,11 +3717,15 @@ 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 @@ -2721,7 +3735,11 @@ 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: @@ -2734,12 +3752,18 @@ 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() @@ -2751,226 +3775,882 @@ 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 + ( + 12, + TType.STRING, + "securitygroup_name", + "UTF8", + None, + ), # 12 ) 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