From 21d2ba98438e51781953abbbeaf5b81af59aa13d Mon Sep 17 00:00:00 2001 From: qqmok Date: Thu, 12 Dec 2024 15:23:36 +0100 Subject: [PATCH 1/5] feat(vm): added disable connection --- portal_client.thrift | 17 +- simple_vm_client/VirtualMachineHandler.py | 21 +- simple_vm_client/VirtualMachineService-remote | 1044 +- simple_vm_client/VirtualMachineService.py | 10792 +++++----------- simple_vm_client/constants.py | 7 +- .../openstack_connector.py | 37 +- simple_vm_client/test_openstack_connector.py | 28 +- .../test_virtualmachinehandler.py | 6 + simple_vm_client/ttypes.py | 3546 ++--- simple_vm_client/util/state_enums.py | 1 + 10 files changed, 4178 insertions(+), 11321 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index a12dc939..f4fc65a1 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -391,6 +391,15 @@ service VirtualMachineService { throws (1:DefaultException r,2:ServerNotFoundException s ) + + void add_project_security_group_to_server( + /** OpenStack id of the server*/ + 1:string server_id,2:string project_name, 3:string project_id) + + throws (1:DefaultException r,2:ServerNotFoundException s + + ) + /** * Add metadata to a server. */ @@ -449,6 +458,8 @@ service VirtualMachineService { void delete_security_group_rule(1:string openstack_id) throws (1:SecurityGroupRuleNotFoundException e,2:DefaultException f) + void delete_server_security_groups(1:string openstack_id) throws (1:SecurityGroupRuleNotFoundException e,2:DefaultException f) + /** * Delete server. @@ -669,14 +680,16 @@ service VirtualMachineService { VM get_server( /** Id of the server.*/ - 1:string openstack_id) + 1:string openstack_id, + 2:optional bool no_connection) throws (1:ServerNotFoundException e), VM get_server_by_unique_name( /** Id of the server.*/ - 1:string unique_name) + 1:string unique_name, + 2:optional bool no_connection) throws (1:ServerNotFoundException e), diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 2b93319d..5f9a5557 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -164,16 +164,17 @@ def set_server_metadata(self, openstack_id: str, metadata: dict[str, str]): openstack_id=openstack_id, metadata=metadata ) - def get_server_by_unique_name(self, unique_name: str) -> VM: + def get_server_by_unique_name(self, unique_name: str, no_connection: bool = False) -> VM: server = self.openstack_connector.get_server_by_unique_name( - unique_name=unique_name + unique_name=unique_name, + no_connection=no_connection ) server = self.forc_connector.get_playbook_status(server=server) server = thrift_converter.os_to_thrift_server(openstack_server=server) return server - def get_server(self, openstack_id: str) -> VM: - server = self.openstack_connector.get_server(openstack_id=openstack_id) + def get_server(self, openstack_id: str, no_connection: bool = False) -> VM: + server = self.openstack_connector.get_server(openstack_id=openstack_id, no_connection=no_connection) server = self.forc_connector.get_playbook_status(server=server) server = thrift_converter.os_to_thrift_server(openstack_server=server) return server @@ -345,6 +346,11 @@ def delete_security_group_rule(self, openstack_id): return self.openstack_connector.delete_security_group_rule( openstack_id=openstack_id ) + + def delete_server_security_groups(self, openstack_id): + return self.openstack_connector.delete_server_security_groups( + openstack_id=openstack_id + ) def add_default_security_groups_to_server(self, openstack_id): return self.openstack_connector.add_default_security_groups_to_server( @@ -374,6 +380,13 @@ def add_research_environment_security_group( server_id=server_id, security_group_name=security_group_name ) + def add_project_security_group_to_server( + self, server_id: str, project_name: str, project_id: str + ) -> None: + return self.openstack_connector.add_project_security_group_to_server( + server_id=server_id, project_name=project_name, project_id=project_id + ) + def add_udp_security_group(self, server_id: str) -> None: return self.openstack_connector.add_udp_security_group(server_id=server_id) diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index 1d78df56..5b50dcf0 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -1,145 +1,113 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.22.0) +# Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import pprint import sys - +import pprint if sys.version_info[0] > 2: from urllib.parse import urlparse else: from urlparse import urlparse - +from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient from thrift.protocol.TBinaryProtocol import TBinaryProtocol -from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport -from VirtualMachineService import VirtualMachineService -if len(sys.argv) <= 1 or sys.argv[1] == "--help": - print("") - print( - "Usage: " - + sys.argv[0] - + " [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]" - ) - print("") - print("Functions:") - print(" bool is_version(double version)") - print(" string get_client_version()") - print(" get_gateway_ip()") - print(" get_calculation_values()") - print(" string import_keypair(string keyname, string public_key)") - print(" get_vm_ports(string openstack_id)") - print(" void add_udp_security_group(string server_id)") - print( - " void add_research_environment_security_group(string server_id, string security_group_name)" - ) - print(" void 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( - " void rescue_server(string openstack_id, string admin_pass, string image_ref)" - ) - print(" void unrescue_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, string slurm_version, string metadata_token, string metadata_endpoint)" - ) - 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, additional_keys, string metadata_token, string metadata_endpoint)" - ) - 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_access_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 set_metadata_server_data(string ip, VirtualMachineServerMetadata metadata)" - ) - print(" void remove_metadata_server_data(string ip)") - print(" void is_metadata_server_available()") - 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(" string get_security_group_id_by_name(string name)") - 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(" string get_keypair_public_key_by_name(string key_name)") - print(" void delete_keypair(string key_name)") - print(" void add_default_security_groups_to_server(string openstack_id)") - print(" VM get_server(string openstack_id)") - print(" VM get_server_by_unique_name(string unique_name)") - 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( public_keys, ClusterInstance master_instance, worker_instances, string user)" - ) - print(" terminate_cluster(string cluster_id)") - print(" void delete_image(string image_id)") - print(" void detach_volume(string volume_id, string server_id)") - print(" void delete_volume(string volume_id)") - print(" attach_volume_to_server(string openstack_id, string volume_id)") - print(" void resume_server(string openstack_id)") - print(" Volume create_volume(string volume_name, int volume_storage, metadata)") - print( - " Volume create_volume_by_source_volume(string volume_name, metadata, string source_volume_id)" - ) - print( - " Volume create_volume_by_volume_snap(string volume_name, metadata, string volume_snap_id)" - ) - print( - " string create_volume_snapshot(string volume_id, string name, string description)" - ) - print(" Snapshot get_volume_snapshot(string name_or_id)") - print(" void delete_volume_snapshot(string snapshot_id)") - print(" void reboot_hard_server(string openstack_id)") - print(" void reboot_soft_server(string openstack_id)") - print("") +from VirtualMachineService import VirtualMachineService +from VirtualMachineService.ttypes import * + +if len(sys.argv) <= 1 or sys.argv[1] == '--help': + print('') + print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]') + print('') + print('Functions:') + print(' bool is_version(double version)') + print(' string get_client_version()') + print(' get_gateway_ip()') + print(' get_calculation_values()') + print(' string import_keypair(string keyname, string public_key)') + print(' get_vm_ports(string openstack_id)') + print(' void add_udp_security_group(string server_id)') + print(' void add_research_environment_security_group(string server_id, string security_group_name)') + print(' void add_project_security_group_to_server(string server_id, string project_name, string project_id)') + print(' void 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_security_groups(string openstack_id)') + print(' void delete_server(string openstack_id)') + print(' void rescue_server(string openstack_id, string admin_pass, string image_ref)') + print(' void unrescue_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, string slurm_version, string metadata_token, string metadata_endpoint)') + 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, additional_keys, string metadata_token, string metadata_endpoint)') + 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_access_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 set_metadata_server_data(string ip, VirtualMachineServerMetadata metadata)') + print(' void remove_metadata_server_data(string ip)') + print(' void is_metadata_server_available()') + 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(' string get_security_group_id_by_name(string name)') + 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(' string get_keypair_public_key_by_name(string key_name)') + print(' void delete_keypair(string key_name)') + print(' void add_default_security_groups_to_server(string openstack_id)') + print(' VM get_server(string openstack_id, bool no_connection)') + print(' VM get_server_by_unique_name(string unique_name, bool no_connection)') + 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( public_keys, 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 @@ -149,16 +117,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]) @@ -166,49 +134,42 @@ if sys.argv[argi] == "-u": port = 80 uri = url[2] if url[4]: - uri += "?%s" % url[4] + uri += '?%s' % url[4] http = True argi += 2 -if sys.argv[argi] == "-f" or sys.argv[argi] == "-framed": +if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': framed = True argi += 1 -if sys.argv[argi] == "-s" or sys.argv[argi] == "-ssl": +if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': ssl = True argi += 1 -if sys.argv[argi] == "-novalidate": +if sys.argv[argi] == '-novalidate': validate = False argi += 1 -if sys.argv[argi] == "-ca_certs": - ca_certs = sys.argv[argi + 1] +if sys.argv[argi] == '-ca_certs': + ca_certs = sys.argv[argi+1] argi += 2 -if sys.argv[argi] == "-keyfile": - keyfile = sys.argv[argi + 1] +if sys.argv[argi] == '-keyfile': + keyfile = sys.argv[argi+1] argi += 2 -if sys.argv[argi] == "-certfile": - certfile = sys.argv[argi + 1] +if sys.argv[argi] == '-certfile': + certfile = sys.argv[argi+1] argi += 2 cmd = sys.argv[argi] -args = sys.argv[argi + 1 :] +args = sys.argv[argi + 1:] if http: transport = THttpClient.THttpClient(host, port, uri) else: if ssl: - socket = TSSLSocket.TSSLSocket( - host, - port, - validate=validate, - ca_certs=ca_certs, - keyfile=keyfile, - certfile=certfile, - ) + socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) else: socket = TSocket.TSocket(host, port) if framed: @@ -219,775 +180,470 @@ protocol = TBinaryProtocol(transport) client = VirtualMachineService.Client(protocol) transport.open() -if cmd == "is_version": +if cmd == 'is_version': if len(args) != 1: - print("is_version requires 1 args") + print('is_version requires 1 args') sys.exit(1) - pp.pprint( - client.is_version( - eval(args[0]), - ) - ) + pp.pprint(client.is_version(eval(args[0]),)) -elif cmd == "get_client_version": +elif cmd == 'get_client_version': if len(args) != 0: - print("get_client_version requires 0 args") + print('get_client_version requires 0 args') sys.exit(1) pp.pprint(client.get_client_version()) -elif cmd == "get_gateway_ip": +elif cmd == 'get_gateway_ip': if len(args) != 0: - print("get_gateway_ip requires 0 args") + print('get_gateway_ip requires 0 args') sys.exit(1) pp.pprint(client.get_gateway_ip()) -elif cmd == "get_calculation_values": +elif cmd == 'get_calculation_values': if len(args) != 0: - print("get_calculation_values requires 0 args") + print('get_calculation_values requires 0 args') sys.exit(1) pp.pprint(client.get_calculation_values()) -elif cmd == "import_keypair": +elif cmd == 'import_keypair': if len(args) != 2: - print("import_keypair requires 2 args") + print('import_keypair requires 2 args') sys.exit(1) - pp.pprint( - client.import_keypair( - args[0], - args[1], - ) - ) + pp.pprint(client.import_keypair(args[0], args[1],)) -elif cmd == "get_vm_ports": +elif cmd == 'get_vm_ports': if len(args) != 1: - print("get_vm_ports requires 1 args") + print('get_vm_ports requires 1 args') sys.exit(1) - pp.pprint( - client.get_vm_ports( - args[0], - ) - ) + pp.pprint(client.get_vm_ports(args[0],)) -elif cmd == "add_udp_security_group": +elif cmd == 'add_udp_security_group': if len(args) != 1: - print("add_udp_security_group requires 1 args") + print('add_udp_security_group requires 1 args') sys.exit(1) - pp.pprint( - client.add_udp_security_group( - args[0], - ) - ) + pp.pprint(client.add_udp_security_group(args[0],)) -elif cmd == "add_research_environment_security_group": +elif cmd == 'add_research_environment_security_group': if len(args) != 2: - print("add_research_environment_security_group requires 2 args") + print('add_research_environment_security_group requires 2 args') + sys.exit(1) + pp.pprint(client.add_research_environment_security_group(args[0], args[1],)) + +elif cmd == 'add_project_security_group_to_server': + if len(args) != 3: + print('add_project_security_group_to_server requires 3 args') sys.exit(1) - pp.pprint( - client.add_research_environment_security_group( - args[0], - args[1], - ) - ) + pp.pprint(client.add_project_security_group_to_server(args[0], args[1], args[2],)) -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") + 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], - ) - ) + 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": +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_security_groups': if len(args) != 1: - print("delete_server requires 1 args") + print('delete_server_security_groups requires 1 args') sys.exit(1) - pp.pprint( - client.delete_server( - args[0], - ) - ) + pp.pprint(client.delete_server_security_groups(args[0],)) -elif cmd == "rescue_server": +elif cmd == 'delete_server': + if len(args) != 1: + print('delete_server requires 1 args') + sys.exit(1) + pp.pprint(client.delete_server(args[0],)) + +elif cmd == 'rescue_server': if len(args) != 3: - print("rescue_server requires 3 args") + print('rescue_server requires 3 args') sys.exit(1) - pp.pprint( - client.rescue_server( - args[0], - args[1], - args[2], - ) - ) + pp.pprint(client.rescue_server(args[0], args[1], args[2],)) -elif cmd == "unrescue_server": +elif cmd == 'unrescue_server': if len(args) != 1: - print("unrescue_server requires 1 args") + print('unrescue_server requires 1 args') sys.exit(1) - pp.pprint( - client.unrescue_server( - args[0], - ) - ) + pp.pprint(client.unrescue_server(args[0],)) -elif cmd == "start_server": +elif cmd == 'start_server': if len(args) != 13: - print("start_server requires 13 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]), - args[10], - args[11], - args[12], - ) - ) - -elif cmd == "is_bibigrid_available": + print('start_server requires 13 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]), args[10], args[11], args[12],)) + +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) != 11: - print("start_server_with_custom_key requires 11 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]), - eval(args[8]), - args[9], - args[10], - ) - ) - -elif cmd == "exist_server": - if len(args) != 1: - print("exist_server requires 1 args") - sys.exit(1) - pp.pprint( - client.exist_server( - args[0], - ) - ) - -elif cmd == "create_and_deploy_playbook": + print('start_server_with_custom_key requires 11 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]), eval(args[8]), args[9], args[10],)) + +elif cmd == 'exist_server': + if len(args) != 1: + print('exist_server requires 1 args') + sys.exit(1) + pp.pprint(client.exist_server(args[0],)) + +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": - if len(args) != 1: - print("get_playbook_logs requires 1 args") - sys.exit(1) - pp.pprint( - client.get_playbook_logs( - args[0], - ) - ) - -elif cmd == "has_forc": + 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') + sys.exit(1) + pp.pprint(client.get_playbook_logs(args[0],)) + +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_access_url": +elif cmd == 'get_forc_access_url': if len(args) != 0: - print("get_forc_access_url requires 0 args") + print('get_forc_access_url requires 0 args') sys.exit(1) pp.pprint(client.get_forc_access_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 == "set_metadata_server_data": +elif cmd == 'set_metadata_server_data': if len(args) != 2: - print("set_metadata_server_data requires 2 args") + print('set_metadata_server_data requires 2 args') sys.exit(1) - pp.pprint( - client.set_metadata_server_data( - args[0], - eval(args[1]), - ) - ) + pp.pprint(client.set_metadata_server_data(args[0], eval(args[1]),)) -elif cmd == "remove_metadata_server_data": +elif cmd == 'remove_metadata_server_data': if len(args) != 1: - print("remove_metadata_server_data requires 1 args") + print('remove_metadata_server_data requires 1 args') sys.exit(1) - pp.pprint( - client.remove_metadata_server_data( - args[0], - ) - ) + pp.pprint(client.remove_metadata_server_data(args[0],)) -elif cmd == "is_metadata_server_available": +elif cmd == 'is_metadata_server_available': if len(args) != 0: - print("is_metadata_server_available requires 0 args") + print('is_metadata_server_available requires 0 args') sys.exit(1) pp.pprint(client.is_metadata_server_available()) -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 == "get_security_group_id_by_name": +elif cmd == 'get_security_group_id_by_name': if len(args) != 1: - print("get_security_group_id_by_name requires 1 args") + print('get_security_group_id_by_name requires 1 args') sys.exit(1) - pp.pprint( - client.get_security_group_id_by_name( - args[0], - ) - ) + pp.pprint(client.get_security_group_id_by_name(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") + 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]), - ) - ) + 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": +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_keypair_public_key_by_name": +elif cmd == 'get_keypair_public_key_by_name': if len(args) != 1: - print("get_keypair_public_key_by_name requires 1 args") + print('get_keypair_public_key_by_name requires 1 args') sys.exit(1) - pp.pprint( - client.get_keypair_public_key_by_name( - args[0], - ) - ) + pp.pprint(client.get_keypair_public_key_by_name(args[0],)) -elif cmd == "delete_keypair": +elif cmd == 'delete_keypair': if len(args) != 1: - print("delete_keypair requires 1 args") + print('delete_keypair requires 1 args') sys.exit(1) - pp.pprint( - client.delete_keypair( - args[0], - ) - ) + pp.pprint(client.delete_keypair(args[0],)) -elif cmd == "add_default_security_groups_to_server": +elif cmd == 'add_default_security_groups_to_server': if len(args) != 1: - print("add_default_security_groups_to_server requires 1 args") + print('add_default_security_groups_to_server requires 1 args') sys.exit(1) - pp.pprint( - client.add_default_security_groups_to_server( - args[0], - ) - ) + pp.pprint(client.add_default_security_groups_to_server(args[0],)) -elif cmd == "get_server": - if len(args) != 1: - print("get_server requires 1 args") +elif cmd == 'get_server': + if len(args) != 2: + print('get_server requires 2 args') sys.exit(1) - pp.pprint( - client.get_server( - args[0], - ) - ) + pp.pprint(client.get_server(args[0], eval(args[1]),)) -elif cmd == "get_server_by_unique_name": - if len(args) != 1: - print("get_server_by_unique_name requires 1 args") +elif cmd == 'get_server_by_unique_name': + if len(args) != 2: + print('get_server_by_unique_name requires 2 args') sys.exit(1) - pp.pprint( - client.get_server_by_unique_name( - args[0], - ) - ) + pp.pprint(client.get_server_by_unique_name(args[0], eval(args[1]),)) -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") + print('start_cluster requires 4 args') sys.exit(1) - pp.pprint( - client.start_cluster( - eval(args[0]), - eval(args[1]), - eval(args[2]), - args[3], - ) - ) + pp.pprint(client.start_cluster(eval(args[0]), eval(args[1]), eval(args[2]), args[3],)) -elif cmd == "terminate_cluster": +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 e846e4f6..5cfd1ef3 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -1,20 +1,20 @@ # -# Autogenerated by Thrift Compiler (0.22.0) +# Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import logging -import sys - -from thrift.Thrift import TApplicationException, TMessageType, TProcessor, TType -from thrift.transport import TTransport +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec +import sys +import logging from .ttypes import * - +from thrift.Thrift import TProcessor +from thrift.transport import TTransport all_structs = [] @@ -23,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): """ @@ -37,12 +37,14 @@ def get_client_version(self): Returns Version of the client """ + pass def get_gateway_ip(self): """ Gets the gateway ip. """ + pass def get_calculation_values(self): pass @@ -57,6 +59,7 @@ def import_keypair(self, keyname, public_key): - public_key: The public key """ + pass def get_vm_ports(self, openstack_id): """ @@ -67,6 +70,7 @@ def get_vm_ports(self, openstack_id): - openstack_id: Id of server """ + pass def add_udp_security_group(self, server_id): """ @@ -76,6 +80,7 @@ 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): """ @@ -86,6 +91,17 @@ def add_research_environment_security_group(self, server_id, security_group_name - security_group_name """ + pass + + def add_project_security_group_to_server(self, server_id, project_name, project_id): + """ + Parameters: + - server_id: OpenStack id of the server + - project_name + - project_id + + """ + pass def add_metadata_to_server(self, openstack_id, metadata): """ @@ -96,6 +112,7 @@ def add_metadata_to_server(self, openstack_id, metadata): - metadata """ + pass def get_flavors(self): """ @@ -103,6 +120,7 @@ def get_flavors(self): Returns: List of flavor instances. """ + pass def get_images(self): """ @@ -110,6 +128,7 @@ def get_images(self): Returns: List of Image instances. """ + pass def get_public_images(self): """ @@ -117,6 +136,7 @@ def get_public_images(self): Returns: List of public Image instances. """ + pass def get_private_images(self): """ @@ -124,6 +144,7 @@ def get_private_images(self): Returns: List of private Image instances. """ + pass def get_image(self, openstack_id, ignore_not_active): """ @@ -135,6 +156,7 @@ def get_image(self, openstack_id, ignore_not_active): - ignore_not_active """ + pass def get_volume(self, volume_id): """ @@ -142,6 +164,7 @@ def get_volume(self, volume_id): - volume_id """ + pass def get_volumes_by_ids(self, volume_ids): """ @@ -149,6 +172,7 @@ def get_volumes_by_ids(self, volume_ids): - volume_ids """ + pass def resize_volume(self, volume_id, size): """ @@ -157,10 +181,9 @@ def resize_volume(self, volume_id, size): - size """ + pass - def open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): + def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): """ Creates/Updates a security group for a vm with a specific port range for a project @@ -172,6 +195,7 @@ def open_port_range_for_vm_in_project( - protocol """ + pass def delete_security_group_rule(self, openstack_id): """ @@ -179,6 +203,15 @@ def delete_security_group_rule(self, openstack_id): - openstack_id """ + pass + + def delete_server_security_groups(self, openstack_id): + """ + Parameters: + - openstack_id + + """ + pass def delete_server(self, openstack_id): """ @@ -189,6 +222,7 @@ def delete_server(self, openstack_id): - openstack_id: Id of the server. """ + pass def rescue_server(self, openstack_id, admin_pass, image_ref): """ @@ -198,6 +232,7 @@ def rescue_server(self, openstack_id, admin_pass, image_ref): - image_ref """ + pass def unrescue_server(self, openstack_id): """ @@ -205,23 +240,9 @@ def unrescue_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, - slurm_version, - metadata_token, - metadata_endpoint, - ): + 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, slurm_version, metadata_token, metadata_endpoint): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -239,6 +260,7 @@ def start_server( - metadata_endpoint """ + pass def is_bibigrid_available(self): pass @@ -250,21 +272,9 @@ def detach_ip_from_server(self, server_id, floating_ip): - floating_ip """ + pass - def start_server_with_custom_key( - self, - flavor_name, - image_name, - servername, - metadata, - research_environment, - volume_ids_path_new, - volume_ids_path_attach, - additional_security_group_ids, - additional_keys, - metadata_token, - metadata_endpoint, - ): + 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, additional_keys, metadata_token, metadata_endpoint): """ Start a new server with custom key for ansible. @@ -282,6 +292,7 @@ def start_server_with_custom_key( - metadata_endpoint """ + pass def exist_server(self, name): """ @@ -291,17 +302,9 @@ def exist_server(self, name): - name """ + pass - def create_and_deploy_playbook( - self, - public_key, - openstack_id, - conda_packages, - research_environment_template, - apt_packages, - create_only_backend, - base_url, - ): + def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): """ Create and deploy an ansible playbook @@ -315,6 +318,7 @@ def create_and_deploy_playbook( - base_url """ + pass def get_playbook_logs(self, openstack_id): """ @@ -324,12 +328,14 @@ def get_playbook_logs(self, openstack_id): - openstack_id """ + pass def has_forc(self): """ Get boolean if client has backend url configured """ + pass def get_forc_access_url(self): pass @@ -345,12 +351,14 @@ def create_backend(self, owner, user_path, template, upstream_url): - upstream_url """ + pass def get_backends(self): """ Get all backends """ + pass def get_backends_by_owner(self, owner): """ @@ -360,6 +368,7 @@ def get_backends_by_owner(self, owner): - owner """ + pass def get_backends_by_template(self, template): """ @@ -369,6 +378,7 @@ def get_backends_by_template(self, template): - template """ + pass def get_backend_by_id(self, id): """ @@ -378,6 +388,7 @@ def get_backend_by_id(self, id): - id """ + pass def set_metadata_server_data(self, ip, metadata): """ @@ -386,6 +397,7 @@ def set_metadata_server_data(self, ip, metadata): - metadata """ + pass def remove_metadata_server_data(self, ip): """ @@ -393,6 +405,7 @@ def remove_metadata_server_data(self, ip): - ip """ + pass def is_metadata_server_available(self): pass @@ -405,6 +418,7 @@ def delete_backend(self, id): - id """ + pass def add_user_to_backend(self, backend_id, user_id): """ @@ -415,6 +429,7 @@ def add_user_to_backend(self, backend_id, user_id): - user_id """ + pass def get_users_from_backend(self, backend_id): """ @@ -424,6 +439,7 @@ def get_users_from_backend(self, backend_id): - backend_id """ + pass def delete_user_from_backend(self, backend_id, user_id): """ @@ -434,6 +450,7 @@ def delete_user_from_backend(self, backend_id, user_id): - user_id """ + pass def get_allowed_templates(self): pass @@ -444,6 +461,7 @@ def get_servers(self): Returns: List of server instances. """ + pass def get_servers_by_ids(self, server_ids): """ @@ -454,6 +472,7 @@ def get_servers_by_ids(self, server_ids): - server_ids """ + pass def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -464,6 +483,7 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): - bibigrid_id """ + pass def get_security_group_id_by_name(self, name): """ @@ -471,10 +491,9 @@ def get_security_group_id_by_name(self, name): - name """ + 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 @@ -486,19 +505,9 @@ def scale_up_cluster( - batch_idx """ + pass - def add_cluster_machine( - self, - cluster_id, - cluster_user, - cluster_group_id, - image_name, - flavor_name, - name, - key_name, - batch_idx, - worker_idx, - ): + def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): """ Parameters: - cluster_id @@ -512,6 +521,7 @@ def add_cluster_machine( - worker_idx """ + pass def get_cluster_info(self, cluster_id): """ @@ -519,6 +529,7 @@ def get_cluster_info(self, cluster_id): - cluster_id """ + pass def get_cluster_status(self, cluster_id): """ @@ -526,6 +537,7 @@ def get_cluster_status(self, cluster_id): - cluster_id """ + pass def get_keypair_public_key_by_name(self, key_name): """ @@ -533,6 +545,7 @@ def get_keypair_public_key_by_name(self, key_name): - key_name """ + pass def delete_keypair(self, key_name): """ @@ -540,6 +553,7 @@ def delete_keypair(self, key_name): - key_name """ + pass def add_default_security_groups_to_server(self, openstack_id): """ @@ -547,23 +561,28 @@ def add_default_security_groups_to_server(self, openstack_id): - openstack_id """ + pass - def get_server(self, openstack_id): + def get_server(self, openstack_id, no_connection): """ Get a Server. Returns: A server instance. Parameters: - openstack_id: Id of the server. + - no_connection """ + pass - def get_server_by_unique_name(self, unique_name): + def get_server_by_unique_name(self, unique_name, no_connection): """ Parameters: - unique_name: Id of the server. + - no_connection """ + pass def stop_server(self, openstack_id): """ @@ -574,6 +593,7 @@ def stop_server(self, openstack_id): - openstack_id: Id of the server. """ + pass def create_snapshot(self, openstack_id, name, username, base_tags, description): """ @@ -589,6 +609,7 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): - description: Description of the new snapshot """ + pass def get_limits(self): """ @@ -598,6 +619,7 @@ def get_limits(self): 'totalInstancesUsed': totalInstancesUsed} """ + pass def start_cluster(self, public_keys, master_instance, worker_instances, user): """ @@ -608,6 +630,7 @@ def start_cluster(self, public_keys, master_instance, worker_instances, user): - user """ + pass def terminate_cluster(self, cluster_id): """ @@ -615,6 +638,7 @@ def terminate_cluster(self, cluster_id): - cluster_id """ + pass def delete_image(self, image_id): """ @@ -625,6 +649,7 @@ def delete_image(self, image_id): - image_id: Id of image """ + pass def detach_volume(self, volume_id, server_id): """ @@ -635,6 +660,7 @@ def detach_volume(self, volume_id, server_id): - server_id: Id of the server where the volume is attached """ + pass def delete_volume(self, volume_id): """ @@ -644,6 +670,7 @@ def delete_volume(self, volume_id): - volume_id """ + pass def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -655,6 +682,7 @@ def attach_volume_to_server(self, openstack_id, volume_id): - volume_id: Id of volume """ + pass def resume_server(self, openstack_id): """ @@ -664,6 +692,7 @@ def resume_server(self, openstack_id): - openstack_id: Id of the server """ + pass def create_volume(self, volume_name, volume_storage, metadata): """ @@ -675,6 +704,7 @@ def create_volume(self, volume_name, volume_storage, metadata): - metadata: Metadata for the new volume """ + pass def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -686,6 +716,7 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ + pass def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -697,6 +728,7 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - volume_snap_id: ID of volume snapshot """ + pass def create_volume_snapshot(self, volume_id, name, description): """ @@ -709,6 +741,7 @@ def create_volume_snapshot(self, volume_id, name, description): - description: Description for the volume snapshot """ + pass def get_volume_snapshot(self, name_or_id): """ @@ -719,6 +752,7 @@ def get_volume_snapshot(self, name_or_id): - name_or_id: Name or ID of volume snapshot """ + pass def delete_volume_snapshot(self, snapshot_id): """ @@ -728,6 +762,7 @@ def delete_volume_snapshot(self, snapshot_id): - snapshot_id """ + pass def reboot_hard_server(self, openstack_id): """ @@ -737,6 +772,7 @@ def reboot_hard_server(self, openstack_id): - openstack_id: Id of the server """ + pass def reboot_soft_server(self, openstack_id): """ @@ -746,6 +782,7 @@ def reboot_soft_server(self, openstack_id): - openstack_id: Id of the server """ + pass class Client(Iface): @@ -753,7 +790,6 @@ class Client(Iface): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ - def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: @@ -770,7 +806,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) @@ -790,9 +826,7 @@ def recv_is_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "is_version failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "is_version failed: unknown result") def get_client_version(self): """ @@ -804,9 +838,7 @@ def get_client_version(self): return self.recv_get_client_version() def send_get_client_version(self): - self._oprot.writeMessageBegin( - "get_client_version", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_client_version', TMessageType.CALL, self._seqid) args = get_client_version_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -825,10 +857,7 @@ def recv_get_client_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_client_version failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_client_version failed: unknown result") def get_gateway_ip(self): """ @@ -839,7 +868,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() @@ -858,19 +887,14 @@ def recv_get_gateway_ip(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_gateway_ip failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_gateway_ip failed: unknown result") def get_calculation_values(self): self.send_get_calculation_values() return self.recv_get_calculation_values() def send_get_calculation_values(self): - self._oprot.writeMessageBegin( - "get_calculation_values", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_calculation_values', TMessageType.CALL, self._seqid) args = get_calculation_values_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -889,10 +913,7 @@ def recv_get_calculation_values(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_calculation_values failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_calculation_values failed: unknown result") def import_keypair(self, keyname, public_key): """ @@ -908,7 +929,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 @@ -929,10 +950,7 @@ def recv_import_keypair(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "import_keypair failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "import_keypair failed: unknown result") def get_vm_ports(self, openstack_id): """ @@ -947,7 +965,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) @@ -969,9 +987,7 @@ def recv_get_vm_ports(self): return result.success if result.s is not None: raise result.s - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result") def add_udp_security_group(self, server_id): """ @@ -985,9 +1001,7 @@ def add_udp_security_group(self, server_id): self.recv_add_udp_security_group() def send_add_udp_security_group(self, server_id): - self._oprot.writeMessageBegin( - "add_udp_security_group", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_udp_security_group', TMessageType.CALL, self._seqid) args = add_udp_security_group_args() args.server_id = server_id args.write(self._oprot) @@ -1020,17 +1034,11 @@ def add_research_environment_security_group(self, server_id, security_group_name - security_group_name """ - self.send_add_research_environment_security_group( - server_id, 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 - ) + 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 @@ -1055,6 +1063,44 @@ def recv_add_research_environment_security_group(self): raise result.s return + def add_project_security_group_to_server(self, server_id, project_name, project_id): + """ + Parameters: + - server_id: OpenStack id of the server + - project_name + - project_id + + """ + self.send_add_project_security_group_to_server(server_id, project_name, project_id) + self.recv_add_project_security_group_to_server() + + def send_add_project_security_group_to_server(self, server_id, project_name, project_id): + self._oprot.writeMessageBegin('add_project_security_group_to_server', TMessageType.CALL, self._seqid) + args = add_project_security_group_to_server_args() + args.server_id = server_id + args.project_name = project_name + args.project_id = project_id + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_project_security_group_to_server(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_project_security_group_to_server_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. @@ -1068,9 +1114,7 @@ def add_metadata_to_server(self, openstack_id, metadata): 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 @@ -1105,7 +1149,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() @@ -1124,9 +1168,7 @@ def recv_get_flavors(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result") def get_images(self): """ @@ -1138,7 +1180,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() @@ -1157,9 +1199,7 @@ def recv_get_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_images failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_images failed: unknown result") def get_public_images(self): """ @@ -1171,9 +1211,7 @@ def get_public_images(self): return self.recv_get_public_images() def send_get_public_images(self): - self._oprot.writeMessageBegin( - "get_public_images", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_public_images', TMessageType.CALL, self._seqid) args = get_public_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1192,10 +1230,7 @@ def recv_get_public_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_public_images failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_public_images failed: unknown result") def get_private_images(self): """ @@ -1207,9 +1242,7 @@ def get_private_images(self): return self.recv_get_private_images() def send_get_private_images(self): - self._oprot.writeMessageBegin( - "get_private_images", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_private_images', TMessageType.CALL, self._seqid) args = get_private_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1228,10 +1261,7 @@ def recv_get_private_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_private_images failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_private_images failed: unknown result") def get_image(self, openstack_id, ignore_not_active): """ @@ -1247,7 +1277,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 @@ -1270,9 +1300,7 @@ def recv_get_image(self): return result.success if result.i is not None: raise result.i - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_image failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_image failed: unknown result") def get_volume(self, volume_id): """ @@ -1284,7 +1312,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) @@ -1306,9 +1334,7 @@ def recv_get_volume(self): return result.success if result.v is not None: raise result.v - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_volume failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume failed: unknown result") def get_volumes_by_ids(self, volume_ids): """ @@ -1320,9 +1346,7 @@ def get_volumes_by_ids(self, volume_ids): return self.recv_get_volumes_by_ids() def send_get_volumes_by_ids(self, volume_ids): - self._oprot.writeMessageBegin( - "get_volumes_by_ids", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_volumes_by_ids', TMessageType.CALL, self._seqid) args = get_volumes_by_ids_args() args.volume_ids = volume_ids args.write(self._oprot) @@ -1342,10 +1366,7 @@ def recv_get_volumes_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_volumes_by_ids failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volumes_by_ids failed: unknown result") def resize_volume(self, volume_id, size): """ @@ -1358,7 +1379,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 @@ -1381,9 +1402,7 @@ def recv_resize_volume(self): raise result.v return - def open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): + def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): """ Creates/Updates a security group for a vm with a specific port range for a project @@ -1395,17 +1414,11 @@ def open_port_range_for_vm_in_project( - protocol """ - self.send_open_port_range_for_vm_in_project( - range_start, range_stop, openstack_id, ethertype, protocol - ) + self.send_open_port_range_for_vm_in_project(range_start, range_stop, openstack_id, ethertype, protocol) return self.recv_open_port_range_for_vm_in_project() - def send_open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): - self._oprot.writeMessageBegin( - "open_port_range_for_vm_in_project", TMessageType.CALL, self._seqid - ) + def send_open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): + self._oprot.writeMessageBegin('open_port_range_for_vm_in_project', TMessageType.CALL, self._seqid) args = open_port_range_for_vm_in_project_args() args.range_start = range_start args.range_stop = range_stop @@ -1435,10 +1448,7 @@ def recv_open_port_range_for_vm_in_project(self): raise result.v if result.o is not None: raise result.o - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "open_port_range_for_vm_in_project failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "open_port_range_for_vm_in_project failed: unknown result") def delete_security_group_rule(self, openstack_id): """ @@ -1450,9 +1460,7 @@ def delete_security_group_rule(self, openstack_id): self.recv_delete_security_group_rule() def send_delete_security_group_rule(self, openstack_id): - self._oprot.writeMessageBegin( - "delete_security_group_rule", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_security_group_rule', TMessageType.CALL, self._seqid) args = delete_security_group_rule_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1476,6 +1484,40 @@ def recv_delete_security_group_rule(self): raise result.f return + def delete_server_security_groups(self, openstack_id): + """ + Parameters: + - openstack_id + + """ + self.send_delete_server_security_groups(openstack_id) + self.recv_delete_server_security_groups() + + def send_delete_server_security_groups(self, openstack_id): + self._oprot.writeMessageBegin('delete_server_security_groups', TMessageType.CALL, self._seqid) + args = delete_server_security_groups_args() + args.openstack_id = openstack_id + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_delete_server_security_groups(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = delete_server_security_groups_result() + result.read(iprot) + iprot.readMessageEnd() + if result.e is not None: + raise result.e + if result.f is not None: + raise result.f + return + def delete_server(self, openstack_id): """ Delete server. @@ -1489,7 +1531,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) @@ -1525,7 +1567,7 @@ def rescue_server(self, openstack_id, admin_pass, image_ref): self.recv_rescue_server() def send_rescue_server(self, openstack_id, admin_pass, image_ref): - self._oprot.writeMessageBegin("rescue_server", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('rescue_server', TMessageType.CALL, self._seqid) args = rescue_server_args() args.openstack_id = openstack_id args.admin_pass = admin_pass @@ -1561,7 +1603,7 @@ def unrescue_server(self, openstack_id): self.recv_unrescue_server() def send_unrescue_server(self, openstack_id): - self._oprot.writeMessageBegin("unrescue_server", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('unrescue_server', TMessageType.CALL, self._seqid) args = unrescue_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1585,22 +1627,7 @@ def recv_unrescue_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, - slurm_version, - metadata_token, - metadata_endpoint, - ): + 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, slurm_version, metadata_token, metadata_endpoint): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -1618,40 +1645,11 @@ def start_server( - metadata_endpoint """ - 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, - slurm_version, - metadata_token, - metadata_endpoint, - ) + 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, slurm_version, metadata_token, metadata_endpoint) 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, - slurm_version, - metadata_token, - metadata_endpoint, - ): - 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, slurm_version, metadata_token, metadata_endpoint): + self._oprot.writeMessageBegin('start_server', TMessageType.CALL, self._seqid) args = start_server_args() args.flavor_name = flavor_name args.image_name = image_name @@ -1693,18 +1691,14 @@ def recv_start_server(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException( - TApplicationException.MISSING_RESULT, "start_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server failed: unknown result") def is_bibigrid_available(self): self.send_is_bibigrid_available() return self.recv_is_bibigrid_available() def send_is_bibigrid_available(self): - self._oprot.writeMessageBegin( - "is_bibigrid_available", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('is_bibigrid_available', TMessageType.CALL, self._seqid) args = is_bibigrid_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1723,10 +1717,7 @@ def recv_is_bibigrid_available(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "is_bibigrid_available failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "is_bibigrid_available failed: unknown result") def detach_ip_from_server(self, server_id, floating_ip): """ @@ -1739,9 +1730,7 @@ def detach_ip_from_server(self, server_id, floating_ip): self.recv_detach_ip_from_server() def send_detach_ip_from_server(self, server_id, floating_ip): - self._oprot.writeMessageBegin( - "detach_ip_from_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('detach_ip_from_server', TMessageType.CALL, self._seqid) args = detach_ip_from_server_args() args.server_id = server_id args.floating_ip = floating_ip @@ -1764,20 +1753,7 @@ def recv_detach_ip_from_server(self): raise result.s return - def start_server_with_custom_key( - self, - flavor_name, - image_name, - servername, - metadata, - research_environment, - volume_ids_path_new, - volume_ids_path_attach, - additional_security_group_ids, - additional_keys, - metadata_token, - metadata_endpoint, - ): + 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, additional_keys, metadata_token, metadata_endpoint): """ Start a new server with custom key for ansible. @@ -1795,38 +1771,11 @@ def start_server_with_custom_key( - metadata_endpoint """ - 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, - additional_keys, - metadata_token, - metadata_endpoint, - ) + 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, additional_keys, metadata_token, metadata_endpoint) 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, - additional_keys, - metadata_token, - metadata_endpoint, - ): - 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, additional_keys, metadata_token, metadata_endpoint): + 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 @@ -1866,10 +1815,7 @@ def recv_start_server_with_custom_key(self): raise result.f if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "start_server_with_custom_key failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_with_custom_key failed: unknown result") def exist_server(self, name): """ @@ -1883,7 +1829,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) @@ -1903,20 +1849,9 @@ def recv_exist_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "exist_server failed: unknown result" - ) - - def create_and_deploy_playbook( - self, - public_key, - openstack_id, - conda_packages, - research_environment_template, - apt_packages, - create_only_backend, - base_url, - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "exist_server failed: unknown result") + + def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): """ Create and deploy an ansible playbook @@ -1930,30 +1865,11 @@ def create_and_deploy_playbook( - base_url """ - self.send_create_and_deploy_playbook( - public_key, - openstack_id, - conda_packages, - research_environment_template, - apt_packages, - create_only_backend, - base_url, - ) + self.send_create_and_deploy_playbook(public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url) return self.recv_create_and_deploy_playbook() - def send_create_and_deploy_playbook( - self, - public_key, - openstack_id, - conda_packages, - research_environment_template, - apt_packages, - create_only_backend, - base_url, - ): - self._oprot.writeMessageBegin( - "create_and_deploy_playbook", TMessageType.CALL, self._seqid - ) + def send_create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): + self._oprot.writeMessageBegin('create_and_deploy_playbook', TMessageType.CALL, self._seqid) args = create_and_deploy_playbook_args() args.public_key = public_key args.openstack_id = openstack_id @@ -1981,10 +1897,7 @@ def recv_create_and_deploy_playbook(self): return result.success if result.s is not None: raise result.s - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_and_deploy_playbook failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_and_deploy_playbook failed: unknown result") def get_playbook_logs(self, openstack_id): """ @@ -1998,9 +1911,7 @@ def get_playbook_logs(self, openstack_id): return self.recv_get_playbook_logs() def send_get_playbook_logs(self, openstack_id): - self._oprot.writeMessageBegin( - "get_playbook_logs", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_playbook_logs', TMessageType.CALL, self._seqid) args = get_playbook_logs_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2022,10 +1933,7 @@ def recv_get_playbook_logs(self): return result.success if result.p is not None: raise result.p - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_playbook_logs failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_playbook_logs failed: unknown result") def has_forc(self): """ @@ -2036,7 +1944,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() @@ -2055,18 +1963,14 @@ def recv_has_forc(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "has_forc failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "has_forc failed: unknown result") def get_forc_access_url(self): self.send_get_forc_access_url() return self.recv_get_forc_access_url() def send_get_forc_access_url(self): - self._oprot.writeMessageBegin( - "get_forc_access_url", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_forc_access_url', TMessageType.CALL, self._seqid) args = get_forc_access_url_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2085,10 +1989,7 @@ def recv_get_forc_access_url(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_forc_access_url failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_forc_access_url failed: unknown result") def create_backend(self, owner, user_path, template, upstream_url): """ @@ -2105,7 +2006,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 @@ -2132,10 +2033,7 @@ def recv_create_backend(self): raise result.e if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_backend failed: unknown result") def get_backends(self): """ @@ -2146,7 +2044,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() @@ -2167,9 +2065,7 @@ def recv_get_backends(self): return result.success if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_backends failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends failed: unknown result") def get_backends_by_owner(self, owner): """ @@ -2183,9 +2079,7 @@ def get_backends_by_owner(self, owner): return self.recv_get_backends_by_owner() def send_get_backends_by_owner(self, owner): - self._oprot.writeMessageBegin( - "get_backends_by_owner", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_backends_by_owner', TMessageType.CALL, self._seqid) args = get_backends_by_owner_args() args.owner = owner args.write(self._oprot) @@ -2207,10 +2101,7 @@ def recv_get_backends_by_owner(self): return result.success if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_backends_by_owner failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_owner failed: unknown result") def get_backends_by_template(self, template): """ @@ -2224,9 +2115,7 @@ def get_backends_by_template(self, template): return self.recv_get_backends_by_template() def send_get_backends_by_template(self, template): - self._oprot.writeMessageBegin( - "get_backends_by_template", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_backends_by_template', TMessageType.CALL, self._seqid) args = get_backends_by_template_args() args.template = template args.write(self._oprot) @@ -2248,10 +2137,7 @@ def recv_get_backends_by_template(self): return result.success if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_backends_by_template failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_template failed: unknown result") def get_backend_by_id(self, id): """ @@ -2265,9 +2151,7 @@ def get_backend_by_id(self, id): return self.recv_get_backend_by_id() def send_get_backend_by_id(self, id): - self._oprot.writeMessageBegin( - "get_backend_by_id", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_backend_by_id', TMessageType.CALL, self._seqid) args = get_backend_by_id_args() args.id = id args.write(self._oprot) @@ -2291,10 +2175,7 @@ def recv_get_backend_by_id(self): raise result.b if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_backend_by_id failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backend_by_id failed: unknown result") def set_metadata_server_data(self, ip, metadata): """ @@ -2307,9 +2188,7 @@ def set_metadata_server_data(self, ip, metadata): self.recv_set_metadata_server_data() def send_set_metadata_server_data(self, ip, metadata): - self._oprot.writeMessageBegin( - "set_metadata_server_data", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('set_metadata_server_data', TMessageType.CALL, self._seqid) args = set_metadata_server_data_args() args.ip = ip args.metadata = metadata @@ -2344,9 +2223,7 @@ def remove_metadata_server_data(self, ip): self.recv_remove_metadata_server_data() def send_remove_metadata_server_data(self, ip): - self._oprot.writeMessageBegin( - "remove_metadata_server_data", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('remove_metadata_server_data', TMessageType.CALL, self._seqid) args = remove_metadata_server_data_args() args.ip = ip args.write(self._oprot) @@ -2375,9 +2252,7 @@ def is_metadata_server_available(self): self.recv_is_metadata_server_available() def send_is_metadata_server_available(self): - self._oprot.writeMessageBegin( - "is_metadata_server_available", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('is_metadata_server_available', TMessageType.CALL, self._seqid) args = is_metadata_server_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2412,7 +2287,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) @@ -2447,9 +2322,7 @@ def add_user_to_backend(self, backend_id, user_id): return self.recv_add_user_to_backend() def send_add_user_to_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin( - "add_user_to_backend", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_user_to_backend', TMessageType.CALL, self._seqid) args = add_user_to_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -2472,10 +2345,7 @@ def recv_add_user_to_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "add_user_to_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_user_to_backend failed: unknown result") def get_users_from_backend(self, backend_id): """ @@ -2489,9 +2359,7 @@ def get_users_from_backend(self, backend_id): return self.recv_get_users_from_backend() def send_get_users_from_backend(self, backend_id): - self._oprot.writeMessageBegin( - "get_users_from_backend", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_users_from_backend', TMessageType.CALL, self._seqid) args = get_users_from_backend_args() args.backend_id = backend_id args.write(self._oprot) @@ -2513,10 +2381,7 @@ def recv_get_users_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_users_from_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_users_from_backend failed: unknown result") def delete_user_from_backend(self, backend_id, user_id): """ @@ -2531,9 +2396,7 @@ def delete_user_from_backend(self, backend_id, user_id): return self.recv_delete_user_from_backend() def send_delete_user_from_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin( - "delete_user_from_backend", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_user_from_backend', TMessageType.CALL, self._seqid) args = delete_user_from_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -2556,19 +2419,14 @@ def recv_delete_user_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "delete_user_from_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_user_from_backend failed: unknown result") def get_allowed_templates(self): self.send_get_allowed_templates() return self.recv_get_allowed_templates() def send_get_allowed_templates(self): - self._oprot.writeMessageBegin( - "get_allowed_templates", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_allowed_templates', TMessageType.CALL, self._seqid) args = get_allowed_templates_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2587,10 +2445,7 @@ def recv_get_allowed_templates(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_allowed_templates failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_allowed_templates failed: unknown result") def get_servers(self): """ @@ -2602,7 +2457,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() @@ -2621,9 +2476,7 @@ def recv_get_servers(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_servers failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers failed: unknown result") def get_servers_by_ids(self, server_ids): """ @@ -2638,9 +2491,7 @@ def get_servers_by_ids(self, server_ids): return self.recv_get_servers_by_ids() def send_get_servers_by_ids(self, server_ids): - self._oprot.writeMessageBegin( - "get_servers_by_ids", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_servers_by_ids', TMessageType.CALL, self._seqid) args = get_servers_by_ids_args() args.server_ids = server_ids args.write(self._oprot) @@ -2660,10 +2511,7 @@ def recv_get_servers_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_servers_by_ids failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_ids failed: unknown result") def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -2678,9 +2526,7 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): return self.recv_get_servers_by_bibigrid_id() def send_get_servers_by_bibigrid_id(self, bibigrid_id): - self._oprot.writeMessageBegin( - "get_servers_by_bibigrid_id", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_servers_by_bibigrid_id', TMessageType.CALL, self._seqid) args = get_servers_by_bibigrid_id_args() args.bibigrid_id = bibigrid_id args.write(self._oprot) @@ -2700,10 +2546,7 @@ 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 get_security_group_id_by_name(self, name): """ @@ -2715,9 +2558,7 @@ def get_security_group_id_by_name(self, name): return self.recv_get_security_group_id_by_name() def send_get_security_group_id_by_name(self, name): - self._oprot.writeMessageBegin( - "get_security_group_id_by_name", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_security_group_id_by_name', TMessageType.CALL, self._seqid) args = get_security_group_id_by_name_args() args.name = name args.write(self._oprot) @@ -2739,14 +2580,9 @@ def recv_get_security_group_id_by_name(self): return result.success if result.s is not None: raise result.s - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_security_group_id_by_name failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_security_group_id_by_name 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 @@ -2758,17 +2594,11 @@ def scale_up_cluster( - batch_idx """ - self.send_scale_up_cluster( - cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx - ) + self.send_scale_up_cluster(cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx) return self.recv_scale_up_cluster() - def send_scale_up_cluster( - self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx - ): - self._oprot.writeMessageBegin( - "scale_up_cluster", TMessageType.CALL, self._seqid - ) + def send_scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): + self._oprot.writeMessageBegin('scale_up_cluster', TMessageType.CALL, self._seqid) args = scale_up_cluster_args() args.cluster_id = cluster_id args.image_name = image_name @@ -2794,23 +2624,9 @@ def recv_scale_up_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "scale_up_cluster failed: unknown result", - ) - - def add_cluster_machine( - self, - cluster_id, - cluster_user, - cluster_group_id, - image_name, - flavor_name, - name, - key_name, - batch_idx, - worker_idx, - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "scale_up_cluster failed: unknown result") + + def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): """ Parameters: - cluster_id @@ -2824,34 +2640,11 @@ def add_cluster_machine( - worker_idx """ - self.send_add_cluster_machine( - cluster_id, - cluster_user, - cluster_group_id, - image_name, - flavor_name, - name, - key_name, - batch_idx, - worker_idx, - ) + self.send_add_cluster_machine(cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx) return self.recv_add_cluster_machine() - def send_add_cluster_machine( - self, - cluster_id, - cluster_user, - cluster_group_id, - image_name, - flavor_name, - name, - key_name, - batch_idx, - worker_idx, - ): - self._oprot.writeMessageBegin( - "add_cluster_machine", TMessageType.CALL, self._seqid - ) + def send_add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): + self._oprot.writeMessageBegin('add_cluster_machine', TMessageType.CALL, self._seqid) args = add_cluster_machine_args() args.cluster_id = cluster_id args.cluster_user = cluster_user @@ -2879,10 +2672,7 @@ def recv_add_cluster_machine(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "add_cluster_machine failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_cluster_machine failed: unknown result") def get_cluster_info(self, cluster_id): """ @@ -2894,9 +2684,7 @@ def get_cluster_info(self, cluster_id): return self.recv_get_cluster_info() def send_get_cluster_info(self, cluster_id): - self._oprot.writeMessageBegin( - "get_cluster_info", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_cluster_info', TMessageType.CALL, self._seqid) args = get_cluster_info_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2918,10 +2706,7 @@ def recv_get_cluster_info(self): return result.success if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_cluster_info failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_info failed: unknown result") def get_cluster_status(self, cluster_id): """ @@ -2933,9 +2718,7 @@ def get_cluster_status(self, cluster_id): return self.recv_get_cluster_status() def send_get_cluster_status(self, cluster_id): - self._oprot.writeMessageBegin( - "get_cluster_status", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_cluster_status', TMessageType.CALL, self._seqid) args = get_cluster_status_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2957,10 +2740,7 @@ def recv_get_cluster_status(self): return result.success if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_cluster_status failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_status failed: unknown result") def get_keypair_public_key_by_name(self, key_name): """ @@ -2972,9 +2752,7 @@ def get_keypair_public_key_by_name(self, key_name): return self.recv_get_keypair_public_key_by_name() def send_get_keypair_public_key_by_name(self, key_name): - self._oprot.writeMessageBegin( - "get_keypair_public_key_by_name", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_keypair_public_key_by_name', TMessageType.CALL, self._seqid) args = get_keypair_public_key_by_name_args() args.key_name = key_name args.write(self._oprot) @@ -2994,10 +2772,7 @@ def recv_get_keypair_public_key_by_name(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_keypair_public_key_by_name failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_keypair_public_key_by_name failed: unknown result") def delete_keypair(self, key_name): """ @@ -3009,7 +2784,7 @@ def delete_keypair(self, key_name): self.recv_delete_keypair() def send_delete_keypair(self, key_name): - self._oprot.writeMessageBegin("delete_keypair", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('delete_keypair', TMessageType.CALL, self._seqid) args = delete_keypair_args() args.key_name = key_name args.write(self._oprot) @@ -3039,9 +2814,7 @@ def add_default_security_groups_to_server(self, openstack_id): self.recv_add_default_security_groups_to_server() def send_add_default_security_groups_to_server(self, openstack_id): - self._oprot.writeMessageBegin( - "add_default_security_groups_to_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_default_security_groups_to_server', TMessageType.CALL, self._seqid) args = add_default_security_groups_to_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3063,22 +2836,24 @@ def recv_add_default_security_groups_to_server(self): raise result.e return - def get_server(self, openstack_id): + def get_server(self, openstack_id, no_connection): """ Get a Server. Returns: A server instance. Parameters: - openstack_id: Id of the server. + - no_connection """ - self.send_get_server(openstack_id) + self.send_get_server(openstack_id, no_connection) return self.recv_get_server() - def send_get_server(self, openstack_id): - self._oprot.writeMessageBegin("get_server", TMessageType.CALL, self._seqid) + def send_get_server(self, openstack_id, no_connection): + self._oprot.writeMessageBegin('get_server', TMessageType.CALL, self._seqid) args = get_server_args() args.openstack_id = openstack_id + args.no_connection = no_connection args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -3098,25 +2873,23 @@ 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 get_server_by_unique_name(self, unique_name): + def get_server_by_unique_name(self, unique_name, no_connection): """ Parameters: - unique_name: Id of the server. + - no_connection """ - self.send_get_server_by_unique_name(unique_name) + self.send_get_server_by_unique_name(unique_name, no_connection) return self.recv_get_server_by_unique_name() - def send_get_server_by_unique_name(self, unique_name): - self._oprot.writeMessageBegin( - "get_server_by_unique_name", TMessageType.CALL, self._seqid - ) + def send_get_server_by_unique_name(self, unique_name, no_connection): + self._oprot.writeMessageBegin('get_server_by_unique_name', TMessageType.CALL, self._seqid) args = get_server_by_unique_name_args() args.unique_name = unique_name + args.no_connection = no_connection args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -3136,10 +2909,7 @@ def recv_get_server_by_unique_name(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_server_by_unique_name failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server_by_unique_name failed: unknown result") def stop_server(self, openstack_id): """ @@ -3154,7 +2924,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) @@ -3195,10 +2965,8 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): self.send_create_snapshot(openstack_id, name, username, base_tags, description) return self.recv_create_snapshot() - def send_create_snapshot( - self, openstack_id, name, username, base_tags, description - ): - self._oprot.writeMessageBegin("create_snapshot", TMessageType.CALL, self._seqid) + def send_create_snapshot(self, openstack_id, name, username, base_tags, description): + self._oprot.writeMessageBegin('create_snapshot', TMessageType.CALL, self._seqid) args = create_snapshot_args() args.openstack_id = openstack_id args.name = name @@ -3226,10 +2994,7 @@ def recv_create_snapshot(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_snapshot failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_snapshot failed: unknown result") def get_limits(self): """ @@ -3243,7 +3008,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() @@ -3262,9 +3027,7 @@ def recv_get_limits(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_limits failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_limits failed: unknown result") def start_cluster(self, public_keys, master_instance, worker_instances, user): """ @@ -3279,7 +3042,7 @@ def start_cluster(self, public_keys, master_instance, worker_instances, user): return self.recv_start_cluster() def send_start_cluster(self, public_keys, 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_keys = public_keys args.master_instance = master_instance @@ -3302,9 +3065,7 @@ def recv_start_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result") def terminate_cluster(self, cluster_id): """ @@ -3316,9 +3077,7 @@ def terminate_cluster(self, cluster_id): return self.recv_terminate_cluster() def send_terminate_cluster(self, cluster_id): - self._oprot.writeMessageBegin( - "terminate_cluster", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('terminate_cluster', TMessageType.CALL, self._seqid) args = terminate_cluster_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -3340,10 +3099,7 @@ def recv_terminate_cluster(self): return result.success if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "terminate_cluster failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "terminate_cluster failed: unknown result") def delete_image(self, image_id): """ @@ -3358,7 +3114,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) @@ -3393,7 +3149,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 @@ -3432,7 +3188,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) @@ -3470,9 +3226,7 @@ def attach_volume_to_server(self, openstack_id, volume_id): return self.recv_attach_volume_to_server() def send_attach_volume_to_server(self, openstack_id, volume_id): - self._oprot.writeMessageBegin( - "attach_volume_to_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('attach_volume_to_server', TMessageType.CALL, self._seqid) args = attach_volume_to_server_args() args.openstack_id = openstack_id args.volume_id = volume_id @@ -3497,10 +3251,7 @@ def recv_attach_volume_to_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "attach_volume_to_server failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "attach_volume_to_server failed: unknown result") def resume_server(self, openstack_id): """ @@ -3514,7 +3265,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) @@ -3552,7 +3303,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 @@ -3578,9 +3329,7 @@ def recv_create_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException( - TApplicationException.MISSING_RESULT, "create_volume failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume failed: unknown result") def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -3592,17 +3341,11 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ - self.send_create_volume_by_source_volume( - volume_name, metadata, source_volume_id - ) + self.send_create_volume_by_source_volume(volume_name, metadata, source_volume_id) return self.recv_create_volume_by_source_volume() - def send_create_volume_by_source_volume( - self, volume_name, metadata, source_volume_id - ): - self._oprot.writeMessageBegin( - "create_volume_by_source_volume", TMessageType.CALL, self._seqid - ) + def send_create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): + self._oprot.writeMessageBegin('create_volume_by_source_volume', TMessageType.CALL, self._seqid) args = create_volume_by_source_volume_args() args.volume_name = volume_name args.metadata = metadata @@ -3628,10 +3371,7 @@ def recv_create_volume_by_source_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_volume_by_source_volume failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_source_volume failed: unknown result") def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -3647,9 +3387,7 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): return self.recv_create_volume_by_volume_snap() def send_create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - self._oprot.writeMessageBegin( - "create_volume_by_volume_snap", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('create_volume_by_volume_snap', TMessageType.CALL, self._seqid) args = create_volume_by_volume_snap_args() args.volume_name = volume_name args.metadata = metadata @@ -3675,10 +3413,7 @@ def recv_create_volume_by_volume_snap(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_volume_by_volume_snap failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_volume_snap failed: unknown result") def create_volume_snapshot(self, volume_id, name, description): """ @@ -3695,9 +3430,7 @@ def create_volume_snapshot(self, volume_id, name, description): return self.recv_create_volume_snapshot() def send_create_volume_snapshot(self, volume_id, name, description): - self._oprot.writeMessageBegin( - "create_volume_snapshot", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('create_volume_snapshot', TMessageType.CALL, self._seqid) args = create_volume_snapshot_args() args.volume_id = volume_id args.name = name @@ -3723,10 +3456,7 @@ def recv_create_volume_snapshot(self): raise result.e if result.r is not None: raise result.r - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_volume_snapshot failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_snapshot failed: unknown result") def get_volume_snapshot(self, name_or_id): """ @@ -3741,9 +3471,7 @@ def get_volume_snapshot(self, name_or_id): return self.recv_get_volume_snapshot() def send_get_volume_snapshot(self, name_or_id): - self._oprot.writeMessageBegin( - "get_volume_snapshot", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_volume_snapshot', TMessageType.CALL, self._seqid) args = get_volume_snapshot_args() args.name_or_id = name_or_id args.write(self._oprot) @@ -3765,10 +3493,7 @@ def recv_get_volume_snapshot(self): return result.success if result.r is not None: raise result.r - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_volume_snapshot failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume_snapshot failed: unknown result") def delete_volume_snapshot(self, snapshot_id): """ @@ -3782,9 +3507,7 @@ def delete_volume_snapshot(self, snapshot_id): self.recv_delete_volume_snapshot() def send_delete_volume_snapshot(self, snapshot_id): - self._oprot.writeMessageBegin( - "delete_volume_snapshot", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_volume_snapshot', TMessageType.CALL, self._seqid) args = delete_volume_snapshot_args() args.snapshot_id = snapshot_id args.write(self._oprot) @@ -3820,9 +3543,7 @@ def reboot_hard_server(self, openstack_id): self.recv_reboot_hard_server() def send_reboot_hard_server(self, openstack_id): - self._oprot.writeMessageBegin( - "reboot_hard_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('reboot_hard_server', TMessageType.CALL, self._seqid) args = reboot_hard_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3858,9 +3579,7 @@ def reboot_soft_server(self, openstack_id): self.recv_reboot_soft_server() def send_reboot_soft_server(self, openstack_id): - self._oprot.writeMessageBegin( - "reboot_soft_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('reboot_soft_server', TMessageType.CALL, self._seqid) args = reboot_soft_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3892,20 +3611,13 @@ 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_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["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_project_security_group_to_server"] = Processor.process_add_project_security_group_to_server + 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 @@ -3914,84 +3626,47 @@ 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_security_groups"] = Processor.process_delete_server_security_groups self._processMap["delete_server"] = Processor.process_delete_server self._processMap["rescue_server"] = Processor.process_rescue_server self._processMap["unrescue_server"] = Processor.process_unrescue_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_access_url"] = Processor.process_get_forc_access_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["set_metadata_server_data"] = ( - Processor.process_set_metadata_server_data - ) - self._processMap["remove_metadata_server_data"] = ( - Processor.process_remove_metadata_server_data - ) - self._processMap["is_metadata_server_available"] = ( - Processor.process_is_metadata_server_available - ) + self._processMap["set_metadata_server_data"] = Processor.process_set_metadata_server_data + self._processMap["remove_metadata_server_data"] = Processor.process_remove_metadata_server_data + self._processMap["is_metadata_server_available"] = Processor.process_is_metadata_server_available 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_security_group_id_by_name"] = ( - Processor.process_get_security_group_id_by_name - ) + self._processMap["get_servers_by_bibigrid_id"] = Processor.process_get_servers_by_bibigrid_id + self._processMap["get_security_group_id_by_name"] = Processor.process_get_security_group_id_by_name 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 self._processMap["get_cluster_status"] = Processor.process_get_cluster_status - self._processMap["get_keypair_public_key_by_name"] = ( - Processor.process_get_keypair_public_key_by_name - ) + self._processMap["get_keypair_public_key_by_name"] = Processor.process_get_keypair_public_key_by_name self._processMap["delete_keypair"] = Processor.process_delete_keypair - self._processMap["add_default_security_groups_to_server"] = ( - Processor.process_add_default_security_groups_to_server - ) + self._processMap["add_default_security_groups_to_server"] = Processor.process_add_default_security_groups_to_server self._processMap["get_server"] = Processor.process_get_server - self._processMap["get_server_by_unique_name"] = ( - Processor.process_get_server_by_unique_name - ) + self._processMap["get_server_by_unique_name"] = Processor.process_get_server_by_unique_name self._processMap["stop_server"] = Processor.process_stop_server self._processMap["create_snapshot"] = Processor.process_create_snapshot self._processMap["get_limits"] = Processor.process_get_limits @@ -4000,24 +3675,14 @@ def __init__(self, handler): self._processMap["delete_image"] = Processor.process_delete_image self._processMap["detach_volume"] = Processor.process_detach_volume self._processMap["delete_volume"] = Processor.process_delete_volume - self._processMap["attach_volume_to_server"] = ( - Processor.process_attach_volume_to_server - ) + self._processMap["attach_volume_to_server"] = Processor.process_attach_volume_to_server self._processMap["resume_server"] = Processor.process_resume_server self._processMap["create_volume"] = Processor.process_create_volume - self._processMap["create_volume_by_source_volume"] = ( - Processor.process_create_volume_by_source_volume - ) - self._processMap["create_volume_by_volume_snap"] = ( - Processor.process_create_volume_by_volume_snap - ) - self._processMap["create_volume_snapshot"] = ( - Processor.process_create_volume_snapshot - ) + self._processMap["create_volume_by_source_volume"] = Processor.process_create_volume_by_source_volume + self._processMap["create_volume_by_volume_snap"] = Processor.process_create_volume_by_volume_snap + self._processMap["create_volume_snapshot"] = Processor.process_create_volume_snapshot self._processMap["get_volume_snapshot"] = Processor.process_get_volume_snapshot - self._processMap["delete_volume_snapshot"] = ( - Processor.process_delete_volume_snapshot - ) + self._processMap["delete_volume_snapshot"] = Processor.process_delete_volume_snapshot self._processMap["reboot_hard_server"] = Processor.process_reboot_hard_server self._processMap["reboot_soft_server"] = Processor.process_reboot_soft_server self._on_message_begin = None @@ -4032,9 +3697,7 @@ def process(self, iprot, oprot): if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() - x = TApplicationException( - TApplicationException.UNKNOWN_METHOD, "Unknown function %s" % (name) - ) + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() @@ -4055,15 +3718,13 @@ def process_is_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("is_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4080,15 +3741,13 @@ def process_get_client_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_client_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4105,15 +3764,13 @@ def process_get_gateway_ip(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_gateway_ip", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4130,15 +3787,13 @@ def process_get_calculation_values(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_calculation_values", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4155,15 +3810,13 @@ def process_import_keypair(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("import_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4183,15 +3836,13 @@ def process_get_vm_ports(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_vm_ports", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4214,15 +3865,13 @@ def process_add_udp_security_group(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_udp_security_group", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4234,9 +3883,7 @@ def process_add_research_environment_security_group(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_research_environment_security_group_result() try: - self._handler.add_research_environment_security_group( - args.server_id, args.security_group_name - ) + self._handler.add_research_environment_security_group(args.server_id, args.security_group_name) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4247,18 +3894,43 @@ def process_add_research_environment_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" - ) - oprot.writeMessageBegin( - "add_research_environment_security_group", msg_type, seqid - ) + 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_project_security_group_to_server(self, seqid, iprot, oprot): + args = add_project_security_group_to_server_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_project_security_group_to_server_result() + try: + self._handler.add_project_security_group_to_server(args.server_id, args.project_name, args.project_id) + 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_project_security_group_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -4280,15 +3952,13 @@ def process_add_metadata_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_metadata_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4305,15 +3975,13 @@ def process_get_flavors(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_flavors", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4330,15 +3998,13 @@ def process_get_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4355,15 +4021,13 @@ def process_get_public_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_public_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4380,15 +4044,13 @@ def process_get_private_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_private_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4400,9 +4062,7 @@ def process_get_image(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_image_result() try: - result.success = self._handler.get_image( - args.openstack_id, args.ignore_not_active - ) + result.success = self._handler.get_image(args.openstack_id, args.ignore_not_active) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4410,15 +4070,13 @@ def process_get_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.i = i except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4438,15 +4096,13 @@ def process_get_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4463,15 +4119,13 @@ def process_get_volumes_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_volumes_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4491,15 +4145,13 @@ def process_resize_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resize_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4511,13 +4163,7 @@ def process_open_port_range_for_vm_in_project(self, seqid, iprot, oprot): iprot.readMessageEnd() result = open_port_range_for_vm_in_project_result() try: - result.success = self._handler.open_port_range_for_vm_in_project( - args.range_start, - args.range_stop, - args.openstack_id, - args.ethertype, - args.protocol, - ) + result.success = self._handler.open_port_range_for_vm_in_project(args.range_start, args.range_stop, args.openstack_id, args.ethertype, args.protocol) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4531,15 +4177,13 @@ def process_open_port_range_for_vm_in_project(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("open_port_range_for_vm_in_project", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4562,20 +4206,47 @@ 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() oprot.trans.flush() + def process_delete_server_security_groups(self, seqid, iprot, oprot): + args = delete_server_security_groups_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_server_security_groups_result() + try: + self._handler.delete_server_security_groups(args.openstack_id) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except SecurityGroupRuleNotFoundException as e: + msg_type = TMessageType.REPLY + result.e = e + except DefaultException as f: + msg_type = TMessageType.REPLY + result.f = f + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + 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("delete_server_security_groups", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_delete_server(self, seqid, iprot, oprot): args = delete_server_args() args.read(iprot) @@ -4593,15 +4264,13 @@ def process_delete_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4613,9 +4282,7 @@ def process_rescue_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = rescue_server_result() try: - self._handler.rescue_server( - args.openstack_id, args.admin_pass, args.image_ref - ) + self._handler.rescue_server(args.openstack_id, args.admin_pass, args.image_ref) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4626,15 +4293,13 @@ def process_rescue_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("rescue_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4657,15 +4322,13 @@ def process_unrescue_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("unrescue_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4677,21 +4340,7 @@ def process_start_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_result() try: - result.success = self._handler.start_server( - args.flavor_name, - args.image_name, - args.public_key, - args.servername, - args.metadata, - args.volume_ids_path_new, - args.volume_ids_path_attach, - args.additional_keys, - args.research_environment, - args.additional_security_group_ids, - args.slurm_version, - args.metadata_token, - args.metadata_endpoint, - ) + 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, args.slurm_version, args.metadata_token, args.metadata_endpoint) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4711,15 +4360,13 @@ def process_start_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("start_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4736,15 +4383,13 @@ def process_is_bibigrid_available(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("is_bibigrid_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4764,15 +4409,13 @@ def process_detach_ip_from_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("detach_ip_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4784,19 +4427,7 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_with_custom_key_result() try: - result.success = self._handler.start_server_with_custom_key( - args.flavor_name, - args.image_name, - args.servername, - args.metadata, - args.research_environment, - args.volume_ids_path_new, - args.volume_ids_path_attach, - args.additional_security_group_ids, - args.additional_keys, - args.metadata_token, - args.metadata_endpoint, - ) + 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, args.additional_keys, args.metadata_token, args.metadata_endpoint) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4816,15 +4447,13 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("start_server_with_custom_key", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4841,15 +4470,13 @@ def process_exist_server(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("exist_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4861,15 +4488,7 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_and_deploy_playbook_result() try: - result.success = self._handler.create_and_deploy_playbook( - args.public_key, - args.openstack_id, - args.conda_packages, - args.research_environment_template, - args.apt_packages, - args.create_only_backend, - args.base_url, - ) + result.success = self._handler.create_and_deploy_playbook(args.public_key, args.openstack_id, args.conda_packages, args.research_environment_template, args.apt_packages, args.create_only_backend, args.base_url) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4877,15 +4496,13 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_and_deploy_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4905,15 +4522,13 @@ def process_get_playbook_logs(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.p = p except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_playbook_logs", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4930,15 +4545,13 @@ def process_has_forc(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("has_forc", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4955,15 +4568,13 @@ def process_get_forc_access_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_access_url", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4975,9 +4586,7 @@ def process_create_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_backend_result() try: - result.success = self._handler.create_backend( - args.owner, args.user_path, args.template, args.upstream_url - ) + result.success = self._handler.create_backend(args.owner, args.user_path, args.template, args.upstream_url) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4988,15 +4597,13 @@ def process_create_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5016,15 +4623,13 @@ def process_get_backends(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_backends", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5044,15 +4649,13 @@ def process_get_backends_by_owner(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_backends_by_owner", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5072,15 +4675,13 @@ def process_get_backends_by_template(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_backends_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5103,15 +4704,13 @@ def process_get_backend_by_id(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_backend_by_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5134,15 +4733,13 @@ def process_set_metadata_server_data(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("set_metadata_server_data", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5165,15 +4762,13 @@ def process_remove_metadata_server_data(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("remove_metadata_server_data", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5196,15 +4791,13 @@ def process_is_metadata_server_available(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("is_metadata_server_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5224,15 +4817,13 @@ def process_delete_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5244,9 +4835,7 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_user_to_backend_result() try: - result.success = self._handler.add_user_to_backend( - args.backend_id, args.user_id - ) + result.success = self._handler.add_user_to_backend(args.backend_id, args.user_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5254,15 +4843,13 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_user_to_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5282,15 +4869,13 @@ def process_get_users_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_users_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5302,9 +4887,7 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_user_from_backend_result() try: - result.success = self._handler.delete_user_from_backend( - args.backend_id, args.user_id - ) + result.success = self._handler.delete_user_from_backend(args.backend_id, args.user_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5312,15 +4895,13 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_user_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5337,15 +4918,13 @@ def process_get_allowed_templates(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_allowed_templates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5362,15 +4941,13 @@ def process_get_servers(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5387,15 +4964,13 @@ def process_get_servers_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5412,15 +4987,13 @@ def process_get_servers_by_bibigrid_id(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers_by_bibigrid_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5440,15 +5013,13 @@ def process_get_security_group_id_by_name(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_security_group_id_by_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5460,28 +5031,18 @@ def process_scale_up_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = scale_up_cluster_result() try: - result.success = self._handler.scale_up_cluster( - args.cluster_id, - args.image_name, - args.flavor_name, - args.count, - args.names, - args.start_idx, - args.batch_idx, - ) + result.success = self._handler.scale_up_cluster(args.cluster_id, args.image_name, args.flavor_name, args.count, args.names, args.start_idx, args.batch_idx) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("scale_up_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5493,30 +5054,18 @@ def process_add_cluster_machine(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_cluster_machine_result() try: - result.success = self._handler.add_cluster_machine( - args.cluster_id, - args.cluster_user, - args.cluster_group_id, - args.image_name, - args.flavor_name, - args.name, - args.key_name, - args.batch_idx, - args.worker_idx, - ) + result.success = self._handler.add_cluster_machine(args.cluster_id, args.cluster_user, args.cluster_group_id, args.image_name, args.flavor_name, args.name, args.key_name, args.batch_idx, args.worker_idx) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_cluster_machine", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5536,15 +5085,13 @@ def process_get_cluster_info(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_cluster_info", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5564,15 +5111,13 @@ def process_get_cluster_status(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_cluster_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5589,15 +5134,13 @@ def process_get_keypair_public_key_by_name(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_keypair_public_key_by_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5614,15 +5157,13 @@ def process_delete_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("delete_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5642,18 +5183,14 @@ def process_add_default_security_groups_to_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" - ) - oprot.writeMessageBegin( - "add_default_security_groups_to_server", msg_type, seqid - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_default_security_groups_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -5664,7 +5201,7 @@ def process_get_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_server_result() try: - result.success = self._handler.get_server(args.openstack_id) + result.success = self._handler.get_server(args.openstack_id, args.no_connection) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5672,15 +5209,13 @@ def process_get_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5692,7 +5227,7 @@ def process_get_server_by_unique_name(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_server_by_unique_name_result() try: - result.success = self._handler.get_server_by_unique_name(args.unique_name) + result.success = self._handler.get_server_by_unique_name(args.unique_name, args.no_connection) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5700,15 +5235,13 @@ def process_get_server_by_unique_name(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_by_unique_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5731,15 +5264,13 @@ def process_stop_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("stop_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5751,13 +5282,7 @@ def process_create_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_snapshot_result() try: - result.success = self._handler.create_snapshot( - args.openstack_id, - args.name, - args.username, - args.base_tags, - args.description, - ) + result.success = self._handler.create_snapshot(args.openstack_id, args.name, args.username, args.base_tags, args.description) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5768,15 +5293,13 @@ def process_create_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5793,15 +5316,13 @@ def process_get_limits(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_limits", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5813,22 +5334,18 @@ def process_start_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_cluster_result() try: - result.success = self._handler.start_cluster( - args.public_keys, args.master_instance, args.worker_instances, args.user - ) + result.success = self._handler.start_cluster(args.public_keys, 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() @@ -5848,15 +5365,13 @@ def process_terminate_cluster(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("terminate_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5876,15 +5391,13 @@ def process_delete_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5910,15 +5423,13 @@ def process_detach_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("detach_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5941,15 +5452,13 @@ def process_delete_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5961,9 +5470,7 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = attach_volume_to_server_result() try: - result.success = self._handler.attach_volume_to_server( - args.openstack_id, args.volume_id - ) + result.success = self._handler.attach_volume_to_server(args.openstack_id, args.volume_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5974,15 +5481,13 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("attach_volume_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6005,15 +5510,13 @@ def process_resume_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resume_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6025,9 +5528,7 @@ def process_create_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_result() try: - result.success = self._handler.create_volume( - args.volume_name, args.volume_storage, args.metadata - ) + result.success = self._handler.create_volume(args.volume_name, args.volume_storage, args.metadata) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -6038,15 +5539,13 @@ def process_create_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6058,9 +5557,7 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_source_volume_result() try: - result.success = self._handler.create_volume_by_source_volume( - args.volume_name, args.metadata, args.source_volume_id - ) + result.success = self._handler.create_volume_by_source_volume(args.volume_name, args.metadata, args.source_volume_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -6071,15 +5568,13 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_volume_by_source_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6091,9 +5586,7 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_volume_snap_result() try: - result.success = self._handler.create_volume_by_volume_snap( - args.volume_name, args.metadata, args.volume_snap_id - ) + result.success = self._handler.create_volume_by_volume_snap(args.volume_name, args.metadata, args.volume_snap_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -6104,15 +5597,13 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_volume_by_volume_snap", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6124,9 +5615,7 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_snapshot_result() try: - result.success = self._handler.create_volume_snapshot( - args.volume_id, args.name, args.description - ) + result.success = self._handler.create_volume_snapshot(args.volume_id, args.name, args.description) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -6137,15 +5626,13 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6165,15 +5652,13 @@ def process_get_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6196,15 +5681,13 @@ def process_delete_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6227,15 +5710,13 @@ def process_reboot_hard_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reboot_hard_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6258,21 +5739,18 @@ def process_reboot_soft_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reboot_soft_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - # HELPER FUNCTIONS AND STRUCTURES @@ -6283,20 +5761,12 @@ class is_version_args(object): """ - thrift_spec = None - 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() @@ -6315,15 +5785,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -6333,26 +5800,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(is_version_args) is_version_args.thrift_spec = ( None, # 0 - ( - 1, - TType.DOUBLE, - "version", - None, - None, - ), # 1 + (1, TType.DOUBLE, 'version', None, None, ), # 1 ) @@ -6363,20 +5823,12 @@ class is_version_result(object): """ - thrift_spec = None - 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() @@ -6395,15 +5847,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -6413,37 +5862,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(is_version_result) is_version_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) class get_client_version_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6457,13 +5895,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -6471,18 +5906,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): @@ -6492,20 +5927,12 @@ class get_client_version_result(object): """ - thrift_spec = None - 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() @@ -6515,11 +5942,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6528,20 +5951,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -6550,37 +5966,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_client_version_result) get_client_version_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) class get_gateway_ip_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6594,13 +5999,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -6608,18 +6010,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): @@ -6629,20 +6031,12 @@ class get_gateway_ip_result(object): """ - thrift_spec = None - 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() @@ -6655,16 +6049,8 @@ def read(self, iprot): self.success = {} (_ktype49, _vtype50, _size48) = iprot.readMapBegin() for _i52 in range(_size48): - _key53 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val54 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key53 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val54 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key53] = _val54 iprot.readMapEnd() else: @@ -6675,23 +6061,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter55, viter56 in self.success.items(): - oprot.writeString( - kiter55.encode("utf-8") if sys.version_info[0] == 2 else kiter55 - ) - oprot.writeString( - viter56.encode("utf-8") if sys.version_info[0] == 2 else viter56 - ) + oprot.writeString(kiter55.encode('utf-8') if sys.version_info[0] == 2 else kiter55) + oprot.writeString(viter56.encode('utf-8') if sys.version_info[0] == 2 else viter56) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6701,37 +6080,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_gateway_ip_result) get_gateway_ip_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) class get_calculation_values_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6745,13 +6113,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -6759,18 +6124,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): @@ -6780,20 +6145,12 @@ class get_calculation_values_result(object): """ - thrift_spec = None - 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() @@ -6806,16 +6163,8 @@ def read(self, iprot): self.success = {} (_ktype58, _vtype59, _size57) = iprot.readMapBegin() for _i61 in range(_size57): - _key62 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val63 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key62 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val63 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key62] = _val63 iprot.readMapEnd() else: @@ -6826,23 +6175,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter64, viter65 in self.success.items(): - oprot.writeString( - kiter64.encode("utf-8") if sys.version_info[0] == 2 else kiter64 - ) - oprot.writeString( - viter65.encode("utf-8") if sys.version_info[0] == 2 else viter65 - ) + oprot.writeString(kiter64.encode('utf-8') if sys.version_info[0] == 2 else kiter64) + oprot.writeString(viter65.encode('utf-8') if sys.version_info[0] == 2 else viter65) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6852,25 +6194,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_calculation_values_result) get_calculation_values_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -6882,22 +6217,13 @@ class import_keypair_args(object): """ - thrift_spec = None - 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() @@ -6907,20 +6233,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.keyname = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.keyname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.public_key = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6929,28 +6247,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -6959,33 +6266,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(import_keypair_args) import_keypair_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "keyname", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "public_key", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'keyname', 'UTF8', None, ), # 1 + (2, TType.STRING, 'public_key', 'UTF8', None, ), # 2 ) @@ -6996,20 +6290,12 @@ class import_keypair_result(object): """ - thrift_spec = None - 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() @@ -7019,11 +6305,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7032,20 +6314,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -7054,25 +6329,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(import_keypair_result) import_keypair_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -7083,20 +6351,12 @@ class get_vm_ports_args(object): """ - thrift_spec = None - 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() @@ -7106,11 +6366,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7119,20 +6375,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -7141,26 +6390,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_vm_ports_args) get_vm_ports_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -7172,22 +6414,13 @@ class get_vm_ports_result(object): """ - thrift_spec = None - 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() @@ -7200,16 +6433,8 @@ def read(self, iprot): self.success = {} (_ktype67, _vtype68, _size66) = iprot.readMapBegin() for _i70 in range(_size66): - _key71 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val72 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key71 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val72 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key71] = _val72 iprot.readMapEnd() else: @@ -7225,27 +6450,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter73, viter74 in self.success.items(): - oprot.writeString( - kiter73.encode("utf-8") if sys.version_info[0] == 2 else kiter73 - ) - oprot.writeString( - viter74.encode("utf-8") if sys.version_info[0] == 2 else viter74 - ) + oprot.writeString(kiter73.encode('utf-8') if sys.version_info[0] == 2 else kiter73) + oprot.writeString(viter74.encode('utf-8') if sys.version_info[0] == 2 else viter74) 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() @@ -7255,32 +6473,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_vm_ports_result) get_vm_ports_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 ) @@ -7291,20 +6496,12 @@ class add_udp_security_group_args(object): """ - thrift_spec = None - 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() @@ -7314,11 +6511,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7327,20 +6520,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -7349,26 +6535,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_udp_security_group_args) add_udp_security_group_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 ) @@ -7380,22 +6559,13 @@ class add_udp_security_group_result(object): """ - thrift_spec = None - 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() @@ -7419,19 +6589,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -7441,33 +6608,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_udp_security_group_result) add_udp_security_group_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 2 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 ) @@ -7479,22 +6633,13 @@ class add_research_environment_security_group_args(object): """ - thrift_spec = None - def __init__( - self, - server_id=None, - security_group_name=None, - ): + 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 - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7504,20 +6649,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.security_group_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + 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: @@ -7526,28 +6663,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_research_environment_security_group_args") + 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.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.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() @@ -7556,33 +6682,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_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 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'security_group_name', 'UTF8', None, ), # 2 ) @@ -7594,22 +6707,13 @@ class add_research_environment_security_group_result(object): """ - thrift_spec = None - 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() @@ -7633,19 +6737,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_research_environment_security_group_result") + oprot.writeStructBegin('add_research_environment_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() @@ -7655,33 +6756,180 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __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 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 +) + + +class add_project_security_group_to_server_args(object): + """ + Attributes: + - server_id: OpenStack id of the server + - project_name + - project_id + + """ + + + def __init__(self, server_id=None, project_name=None, project_id=None,): + self.server_id = server_id + self.project_name = project_name + self.project_id = project_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: + 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.project_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.project_id = 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_project_security_group_to_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.writeFieldEnd() + if self.project_name is not None: + oprot.writeFieldBegin('project_name', TType.STRING, 2) + oprot.writeString(self.project_name.encode('utf-8') if sys.version_info[0] == 2 else self.project_name) + oprot.writeFieldEnd() + if self.project_id is not None: + oprot.writeFieldBegin('project_id', TType.STRING, 3) + oprot.writeString(self.project_id.encode('utf-8') if sys.version_info[0] == 2 else self.project_id) + 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_project_security_group_to_server_args) +add_project_security_group_to_server_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'project_name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'project_id', 'UTF8', None, ), # 3 +) + + +class add_project_security_group_to_server_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_project_security_group_to_server_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_project_security_group_to_server_result) +add_project_security_group_to_server_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 ) @@ -7693,22 +6941,13 @@ class add_metadata_to_server_args(object): """ - thrift_spec = None - 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() @@ -7718,11 +6957,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -7730,16 +6965,8 @@ def read(self, iprot): self.metadata = {} (_ktype76, _vtype77, _size75) = iprot.readMapBegin() for _i79 in range(_size75): - _key80 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val81 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key80 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val81 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key80] = _val81 iprot.readMapEnd() else: @@ -7750,31 +6977,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter82, viter83 in self.metadata.items(): - oprot.writeString( - kiter82.encode("utf-8") if sys.version_info[0] == 2 else kiter82 - ) - oprot.writeString( - viter83.encode("utf-8") if sys.version_info[0] == 2 else viter83 - ) + oprot.writeString(kiter82.encode('utf-8') if sys.version_info[0] == 2 else kiter82) + oprot.writeString(viter83.encode('utf-8') if sys.version_info[0] == 2 else viter83) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7784,33 +7000,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_metadata_to_server_args) add_metadata_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 ) @@ -7822,22 +7025,13 @@ class add_metadata_to_server_result(object): """ - thrift_spec = None - 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() @@ -7861,19 +7055,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.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() @@ -7883,45 +7074,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_metadata_to_server_result) add_metadata_to_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 2 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 ) class get_flavors_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7935,13 +7109,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -7949,18 +7120,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): @@ -7970,20 +7141,12 @@ class get_flavors_result(object): """ - thrift_spec = None - 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() @@ -8008,15 +7171,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter90 in self.success: iter90.write(oprot) @@ -8029,37 +7189,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_flavors_result) get_flavors_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Flavor, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Flavor, None], False), None, ), # 0 ) class get_images_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8073,13 +7222,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -8087,18 +7233,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): @@ -8108,20 +7254,12 @@ class get_images_result(object): """ - thrift_spec = None - 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() @@ -8146,15 +7284,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter97 in self.success: iter97.write(oprot) @@ -8167,37 +7302,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_images_result) get_images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) class get_public_images_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8211,13 +7335,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -8225,18 +7346,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): @@ -8246,20 +7367,12 @@ class get_public_images_result(object): """ - thrift_spec = None - 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() @@ -8284,15 +7397,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter104 in self.success: iter104.write(oprot) @@ -8305,37 +7415,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_public_images_result) get_public_images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) class get_private_images_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8349,13 +7448,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -8363,18 +7459,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): @@ -8384,20 +7480,12 @@ class get_private_images_result(object): """ - thrift_spec = None - 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() @@ -8422,15 +7510,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter111 in self.success: iter111.write(oprot) @@ -8443,25 +7528,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_private_images_result) get_private_images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) @@ -8473,22 +7551,13 @@ class get_image_args(object): """ - thrift_spec = None - 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() @@ -8498,11 +7567,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -8516,23 +7581,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -8542,33 +7600,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_image_args) get_image_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.BOOL, - "ignore_not_active", - None, - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.BOOL, 'ignore_not_active', None, None, ), # 2 ) @@ -8580,22 +7625,13 @@ class get_image_result(object): """ - thrift_spec = None - 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() @@ -8620,19 +7656,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -8642,32 +7675,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_image_result) get_image_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Image, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "i", - [ImageNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [Image, None], None, ), # 0 + (1, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 1 ) @@ -8678,20 +7698,12 @@ class get_volume_args(object): """ - thrift_spec = None - 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() @@ -8701,11 +7713,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -8714,20 +7722,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -8736,26 +7737,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_args) get_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 ) @@ -8767,22 +7761,13 @@ class get_volume_result(object): """ - thrift_spec = None - 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() @@ -8807,19 +7792,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -8829,32 +7811,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_result) get_volume_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "v", - [VolumeNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 ) @@ -8865,20 +7834,12 @@ class get_volumes_by_ids_args(object): """ - thrift_spec = None - 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() @@ -8891,11 +7852,7 @@ def read(self, iprot): self.volume_ids = [] (_etype115, _size112) = iprot.readListBegin() for _i116 in range(_size112): - _elem117 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem117 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.volume_ids.append(_elem117) iprot.readListEnd() else: @@ -8906,20 +7863,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter118 in self.volume_ids: - oprot.writeString( - iter118.encode("utf-8") if sys.version_info[0] == 2 else iter118 - ) + oprot.writeString(iter118.encode('utf-8') if sys.version_info[0] == 2 else iter118) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8929,26 +7881,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volumes_by_ids_args) get_volumes_by_ids_args.thrift_spec = ( None, # 0 - ( - 1, - TType.LIST, - "volume_ids", - (TType.STRING, "UTF8", False), - None, - ), # 1 + (1, TType.LIST, 'volume_ids', (TType.STRING, 'UTF8', False), None, ), # 1 ) @@ -8959,20 +7904,12 @@ class get_volumes_by_ids_result(object): """ - thrift_spec = None - 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() @@ -8997,15 +7934,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter125 in self.success: iter125.write(oprot) @@ -9018,25 +7952,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volumes_by_ids_result) get_volumes_by_ids_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Volume, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Volume, None], False), None, ), # 0 ) @@ -9048,22 +7975,13 @@ class resize_volume_args(object): """ - thrift_spec = None - 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() @@ -9073,11 +7991,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -9091,23 +8005,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -9117,33 +8024,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resize_volume_args) resize_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.I32, - "size", - None, - None, - ), # 2 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + (2, TType.I32, 'size', None, None, ), # 2 ) @@ -9154,20 +8048,12 @@ class resize_volume_result(object): """ - thrift_spec = None - 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() @@ -9186,15 +8072,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -9204,26 +8087,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resize_volume_result) resize_volume_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "v", - [VolumeNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 ) @@ -9238,16 +8114,8 @@ class open_port_range_for_vm_in_project_args(object): """ - thrift_spec = None - 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 @@ -9255,11 +8123,7 @@ def __init__( self.protocol = protocol def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9279,29 +8143,17 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.ethertype = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ethertype = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.protocol = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.protocol = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9310,44 +8162,29 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -9356,54 +8193,23 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(open_port_range_for_vm_in_project_args) open_port_range_for_vm_in_project_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I32, - "range_start", - None, - None, - ), # 1 - ( - 2, - TType.I32, - "range_stop", - None, - None, - ), # 2 - ( - 3, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "ethertype", - "UTF8", - "IPv4", - ), # 4 - ( - 5, - TType.STRING, - "protocol", - "UTF8", - "TCP", - ), # 5 + (1, TType.I32, 'range_start', None, None, ), # 1 + (2, TType.I32, 'range_stop', None, None, ), # 2 + (3, TType.STRING, 'openstack_id', 'UTF8', None, ), # 3 + (4, TType.STRING, 'ethertype', 'UTF8', "IPv4", ), # 4 + (5, TType.STRING, 'protocol', 'UTF8', "TCP", ), # 5 ) @@ -9417,26 +8223,15 @@ class open_port_range_for_vm_in_project_result(object): """ - thrift_spec = None - 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() @@ -9446,11 +8241,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -9474,31 +8265,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -9508,46 +8292,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(open_port_range_for_vm_in_project_result) open_port_range_for_vm_in_project_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "v", - [DefaultException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "o", - [OpenStackConflictException, None], - None, - ), # 3 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'v', [DefaultException, None], None, ), # 2 + (3, TType.STRUCT, 'o', [OpenStackConflictException, None], None, ), # 3 ) @@ -9558,20 +8317,12 @@ class delete_security_group_rule_args(object): """ - thrift_spec = None - 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() @@ -9581,11 +8332,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9594,20 +8341,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -9616,26 +8356,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_security_group_rule_args) delete_security_group_rule_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -9647,22 +8380,13 @@ class delete_security_group_rule_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - f=None, - ): + def __init__(self, e=None, f=None,): self.e = e self.f = f def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9686,19 +8410,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_security_group_rule_result") + oprot.writeStructBegin('delete_security_group_rule_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin("f", TType.STRUCT, 2) + oprot.writeFieldBegin('f', TType.STRUCT, 2) self.f.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9708,33 +8429,156 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_security_group_rule_result) delete_security_group_rule_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [SecurityGroupRuleNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "f", - [DefaultException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [SecurityGroupRuleNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'f', [DefaultException, None], None, ), # 2 +) + + +class delete_server_security_groups_args(object): + """ + Attributes: + - openstack_id + + """ + + + 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: + 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.openstack_id = 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('delete_server_security_groups_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.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(delete_server_security_groups_args) +delete_server_security_groups_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 +) + + +class delete_server_security_groups_result(object): + """ + Attributes: + - e + - f + + """ + + + def __init__(self, e=None, f=None,): + self.e = e + self.f = f + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + 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.e = SecurityGroupRuleNotFoundException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.f = DefaultException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + 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('delete_server_security_groups_result') + if self.e is not None: + oprot.writeFieldBegin('e', TType.STRUCT, 1) + self.e.write(oprot) + oprot.writeFieldEnd() + if self.f is not None: + oprot.writeFieldBegin('f', TType.STRUCT, 2) + self.f.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + 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(delete_server_security_groups_result) +delete_server_security_groups_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'e', [SecurityGroupRuleNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'f', [DefaultException, None], None, ), # 2 ) @@ -9745,20 +8589,12 @@ class delete_server_args(object): """ - thrift_spec = None - 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() @@ -9768,11 +8604,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9781,20 +8613,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -9803,26 +8628,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_server_args) delete_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -9834,22 +8652,13 @@ class delete_server_result(object): """ - thrift_spec = None - 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() @@ -9873,19 +8682,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -9895,33 +8701,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_server_result) delete_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -9934,24 +8727,14 @@ class rescue_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - admin_pass=None, - image_ref=None, - ): + def __init__(self, openstack_id=None, admin_pass=None, image_ref=None,): self.openstack_id = openstack_id self.admin_pass = admin_pass self.image_ref = image_ref def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9961,29 +8744,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.admin_pass = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.admin_pass = 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.image_ref = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_ref = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9992,36 +8763,21 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("rescue_server_args") + oprot.writeStructBegin('rescue_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.admin_pass is not None: - oprot.writeFieldBegin("admin_pass", TType.STRING, 2) - oprot.writeString( - self.admin_pass.encode("utf-8") - if sys.version_info[0] == 2 - else self.admin_pass - ) + oprot.writeFieldBegin('admin_pass', TType.STRING, 2) + oprot.writeString(self.admin_pass.encode('utf-8') if sys.version_info[0] == 2 else self.admin_pass) oprot.writeFieldEnd() if self.image_ref is not None: - oprot.writeFieldBegin("image_ref", TType.STRING, 3) - oprot.writeString( - self.image_ref.encode("utf-8") - if sys.version_info[0] == 2 - else self.image_ref - ) + oprot.writeFieldBegin('image_ref', TType.STRING, 3) + oprot.writeString(self.image_ref.encode('utf-8') if sys.version_info[0] == 2 else self.image_ref) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10030,40 +8786,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(rescue_server_args) rescue_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "admin_pass", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "image_ref", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'admin_pass', 'UTF8', None, ), # 2 + (3, TType.STRING, 'image_ref', 'UTF8', None, ), # 3 ) @@ -10075,22 +8812,13 @@ class rescue_server_result(object): """ - thrift_spec = None - 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() @@ -10114,19 +8842,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("rescue_server_result") + oprot.writeStructBegin('rescue_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() @@ -10136,33 +8861,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(rescue_server_result) rescue_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 ) @@ -10173,20 +8885,12 @@ class unrescue_server_args(object): """ - thrift_spec = None - 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() @@ -10196,11 +8900,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -10209,20 +8909,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("unrescue_server_args") + oprot.writeStructBegin('unrescue_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() @@ -10231,26 +8924,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(unrescue_server_args) unrescue_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -10262,22 +8948,13 @@ class unrescue_server_result(object): """ - thrift_spec = None - 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() @@ -10301,19 +8978,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("unrescue_server_result") + oprot.writeStructBegin('unrescue_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() @@ -10323,33 +8997,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(unrescue_server_result) unrescue_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 ) @@ -10372,24 +9033,8 @@ class start_server_args(object): """ - thrift_spec = 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, - slurm_version=None, - metadata_token=None, - metadata_endpoint=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, slurm_version=None, metadata_token=None, metadata_endpoint=None,): self.flavor_name = flavor_name self.image_name = image_name self.public_key = public_key @@ -10405,11 +9050,7 @@ def __init__( self.metadata_endpoint = metadata_endpoint def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10419,38 +9060,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.public_key = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.servername = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: @@ -10458,16 +9083,8 @@ def read(self, iprot): self.metadata = {} (_ktype127, _vtype128, _size126) = iprot.readMapBegin() for _i130 in range(_size126): - _key131 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val132 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key131 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val132 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key131] = _val132 iprot.readMapEnd() else: @@ -10480,16 +9097,8 @@ def read(self, iprot): _elem138 = {} (_ktype140, _vtype141, _size139) = iprot.readMapBegin() for _i143 in range(_size139): - _key144 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val145 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key144 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val145 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem138[_key144] = _val145 iprot.readMapEnd() self.volume_ids_path_new.append(_elem138) @@ -10504,16 +9113,8 @@ def read(self, iprot): _elem151 = {} (_ktype153, _vtype154, _size152) = iprot.readMapBegin() for _i156 in range(_size152): - _key157 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val158 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key157 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val158 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem151[_key157] = _val158 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem151) @@ -10525,22 +9126,14 @@ def read(self, iprot): self.additional_keys = [] (_etype162, _size159) = iprot.readListBegin() for _i163 in range(_size159): - _elem164 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem164 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_keys.append(_elem164) 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: @@ -10548,40 +9141,24 @@ def read(self, iprot): self.additional_security_group_ids = [] (_etype168, _size165) = iprot.readListBegin() for _i169 in range(_size165): - _elem170 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem170 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_security_group_ids.append(_elem170) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: - self.slurm_version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.slurm_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.STRING: - self.metadata_token = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.metadata_token = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 14: if ftype == TType.STRING: - self.metadata_endpoint = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.metadata_endpoint = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -10590,144 +9167,85 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter171, viter172 in self.metadata.items(): - oprot.writeString( - kiter171.encode("utf-8") if sys.version_info[0] == 2 else kiter171 - ) - oprot.writeString( - viter172.encode("utf-8") if sys.version_info[0] == 2 else viter172 - ) + oprot.writeString(kiter171.encode('utf-8') if sys.version_info[0] == 2 else kiter171) + oprot.writeString(viter172.encode('utf-8') if sys.version_info[0] == 2 else viter172) 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 iter173 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter173)) for kiter174, viter175 in iter173.items(): - oprot.writeString( - kiter174.encode("utf-8") - if sys.version_info[0] == 2 - else kiter174 - ) - oprot.writeString( - viter175.encode("utf-8") - if sys.version_info[0] == 2 - else viter175 - ) + oprot.writeString(kiter174.encode('utf-8') if sys.version_info[0] == 2 else kiter174) + oprot.writeString(viter175.encode('utf-8') if sys.version_info[0] == 2 else viter175) 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 iter176 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter176)) for kiter177, viter178 in iter176.items(): - oprot.writeString( - kiter177.encode("utf-8") - if sys.version_info[0] == 2 - else kiter177 - ) - oprot.writeString( - viter178.encode("utf-8") - if sys.version_info[0] == 2 - else viter178 - ) + oprot.writeString(kiter177.encode('utf-8') if sys.version_info[0] == 2 else kiter177) + oprot.writeString(viter178.encode('utf-8') if sys.version_info[0] == 2 else viter178) 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 iter179 in self.additional_keys: - oprot.writeString( - iter179.encode("utf-8") if sys.version_info[0] == 2 else iter179 - ) + oprot.writeString(iter179.encode('utf-8') if sys.version_info[0] == 2 else iter179) 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 iter180 in self.additional_security_group_ids: - oprot.writeString( - iter180.encode("utf-8") if sys.version_info[0] == 2 else iter180 - ) + oprot.writeString(iter180.encode('utf-8') if sys.version_info[0] == 2 else iter180) oprot.writeListEnd() oprot.writeFieldEnd() if self.slurm_version is not None: - oprot.writeFieldBegin("slurm_version", TType.STRING, 12) - oprot.writeString( - self.slurm_version.encode("utf-8") - if sys.version_info[0] == 2 - else self.slurm_version - ) + oprot.writeFieldBegin('slurm_version', TType.STRING, 12) + oprot.writeString(self.slurm_version.encode('utf-8') if sys.version_info[0] == 2 else self.slurm_version) oprot.writeFieldEnd() if self.metadata_token is not None: - oprot.writeFieldBegin("metadata_token", TType.STRING, 13) - oprot.writeString( - self.metadata_token.encode("utf-8") - if sys.version_info[0] == 2 - else self.metadata_token - ) + oprot.writeFieldBegin('metadata_token', TType.STRING, 13) + oprot.writeString(self.metadata_token.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_token) oprot.writeFieldEnd() if self.metadata_endpoint is not None: - oprot.writeFieldBegin("metadata_endpoint", TType.STRING, 14) - oprot.writeString( - self.metadata_endpoint.encode("utf-8") - if sys.version_info[0] == 2 - else self.metadata_endpoint - ) + oprot.writeFieldBegin('metadata_endpoint', TType.STRING, 14) + oprot.writeString(self.metadata_endpoint.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_endpoint) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10736,111 +9254,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(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 - ( - 12, - TType.STRING, - "slurm_version", - "UTF8", - None, - ), # 12 - ( - 13, - TType.STRING, - "metadata_token", - "UTF8", - None, - ), # 13 - ( - 14, - TType.STRING, - "metadata_endpoint", - "UTF8", - None, - ), # 14 + (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 + (12, TType.STRING, 'slurm_version', 'UTF8', None, ), # 12 + (13, TType.STRING, 'metadata_token', 'UTF8', None, ), # 13 + (14, TType.STRING, 'metadata_endpoint', 'UTF8', None, ), # 14 ) @@ -10856,17 +9295,8 @@ class start_server_result(object): """ - thrift_spec = None - 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 @@ -10875,11 +9305,7 @@ def __init__( self.o = o def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10889,11 +9315,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -10927,39 +9349,32 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -10969,74 +9384,33 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_result) start_server_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [NameAlreadyUsedException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ResourceNotAvailableException, None], - None, - ), # 2 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 None, # 3 None, # 4 - ( - 5, - TType.STRUCT, - "i", - [ImageNotFoundException, None], - None, - ), # 5 - ( - 6, - TType.STRUCT, - "f", - [FlavorNotFoundException, None], - None, - ), # 6 - ( - 7, - TType.STRUCT, - "o", - [DefaultException, None], - None, - ), # 7 + (5, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 5 + (6, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 6 + (7, TType.STRUCT, 'o', [DefaultException, None], None, ), # 7 ) class is_bibigrid_available_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11050,13 +9424,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -11064,18 +9435,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): @@ -11085,20 +9456,12 @@ class is_bibigrid_available_result(object): """ - thrift_spec = None - 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() @@ -11117,15 +9480,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -11135,25 +9495,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(is_bibigrid_available_result) is_bibigrid_available_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -11165,22 +9518,13 @@ class detach_ip_from_server_args(object): """ - thrift_spec = None - 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() @@ -11190,20 +9534,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.floating_ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.floating_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -11212,28 +9548,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -11242,33 +9567,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_ip_from_server_args) detach_ip_from_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "floating_ip", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'floating_ip', 'UTF8', None, ), # 2 ) @@ -11279,20 +9591,12 @@ class detach_ip_from_server_result(object): """ - thrift_spec = None - 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() @@ -11311,15 +9615,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -11329,26 +9630,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_ip_from_server_result) detach_ip_from_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 ) @@ -11369,22 +9663,8 @@ class start_server_with_custom_key_args(object): """ - thrift_spec = 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, - additional_keys=None, - metadata_token=None, - metadata_endpoint=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, additional_keys=None, metadata_token=None, metadata_endpoint=None,): self.flavor_name = flavor_name self.image_name = image_name self.servername = servername @@ -11398,11 +9678,7 @@ def __init__( self.metadata_endpoint = metadata_endpoint def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11412,29 +9688,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.servername = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -11442,27 +9706,15 @@ def read(self, iprot): self.metadata = {} (_ktype182, _vtype183, _size181) = iprot.readMapBegin() for _i185 in range(_size181): - _key186 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val187 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key186 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val187 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key186] = _val187 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: @@ -11473,16 +9725,8 @@ def read(self, iprot): _elem193 = {} (_ktype195, _vtype196, _size194) = iprot.readMapBegin() for _i198 in range(_size194): - _key199 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val200 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key199 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val200 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem193[_key199] = _val200 iprot.readMapEnd() self.volume_ids_path_new.append(_elem193) @@ -11497,16 +9741,8 @@ def read(self, iprot): _elem206 = {} (_ktype208, _vtype209, _size207) = iprot.readMapBegin() for _i211 in range(_size207): - _key212 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val213 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key212 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val213 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem206[_key212] = _val213 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem206) @@ -11518,11 +9754,7 @@ def read(self, iprot): self.additional_security_group_ids = [] (_etype217, _size214) = iprot.readListBegin() for _i218 in range(_size214): - _elem219 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem219 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_security_group_ids.append(_elem219) iprot.readListEnd() else: @@ -11532,31 +9764,19 @@ def read(self, iprot): self.additional_keys = [] (_etype223, _size220) = iprot.readListBegin() for _i224 in range(_size220): - _elem225 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem225 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_keys.append(_elem225) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: - self.metadata_token = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.metadata_token = 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.metadata_endpoint = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.metadata_endpoint = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -11565,128 +9785,77 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter226, viter227 in self.metadata.items(): - oprot.writeString( - kiter226.encode("utf-8") if sys.version_info[0] == 2 else kiter226 - ) - oprot.writeString( - viter227.encode("utf-8") if sys.version_info[0] == 2 else viter227 - ) + oprot.writeString(kiter226.encode('utf-8') if sys.version_info[0] == 2 else kiter226) + oprot.writeString(viter227.encode('utf-8') if sys.version_info[0] == 2 else viter227) 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 iter228 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter228)) for kiter229, viter230 in iter228.items(): - oprot.writeString( - kiter229.encode("utf-8") - if sys.version_info[0] == 2 - else kiter229 - ) - oprot.writeString( - viter230.encode("utf-8") - if sys.version_info[0] == 2 - else viter230 - ) + oprot.writeString(kiter229.encode('utf-8') if sys.version_info[0] == 2 else kiter229) + oprot.writeString(viter230.encode('utf-8') if sys.version_info[0] == 2 else viter230) 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 iter231 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter231)) for kiter232, viter233 in iter231.items(): - oprot.writeString( - kiter232.encode("utf-8") - if sys.version_info[0] == 2 - else kiter232 - ) - oprot.writeString( - viter233.encode("utf-8") - if sys.version_info[0] == 2 - else viter233 - ) + oprot.writeString(kiter232.encode('utf-8') if sys.version_info[0] == 2 else kiter232) + oprot.writeString(viter233.encode('utf-8') if sys.version_info[0] == 2 else viter233) oprot.writeMapEnd() oprot.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 iter234 in self.additional_security_group_ids: - oprot.writeString( - iter234.encode("utf-8") if sys.version_info[0] == 2 else iter234 - ) + oprot.writeString(iter234.encode('utf-8') if sys.version_info[0] == 2 else iter234) oprot.writeListEnd() oprot.writeFieldEnd() if self.additional_keys is not None: - oprot.writeFieldBegin("additional_keys", TType.LIST, 10) + oprot.writeFieldBegin('additional_keys', TType.LIST, 10) oprot.writeListBegin(TType.STRING, len(self.additional_keys)) for iter235 in self.additional_keys: - 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.metadata_token is not None: - oprot.writeFieldBegin("metadata_token", TType.STRING, 11) - oprot.writeString( - self.metadata_token.encode("utf-8") - if sys.version_info[0] == 2 - else self.metadata_token - ) + oprot.writeFieldBegin('metadata_token', TType.STRING, 11) + oprot.writeString(self.metadata_token.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_token) oprot.writeFieldEnd() if self.metadata_endpoint is not None: - oprot.writeFieldBegin("metadata_endpoint", TType.STRING, 12) - oprot.writeString( - self.metadata_endpoint.encode("utf-8") - if sys.version_info[0] == 2 - else self.metadata_endpoint - ) + oprot.writeFieldBegin('metadata_endpoint', TType.STRING, 12) + oprot.writeString(self.metadata_endpoint.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_endpoint) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11695,97 +9864,30 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __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 - ( - 10, - TType.LIST, - "additional_keys", - (TType.STRING, "UTF8", False), - None, - ), # 10 - ( - 11, - TType.STRING, - "metadata_token", - "UTF8", - None, - ), # 11 - ( - 12, - TType.STRING, - "metadata_endpoint", - "UTF8", - None, - ), # 12 + (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 + (10, TType.LIST, 'additional_keys', (TType.STRING, 'UTF8', False), None, ), # 10 + (11, TType.STRING, 'metadata_token', 'UTF8', None, ), # 11 + (12, TType.STRING, 'metadata_endpoint', 'UTF8', None, ), # 12 ) @@ -11801,17 +9903,8 @@ class start_server_with_custom_key_result(object): """ - thrift_spec = None - 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 @@ -11820,11 +9913,7 @@ def __init__( self.d = d def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11834,11 +9923,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -11872,39 +9957,32 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -11914,60 +9992,23 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_with_custom_key_result) start_server_with_custom_key_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [NameAlreadyUsedException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ResourceNotAvailableException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "i", - [ImageNotFoundException, None], - None, - ), # 3 - ( - 4, - TType.STRUCT, - "f", - [FlavorNotFoundException, None], - None, - ), # 4 - ( - 5, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 5 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 + (3, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 3 + (4, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 4 + (5, TType.STRUCT, 'd', [DefaultException, None], None, ), # 5 ) @@ -11978,20 +10019,12 @@ class exist_server_args(object): """ - thrift_spec = None - 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() @@ -12001,11 +10034,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12014,18 +10043,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12034,26 +10058,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(exist_server_args) exist_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 ) @@ -12064,20 +10081,12 @@ class exist_server_result(object): """ - thrift_spec = None - 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() @@ -12096,15 +10105,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12114,25 +10120,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(exist_server_result) exist_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -12149,18 +10148,8 @@ class create_and_deploy_playbook_args(object): """ - thrift_spec = 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, - ): + 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 @@ -12170,11 +10159,7 @@ def __init__( self.base_url = base_url def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12184,20 +10169,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -12213,11 +10190,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.research_environment_template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.research_environment_template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: @@ -12225,11 +10198,7 @@ def read(self, iprot): self.apt_packages = [] (_etype245, _size242) = iprot.readListBegin() for _i246 in range(_size242): - _elem247 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem247 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.apt_packages.append(_elem247) iprot.readListEnd() else: @@ -12241,11 +10210,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.base_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.base_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12254,64 +10219,43 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter248 in self.conda_packages: iter248.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 iter249 in self.apt_packages: - oprot.writeString( - iter249.encode("utf-8") if sys.version_info[0] == 2 else iter249 - ) + oprot.writeString(iter249.encode('utf-8') if sys.version_info[0] == 2 else iter249) 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() @@ -12320,68 +10264,25 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_and_deploy_playbook_args) create_and_deploy_playbook_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "public_key", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 2 - ( - 3, - TType.LIST, - "conda_packages", - (TType.STRUCT, [CondaPackage, None], False), - None, - ), # 3 - ( - 4, - TType.STRING, - "research_environment_template", - "UTF8", - None, - ), # 4 - ( - 5, - TType.LIST, - "apt_packages", - (TType.STRING, "UTF8", False), - None, - ), # 5 - ( - 6, - TType.BOOL, - "create_only_backend", - None, - None, - ), # 6 - ( - 7, - TType.STRING, - "base_url", - "UTF8", - None, - ), # 7 + (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 + (2, TType.STRING, 'openstack_id', 'UTF8', None, ), # 2 + (3, TType.LIST, 'conda_packages', (TType.STRUCT, [CondaPackage, None], False), None, ), # 3 + (4, TType.STRING, 'research_environment_template', 'UTF8', None, ), # 4 + (5, TType.LIST, 'apt_packages', (TType.STRING, 'UTF8', False), None, ), # 5 + (6, TType.BOOL, 'create_only_backend', None, None, ), # 6 + (7, TType.STRING, 'base_url', 'UTF8', None, ), # 7 ) @@ -12393,22 +10294,13 @@ class create_and_deploy_playbook_result(object): """ - thrift_spec = None - 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() @@ -12432,19 +10324,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12454,32 +10343,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_and_deploy_playbook_result) create_and_deploy_playbook_result.thrift_spec = ( - ( - 0, - TType.I32, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 1 + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 ) @@ -12490,20 +10366,12 @@ class get_playbook_logs_args(object): """ - thrift_spec = None - 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() @@ -12513,11 +10381,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12526,20 +10390,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12548,26 +10405,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_playbook_logs_args) get_playbook_logs_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -12579,22 +10429,13 @@ class get_playbook_logs_result(object): """ - thrift_spec = None - 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() @@ -12619,19 +10460,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12641,44 +10479,27 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_playbook_logs_result) get_playbook_logs_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [PlaybookResult, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "p", - [PlaybookNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [PlaybookResult, None], None, ), # 0 + (1, TType.STRUCT, 'p', [PlaybookNotFoundException, None], None, ), # 1 ) class has_forc_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12692,13 +10513,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12706,18 +10524,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): @@ -12727,20 +10545,12 @@ class has_forc_result(object): """ - thrift_spec = None - 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() @@ -12759,15 +10569,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12777,37 +10584,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(has_forc_result) has_forc_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) class get_forc_access_url_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12821,13 +10617,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_access_url_args") + oprot.writeStructBegin('get_forc_access_url_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -12835,18 +10628,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_access_url_args) -get_forc_access_url_args.thrift_spec = () +get_forc_access_url_args.thrift_spec = ( +) class get_forc_access_url_result(object): @@ -12856,20 +10649,12 @@ class get_forc_access_url_result(object): """ - thrift_spec = None - 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() @@ -12879,11 +10664,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12892,20 +10673,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_access_url_result") + oprot.writeStructBegin('get_forc_access_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() @@ -12914,25 +10688,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_access_url_result) get_forc_access_url_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -12946,26 +10713,15 @@ class create_backend_args(object): """ - thrift_spec = None - 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() @@ -12975,38 +10731,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_path = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_path = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.upstream_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.upstream_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -13015,42 +10755,25 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -13059,47 +10782,22 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_backend_args) create_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "owner", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "user_path", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "template", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "upstream_url", - "UTF8", - None, - ), # 4 + (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 + (2, TType.STRING, 'user_path', 'UTF8', None, ), # 2 + (3, TType.STRING, 'template', 'UTF8', None, ), # 3 + (4, TType.STRING, 'upstream_url', 'UTF8', None, ), # 4 ) @@ -13112,24 +10810,14 @@ class create_backend_result(object): """ - thrift_spec = None - 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() @@ -13159,23 +10847,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -13185,51 +10870,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_backend_result) create_backend_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Backend, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [TemplateNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 + (1, TType.STRUCT, 'e', [TemplateNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'd', [DefaultException, None], None, ), # 2 ) class get_backends_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13243,13 +10905,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -13257,18 +10916,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): @@ -13279,22 +10938,13 @@ class get_backends_result(object): """ - thrift_spec = None - 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() @@ -13324,22 +10974,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 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() @@ -13349,32 +10996,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_result) get_backends_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 ) @@ -13385,20 +11019,12 @@ class get_backends_by_owner_args(object): """ - thrift_spec = None - 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() @@ -13408,11 +11034,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -13421,18 +11043,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -13441,26 +11058,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_owner_args) get_backends_by_owner_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "owner", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 ) @@ -13472,22 +11082,13 @@ class get_backends_by_owner_result(object): """ - thrift_spec = None - 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() @@ -13517,22 +11118,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter263 in self.success: iter263.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() @@ -13542,32 +11140,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_owner_result) get_backends_by_owner_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 ) @@ -13578,20 +11163,12 @@ class get_backends_by_template_args(object): """ - thrift_spec = None - 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() @@ -13601,11 +11178,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -13614,20 +11187,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -13636,26 +11202,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_template_args) get_backends_by_template_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "template", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'template', 'UTF8', None, ), # 1 ) @@ -13667,22 +11226,13 @@ class get_backends_by_template_result(object): """ - thrift_spec = None - 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() @@ -13712,22 +11262,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter270 in self.success: iter270.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() @@ -13737,32 +11284,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_template_result) get_backends_by_template_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 ) @@ -13773,20 +11307,12 @@ class get_backend_by_id_args(object): """ - thrift_spec = None - 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() @@ -13805,15 +11331,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -13823,26 +11346,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backend_by_id_args) get_backend_by_id_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 + (1, TType.I64, 'id', None, None, ), # 1 ) @@ -13855,24 +11371,14 @@ class get_backend_by_id_result(object): """ - thrift_spec = None - 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() @@ -13902,23 +11408,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -13928,39 +11431,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backend_by_id_result) get_backend_by_id_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Backend, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'd', [DefaultException, None], None, ), # 2 ) @@ -13972,22 +11456,13 @@ class set_metadata_server_data_args(object): """ - thrift_spec = None - def __init__( - self, - ip=None, - metadata=None, - ): + def __init__(self, ip=None, metadata=None,): self.ip = ip 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() @@ -13997,11 +11472,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -14016,21 +11487,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_metadata_server_data_args") + oprot.writeStructBegin('set_metadata_server_data_args') if self.ip is not None: - oprot.writeFieldBegin("ip", TType.STRING, 1) - oprot.writeString( - self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip - ) + oprot.writeFieldBegin('ip', TType.STRING, 1) + oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin("metadata", TType.STRUCT, 3) + oprot.writeFieldBegin('metadata', TType.STRUCT, 3) self.metadata.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14040,34 +11506,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(set_metadata_server_data_args) set_metadata_server_data_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "ip", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 None, # 2 - ( - 3, - TType.STRUCT, - "metadata", - [VirtualMachineServerMetadata, None], - None, - ), # 3 + (3, TType.STRUCT, 'metadata', [VirtualMachineServerMetadata, None], None, ), # 3 ) @@ -14079,22 +11532,13 @@ class set_metadata_server_data_result(object): """ - thrift_spec = None - def __init__( - self, - m=None, - b=None, - ): + def __init__(self, m=None, b=None,): self.m = m 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() @@ -14118,19 +11562,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_metadata_server_data_result") + oprot.writeStructBegin('set_metadata_server_data_result') if self.m is not None: - oprot.writeFieldBegin("m", TType.STRUCT, 1) + oprot.writeFieldBegin('m', TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin("b", TType.STRUCT, 2) + oprot.writeFieldBegin('b', TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14140,33 +11581,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(set_metadata_server_data_result) set_metadata_server_data_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "m", - [MetadataServerNotAvailableException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "b", - [MetadataServerNotAllowedException, None], - None, - ), # 2 + (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 + (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 ) @@ -14177,20 +11605,12 @@ class remove_metadata_server_data_args(object): """ - thrift_spec = None - def __init__( - self, - ip=None, - ): + def __init__(self, ip=None,): self.ip = 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() @@ -14200,11 +11620,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -14213,18 +11629,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("remove_metadata_server_data_args") + oprot.writeStructBegin('remove_metadata_server_data_args') if self.ip is not None: - oprot.writeFieldBegin("ip", TType.STRING, 1) - oprot.writeString( - self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip - ) + oprot.writeFieldBegin('ip', TType.STRING, 1) + oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14233,26 +11644,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(remove_metadata_server_data_args) remove_metadata_server_data_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "ip", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 ) @@ -14264,22 +11668,13 @@ class remove_metadata_server_data_result(object): """ - thrift_spec = None - def __init__( - self, - m=None, - b=None, - ): + def __init__(self, m=None, b=None,): self.m = m 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() @@ -14303,19 +11698,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("remove_metadata_server_data_result") + oprot.writeStructBegin('remove_metadata_server_data_result') if self.m is not None: - oprot.writeFieldBegin("m", TType.STRUCT, 1) + oprot.writeFieldBegin('m', TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin("b", TType.STRUCT, 2) + oprot.writeFieldBegin('b', TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14325,45 +11717,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(remove_metadata_server_data_result) remove_metadata_server_data_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "m", - [MetadataServerNotAvailableException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "b", - [MetadataServerNotAllowedException, None], - None, - ), # 2 + (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 + (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 ) class is_metadata_server_available_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14377,13 +11752,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_metadata_server_available_args") + oprot.writeStructBegin('is_metadata_server_available_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -14391,18 +11763,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_metadata_server_available_args) -is_metadata_server_available_args.thrift_spec = () +is_metadata_server_available_args.thrift_spec = ( +) class is_metadata_server_available_result(object): @@ -14413,22 +11785,13 @@ class is_metadata_server_available_result(object): """ - thrift_spec = None - def __init__( - self, - m=None, - b=None, - ): + def __init__(self, m=None, b=None,): self.m = m 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() @@ -14452,19 +11815,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_metadata_server_available_result") + oprot.writeStructBegin('is_metadata_server_available_result') if self.m is not None: - oprot.writeFieldBegin("m", TType.STRUCT, 1) + oprot.writeFieldBegin('m', TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin("b", TType.STRUCT, 2) + oprot.writeFieldBegin('b', TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14474,33 +11834,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(is_metadata_server_available_result) is_metadata_server_available_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "m", - [MetadataServerNotAvailableException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "b", - [MetadataServerNotAllowedException, None], - None, - ), # 2 + (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 + (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 ) @@ -14511,20 +11858,12 @@ class delete_backend_args(object): """ - thrift_spec = None - 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() @@ -14543,15 +11882,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -14561,26 +11897,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_backend_args) delete_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 + (1, TType.I64, 'id', None, None, ), # 1 ) @@ -14591,20 +11920,12 @@ class delete_backend_result(object): """ - thrift_spec = None - 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() @@ -14623,15 +11944,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -14641,26 +11959,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_backend_result) delete_backend_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 ) @@ -14672,22 +11983,13 @@ class add_user_to_backend_args(object): """ - thrift_spec = None - 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() @@ -14702,11 +12004,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -14715,24 +12013,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -14741,33 +12032,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_user_to_backend_args) add_user_to_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "backend_id", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "user_id", - "UTF8", - None, - ), # 2 + (1, TType.I64, 'backend_id', None, None, ), # 1 + (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 ) @@ -14779,22 +12057,13 @@ class add_user_to_backend_result(object): """ - thrift_spec = None - 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() @@ -14807,16 +12076,8 @@ def read(self, iprot): self.success = {} (_ktype272, _vtype273, _size271) = iprot.readMapBegin() for _i275 in range(_size271): - _key276 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val277 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key276 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val277 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key276] = _val277 iprot.readMapEnd() else: @@ -14832,27 +12093,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter278, viter279 in self.success.items(): - oprot.writeString( - kiter278.encode("utf-8") if sys.version_info[0] == 2 else kiter278 - ) - oprot.writeString( - viter279.encode("utf-8") if sys.version_info[0] == 2 else viter279 - ) + oprot.writeString(kiter278.encode('utf-8') if sys.version_info[0] == 2 else kiter278) + oprot.writeString(viter279.encode('utf-8') if sys.version_info[0] == 2 else viter279) 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() @@ -14862,32 +12116,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_user_to_backend_result) add_user_to_backend_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 ) @@ -14898,20 +12139,12 @@ class get_users_from_backend_args(object): """ - thrift_spec = None - 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() @@ -14930,15 +12163,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -14948,26 +12178,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_users_from_backend_args) get_users_from_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "backend_id", - None, - None, - ), # 1 + (1, TType.I64, 'backend_id', None, None, ), # 1 ) @@ -14979,22 +12202,13 @@ class get_users_from_backend_result(object): """ - thrift_spec = None - 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() @@ -15007,11 +12221,7 @@ def read(self, iprot): self.success = [] (_etype283, _size280) = iprot.readListBegin() for _i284 in range(_size280): - _elem285 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem285 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem285) iprot.readListEnd() else: @@ -15027,24 +12237,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter286 in self.success: - oprot.writeString( - iter286.encode("utf-8") if sys.version_info[0] == 2 else iter286 - ) + oprot.writeString(iter286.encode('utf-8') if sys.version_info[0] == 2 else iter286) 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() @@ -15054,32 +12259,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_users_from_backend_result) get_users_from_backend_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 + (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 ) @@ -15091,22 +12283,13 @@ class delete_user_from_backend_args(object): """ - thrift_spec = None - 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() @@ -15121,11 +12304,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15134,24 +12313,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -15160,33 +12332,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_user_from_backend_args) delete_user_from_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "backend_id", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "user_id", - "UTF8", - None, - ), # 2 + (1, TType.I64, 'backend_id', None, None, ), # 1 + (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 ) @@ -15198,22 +12357,13 @@ class delete_user_from_backend_result(object): """ - thrift_spec = None - 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() @@ -15226,16 +12376,8 @@ def read(self, iprot): self.success = {} (_ktype288, _vtype289, _size287) = iprot.readMapBegin() for _i291 in range(_size287): - _key292 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val293 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key292 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val293 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key292] = _val293 iprot.readMapEnd() else: @@ -15251,27 +12393,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter294, viter295 in self.success.items(): - oprot.writeString( - kiter294.encode("utf-8") if sys.version_info[0] == 2 else kiter294 - ) - oprot.writeString( - viter295.encode("utf-8") if sys.version_info[0] == 2 else viter295 - ) + oprot.writeString(kiter294.encode('utf-8') if sys.version_info[0] == 2 else kiter294) + oprot.writeString(viter295.encode('utf-8') if sys.version_info[0] == 2 else viter295) 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() @@ -15281,44 +12416,27 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_user_from_backend_result) delete_user_from_backend_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 ) class get_allowed_templates_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15332,13 +12450,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -15346,18 +12461,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): @@ -15367,20 +12482,12 @@ class get_allowed_templates_result(object): """ - thrift_spec = None - 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() @@ -15405,15 +12512,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter302 in self.success: iter302.write(oprot) @@ -15426,37 +12530,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_allowed_templates_result) get_allowed_templates_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [ResearchEnvironmentTemplate, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [ResearchEnvironmentTemplate, None], False), None, ), # 0 ) class get_servers_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15470,13 +12563,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -15484,18 +12574,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): @@ -15505,20 +12595,12 @@ class get_servers_result(object): """ - thrift_spec = None - 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() @@ -15543,15 +12625,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter309 in self.success: iter309.write(oprot) @@ -15564,25 +12643,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_result) get_servers_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -15593,20 +12665,12 @@ class get_servers_by_ids_args(object): """ - thrift_spec = None - 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() @@ -15619,11 +12683,7 @@ def read(self, iprot): self.server_ids = [] (_etype313, _size310) = iprot.readListBegin() for _i314 in range(_size310): - _elem315 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem315 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.server_ids.append(_elem315) iprot.readListEnd() else: @@ -15634,20 +12694,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter316 in self.server_ids: - oprot.writeString( - iter316.encode("utf-8") if sys.version_info[0] == 2 else iter316 - ) + oprot.writeString(iter316.encode('utf-8') if sys.version_info[0] == 2 else iter316) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15657,26 +12712,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_ids_args) get_servers_by_ids_args.thrift_spec = ( None, # 0 - ( - 1, - TType.LIST, - "server_ids", - (TType.STRING, "UTF8", False), - None, - ), # 1 + (1, TType.LIST, 'server_ids', (TType.STRING, 'UTF8', False), None, ), # 1 ) @@ -15687,20 +12735,12 @@ class get_servers_by_ids_result(object): """ - thrift_spec = None - 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() @@ -15725,15 +12765,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter323 in self.success: iter323.write(oprot) @@ -15746,25 +12783,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_ids_result) get_servers_by_ids_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -15775,20 +12805,12 @@ class get_servers_by_bibigrid_id_args(object): """ - thrift_spec = None - 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() @@ -15798,11 +12820,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.bibigrid_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.bibigrid_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15811,20 +12829,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -15833,26 +12844,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_bibigrid_id_args) get_servers_by_bibigrid_id_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "bibigrid_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'bibigrid_id', 'UTF8', None, ), # 1 ) @@ -15863,20 +12867,12 @@ class get_servers_by_bibigrid_id_result(object): """ - thrift_spec = None - 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() @@ -15901,15 +12897,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter330 in self.success: iter330.write(oprot) @@ -15922,25 +12915,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_bibigrid_id_result) get_servers_by_bibigrid_id_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -15951,20 +12937,12 @@ class get_security_group_id_by_name_args(object): """ - thrift_spec = None - 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() @@ -15974,11 +12952,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15987,18 +12961,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_security_group_id_by_name_args") + oprot.writeStructBegin('get_security_group_id_by_name_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() @@ -16007,26 +12976,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_security_group_id_by_name_args) get_security_group_id_by_name_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 ) @@ -16038,22 +13000,13 @@ class get_security_group_id_by_name_result(object): """ - thrift_spec = None - 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() @@ -16063,11 +13016,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -16081,23 +13030,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_security_group_id_by_name_result") + oprot.writeStructBegin('get_security_group_id_by_name_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.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 1) + oprot.writeFieldBegin('s', TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -16107,32 +13049,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_security_group_id_by_name_result) get_security_group_id_by_name_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "s", - [SecurityGroupNotFoundException, None], - None, - ), # 1 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 's', [SecurityGroupNotFoundException, None], None, ), # 1 ) @@ -16149,18 +13078,8 @@ class scale_up_cluster_args(object): """ - thrift_spec = None - 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 @@ -16170,11 +13089,7 @@ def __init__( self.batch_idx = batch_idx def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16184,29 +13099,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.flavor_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -16219,11 +13122,7 @@ def read(self, iprot): self.names = [] (_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() self.names.append(_elem336) iprot.readListEnd() else: @@ -16244,56 +13143,39 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter337 in self.names: - oprot.writeString( - iter337.encode("utf-8") if sys.version_info[0] == 2 else iter337 - ) + oprot.writeString(iter337.encode('utf-8') if sys.version_info[0] == 2 else iter337) 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() @@ -16303,68 +13185,25 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(scale_up_cluster_args) scale_up_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image_name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "flavor_name", - "UTF8", - None, - ), # 3 - ( - 4, - TType.I32, - "count", - None, - None, - ), # 4 - ( - 5, - TType.LIST, - "names", - (TType.STRING, "UTF8", False), - None, - ), # 5 - ( - 6, - TType.I32, - "start_idx", - None, - None, - ), # 6 - ( - 7, - TType.I32, - "batch_idx", - None, - None, - ), # 7 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'flavor_name', 'UTF8', None, ), # 3 + (4, TType.I32, 'count', None, None, ), # 4 + (5, TType.LIST, 'names', (TType.STRING, 'UTF8', False), None, ), # 5 + (6, TType.I32, 'start_idx', None, None, ), # 6 + (7, TType.I32, 'batch_idx', None, None, ), # 7 ) @@ -16375,20 +13214,12 @@ class scale_up_cluster_result(object): """ - thrift_spec = None - 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() @@ -16401,19 +13232,11 @@ def read(self, iprot): self.success = {} (_ktype339, _vtype340, _size338) = iprot.readMapBegin() for _i342 in range(_size338): - _key343 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key343 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _val344 = [] (_etype348, _size345) = iprot.readListBegin() for _i349 in range(_size345): - _elem350 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem350 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _val344.append(_elem350) iprot.readListEnd() self.success[_key343] = _val344 @@ -16426,25 +13249,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter351, viter352 in self.success.items(): - oprot.writeString( - kiter351.encode("utf-8") if sys.version_info[0] == 2 else kiter351 - ) + oprot.writeString(kiter351.encode('utf-8') if sys.version_info[0] == 2 else kiter351) oprot.writeListBegin(TType.STRING, len(viter352)) for iter353 in viter352: - oprot.writeString( - iter353.encode("utf-8") if sys.version_info[0] == 2 else iter353 - ) + oprot.writeString(iter353.encode('utf-8') if sys.version_info[0] == 2 else iter353) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -16455,25 +13271,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(scale_up_cluster_result) scale_up_cluster_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.LIST, (TType.STRING, "UTF8", False), False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.LIST, (TType.STRING, 'UTF8', False), False), None, ), # 0 ) @@ -16492,20 +13301,8 @@ class add_cluster_machine_args(object): """ - thrift_spec = 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, - ): + 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 @@ -16517,11 +13314,7 @@ def __init__( self.worker_idx = worker_idx def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16531,65 +13324,37 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.cluster_user = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.cluster_group_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_group_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.image_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.flavor_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.key_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: @@ -16608,73 +13373,44 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -16684,82 +13420,27 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_cluster_machine_args) add_cluster_machine_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "cluster_user", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "cluster_group_id", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "image_name", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "flavor_name", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "name", - "UTF8", - None, - ), # 6 - ( - 7, - TType.STRING, - "key_name", - "UTF8", - None, - ), # 7 - ( - 8, - TType.I32, - "batch_idx", - None, - None, - ), # 8 - ( - 9, - TType.I32, - "worker_idx", - None, - None, - ), # 9 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'cluster_user', 'UTF8', None, ), # 2 + (3, TType.STRING, 'cluster_group_id', 'UTF8', None, ), # 3 + (4, TType.STRING, 'image_name', 'UTF8', None, ), # 4 + (5, TType.STRING, 'flavor_name', 'UTF8', None, ), # 5 + (6, TType.STRING, 'name', 'UTF8', None, ), # 6 + (7, TType.STRING, 'key_name', 'UTF8', None, ), # 7 + (8, TType.I32, 'batch_idx', None, None, ), # 8 + (9, TType.I32, 'worker_idx', None, None, ), # 9 ) @@ -16770,20 +13451,12 @@ class add_cluster_machine_result(object): """ - thrift_spec = None - 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() @@ -16793,11 +13466,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16806,20 +13475,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -16828,25 +13490,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_cluster_machine_result) add_cluster_machine_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -16857,20 +13512,12 @@ class get_cluster_info_args(object): """ - thrift_spec = None - 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() @@ -16880,11 +13527,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16893,20 +13536,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -16915,26 +13551,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_info_args) get_cluster_info_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -16946,22 +13575,13 @@ class get_cluster_info_result(object): """ - thrift_spec = None - 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() @@ -16986,19 +13606,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -17008,32 +13625,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_info_result) get_cluster_info_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [ClusterInfo, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "c", - [ClusterNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [ClusterInfo, None], None, ), # 0 + (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 ) @@ -17044,20 +13648,12 @@ class get_cluster_status_args(object): """ - thrift_spec = None - 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() @@ -17067,11 +13663,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -17080,20 +13672,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -17102,26 +13687,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_status_args) get_cluster_status_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -17133,22 +13711,13 @@ class get_cluster_status_result(object): """ - thrift_spec = None - 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() @@ -17161,16 +13730,8 @@ def read(self, iprot): self.success = {} (_ktype355, _vtype356, _size354) = iprot.readMapBegin() for _i358 in range(_size354): - _key359 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val360 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key359 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val360 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key359] = _val360 iprot.readMapEnd() else: @@ -17186,27 +13747,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter361, viter362 in self.success.items(): - oprot.writeString( - kiter361.encode("utf-8") if sys.version_info[0] == 2 else kiter361 - ) - oprot.writeString( - viter362.encode("utf-8") if sys.version_info[0] == 2 else viter362 - ) + oprot.writeString(kiter361.encode('utf-8') if sys.version_info[0] == 2 else kiter361) + oprot.writeString(viter362.encode('utf-8') if sys.version_info[0] == 2 else viter362) 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() @@ -17216,32 +13770,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_status_result) get_cluster_status_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "c", - [ClusterNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 ) @@ -17252,20 +13793,12 @@ class get_keypair_public_key_by_name_args(object): """ - thrift_spec = None - def __init__( - self, - key_name=None, - ): + def __init__(self, key_name=None,): 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() @@ -17275,11 +13808,7 @@ def read(self, iprot): break if fid == 1: 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: @@ -17288,20 +13817,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_keypair_public_key_by_name_args") + oprot.writeStructBegin('get_keypair_public_key_by_name_args') if self.key_name is not None: - oprot.writeFieldBegin("key_name", TType.STRING, 1) - oprot.writeString( - self.key_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.key_name - ) + oprot.writeFieldBegin('key_name', TType.STRING, 1) + oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -17310,26 +13832,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_keypair_public_key_by_name_args) get_keypair_public_key_by_name_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "key_name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'key_name', 'UTF8', None, ), # 1 ) @@ -17340,20 +13855,12 @@ class get_keypair_public_key_by_name_result(object): """ - thrift_spec = None - 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() @@ -17363,11 +13870,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -17376,20 +13879,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_keypair_public_key_by_name_result") + oprot.writeStructBegin('get_keypair_public_key_by_name_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() @@ -17398,25 +13894,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_keypair_public_key_by_name_result) get_keypair_public_key_by_name_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -17427,20 +13916,12 @@ class delete_keypair_args(object): """ - thrift_spec = None - def __init__( - self, - key_name=None, - ): + def __init__(self, key_name=None,): 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() @@ -17450,11 +13931,7 @@ def read(self, iprot): break if fid == 1: 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: @@ -17463,20 +13940,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_keypair_args") + oprot.writeStructBegin('delete_keypair_args') if self.key_name is not None: - oprot.writeFieldBegin("key_name", TType.STRING, 1) - oprot.writeString( - self.key_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.key_name - ) + oprot.writeFieldBegin('key_name', TType.STRING, 1) + oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -17485,38 +13955,27 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_keypair_args) delete_keypair_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "key_name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'key_name', 'UTF8', None, ), # 1 ) class delete_keypair_result(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17530,13 +13989,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_keypair_result") + oprot.writeStructBegin('delete_keypair_result') oprot.writeFieldStop() oprot.writeStructEnd() @@ -17544,18 +14000,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(delete_keypair_result) -delete_keypair_result.thrift_spec = () +delete_keypair_result.thrift_spec = ( +) class add_default_security_groups_to_server_args(object): @@ -17565,20 +14021,12 @@ class add_default_security_groups_to_server_args(object): """ - thrift_spec = None - 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() @@ -17588,11 +14036,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -17601,20 +14045,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_default_security_groups_to_server_args") + oprot.writeStructBegin('add_default_security_groups_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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -17623,26 +14060,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_default_security_groups_to_server_args) add_default_security_groups_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -17653,20 +14083,12 @@ class add_default_security_groups_to_server_result(object): """ - thrift_spec = None - 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() @@ -17685,15 +14107,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_default_security_groups_to_server_result") + oprot.writeStructBegin('add_default_security_groups_to_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() oprot.writeFieldStop() @@ -17703,26 +14122,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_default_security_groups_to_server_result) add_default_security_groups_to_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 ) @@ -17730,23 +14142,17 @@ class get_server_args(object): """ Attributes: - openstack_id: Id of the server. + - no_connection """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None, no_connection=None,): self.openstack_id = openstack_id + self.no_connection = no_connection def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17756,11 +14162,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.no_connection = iprot.readBool() else: iprot.skip(ftype) else: @@ -17769,20 +14176,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() + if self.no_connection is not None: + oprot.writeFieldBegin('no_connection', TType.BOOL, 2) + oprot.writeBool(self.no_connection) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -17791,26 +14195,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_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 + (2, TType.BOOL, 'no_connection', None, None, ), # 2 ) @@ -17822,22 +14220,13 @@ class get_server_result(object): """ - thrift_spec = None - 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() @@ -17862,19 +14251,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -17884,32 +14270,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_result) get_server_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [VM, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 ) @@ -17917,23 +14290,17 @@ class get_server_by_unique_name_args(object): """ Attributes: - unique_name: Id of the server. + - no_connection """ - thrift_spec = None - def __init__( - self, - unique_name=None, - ): + def __init__(self, unique_name=None, no_connection=None,): self.unique_name = unique_name + self.no_connection = no_connection def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17943,11 +14310,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.unique_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.unique_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.BOOL: + self.no_connection = iprot.readBool() else: iprot.skip(ftype) else: @@ -17956,20 +14324,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_by_unique_name_args") + oprot.writeStructBegin('get_server_by_unique_name_args') if self.unique_name is not None: - oprot.writeFieldBegin("unique_name", TType.STRING, 1) - oprot.writeString( - self.unique_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.unique_name - ) + oprot.writeFieldBegin('unique_name', TType.STRING, 1) + oprot.writeString(self.unique_name.encode('utf-8') if sys.version_info[0] == 2 else self.unique_name) + oprot.writeFieldEnd() + if self.no_connection is not None: + oprot.writeFieldBegin('no_connection', TType.BOOL, 2) + oprot.writeBool(self.no_connection) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -17978,26 +14343,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_by_unique_name_args) get_server_by_unique_name_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "unique_name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'unique_name', 'UTF8', None, ), # 1 + (2, TType.BOOL, 'no_connection', None, None, ), # 2 ) @@ -18009,22 +14368,13 @@ class get_server_by_unique_name_result(object): """ - thrift_spec = None - 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() @@ -18049,19 +14399,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_by_unique_name_result") + oprot.writeStructBegin('get_server_by_unique_name_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() @@ -18071,32 +14418,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_by_unique_name_result) get_server_by_unique_name_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 ) @@ -18107,20 +14441,12 @@ class stop_server_args(object): """ - thrift_spec = None - 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() @@ -18130,11 +14456,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18143,20 +14465,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -18165,26 +14480,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(stop_server_args) stop_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -18196,22 +14504,13 @@ class stop_server_result(object): """ - thrift_spec = None - 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() @@ -18235,19 +14534,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -18257,33 +14553,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(stop_server_result) stop_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -18298,16 +14581,8 @@ class create_snapshot_args(object): """ - thrift_spec = None - 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 @@ -18315,11 +14590,7 @@ def __init__( self.description = description def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18329,29 +14600,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.username = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -18359,22 +14618,14 @@ def read(self, iprot): self.base_tags = [] (_etype366, _size363) = iprot.readListBegin() for _i367 in range(_size363): - _elem368 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem368 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.base_tags.append(_elem368) 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: @@ -18383,51 +14634,32 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter369 in self.base_tags: - oprot.writeString( - iter369.encode("utf-8") if sys.version_info[0] == 2 else iter369 - ) + oprot.writeString(iter369.encode('utf-8') if sys.version_info[0] == 2 else iter369) 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() @@ -18436,54 +14668,23 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_snapshot_args) create_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "username", - "UTF8", - None, - ), # 3 - ( - 4, - TType.LIST, - "base_tags", - (TType.STRING, "UTF8", False), - None, - ), # 4 - ( - 5, - TType.STRING, - "description", - "UTF8", - None, - ), # 5 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'username', 'UTF8', None, ), # 3 + (4, TType.LIST, 'base_tags', (TType.STRING, 'UTF8', False), None, ), # 4 + (5, TType.STRING, 'description', 'UTF8', None, ), # 5 ) @@ -18496,24 +14697,14 @@ class create_snapshot_result(object): """ - thrift_spec = None - 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() @@ -18523,11 +14714,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -18546,27 +14733,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -18576,51 +14756,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_snapshot_result) create_snapshot_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) class get_limits_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18634,13 +14791,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -18648,18 +14802,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): @@ -18669,20 +14823,12 @@ class get_limits_result(object): """ - thrift_spec = None - 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() @@ -18695,16 +14841,8 @@ def read(self, iprot): self.success = {} (_ktype371, _vtype372, _size370) = iprot.readMapBegin() for _i374 in range(_size370): - _key375 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val376 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key375 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val376 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key375] = _val376 iprot.readMapEnd() else: @@ -18715,23 +14853,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter377, viter378 in self.success.items(): - oprot.writeString( - kiter377.encode("utf-8") if sys.version_info[0] == 2 else kiter377 - ) - oprot.writeString( - viter378.encode("utf-8") if sys.version_info[0] == 2 else viter378 - ) + oprot.writeString(kiter377.encode('utf-8') if sys.version_info[0] == 2 else kiter377) + oprot.writeString(viter378.encode('utf-8') if sys.version_info[0] == 2 else viter378) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -18741,25 +14872,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_limits_result) get_limits_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -18773,26 +14897,15 @@ class start_cluster_args(object): """ - thrift_spec = None - def __init__( - self, - public_keys=None, - master_instance=None, - worker_instances=None, - user=None, - ): + def __init__(self, public_keys=None, master_instance=None, worker_instances=None, user=None,): self.public_keys = public_keys 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() @@ -18805,11 +14918,7 @@ def read(self, iprot): self.public_keys = [] (_etype382, _size379) = iprot.readListBegin() for _i383 in range(_size379): - _elem384 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem384 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.public_keys.append(_elem384) iprot.readListEnd() else: @@ -18833,11 +14942,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.user = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18846,38 +14951,31 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_keys is not None: - oprot.writeFieldBegin("public_keys", TType.LIST, 1) + oprot.writeFieldBegin('public_keys', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.public_keys)) for iter391 in self.public_keys: - oprot.writeString( - iter391.encode("utf-8") if sys.version_info[0] == 2 else iter391 - ) + oprot.writeString(iter391.encode('utf-8') if sys.version_info[0] == 2 else iter391) oprot.writeListEnd() 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 iter392 in self.worker_instances: iter392.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() @@ -18886,47 +14984,22 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_cluster_args) start_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.LIST, - "public_keys", - (TType.STRING, "UTF8", False), - 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.LIST, 'public_keys', (TType.STRING, 'UTF8', False), 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 ) @@ -18937,20 +15010,12 @@ class start_cluster_result(object): """ - thrift_spec = None - 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() @@ -18963,16 +15028,8 @@ def read(self, iprot): self.success = {} (_ktype394, _vtype395, _size393) = iprot.readMapBegin() for _i397 in range(_size393): - _key398 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val399 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key398 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val399 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key398] = _val399 iprot.readMapEnd() else: @@ -18983,23 +15040,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter400, viter401 in self.success.items(): - oprot.writeString( - kiter400.encode("utf-8") if sys.version_info[0] == 2 else kiter400 - ) - oprot.writeString( - viter401.encode("utf-8") if sys.version_info[0] == 2 else viter401 - ) + oprot.writeString(kiter400.encode('utf-8') if sys.version_info[0] == 2 else kiter400) + oprot.writeString(viter401.encode('utf-8') if sys.version_info[0] == 2 else viter401) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -19009,25 +15059,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_cluster_result) start_cluster_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -19038,20 +15081,12 @@ class terminate_cluster_args(object): """ - thrift_spec = None - 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() @@ -19061,11 +15096,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19074,20 +15105,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19096,26 +15120,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(terminate_cluster_args) terminate_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -19127,22 +15144,13 @@ class terminate_cluster_result(object): """ - thrift_spec = None - 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() @@ -19155,16 +15163,8 @@ def read(self, iprot): self.success = {} (_ktype403, _vtype404, _size402) = iprot.readMapBegin() for _i406 in range(_size402): - _key407 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val408 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key407 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val408 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key407] = _val408 iprot.readMapEnd() else: @@ -19180,27 +15180,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter409, viter410 in self.success.items(): - oprot.writeString( - kiter409.encode("utf-8") if sys.version_info[0] == 2 else kiter409 - ) - oprot.writeString( - viter410.encode("utf-8") if sys.version_info[0] == 2 else viter410 - ) + oprot.writeString(kiter409.encode('utf-8') if sys.version_info[0] == 2 else kiter409) + oprot.writeString(viter410.encode('utf-8') if sys.version_info[0] == 2 else viter410) 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() @@ -19210,32 +15203,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(terminate_cluster_result) terminate_cluster_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "c", - [ClusterNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 ) @@ -19246,20 +15226,12 @@ class delete_image_args(object): """ - thrift_spec = None - 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() @@ -19269,11 +15241,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.image_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19282,20 +15250,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19304,26 +15265,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_image_args) delete_image_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "image_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'image_id', 'UTF8', None, ), # 1 ) @@ -19334,20 +15288,12 @@ class delete_image_result(object): """ - thrift_spec = None - 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() @@ -19366,15 +15312,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19384,26 +15327,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_image_result) delete_image_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ImageNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 'e', [ImageNotFoundException, None], None, ), # 1 ) @@ -19415,22 +15351,13 @@ class detach_volume_args(object): """ - thrift_spec = None - 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() @@ -19440,20 +15367,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19462,28 +15381,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19492,33 +15400,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_volume_args) detach_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'server_id', 'UTF8', None, ), # 2 ) @@ -19531,24 +15426,14 @@ class detach_volume_result(object): """ - thrift_spec = None - 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() @@ -19577,23 +15462,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19603,40 +15485,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_volume_result) detach_volume_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "v", - [VolumeNotFoundException, None], - None, - ), # 3 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + (3, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 3 ) @@ -19647,20 +15510,12 @@ class delete_volume_args(object): """ - thrift_spec = None - 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() @@ -19670,11 +15525,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19683,20 +15534,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19705,26 +15549,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_args) delete_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 ) @@ -19736,22 +15573,13 @@ class delete_volume_result(object): """ - thrift_spec = None - 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() @@ -19775,19 +15603,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19797,33 +15622,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_result) delete_volume_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "v", - [VolumeNotFoundException, None], - None, - ), # 2 + (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 + (2, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 2 ) @@ -19835,22 +15647,13 @@ class attach_volume_to_server_args(object): """ - thrift_spec = None - 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() @@ -19860,20 +15663,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19882,28 +15677,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19912,33 +15696,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(attach_volume_to_server_args) attach_volume_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'volume_id', 'UTF8', None, ), # 2 ) @@ -19951,24 +15722,14 @@ class attach_volume_to_server_result(object): """ - thrift_spec = None - 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() @@ -19981,16 +15742,8 @@ def read(self, iprot): self.success = {} (_ktype412, _vtype413, _size411) = iprot.readMapBegin() for _i415 in range(_size411): - _key416 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val417 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key416 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val417 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key416] = _val417 iprot.readMapEnd() else: @@ -20011,31 +15764,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter418, viter419 in self.success.items(): - oprot.writeString( - kiter418.encode("utf-8") if sys.version_info[0] == 2 else kiter418 - ) - oprot.writeString( - viter419.encode("utf-8") if sys.version_info[0] == 2 else viter419 - ) + oprot.writeString(kiter418.encode('utf-8') if sys.version_info[0] == 2 else kiter418) + oprot.writeString(viter419.encode('utf-8') if sys.version_info[0] == 2 else viter419) 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() @@ -20045,39 +15791,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(attach_volume_to_server_result) attach_volume_to_server_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [VolumeNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -20088,20 +15815,12 @@ class resume_server_args(object): """ - thrift_spec = None - 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() @@ -20111,11 +15830,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -20124,20 +15839,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -20146,26 +15854,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resume_server_args) resume_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -20177,22 +15878,13 @@ class resume_server_result(object): """ - thrift_spec = None - 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() @@ -20216,19 +15908,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -20238,33 +15927,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resume_server_result) resume_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -20277,24 +15953,14 @@ class create_volume_args(object): """ - thrift_spec = None - 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() @@ -20304,11 +15970,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -20321,16 +15983,8 @@ def read(self, iprot): self.metadata = {} (_ktype421, _vtype422, _size420) = iprot.readMapBegin() for _i424 in range(_size420): - _key425 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val426 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key425 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val426 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key425] = _val426 iprot.readMapEnd() else: @@ -20341,35 +15995,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter427, viter428 in self.metadata.items(): - oprot.writeString( - kiter427.encode("utf-8") if sys.version_info[0] == 2 else kiter427 - ) - oprot.writeString( - viter428.encode("utf-8") if sys.version_info[0] == 2 else viter428 - ) + oprot.writeString(kiter427.encode('utf-8') if sys.version_info[0] == 2 else kiter427) + oprot.writeString(viter428.encode('utf-8') if sys.version_info[0] == 2 else viter428) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -20379,40 +16022,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_args) create_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.I32, - "volume_storage", - None, - None, - ), # 2 - ( - 3, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 3 + (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 + (2, TType.I32, 'volume_storage', None, None, ), # 2 + (3, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 ) @@ -20425,24 +16049,14 @@ class create_volume_result(object): """ - thrift_spec = None - 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() @@ -20472,23 +16086,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -20498,39 +16109,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_result) create_volume_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "n", - [ResourceNotAvailableException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 ) @@ -20543,24 +16135,14 @@ class create_volume_by_source_volume_args(object): """ - thrift_spec = None - 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() @@ -20570,11 +16152,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -20582,27 +16160,15 @@ def read(self, iprot): self.metadata = {} (_ktype430, _vtype431, _size429) = iprot.readMapBegin() for _i433 in range(_size429): - _key434 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val435 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key434 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val435 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key434] = _val435 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: @@ -20611,40 +16177,25 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter436, viter437 in self.metadata.items(): - oprot.writeString( - kiter436.encode("utf-8") if sys.version_info[0] == 2 else kiter436 - ) - oprot.writeString( - viter437.encode("utf-8") if sys.version_info[0] == 2 else viter437 - ) + oprot.writeString(kiter436.encode('utf-8') if sys.version_info[0] == 2 else kiter436) + oprot.writeString(viter437.encode('utf-8') if sys.version_info[0] == 2 else viter437) 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() @@ -20653,40 +16204,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_by_source_volume_args) create_volume_by_source_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 2 - ( - 3, - TType.STRING, - "source_volume_id", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 + (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 + (3, TType.STRING, 'source_volume_id', 'UTF8', None, ), # 3 ) @@ -20699,24 +16231,14 @@ class create_volume_by_source_volume_result(object): """ - thrift_spec = None - 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() @@ -20746,23 +16268,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -20772,39 +16291,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_by_source_volume_result) create_volume_by_source_volume_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "n", - [ResourceNotAvailableException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 ) @@ -20817,24 +16317,14 @@ class create_volume_by_volume_snap_args(object): """ - thrift_spec = None - 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() @@ -20844,11 +16334,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -20856,27 +16342,15 @@ def read(self, iprot): self.metadata = {} (_ktype439, _vtype440, _size438) = iprot.readMapBegin() for _i442 in range(_size438): - _key443 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val444 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key443 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val444 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key443] = _val444 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: @@ -20885,40 +16359,25 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter445, viter446 in self.metadata.items(): - oprot.writeString( - kiter445.encode("utf-8") if sys.version_info[0] == 2 else kiter445 - ) - oprot.writeString( - viter446.encode("utf-8") if sys.version_info[0] == 2 else viter446 - ) + oprot.writeString(kiter445.encode('utf-8') if sys.version_info[0] == 2 else kiter445) + oprot.writeString(viter446.encode('utf-8') if sys.version_info[0] == 2 else viter446) 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() @@ -20927,40 +16386,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_by_volume_snap_args) create_volume_by_volume_snap_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 2 - ( - 3, - TType.STRING, - "volume_snap_id", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 + (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 + (3, TType.STRING, 'volume_snap_id', 'UTF8', None, ), # 3 ) @@ -20973,24 +16413,14 @@ class create_volume_by_volume_snap_result(object): """ - thrift_spec = None - 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() @@ -21020,23 +16450,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21046,39 +16473,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_by_volume_snap_result) create_volume_by_volume_snap_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "n", - [ResourceNotAvailableException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 ) @@ -21091,24 +16499,14 @@ class create_volume_snapshot_args(object): """ - thrift_spec = None - 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() @@ -21118,29 +16516,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -21149,34 +16535,21 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21185,40 +16558,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_snapshot_args) create_volume_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "description", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'description', 'UTF8', None, ), # 3 ) @@ -21231,24 +16585,14 @@ class create_volume_snapshot_result(object): """ - thrift_spec = None - 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() @@ -21258,11 +16602,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -21281,27 +16621,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21311,39 +16644,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_snapshot_result) create_volume_snapshot_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [VolumeNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 2 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [DefaultException, None], None, ), # 2 ) @@ -21354,20 +16668,12 @@ class get_volume_snapshot_args(object): """ - thrift_spec = None - 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() @@ -21377,11 +16683,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -21390,20 +16692,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21412,26 +16707,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_snapshot_args) get_volume_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'name_or_id', 'UTF8', None, ), # 1 ) @@ -21443,22 +16731,13 @@ class get_volume_snapshot_result(object): """ - thrift_spec = None - 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() @@ -21483,19 +16762,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21505,32 +16781,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_snapshot_result) get_volume_snapshot_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Snapshot, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [ResourceNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [Snapshot, None], None, ), # 0 + (1, TType.STRUCT, 'r', [ResourceNotFoundException, None], None, ), # 1 ) @@ -21541,20 +16804,12 @@ class delete_volume_snapshot_args(object): """ - thrift_spec = None - 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() @@ -21564,11 +16819,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.snapshot_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.snapshot_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -21577,20 +16828,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21599,26 +16843,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_snapshot_args) delete_volume_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "snapshot_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'snapshot_id', 'UTF8', None, ), # 1 ) @@ -21630,22 +16867,13 @@ class delete_volume_snapshot_result(object): """ - thrift_spec = None - 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() @@ -21669,19 +16897,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21691,33 +16916,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_snapshot_result) delete_volume_snapshot_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "e", - [DefaultException, None], - None, - ), # 2 + (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 + (2, TType.STRUCT, 'e', [DefaultException, None], None, ), # 2 ) @@ -21728,20 +16940,12 @@ class reboot_hard_server_args(object): """ - thrift_spec = None - 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() @@ -21751,11 +16955,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -21764,20 +16964,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21786,26 +16979,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_hard_server_args) reboot_hard_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -21817,22 +17003,13 @@ class reboot_hard_server_result(object): """ - thrift_spec = None - 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() @@ -21856,19 +17033,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21878,33 +17052,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_hard_server_result) reboot_hard_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -21915,20 +17076,12 @@ class reboot_soft_server_args(object): """ - thrift_spec = None - 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() @@ -21938,11 +17091,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -21951,20 +17100,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -21973,26 +17115,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_soft_server_args) reboot_soft_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -22004,22 +17139,13 @@ class reboot_soft_server_result(object): """ - thrift_spec = None - 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() @@ -22043,19 +17169,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -22065,33 +17188,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_soft_server_result) reboot_soft_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) fix_spec(all_structs) del all_structs diff --git a/simple_vm_client/constants.py b/simple_vm_client/constants.py index 9960013e..04f3806d 100644 --- a/simple_vm_client/constants.py +++ b/simple_vm_client/constants.py @@ -1,10 +1,15 @@ # -# Autogenerated by Thrift Compiler (0.22.0) +# Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec +import sys +from .ttypes import * VERSION = "1.0.0" diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index f1a084bd..8ec1b330 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -909,6 +909,18 @@ def delete_security_group_rule(self, openstack_id): raise DefaultException( message=f"Could not delete security group rule - {openstack_id}" ) + + def delete_server_security_groups(self, openstack_id): + logger.info(f"Delete Security Groups for {openstack_id}") + server = self.get_server(openstack_id=openstack_id) + deleted = self.openstack_connection.remove_server_security_groups( + server, server.security_groups + ) + logger.info(f"Delete Result -- {deleted}") + if not deleted: + raise DefaultException( + message=f"Could not delete security groups for {openstack_id}" + ) def open_port_range_for_vm_in_project( self, range_start, range_stop, openstack_id, ethertype="IPv4", protocol="TCP" @@ -1212,7 +1224,7 @@ def set_server_metadata(self, openstack_id: str, metadata) -> None: message=f"Error when setting server {openstack_id} metadata --> {metadata}! - {e}" ) - def get_server_by_unique_name(self, unique_name: str) -> Server: + def get_server_by_unique_name(self, unique_name: str, no_connection: bool = False) -> Server: logger.info(f"Get Server by unique_name: {unique_name}") filters = {"name": unique_name} @@ -1222,7 +1234,7 @@ def get_server_by_unique_name(self, unique_name: str) -> Server: if len(servers) == 1: server = list(servers)[0] logger.info(server) - if server.vm_state == VmStates.ACTIVE.value: + if server.vm_state == VmStates.ACTIVE.value and not no_connection: ssh_port, udp_port = self._calculate_vm_ports(server=server) if not self.netcat(port=ssh_port): @@ -1249,7 +1261,7 @@ def get_server_by_unique_name(self, unique_name: str) -> Server: message=f"Error when getting server {unique_name}! - multiple entries" ) - def get_server(self, openstack_id: str) -> Server: + def get_server(self, openstack_id: str, no_connection: bool = False) -> Server: try: logger.info(f"Get Server by id: {openstack_id}") server: Server = self.openstack_connection.get_server_by_id(id=openstack_id) @@ -1259,7 +1271,7 @@ def get_server(self, openstack_id: str) -> Server: message=f"Instance {openstack_id} not found", name_or_id=openstack_id, ) - if server.vm_state == VmStates.ACTIVE.value: + if server.vm_state == VmStates.ACTIVE.value and not no_connection: ssh_port, udp_port = self._calculate_vm_ports(server=server) if not self.netcat(port=ssh_port): @@ -1714,6 +1726,23 @@ def add_research_environment_security_group( self.openstack_connection.compute.add_security_group_to_server( server=server, security_group=security_group ) + + def add_project_security_group_to_server( + self, server_id: str, project_name: str, project_id: str + ): + logger.info(f"Setting up {project_name} security group for {server_id}") + server: Server = self.get_server(openstack_id=server_id) + security_group_id = self.get_or_create_project_security_group( + project_name=project_name, project_id=project_id + ) + security_group = self.openstack_connection.get_security_group(name_or_id=security_group_id) + if self._is_security_group_already_added_to_server( + server=server, security_group_name=security_group.name + ): + return + 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) diff --git a/simple_vm_client/test_openstack_connector.py b/simple_vm_client/test_openstack_connector.py index c4d777b5..f65ac09b 100644 --- a/simple_vm_client/test_openstack_connector.py +++ b/simple_vm_client/test_openstack_connector.py @@ -25,8 +25,8 @@ ) from simple_vm_client.util.state_enums import VmStates, VmTaskStates -from .openstack_connector.openstack_connector import OpenStackConnector -from .ttypes import ( +from openstack_connector.openstack_connector import OpenStackConnector +from ttypes import ( DefaultException, FlavorNotFoundException, ImageNotFoundException, @@ -2924,6 +2924,30 @@ def test_delete_security_group_rule_failure(self): rule_id="rule_id" ) + @patch.object(OpenStackConnector, "get_server") + def test_delete_server_security_groups_sucess(self, mock_get_server): + server_mock = fakes.generate_fake_resource(server.Server) + mock_get_server.return_value = server_mock + + self.openstack_connector.delete_server_security_groups(server_mock.id) + self.openstack_connector.openstack_connection.remove_server_security_groups.assert_called_once_with( + server_mock, server_mock.security_groups + ) + + @patch.object(OpenStackConnector, "get_server") + def test_delete_server_security_groups_failure(self, mock_get_server): + server_mock = fakes.generate_fake_resource(server.Server) + mock_get_server.return_value = server_mock + + self.openstack_connector.openstack_connection.remove_server_security_groups.return_value = ( + False + ) + with self.assertRaises(DefaultException): + self.openstack_connector.delete_server_security_groups(server_mock.id) + self.openstack_connector.openstack_connection.remove_server_security_groups.assert_called_once_with( + server_mock, server_mock.security_groups + ) + def test_get_gateway_ip(self): result = self.openstack_connector.get_gateway_ip() self.assertEqual( diff --git a/simple_vm_client/test_virtualmachinehandler.py b/simple_vm_client/test_virtualmachinehandler.py index 38da130b..be57f6db 100644 --- a/simple_vm_client/test_virtualmachinehandler.py +++ b/simple_vm_client/test_virtualmachinehandler.py @@ -421,6 +421,12 @@ def test_delete_security_group_rule(self): openstack_id=OPENSTACK_ID ) + def test_delete_server_security_groups(self): + self.handler.delete_server_security_groups(openstack_id=OPENSTACK_ID) + self.handler.openstack_connector.delete_server_security_groups.assert_called_once_with( + openstack_id=OPENSTACK_ID + ) + def test_open_port_range_for_vm_in_project(self): self.handler.open_port_range_for_vm_in_project( range_start=1000, range_stop=1000, openstack_id=OPENSTACK_ID diff --git a/simple_vm_client/ttypes.py b/simple_vm_client/ttypes.py index 82058366..825c425d 100644 --- a/simple_vm_client/ttypes.py +++ b/simple_vm_client/ttypes.py @@ -1,18 +1,18 @@ # -# Autogenerated by Thrift Compiler (0.22.0) +# Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import sys - +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException -from thrift.Thrift import TException, TType -from thrift.transport import TTransport from thrift.TRecursive import fix_spec +import sys + +from thrift.transport import TTransport all_structs = [] @@ -25,24 +25,14 @@ class User(object): """ - thrift_spec = None - def __init__( - self, - username=None, - user_id=None, - public_keys=None, - ): + def __init__(self, username=None, user_id=None, public_keys=None,): self.username = username self.user_id = user_id self.public_keys = public_keys def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -52,20 +42,12 @@ def read(self, iprot): break if fid == 1: 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 == 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) elif fid == 3: @@ -73,11 +55,7 @@ def read(self, iprot): self.public_keys = [] (_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.public_keys.append(_elem5) iprot.readListEnd() else: @@ -88,36 +66,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("User") + oprot.writeStructBegin('User') if self.username is not None: - oprot.writeFieldBegin("username", TType.STRING, 1) - oprot.writeString( - self.username.encode("utf-8") - if sys.version_info[0] == 2 - else self.username - ) + oprot.writeFieldBegin('username', TType.STRING, 1) + oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) 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() if self.public_keys is not None: - oprot.writeFieldBegin("public_keys", TType.LIST, 3) + oprot.writeFieldBegin('public_keys', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.public_keys)) for iter6 in self.public_keys: - oprot.writeString( - iter6.encode("utf-8") if sys.version_info[0] == 2 else iter6 - ) + oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -125,12 +90,13 @@ def write(self, oprot): def validate(self): if self.user_id is None: - raise TProtocolException(message="Required field user_id is unset!") + raise TProtocolException(message='Required field user_id 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__ @@ -146,22 +112,16 @@ class UserData(object): """ - thrift_spec = None - def __init__( - self, - data={}, - ): + def __init__(self, data={ + },): if data is self.thrift_spec[2][4]: - data = {} + data = { + } self.data = data def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -174,11 +134,7 @@ def read(self, iprot): self.data = {} (_ktype8, _vtype9, _size7) = iprot.readMapBegin() for _i11 in range(_size7): - _key12 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _val13 = User() _val13.read(iprot) self.data[_key12] = _val13 @@ -191,20 +147,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("UserData") + oprot.writeStructBegin('UserData') if self.data is not None: - oprot.writeFieldBegin("data", TType.MAP, 2) + oprot.writeFieldBegin('data', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.data)) for kiter14, viter15 in self.data.items(): - oprot.writeString( - kiter14.encode("utf-8") if sys.version_info[0] == 2 else kiter14 - ) + oprot.writeString(kiter14.encode('utf-8') if sys.version_info[0] == 2 else kiter14) viter15.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -213,12 +164,13 @@ def write(self, oprot): def validate(self): if self.data is None: - raise TProtocolException(message="Required field data is unset!") + raise TProtocolException(message='Required field data 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__ @@ -236,24 +188,14 @@ class VirtualMachineServerMetadata(object): """ - thrift_spec = None - def __init__( - self, - ip=None, - hashed_auth_token=None, - userdata=None, - ): + def __init__(self, ip=None, hashed_auth_token=None, userdata=None,): self.ip = ip self.hashed_auth_token = hashed_auth_token self.userdata = userdata def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -263,20 +205,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ip = 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.hashed_auth_token = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.hashed_auth_token = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -291,29 +225,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("VirtualMachineServerMetadata") + oprot.writeStructBegin('VirtualMachineServerMetadata') if self.ip is not None: - oprot.writeFieldBegin("ip", TType.STRING, 1) - oprot.writeString( - self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip - ) + oprot.writeFieldBegin('ip', TType.STRING, 1) + oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) oprot.writeFieldEnd() if self.hashed_auth_token is not None: - oprot.writeFieldBegin("hashed_auth_token", TType.STRING, 2) - oprot.writeString( - self.hashed_auth_token.encode("utf-8") - if sys.version_info[0] == 2 - else self.hashed_auth_token - ) + oprot.writeFieldBegin('hashed_auth_token', TType.STRING, 2) + oprot.writeString(self.hashed_auth_token.encode('utf-8') if sys.version_info[0] == 2 else self.hashed_auth_token) oprot.writeFieldEnd() if self.userdata is not None: - oprot.writeFieldBegin("userdata", TType.STRUCT, 3) + oprot.writeFieldBegin('userdata', TType.STRUCT, 3) self.userdata.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -321,16 +246,15 @@ def write(self, oprot): def validate(self): if self.ip is None: - raise TProtocolException(message="Required field ip is unset!") + raise TProtocolException(message='Required field ip is unset!') if self.hashed_auth_token is None: - raise TProtocolException( - message="Required field hashed_auth_token is unset!" - ) + raise TProtocolException(message='Required field hashed_auth_token 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__ @@ -350,16 +274,8 @@ class Backend(object): """ - thrift_spec = None - 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 @@ -367,11 +283,7 @@ def __init__( self.template_version = template_version def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -386,38 +298,22 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.location_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.location_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.template_version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -426,46 +322,29 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -474,8 +353,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -502,23 +382,8 @@ class ResearchEnvironmentTemplate(object): """ - thrift_spec = None - - 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, - ): + + 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 @@ -537,11 +402,7 @@ def __init__( 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() @@ -551,47 +412,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.title = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.title = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.logo_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.logo_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.info_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.info_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: @@ -604,11 +445,7 @@ def read(self, iprot): self.incompatible_versions = [] (_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.incompatible_versions.append(_elem21) iprot.readListEnd() else: @@ -623,16 +460,8 @@ def read(self, iprot): self.information_for_display = {} (_ktype23, _vtype24, _size22) = iprot.readMapBegin() for _i26 in range(_size22): - _key27 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val28 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key27 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val28 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.information_for_display[_key27] = _val28 iprot.readMapEnd() else: @@ -649,11 +478,7 @@ def read(self, iprot): 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() - ) + self.securitygroup_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -662,97 +487,64 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter29 in self.incompatible_versions: - oprot.writeString( - iter29.encode("utf-8") if sys.version_info[0] == 2 else iter29 - ) + oprot.writeString(iter29.encode('utf-8') if sys.version_info[0] == 2 else iter29) 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 kiter30, viter31 in self.information_for_display.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.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.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() @@ -761,8 +553,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -782,16 +575,8 @@ class CondaPackage(object): """ - thrift_spec = None - 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 @@ -799,11 +584,7 @@ def __init__( self.home = home def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -813,47 +594,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.build = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.build = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.build_number = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.build_number = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.home = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.home = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -862,46 +623,29 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -910,8 +654,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -935,20 +680,8 @@ class ClusterInfo(object): """ - thrift_spec = 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, - ): + + 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 @@ -960,11 +693,7 @@ def __init__( self.key_name = key_name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -974,56 +703,32 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.launch_date = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.launch_date = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.group_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.group_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.network_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.network_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.public_ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.subnet_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.subnet_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.user = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -1033,20 +738,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: - self.key_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1055,78 +752,45 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -1135,8 +799,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1159,19 +824,8 @@ class Volume(object): """ - thrift_spec = None - - 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 @@ -1182,11 +836,7 @@ def __init__( self.server_id = server_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1196,56 +846,32 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.device = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.device = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -1255,11 +881,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1268,64 +890,41 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -1334,8 +933,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1359,18 +959,8 @@ class Snapshot(object): """ - thrift_spec = None - - 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 @@ -1380,11 +970,7 @@ def __init__( self.volume_id = volume_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1394,47 +980,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: @@ -1444,11 +1010,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1457,58 +1019,37 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -1517,8 +1058,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1541,17 +1083,8 @@ class Flavor(object): """ - thrift_spec = None - - 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 @@ -1560,11 +1093,7 @@ def __init__( self.ephemeral_disk = ephemeral_disk def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1589,20 +1118,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: @@ -1616,41 +1137,32 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -1658,18 +1170,19 @@ def write(self, oprot): def validate(self): if self.vcpus is None: - raise TProtocolException(message="Required field vcpus is unset!") + raise TProtocolException(message='Required field vcpus is unset!') if self.ram is None: - raise TProtocolException(message="Required field ram is unset!") + raise TProtocolException(message='Required field ram is unset!') if self.disk is None: - raise TProtocolException(message="Required field disk is unset!") + raise TProtocolException(message='Required field disk is unset!') if self.name is None: - raise TProtocolException(message="Required field name is unset!") + raise TProtocolException(message='Required field name is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1700,25 +1213,8 @@ class Image(object): """ - thrift_spec = 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, - os_distro=None, - title=None, - slurm_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, os_distro=None, title=None, slurm_version=None,): self.name = name self.min_disk = min_disk self.min_ram = min_ram @@ -1735,11 +1231,7 @@ def __init__( self.slurm_version = slurm_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() @@ -1749,11 +1241,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -1768,47 +1256,27 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.updated_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.updated_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: @@ -1816,11 +1284,7 @@ def read(self, iprot): self.tags = [] (_etype35, _size32) = iprot.readListBegin() for _i36 in range(_size32): - _elem37 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem37 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.tags.append(_elem37) iprot.readListEnd() else: @@ -1832,38 +1296,22 @@ 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) elif fid == 12: if ftype == TType.STRING: - self.os_distro = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.os_distro = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 13: 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 == 14: if ftype == TType.STRING: - self.slurm_version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.slurm_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1872,129 +1320,91 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 iter38 in self.tags: - oprot.writeString( - iter38.encode("utf-8") if sys.version_info[0] == 2 else iter38 - ) + oprot.writeString(iter38.encode('utf-8') if sys.version_info[0] == 2 else iter38) 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() if self.os_distro is not None: - oprot.writeFieldBegin("os_distro", TType.STRING, 12) - oprot.writeString( - self.os_distro.encode("utf-8") - if sys.version_info[0] == 2 - else self.os_distro - ) + oprot.writeFieldBegin('os_distro', TType.STRING, 12) + oprot.writeString(self.os_distro.encode('utf-8') if sys.version_info[0] == 2 else self.os_distro) oprot.writeFieldEnd() if self.title is not None: - oprot.writeFieldBegin("title", TType.STRING, 13) - oprot.writeString( - self.title.encode("utf-8") if sys.version_info[0] == 2 else self.title - ) + oprot.writeFieldBegin('title', TType.STRING, 13) + oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) oprot.writeFieldEnd() if self.slurm_version is not None: - oprot.writeFieldBegin("slurm_version", TType.STRING, 14) - oprot.writeString( - self.slurm_version.encode("utf-8") - if sys.version_info[0] == 2 - else self.slurm_version - ) + oprot.writeFieldBegin('slurm_version', TType.STRING, 14) + oprot.writeString(self.slurm_version.encode('utf-8') if sys.version_info[0] == 2 else self.slurm_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__ @@ -2023,23 +1433,8 @@ class VM(object): """ - thrift_spec = 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, - ): + + 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 @@ -2054,11 +1449,7 @@ def __init__( self.vm_state = vm_state def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -2083,99 +1474,55 @@ def read(self, iprot): self.metadata = {} (_ktype40, _vtype41, _size39) = iprot.readMapBegin() for _i43 in range(_size39): - _key44 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val45 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key44 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val45 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key44] = _val45 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: @@ -2184,124 +1531,84 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter46, viter47 in self.metadata.items(): - oprot.writeString( - kiter46.encode("utf-8") if sys.version_info[0] == 2 else kiter46 - ) - oprot.writeString( - viter47.encode("utf-8") if sys.version_info[0] == 2 else viter47 - ) + oprot.writeString(kiter46.encode('utf-8') if sys.version_info[0] == 2 else kiter46) + oprot.writeString(viter47.encode('utf-8') if sys.version_info[0] == 2 else viter47) 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__ @@ -2319,24 +1626,14 @@ class ClusterInstance(object): """ - thrift_spec = None - 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() @@ -2346,20 +1643,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.type = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -2373,27 +1662,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -2401,14 +1683,15 @@ def write(self, oprot): def validate(self): if self.type is None: - raise TProtocolException(message="Required field type is unset!") + raise TProtocolException(message='Required field type is unset!') if self.image is None: - raise TProtocolException(message="Required field image is unset!") + raise TProtocolException(message='Required field image is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2428,24 +1711,14 @@ class PlaybookResult(object): """ - thrift_spec = None - 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() @@ -2460,20 +1733,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.stdout = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.stdout = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.stderr = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.stderr = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2482,44 +1747,38 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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__ @@ -2535,13 +1794,9 @@ class MetadataServerNotAvailableException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - ): - super(MetadataServerNotAvailableException, self).__setattr__("message", message) + def __init__(self, message=None,): + super(MetadataServerNotAvailableException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2550,15 +1805,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2568,11 +1819,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2584,20 +1831,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("MetadataServerNotAvailableException") + oprot.writeStructBegin('MetadataServerNotAvailableException') 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() @@ -2609,8 +1849,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2626,13 +1867,9 @@ class MetadataServerNotAllowedException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - ): - super(MetadataServerNotAllowedException, self).__setattr__("message", message) + def __init__(self, message=None,): + super(MetadataServerNotAllowedException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2641,15 +1878,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2659,11 +1892,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2675,20 +1904,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("MetadataServerNotAllowedException") + oprot.writeStructBegin('MetadataServerNotAllowedException') 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() @@ -2700,8 +1922,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2719,19 +1942,11 @@ class ResourceNotFoundException(TException): """ - thrift_spec = None - - 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") @@ -2740,21 +1955,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.resource_type, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.resource_type, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2766,29 +1971,17 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - resource_type = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + resource_type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2802,36 +1995,21 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -2843,8 +2021,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2860,13 +2039,9 @@ class ResourceNotAvailableException(TException): """ - thrift_spec = None - 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") @@ -2875,15 +2050,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2893,11 +2064,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2909,20 +2076,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -2934,8 +2094,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2952,15 +2113,10 @@ class TemplateNotFoundException(TException): """ - thrift_spec = None - 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") @@ -2969,20 +2125,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.template, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.template, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2993,20 +2140,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3019,28 +2158,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -3052,8 +2180,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3070,15 +2199,10 @@ class NameAlreadyUsedException(TException): """ - thrift_spec = None - 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") @@ -3087,20 +2211,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3111,20 +2226,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3137,26 +2244,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -3168,8 +2266,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3186,15 +2285,10 @@ class ServerNotFoundException(TException): """ - thrift_spec = None - 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") @@ -3203,20 +2297,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3227,20 +2312,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3253,28 +2330,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -3286,8 +2352,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3304,17 +2371,10 @@ class SecurityGroupNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(SecurityGroupNotFoundException, self).__setattr__("message", message) - super(SecurityGroupNotFoundException, self).__setattr__( - "name_or_id", name_or_id - ) + def __init__(self, message=None, name_or_id=None,): + super(SecurityGroupNotFoundException, self).__setattr__('message', message) + super(SecurityGroupNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3323,20 +2383,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3347,20 +2398,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3373,28 +2416,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("SecurityGroupNotFoundException") + oprot.writeStructBegin('SecurityGroupNotFoundException') 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() @@ -3406,8 +2438,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3424,17 +2457,10 @@ class SecurityGroupRuleNotFoundException(TException): """ - thrift_spec = None - 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") @@ -3443,20 +2469,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3467,20 +2484,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3493,28 +2502,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -3526,8 +2524,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3544,15 +2543,10 @@ class FlavorNotFoundException(TException): """ - thrift_spec = None - 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") @@ -3561,20 +2555,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3585,20 +2570,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3611,28 +2588,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -3644,8 +2610,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3662,15 +2629,10 @@ class VolumeNotFoundException(TException): """ - thrift_spec = None - 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") @@ -3679,20 +2641,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3703,20 +2656,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3729,28 +2674,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -3762,8 +2696,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3780,15 +2715,10 @@ class SnapshotNotFoundException(TException): """ - thrift_spec = None - 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") @@ -3797,20 +2727,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3821,20 +2742,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3847,28 +2760,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -3880,8 +2782,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3898,15 +2801,10 @@ class ImageNotFoundException(TException): """ - thrift_spec = None - 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") @@ -3915,20 +2813,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3939,20 +2828,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3965,28 +2846,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -3998,8 +2868,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4016,15 +2887,10 @@ class ClusterNotFoundException(TException): """ - thrift_spec = None - 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") @@ -4033,20 +2899,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4057,20 +2914,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4083,28 +2932,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -4116,8 +2954,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4134,15 +2973,10 @@ class BackendNotFoundException(TException): """ - thrift_spec = None - 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") @@ -4151,20 +2985,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4175,20 +3000,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4201,28 +3018,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -4234,8 +3040,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4252,15 +3059,10 @@ class PlaybookNotFoundException(TException): """ - thrift_spec = None - 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") @@ -4269,20 +3071,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4293,20 +3086,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4319,28 +3104,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -4352,8 +3126,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4369,13 +3144,9 @@ class DefaultException(TException): """ - thrift_spec = None - 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") @@ -4384,15 +3155,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4402,11 +3169,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4418,20 +3181,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -4443,8 +3199,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4462,13 +3219,9 @@ class OpenStackConflictException(TException): """ - thrift_spec = None - 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") @@ -4477,15 +3230,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4495,11 +3244,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4511,20 +3256,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -4536,1005 +3274,267 @@ 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(User) User.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "username", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "user_id", - "UTF8", - None, - ), # 2 - ( - 3, - TType.LIST, - "public_keys", - (TType.STRING, "UTF8", False), - None, - ), # 3 + (1, TType.STRING, 'username', 'UTF8', None, ), # 1 + (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 + (3, TType.LIST, 'public_keys', (TType.STRING, 'UTF8', False), None, ), # 3 ) all_structs.append(UserData) UserData.thrift_spec = ( None, # 0 None, # 1 - ( - 2, - TType.MAP, - "data", - (TType.STRING, "UTF8", TType.STRUCT, [User, None], False), - {}, - ), # 2 + (2, TType.MAP, 'data', (TType.STRING, 'UTF8', TType.STRUCT, [User, None], False), { + }, ), # 2 ) all_structs.append(VirtualMachineServerMetadata) VirtualMachineServerMetadata.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "ip", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "hashed_auth_token", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRUCT, - "userdata", - [UserData, None], - None, - ), # 3 + (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 + (2, TType.STRING, 'hashed_auth_token', 'UTF8', None, ), # 2 + (3, TType.STRUCT, 'userdata', [UserData, None], None, ), # 3 ) 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 - ( - 12, - TType.STRING, - "securitygroup_name", - "UTF8", - None, - ), # 12 + (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 - ( - 12, - TType.STRING, - "os_distro", - "UTF8", - None, - ), # 12 - ( - 13, - TType.STRING, - "title", - "UTF8", - None, - ), # 13 - ( - 14, - TType.STRING, - "slurm_version", - "UTF8", - None, - ), # 14 + (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 + (12, TType.STRING, 'os_distro', 'UTF8', None, ), # 12 + (13, TType.STRING, 'title', 'UTF8', None, ), # 13 + (14, TType.STRING, 'slurm_version', 'UTF8', None, ), # 14 ) 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(MetadataServerNotAvailableException) MetadataServerNotAvailableException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) all_structs.append(MetadataServerNotAllowedException) MetadataServerNotAllowedException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) 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(SecurityGroupNotFoundException) SecurityGroupNotFoundException.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 diff --git a/simple_vm_client/util/state_enums.py b/simple_vm_client/util/state_enums.py index 9554c821..4d7d2678 100644 --- a/simple_vm_client/util/state_enums.py +++ b/simple_vm_client/util/state_enums.py @@ -77,3 +77,4 @@ class VmStates(Enum): CLIENT_OFFLINE = "client_offline" PLANNED = "planned" PORT_CLOSED = "port_closed" + CONNECTION_DISABLED = "connection_disabled" From 0a4ff40cb5c1ec891c3b6bb64451944872969e02 Mon Sep 17 00:00:00 2001 From: qqmok Date: Thu, 12 Dec 2024 16:10:44 +0100 Subject: [PATCH 2/5] fix(remove_security_groups): use existing method --- .../openstack_connector/openstack_connector.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index 8ec1b330..2c091859 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -912,15 +912,12 @@ def delete_security_group_rule(self, openstack_id): def delete_server_security_groups(self, openstack_id): logger.info(f"Delete Security Groups for {openstack_id}") - server = self.get_server(openstack_id=openstack_id) - deleted = self.openstack_connection.remove_server_security_groups( - server, server.security_groups - ) - logger.info(f"Delete Result -- {deleted}") - if not deleted: - raise DefaultException( - message=f"Could not delete security groups for {openstack_id}" - ) + try: + server: Server = self.get_server(openstack_id=openstack_id) + self._remove_security_groups_from_server(server) + except ConflictException as e: + logger.error(f"Delete Security Groups for {openstack_id} failed!") + raise OpenStackConflictException(message=e.message) def open_port_range_for_vm_in_project( self, range_start, range_stop, openstack_id, ethertype="IPv4", protocol="TCP" From f2963b1ad9314da6051fea296f21928f4af58bfa Mon Sep 17 00:00:00 2001 From: qqmok Date: Thu, 12 Dec 2024 16:27:16 +0100 Subject: [PATCH 3/5] fix(remove_security_groups): adjusted function names --- portal_client.thrift | 2 +- simple_vm_client/VirtualMachineHandler.py | 4 +- simple_vm_client/VirtualMachineService-remote | 8 +-- simple_vm_client/VirtualMachineService.py | 52 +++++++++---------- .../openstack_connector.py | 18 +++---- simple_vm_client/test_openstack_connector.py | 8 +-- .../test_virtualmachinehandler.py | 6 +-- 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index f4fc65a1..ab6185f9 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -458,7 +458,7 @@ service VirtualMachineService { void delete_security_group_rule(1:string openstack_id) throws (1:SecurityGroupRuleNotFoundException e,2:DefaultException f) - void delete_server_security_groups(1:string openstack_id) throws (1:SecurityGroupRuleNotFoundException e,2:DefaultException f) + void remove_security_groups_from_server(1:string openstack_id) throws (1:SecurityGroupRuleNotFoundException e,2:OpenStackConflictException f) /** diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 5f9a5557..4bf2f8e8 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -347,8 +347,8 @@ def delete_security_group_rule(self, openstack_id): openstack_id=openstack_id ) - def delete_server_security_groups(self, openstack_id): - return self.openstack_connector.delete_server_security_groups( + def remove_security_groups_from_server(self, openstack_id): + return self.openstack_connector.remove_security_groups_from_server( openstack_id=openstack_id ) diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index 5b50dcf0..b71b4ef6 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -44,7 +44,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': 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_security_groups(string openstack_id)') + print(' void remove_security_groups_from_server(string openstack_id)') print(' void delete_server(string openstack_id)') print(' void rescue_server(string openstack_id, string admin_pass, string image_ref)') print(' void unrescue_server(string openstack_id)') @@ -300,11 +300,11 @@ elif cmd == 'delete_security_group_rule': sys.exit(1) pp.pprint(client.delete_security_group_rule(args[0],)) -elif cmd == 'delete_server_security_groups': +elif cmd == 'remove_security_groups_from_server': if len(args) != 1: - print('delete_server_security_groups requires 1 args') + print('remove_security_groups_from_server requires 1 args') sys.exit(1) - pp.pprint(client.delete_server_security_groups(args[0],)) + pp.pprint(client.remove_security_groups_from_server(args[0],)) elif cmd == 'delete_server': if len(args) != 1: diff --git a/simple_vm_client/VirtualMachineService.py b/simple_vm_client/VirtualMachineService.py index 5cfd1ef3..09f673f7 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -205,7 +205,7 @@ def delete_security_group_rule(self, openstack_id): """ pass - def delete_server_security_groups(self, openstack_id): + def remove_security_groups_from_server(self, openstack_id): """ Parameters: - openstack_id @@ -1484,24 +1484,24 @@ def recv_delete_security_group_rule(self): raise result.f return - def delete_server_security_groups(self, openstack_id): + def remove_security_groups_from_server(self, openstack_id): """ Parameters: - openstack_id """ - self.send_delete_server_security_groups(openstack_id) - self.recv_delete_server_security_groups() + self.send_remove_security_groups_from_server(openstack_id) + self.recv_remove_security_groups_from_server() - def send_delete_server_security_groups(self, openstack_id): - self._oprot.writeMessageBegin('delete_server_security_groups', TMessageType.CALL, self._seqid) - args = delete_server_security_groups_args() + def send_remove_security_groups_from_server(self, openstack_id): + self._oprot.writeMessageBegin('remove_security_groups_from_server', TMessageType.CALL, self._seqid) + args = remove_security_groups_from_server_args() args.openstack_id = openstack_id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_delete_server_security_groups(self): + def recv_remove_security_groups_from_server(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: @@ -1509,7 +1509,7 @@ def recv_delete_server_security_groups(self): x.read(iprot) iprot.readMessageEnd() raise x - result = delete_server_security_groups_result() + result = remove_security_groups_from_server_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: @@ -3628,7 +3628,7 @@ def __init__(self, handler): 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["delete_server_security_groups"] = Processor.process_delete_server_security_groups + self._processMap["remove_security_groups_from_server"] = Processor.process_remove_security_groups_from_server self._processMap["delete_server"] = Processor.process_delete_server self._processMap["rescue_server"] = Processor.process_rescue_server self._processMap["unrescue_server"] = Processor.process_unrescue_server @@ -4218,20 +4218,20 @@ def process_delete_security_group_rule(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() - def process_delete_server_security_groups(self, seqid, iprot, oprot): - args = delete_server_security_groups_args() + def process_remove_security_groups_from_server(self, seqid, iprot, oprot): + args = remove_security_groups_from_server_args() args.read(iprot) iprot.readMessageEnd() - result = delete_server_security_groups_result() + result = remove_security_groups_from_server_result() try: - self._handler.delete_server_security_groups(args.openstack_id) + self._handler.remove_security_groups_from_server(args.openstack_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except SecurityGroupRuleNotFoundException as e: msg_type = TMessageType.REPLY result.e = e - except DefaultException as f: + except OpenStackConflictException as f: msg_type = TMessageType.REPLY result.f = f except TApplicationException as ex: @@ -4242,7 +4242,7 @@ def process_delete_server_security_groups(self, seqid, iprot, oprot): logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("delete_server_security_groups", msg_type, seqid) + oprot.writeMessageBegin("remove_security_groups_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -8446,7 +8446,7 @@ def __ne__(self, other): ) -class delete_server_security_groups_args(object): +class remove_security_groups_from_server_args(object): """ Attributes: - openstack_id @@ -8480,7 +8480,7 @@ def write(self, oprot): if oprot._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('delete_server_security_groups_args') + oprot.writeStructBegin('remove_security_groups_from_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) @@ -8501,14 +8501,14 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -all_structs.append(delete_server_security_groups_args) -delete_server_security_groups_args.thrift_spec = ( +all_structs.append(remove_security_groups_from_server_args) +remove_security_groups_from_server_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) -class delete_server_security_groups_result(object): +class remove_security_groups_from_server_result(object): """ Attributes: - e @@ -8537,7 +8537,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.f = DefaultException.read(iprot) + self.f = OpenStackConflictException.read(iprot) else: iprot.skip(ftype) else: @@ -8549,7 +8549,7 @@ def write(self, oprot): if oprot._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('delete_server_security_groups_result') + oprot.writeStructBegin('remove_security_groups_from_server_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) @@ -8574,11 +8574,11 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -all_structs.append(delete_server_security_groups_result) -delete_server_security_groups_result.thrift_spec = ( +all_structs.append(remove_security_groups_from_server_result) +remove_security_groups_from_server_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [SecurityGroupRuleNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'f', [DefaultException, None], None, ), # 2 + (2, TType.STRUCT, 'f', [OpenStackConflictException, None], None, ), # 2 ) diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index 2c091859..fa2f0741 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -909,15 +909,6 @@ def delete_security_group_rule(self, openstack_id): raise DefaultException( message=f"Could not delete security group rule - {openstack_id}" ) - - def delete_server_security_groups(self, openstack_id): - logger.info(f"Delete Security Groups for {openstack_id}") - try: - server: Server = self.get_server(openstack_id=openstack_id) - self._remove_security_groups_from_server(server) - except ConflictException as e: - logger.error(f"Delete Security Groups for {openstack_id} failed!") - raise OpenStackConflictException(message=e.message) def open_port_range_for_vm_in_project( self, range_start, range_stop, openstack_id, ethertype="IPv4", protocol="TCP" @@ -1350,6 +1341,15 @@ def _remove_security_groups_from_server(self, server: Server) -> None: logger.info( f"Could not remoeve security group {sec.id} from server" ) + + def remove_security_groups_from_server(self, openstack_id): + logger.info(f"Delete Security Groups for {openstack_id}") + try: + server: Server = self.get_server(openstack_id=openstack_id) + self._remove_security_groups_from_server(server) + except ConflictException as e: + logger.error(f"Delete Security Groups for {openstack_id} failed!") + raise OpenStackConflictException(message=e.message) def _validate_server_for_deletion(self, server: Server) -> None: task_state = server.task_state diff --git a/simple_vm_client/test_openstack_connector.py b/simple_vm_client/test_openstack_connector.py index f65ac09b..bb03cceb 100644 --- a/simple_vm_client/test_openstack_connector.py +++ b/simple_vm_client/test_openstack_connector.py @@ -2925,17 +2925,17 @@ def test_delete_security_group_rule_failure(self): ) @patch.object(OpenStackConnector, "get_server") - def test_delete_server_security_groups_sucess(self, mock_get_server): + def test_remove_security_groups_from_server_sucess(self, mock_get_server): server_mock = fakes.generate_fake_resource(server.Server) mock_get_server.return_value = server_mock - self.openstack_connector.delete_server_security_groups(server_mock.id) + self.openstack_connector.remove_security_groups_from_server(server_mock.id) self.openstack_connector.openstack_connection.remove_server_security_groups.assert_called_once_with( server_mock, server_mock.security_groups ) @patch.object(OpenStackConnector, "get_server") - def test_delete_server_security_groups_failure(self, mock_get_server): + def test_remove_security_groups_from_server_failure(self, mock_get_server): server_mock = fakes.generate_fake_resource(server.Server) mock_get_server.return_value = server_mock @@ -2943,7 +2943,7 @@ def test_delete_server_security_groups_failure(self, mock_get_server): False ) with self.assertRaises(DefaultException): - self.openstack_connector.delete_server_security_groups(server_mock.id) + self.openstack_connector.remove_security_groups_from_server(server_mock.id) self.openstack_connector.openstack_connection.remove_server_security_groups.assert_called_once_with( server_mock, server_mock.security_groups ) diff --git a/simple_vm_client/test_virtualmachinehandler.py b/simple_vm_client/test_virtualmachinehandler.py index be57f6db..94b58132 100644 --- a/simple_vm_client/test_virtualmachinehandler.py +++ b/simple_vm_client/test_virtualmachinehandler.py @@ -421,9 +421,9 @@ def test_delete_security_group_rule(self): openstack_id=OPENSTACK_ID ) - def test_delete_server_security_groups(self): - self.handler.delete_server_security_groups(openstack_id=OPENSTACK_ID) - self.handler.openstack_connector.delete_server_security_groups.assert_called_once_with( + def test_remove_security_groups_from_server(self): + self.handler.remove_security_groups_from_server(openstack_id=OPENSTACK_ID) + self.handler.openstack_connector.remove_security_groups_from_server.assert_called_once_with( openstack_id=OPENSTACK_ID ) From 5e8bdeae8397e5fa8fc395e0f3e42d8f1fbb62e3 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Fri, 20 Dec 2024 13:21:32 +0100 Subject: [PATCH 4/5] fix(Keys):additional owner keys to normal authorized keys --- portal_client.thrift | 20 +- simple_vm_client/VirtualMachineHandler.py | 25 +- simple_vm_client/VirtualMachineService-remote | 1076 +- simple_vm_client/VirtualMachineService.py | 11098 ++++++++++++---- simple_vm_client/constants.py | 7 +- .../openstack_connector.py | 61 +- .../scripts/bash/add_keys_to_authorized.sh | 36 +- simple_vm_client/ttypes.py | 3546 +++-- 8 files changed, 11945 insertions(+), 3924 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index ab6185f9..cc527b44 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -507,12 +507,13 @@ service VirtualMachineService { 7:list> volume_ids_path_new, 8:list> volume_ids_path_attach, - 9:list additional_keys, - 10:optional string research_environment - 11:optional list additional_security_group_ids, - 12:optional string slurm_version, - 13:optional string metadata_token, - 14:optional string metadata_endpoint + 9:list additional_owner_keys, + 10:list addtional_user_keys, + 11:optional string research_environment + 12:optional list additional_security_group_ids, + 13:optional string slurm_version, + 14:optional string metadata_token, + 15:optional string metadata_endpoint ) @@ -546,9 +547,10 @@ service VirtualMachineService { 7:list> volume_ids_path_new, 8:list> volume_ids_path_attach, 9:optional list additional_security_group_ids, - 10:optional list additional_keys, - 11:optional string metadata_token, - 12:optional string metadata_endpoint, + 10:list additional_owner_keys, + 11:list addtional_user_keys, + 12:optional string metadata_token, + 13:optional string metadata_endpoint, diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 4bf2f8e8..30a51bd3 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -164,17 +164,20 @@ def set_server_metadata(self, openstack_id: str, metadata: dict[str, str]): openstack_id=openstack_id, metadata=metadata ) - def get_server_by_unique_name(self, unique_name: str, no_connection: bool = False) -> VM: + def get_server_by_unique_name( + self, unique_name: str, no_connection: bool = False + ) -> VM: server = self.openstack_connector.get_server_by_unique_name( - unique_name=unique_name, - no_connection=no_connection + unique_name=unique_name, no_connection=no_connection ) server = self.forc_connector.get_playbook_status(server=server) server = thrift_converter.os_to_thrift_server(openstack_server=server) return server def get_server(self, openstack_id: str, no_connection: bool = False) -> VM: - server = self.openstack_connector.get_server(openstack_id=openstack_id, no_connection=no_connection) + server = self.openstack_connector.get_server( + openstack_id=openstack_id, no_connection=no_connection + ) server = self.forc_connector.get_playbook_status(server=server) server = thrift_converter.os_to_thrift_server(openstack_server=server) return server @@ -346,7 +349,7 @@ def delete_security_group_rule(self, openstack_id): return self.openstack_connector.delete_security_group_rule( openstack_id=openstack_id ) - + def remove_security_groups_from_server(self, openstack_id): return self.openstack_connector.remove_security_groups_from_server( openstack_id=openstack_id @@ -404,7 +407,8 @@ def start_server( metadata: dict[str, str], volume_ids_path_new: list[dict[str, str]], volume_ids_path_attach: list[dict[str, str]], - additional_keys: list[str], + additional_owner_keys: list[str], + additional_user_keys: list[str], research_environment: str, additional_security_group_ids: list[str], slurm_version: str = None, @@ -427,7 +431,8 @@ def start_server( metadata=metadata, volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, - additional_keys=additional_keys, + additional_owner_keys=additional_owner_keys, + additional_user_keys=additional_user_keys, research_environment_metadata=research_environment_metadata, additional_security_group_ids=additional_security_group_ids, slurm_version=slurm_version, @@ -445,7 +450,8 @@ def start_server_with_custom_key( volume_ids_path_new: list[dict[str, str]], volume_ids_path_attach: list[dict[str, str]], additional_security_group_ids: list[str], - additional_keys: list[str], + additional_owner_keys: list[str], + additional_user_keys: list[str], metadata_token: str = None, metadata_endpoint: str = None, ) -> str: @@ -462,7 +468,8 @@ def start_server_with_custom_key( image_name=image_name, servername=servername, metadata=metadata, - additional_keys=additional_keys, + additional_owner_keys=additional_owner_keys, + additional_user_keys=additional_user_keys, research_environment_metadata=research_environment_metadata, volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index b71b4ef6..e901e35d 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -1,113 +1,149 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.20.0) +# Autogenerated by Thrift Compiler (0.22.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # 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(' void add_research_environment_security_group(string server_id, string security_group_name)') - print(' void add_project_security_group_to_server(string server_id, string project_name, string project_id)') - print(' void 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 remove_security_groups_from_server(string openstack_id)') - print(' void delete_server(string openstack_id)') - print(' void rescue_server(string openstack_id, string admin_pass, string image_ref)') - print(' void unrescue_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, string slurm_version, string metadata_token, string metadata_endpoint)') - 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, additional_keys, string metadata_token, string metadata_endpoint)') - 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_access_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 set_metadata_server_data(string ip, VirtualMachineServerMetadata metadata)') - print(' void remove_metadata_server_data(string ip)') - print(' void is_metadata_server_available()') - 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(' string get_security_group_id_by_name(string name)') - 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(' string get_keypair_public_key_by_name(string key_name)') - print(' void delete_keypair(string key_name)') - print(' void add_default_security_groups_to_server(string openstack_id)') - print(' VM get_server(string openstack_id, bool no_connection)') - print(' VM get_server_by_unique_name(string unique_name, bool no_connection)') - 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( public_keys, 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( + " void add_project_security_group_to_server(string server_id, string project_name, string project_id)" + ) + print(" void 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 remove_security_groups_from_server(string openstack_id)") + print(" void delete_server(string openstack_id)") + print( + " void rescue_server(string openstack_id, string admin_pass, string image_ref)" + ) + print(" void unrescue_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_owner_keys, addtional_user_keys, string research_environment, additional_security_group_ids, string slurm_version, string metadata_token, string metadata_endpoint)" + ) + 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, additional_owner_keys, addtional_user_keys, string metadata_token, string metadata_endpoint)" + ) + 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_access_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 set_metadata_server_data(string ip, VirtualMachineServerMetadata metadata)" + ) + print(" void remove_metadata_server_data(string ip)") + print(" void is_metadata_server_available()") + 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(" string get_security_group_id_by_name(string name)") + 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(" string get_keypair_public_key_by_name(string key_name)") + print(" void delete_keypair(string key_name)") + print(" void add_default_security_groups_to_server(string openstack_id)") + print(" VM get_server(string openstack_id, bool no_connection)") + print(" VM get_server_by_unique_name(string unique_name, bool no_connection)") + 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( public_keys, 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 @@ -117,16 +153,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]) @@ -134,42 +170,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: @@ -180,470 +223,801 @@ protocol = TBinaryProtocol(transport) client = VirtualMachineService.Client(protocol) transport.open() -if cmd == 'is_version': +if cmd == "is_version": if len(args) != 1: - print('is_version requires 1 args') + print("is_version requires 1 args") sys.exit(1) - pp.pprint(client.is_version(eval(args[0]),)) + pp.pprint( + client.is_version( + eval(args[0]), + ) + ) -elif cmd == 'get_client_version': +elif cmd == "get_client_version": if len(args) != 0: - print('get_client_version requires 0 args') + print("get_client_version requires 0 args") sys.exit(1) pp.pprint(client.get_client_version()) -elif cmd == 'get_gateway_ip': +elif cmd == "get_gateway_ip": if len(args) != 0: - print('get_gateway_ip requires 0 args') + print("get_gateway_ip requires 0 args") sys.exit(1) pp.pprint(client.get_gateway_ip()) -elif cmd == 'get_calculation_values': +elif cmd == "get_calculation_values": if len(args) != 0: - print('get_calculation_values requires 0 args') + print("get_calculation_values requires 0 args") sys.exit(1) pp.pprint(client.get_calculation_values()) -elif cmd == 'import_keypair': +elif cmd == "import_keypair": if len(args) != 2: - print('import_keypair requires 2 args') + print("import_keypair requires 2 args") sys.exit(1) - pp.pprint(client.import_keypair(args[0], args[1],)) + pp.pprint( + client.import_keypair( + args[0], + args[1], + ) + ) -elif cmd == 'get_vm_ports': +elif cmd == "get_vm_ports": if len(args) != 1: - print('get_vm_ports requires 1 args') + print("get_vm_ports requires 1 args") sys.exit(1) - pp.pprint(client.get_vm_ports(args[0],)) + pp.pprint( + client.get_vm_ports( + args[0], + ) + ) -elif cmd == 'add_udp_security_group': +elif cmd == "add_udp_security_group": if len(args) != 1: - print('add_udp_security_group requires 1 args') + print("add_udp_security_group requires 1 args") sys.exit(1) - pp.pprint(client.add_udp_security_group(args[0],)) + pp.pprint( + client.add_udp_security_group( + args[0], + ) + ) -elif cmd == 'add_research_environment_security_group': +elif cmd == "add_research_environment_security_group": if len(args) != 2: - print('add_research_environment_security_group requires 2 args') + print("add_research_environment_security_group requires 2 args") sys.exit(1) - pp.pprint(client.add_research_environment_security_group(args[0], args[1],)) + pp.pprint( + client.add_research_environment_security_group( + args[0], + args[1], + ) + ) -elif cmd == 'add_project_security_group_to_server': +elif cmd == "add_project_security_group_to_server": if len(args) != 3: - print('add_project_security_group_to_server requires 3 args') + print("add_project_security_group_to_server requires 3 args") sys.exit(1) - pp.pprint(client.add_project_security_group_to_server(args[0], args[1], args[2],)) + pp.pprint( + client.add_project_security_group_to_server( + args[0], + args[1], + args[2], + ) + ) -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') + 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],)) + 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': +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 == 'remove_security_groups_from_server': +elif cmd == "remove_security_groups_from_server": if len(args) != 1: - print('remove_security_groups_from_server requires 1 args') + print("remove_security_groups_from_server requires 1 args") sys.exit(1) - pp.pprint(client.remove_security_groups_from_server(args[0],)) + pp.pprint( + client.remove_security_groups_from_server( + 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 == 'rescue_server': +elif cmd == "rescue_server": if len(args) != 3: - print('rescue_server requires 3 args') - sys.exit(1) - pp.pprint(client.rescue_server(args[0], args[1], args[2],)) - -elif cmd == 'unrescue_server': - if len(args) != 1: - print('unrescue_server requires 1 args') - sys.exit(1) - pp.pprint(client.unrescue_server(args[0],)) - -elif cmd == 'start_server': - if len(args) != 13: - print('start_server requires 13 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]), args[10], args[11], args[12],)) - -elif cmd == 'is_bibigrid_available': + print("rescue_server requires 3 args") + sys.exit(1) + pp.pprint( + client.rescue_server( + args[0], + args[1], + args[2], + ) + ) + +elif cmd == "unrescue_server": + if len(args) != 1: + print("unrescue_server requires 1 args") + sys.exit(1) + pp.pprint( + client.unrescue_server( + args[0], + ) + ) + +elif cmd == "start_server": + if len(args) != 14: + print("start_server requires 14 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]), + eval(args[8]), + args[9], + eval(args[10]), + args[11], + args[12], + args[13], + ) + ) + +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') - sys.exit(1) - pp.pprint(client.detach_ip_from_server(args[0], args[1],)) - -elif cmd == 'start_server_with_custom_key': - if len(args) != 11: - print('start_server_with_custom_key requires 11 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]), eval(args[8]), args[9], args[10],)) - -elif cmd == 'exist_server': - if len(args) != 1: - print('exist_server requires 1 args') - sys.exit(1) - pp.pprint(client.exist_server(args[0],)) - -elif cmd == 'create_and_deploy_playbook': + print("detach_ip_from_server requires 2 args") + sys.exit(1) + pp.pprint( + client.detach_ip_from_server( + args[0], + args[1], + ) + ) + +elif cmd == "start_server_with_custom_key": + if len(args) != 12: + print("start_server_with_custom_key requires 12 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]), + eval(args[8]), + eval(args[9]), + args[10], + args[11], + ) + ) + +elif cmd == "exist_server": + if len(args) != 1: + print("exist_server requires 1 args") + sys.exit(1) + pp.pprint( + client.exist_server( + args[0], + ) + ) + +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': - if len(args) != 1: - print('get_playbook_logs requires 1 args') - sys.exit(1) - pp.pprint(client.get_playbook_logs(args[0],)) - -elif cmd == 'has_forc': + 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") + sys.exit(1) + pp.pprint( + client.get_playbook_logs( + args[0], + ) + ) + +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_access_url': +elif cmd == "get_forc_access_url": if len(args) != 0: - print('get_forc_access_url requires 0 args') + print("get_forc_access_url requires 0 args") sys.exit(1) pp.pprint(client.get_forc_access_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 == 'set_metadata_server_data': +elif cmd == "set_metadata_server_data": if len(args) != 2: - print('set_metadata_server_data requires 2 args') + print("set_metadata_server_data requires 2 args") sys.exit(1) - pp.pprint(client.set_metadata_server_data(args[0], eval(args[1]),)) + pp.pprint( + client.set_metadata_server_data( + args[0], + eval(args[1]), + ) + ) -elif cmd == 'remove_metadata_server_data': +elif cmd == "remove_metadata_server_data": if len(args) != 1: - print('remove_metadata_server_data requires 1 args') + print("remove_metadata_server_data requires 1 args") sys.exit(1) - pp.pprint(client.remove_metadata_server_data(args[0],)) + pp.pprint( + client.remove_metadata_server_data( + args[0], + ) + ) -elif cmd == 'is_metadata_server_available': +elif cmd == "is_metadata_server_available": if len(args) != 0: - print('is_metadata_server_available requires 0 args') + print("is_metadata_server_available requires 0 args") sys.exit(1) pp.pprint(client.is_metadata_server_available()) -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 == 'get_security_group_id_by_name': +elif cmd == "get_security_group_id_by_name": if len(args) != 1: - print('get_security_group_id_by_name requires 1 args') + print("get_security_group_id_by_name requires 1 args") sys.exit(1) - pp.pprint(client.get_security_group_id_by_name(args[0],)) + pp.pprint( + client.get_security_group_id_by_name( + 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') + 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]),)) + 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': +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_keypair_public_key_by_name': +elif cmd == "get_keypair_public_key_by_name": if len(args) != 1: - print('get_keypair_public_key_by_name requires 1 args') + print("get_keypair_public_key_by_name requires 1 args") sys.exit(1) - pp.pprint(client.get_keypair_public_key_by_name(args[0],)) + pp.pprint( + client.get_keypair_public_key_by_name( + args[0], + ) + ) -elif cmd == 'delete_keypair': +elif cmd == "delete_keypair": if len(args) != 1: - print('delete_keypair requires 1 args') + print("delete_keypair requires 1 args") sys.exit(1) - pp.pprint(client.delete_keypair(args[0],)) + pp.pprint( + client.delete_keypair( + args[0], + ) + ) -elif cmd == 'add_default_security_groups_to_server': +elif cmd == "add_default_security_groups_to_server": if len(args) != 1: - print('add_default_security_groups_to_server requires 1 args') + print("add_default_security_groups_to_server requires 1 args") sys.exit(1) - pp.pprint(client.add_default_security_groups_to_server(args[0],)) + pp.pprint( + client.add_default_security_groups_to_server( + args[0], + ) + ) -elif cmd == 'get_server': +elif cmd == "get_server": if len(args) != 2: - print('get_server requires 2 args') + print("get_server requires 2 args") sys.exit(1) - pp.pprint(client.get_server(args[0], eval(args[1]),)) + pp.pprint( + client.get_server( + args[0], + eval(args[1]), + ) + ) -elif cmd == 'get_server_by_unique_name': +elif cmd == "get_server_by_unique_name": if len(args) != 2: - print('get_server_by_unique_name requires 2 args') + print("get_server_by_unique_name requires 2 args") sys.exit(1) - pp.pprint(client.get_server_by_unique_name(args[0], eval(args[1]),)) + pp.pprint( + client.get_server_by_unique_name( + args[0], + eval(args[1]), + ) + ) -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') + print("start_cluster requires 4 args") sys.exit(1) - pp.pprint(client.start_cluster(eval(args[0]), eval(args[1]), eval(args[2]), args[3],)) + pp.pprint( + client.start_cluster( + eval(args[0]), + eval(args[1]), + eval(args[2]), + args[3], + ) + ) -elif cmd == 'terminate_cluster': +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 09f673f7..22add231 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -1,20 +1,20 @@ # -# Autogenerated by Thrift Compiler (0.20.0) +# Autogenerated by Thrift Compiler (0.22.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException +import 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 = [] @@ -23,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): """ @@ -37,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 @@ -59,7 +57,6 @@ def import_keypair(self, keyname, public_key): - public_key: The public key """ - pass def get_vm_ports(self, openstack_id): """ @@ -70,7 +67,6 @@ def get_vm_ports(self, openstack_id): - openstack_id: Id of server """ - pass def add_udp_security_group(self, server_id): """ @@ -80,7 +76,6 @@ 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): """ @@ -91,7 +86,6 @@ def add_research_environment_security_group(self, server_id, security_group_name - security_group_name """ - pass def add_project_security_group_to_server(self, server_id, project_name, project_id): """ @@ -101,7 +95,6 @@ def add_project_security_group_to_server(self, server_id, project_name, project_ - project_id """ - pass def add_metadata_to_server(self, openstack_id, metadata): """ @@ -112,7 +105,6 @@ def add_metadata_to_server(self, openstack_id, metadata): - metadata """ - pass def get_flavors(self): """ @@ -120,7 +112,6 @@ def get_flavors(self): Returns: List of flavor instances. """ - pass def get_images(self): """ @@ -128,7 +119,6 @@ def get_images(self): Returns: List of Image instances. """ - pass def get_public_images(self): """ @@ -136,7 +126,6 @@ def get_public_images(self): Returns: List of public Image instances. """ - pass def get_private_images(self): """ @@ -144,7 +133,6 @@ def get_private_images(self): Returns: List of private Image instances. """ - pass def get_image(self, openstack_id, ignore_not_active): """ @@ -156,7 +144,6 @@ def get_image(self, openstack_id, ignore_not_active): - ignore_not_active """ - pass def get_volume(self, volume_id): """ @@ -164,7 +151,6 @@ def get_volume(self, volume_id): - volume_id """ - pass def get_volumes_by_ids(self, volume_ids): """ @@ -172,7 +158,6 @@ def get_volumes_by_ids(self, volume_ids): - volume_ids """ - pass def resize_volume(self, volume_id, size): """ @@ -181,9 +166,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 @@ -195,7 +181,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): """ @@ -203,7 +188,6 @@ def delete_security_group_rule(self, openstack_id): - openstack_id """ - pass def remove_security_groups_from_server(self, openstack_id): """ @@ -211,7 +195,6 @@ def remove_security_groups_from_server(self, openstack_id): - openstack_id """ - pass def delete_server(self, openstack_id): """ @@ -222,7 +205,6 @@ def delete_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def rescue_server(self, openstack_id, admin_pass, image_ref): """ @@ -232,7 +214,6 @@ def rescue_server(self, openstack_id, admin_pass, image_ref): - image_ref """ - pass def unrescue_server(self, openstack_id): """ @@ -240,9 +221,24 @@ def unrescue_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, slurm_version, metadata_token, metadata_endpoint): + def start_server( + self, + flavor_name, + image_name, + public_key, + servername, + metadata, + volume_ids_path_new, + volume_ids_path_attach, + additional_owner_keys, + addtional_user_keys, + research_environment, + additional_security_group_ids, + slurm_version, + metadata_token, + metadata_endpoint, + ): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -252,7 +248,8 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - metadata: Metadata for the new instance - volume_ids_path_new - volume_ids_path_attach - - additional_keys + - additional_owner_keys + - addtional_user_keys - research_environment - additional_security_group_ids - slurm_version @@ -260,7 +257,6 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - metadata_endpoint """ - pass def is_bibigrid_available(self): pass @@ -272,9 +268,22 @@ 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, additional_keys, metadata_token, metadata_endpoint): + 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, + additional_owner_keys, + addtional_user_keys, + metadata_token, + metadata_endpoint, + ): """ Start a new server with custom key for ansible. @@ -287,12 +296,12 @@ def start_server_with_custom_key(self, flavor_name, image_name, servername, meta - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids - - additional_keys + - additional_owner_keys + - addtional_user_keys - metadata_token - metadata_endpoint """ - pass def exist_server(self, name): """ @@ -302,9 +311,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 @@ -318,7 +335,6 @@ def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, r - base_url """ - pass def get_playbook_logs(self, openstack_id): """ @@ -328,14 +344,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_access_url(self): pass @@ -351,14 +365,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): """ @@ -368,7 +380,6 @@ def get_backends_by_owner(self, owner): - owner """ - pass def get_backends_by_template(self, template): """ @@ -378,7 +389,6 @@ def get_backends_by_template(self, template): - template """ - pass def get_backend_by_id(self, id): """ @@ -388,7 +398,6 @@ def get_backend_by_id(self, id): - id """ - pass def set_metadata_server_data(self, ip, metadata): """ @@ -397,7 +406,6 @@ def set_metadata_server_data(self, ip, metadata): - metadata """ - pass def remove_metadata_server_data(self, ip): """ @@ -405,7 +413,6 @@ def remove_metadata_server_data(self, ip): - ip """ - pass def is_metadata_server_available(self): pass @@ -418,7 +425,6 @@ def delete_backend(self, id): - id """ - pass def add_user_to_backend(self, backend_id, user_id): """ @@ -429,7 +435,6 @@ def add_user_to_backend(self, backend_id, user_id): - user_id """ - pass def get_users_from_backend(self, backend_id): """ @@ -439,7 +444,6 @@ def get_users_from_backend(self, backend_id): - backend_id """ - pass def delete_user_from_backend(self, backend_id, user_id): """ @@ -450,7 +454,6 @@ def delete_user_from_backend(self, backend_id, user_id): - user_id """ - pass def get_allowed_templates(self): pass @@ -461,7 +464,6 @@ def get_servers(self): Returns: List of server instances. """ - pass def get_servers_by_ids(self, server_ids): """ @@ -472,7 +474,6 @@ def get_servers_by_ids(self, server_ids): - server_ids """ - pass def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -483,7 +484,6 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): - bibigrid_id """ - pass def get_security_group_id_by_name(self, name): """ @@ -491,9 +491,10 @@ def get_security_group_id_by_name(self, name): - name """ - 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 @@ -505,9 +506,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 @@ -521,7 +532,6 @@ def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_ - worker_idx """ - pass def get_cluster_info(self, cluster_id): """ @@ -529,7 +539,6 @@ def get_cluster_info(self, cluster_id): - cluster_id """ - pass def get_cluster_status(self, cluster_id): """ @@ -537,7 +546,6 @@ def get_cluster_status(self, cluster_id): - cluster_id """ - pass def get_keypair_public_key_by_name(self, key_name): """ @@ -545,7 +553,6 @@ def get_keypair_public_key_by_name(self, key_name): - key_name """ - pass def delete_keypair(self, key_name): """ @@ -553,7 +560,6 @@ def delete_keypair(self, key_name): - key_name """ - pass def add_default_security_groups_to_server(self, openstack_id): """ @@ -561,7 +567,6 @@ def add_default_security_groups_to_server(self, openstack_id): - openstack_id """ - pass def get_server(self, openstack_id, no_connection): """ @@ -573,7 +578,6 @@ def get_server(self, openstack_id, no_connection): - no_connection """ - pass def get_server_by_unique_name(self, unique_name, no_connection): """ @@ -582,7 +586,6 @@ def get_server_by_unique_name(self, unique_name, no_connection): - no_connection """ - pass def stop_server(self, openstack_id): """ @@ -593,7 +596,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): """ @@ -609,7 +611,6 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): - description: Description of the new snapshot """ - pass def get_limits(self): """ @@ -619,7 +620,6 @@ def get_limits(self): 'totalInstancesUsed': totalInstancesUsed} """ - pass def start_cluster(self, public_keys, master_instance, worker_instances, user): """ @@ -630,7 +630,6 @@ def start_cluster(self, public_keys, master_instance, worker_instances, user): - user """ - pass def terminate_cluster(self, cluster_id): """ @@ -638,7 +637,6 @@ def terminate_cluster(self, cluster_id): - cluster_id """ - pass def delete_image(self, image_id): """ @@ -649,7 +647,6 @@ def delete_image(self, image_id): - image_id: Id of image """ - pass def detach_volume(self, volume_id, server_id): """ @@ -660,7 +657,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): """ @@ -670,7 +666,6 @@ def delete_volume(self, volume_id): - volume_id """ - pass def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -682,7 +677,6 @@ def attach_volume_to_server(self, openstack_id, volume_id): - volume_id: Id of volume """ - pass def resume_server(self, openstack_id): """ @@ -692,7 +686,6 @@ def resume_server(self, openstack_id): - openstack_id: Id of the server """ - pass def create_volume(self, volume_name, volume_storage, metadata): """ @@ -704,7 +697,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): """ @@ -716,7 +708,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): """ @@ -728,7 +719,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): """ @@ -741,7 +731,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): """ @@ -752,7 +741,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): """ @@ -762,7 +750,6 @@ def delete_volume_snapshot(self, snapshot_id): - snapshot_id """ - pass def reboot_hard_server(self, openstack_id): """ @@ -772,7 +759,6 @@ def reboot_hard_server(self, openstack_id): - openstack_id: Id of the server """ - pass def reboot_soft_server(self, openstack_id): """ @@ -782,7 +768,6 @@ def reboot_soft_server(self, openstack_id): - openstack_id: Id of the server """ - pass class Client(Iface): @@ -790,6 +775,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: @@ -806,7 +792,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) @@ -826,7 +812,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): """ @@ -838,7 +826,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() @@ -857,7 +847,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): """ @@ -868,7 +861,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() @@ -887,14 +880,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() @@ -913,7 +911,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): """ @@ -929,7 +930,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 @@ -950,7 +951,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): """ @@ -965,7 +969,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) @@ -987,7 +991,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): """ @@ -1001,7 +1007,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) @@ -1034,11 +1042,17 @@ def add_research_environment_security_group(self, server_id, security_group_name - security_group_name """ - self.send_add_research_environment_security_group(server_id, 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) + 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 @@ -1071,11 +1085,17 @@ def add_project_security_group_to_server(self, server_id, project_name, project_ - project_id """ - self.send_add_project_security_group_to_server(server_id, project_name, project_id) + self.send_add_project_security_group_to_server( + server_id, project_name, project_id + ) self.recv_add_project_security_group_to_server() - def send_add_project_security_group_to_server(self, server_id, project_name, project_id): - self._oprot.writeMessageBegin('add_project_security_group_to_server', TMessageType.CALL, self._seqid) + def send_add_project_security_group_to_server( + self, server_id, project_name, project_id + ): + self._oprot.writeMessageBegin( + "add_project_security_group_to_server", TMessageType.CALL, self._seqid + ) args = add_project_security_group_to_server_args() args.server_id = server_id args.project_name = project_name @@ -1114,7 +1134,9 @@ def add_metadata_to_server(self, openstack_id, metadata): 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 @@ -1149,7 +1171,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() @@ -1168,7 +1190,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): """ @@ -1180,7 +1204,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() @@ -1199,7 +1223,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): """ @@ -1211,7 +1237,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() @@ -1230,7 +1258,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): """ @@ -1242,7 +1273,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() @@ -1261,7 +1294,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): """ @@ -1277,7 +1313,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 @@ -1300,7 +1336,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): """ @@ -1312,7 +1350,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) @@ -1334,7 +1372,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): """ @@ -1346,7 +1386,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) @@ -1366,7 +1408,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): """ @@ -1379,7 +1424,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 @@ -1402,7 +1447,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 @@ -1414,11 +1461,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 @@ -1448,7 +1501,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): """ @@ -1460,7 +1516,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) @@ -1494,7 +1552,9 @@ def remove_security_groups_from_server(self, openstack_id): self.recv_remove_security_groups_from_server() def send_remove_security_groups_from_server(self, openstack_id): - self._oprot.writeMessageBegin('remove_security_groups_from_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "remove_security_groups_from_server", TMessageType.CALL, self._seqid + ) args = remove_security_groups_from_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1531,7 +1591,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) @@ -1567,7 +1627,7 @@ def rescue_server(self, openstack_id, admin_pass, image_ref): self.recv_rescue_server() def send_rescue_server(self, openstack_id, admin_pass, image_ref): - self._oprot.writeMessageBegin('rescue_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("rescue_server", TMessageType.CALL, self._seqid) args = rescue_server_args() args.openstack_id = openstack_id args.admin_pass = admin_pass @@ -1603,7 +1663,7 @@ def unrescue_server(self, openstack_id): self.recv_unrescue_server() def send_unrescue_server(self, openstack_id): - self._oprot.writeMessageBegin('unrescue_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("unrescue_server", TMessageType.CALL, self._seqid) args = unrescue_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1627,7 +1687,23 @@ def recv_unrescue_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, slurm_version, metadata_token, metadata_endpoint): + def start_server( + self, + flavor_name, + image_name, + public_key, + servername, + metadata, + volume_ids_path_new, + volume_ids_path_attach, + additional_owner_keys, + addtional_user_keys, + research_environment, + additional_security_group_ids, + slurm_version, + metadata_token, + metadata_endpoint, + ): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -1637,7 +1713,8 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - metadata: Metadata for the new instance - volume_ids_path_new - volume_ids_path_attach - - additional_keys + - additional_owner_keys + - addtional_user_keys - research_environment - additional_security_group_ids - slurm_version @@ -1645,11 +1722,42 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - metadata_endpoint """ - 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, slurm_version, metadata_token, metadata_endpoint) + self.send_start_server( + flavor_name, + image_name, + public_key, + servername, + metadata, + volume_ids_path_new, + volume_ids_path_attach, + additional_owner_keys, + addtional_user_keys, + research_environment, + additional_security_group_ids, + slurm_version, + metadata_token, + metadata_endpoint, + ) 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, slurm_version, metadata_token, metadata_endpoint): - 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_owner_keys, + addtional_user_keys, + research_environment, + additional_security_group_ids, + slurm_version, + metadata_token, + metadata_endpoint, + ): + self._oprot.writeMessageBegin("start_server", TMessageType.CALL, self._seqid) args = start_server_args() args.flavor_name = flavor_name args.image_name = image_name @@ -1658,7 +1766,8 @@ def send_start_server(self, flavor_name, image_name, public_key, servername, met args.metadata = metadata args.volume_ids_path_new = volume_ids_path_new args.volume_ids_path_attach = volume_ids_path_attach - args.additional_keys = additional_keys + args.additional_owner_keys = additional_owner_keys + args.addtional_user_keys = addtional_user_keys args.research_environment = research_environment args.additional_security_group_ids = additional_security_group_ids args.slurm_version = slurm_version @@ -1691,14 +1800,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() @@ -1717,7 +1830,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): """ @@ -1730,7 +1846,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 @@ -1753,7 +1871,21 @@ 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, additional_keys, metadata_token, metadata_endpoint): + 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, + additional_owner_keys, + addtional_user_keys, + metadata_token, + metadata_endpoint, + ): """ Start a new server with custom key for ansible. @@ -1766,16 +1898,46 @@ def start_server_with_custom_key(self, flavor_name, image_name, servername, meta - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids - - additional_keys + - additional_owner_keys + - addtional_user_keys - metadata_token - metadata_endpoint """ - 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, additional_keys, metadata_token, metadata_endpoint) + 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, + additional_owner_keys, + addtional_user_keys, + metadata_token, + metadata_endpoint, + ) 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, additional_keys, metadata_token, metadata_endpoint): - 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, + additional_owner_keys, + addtional_user_keys, + metadata_token, + metadata_endpoint, + ): + 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 @@ -1785,7 +1947,8 @@ def send_start_server_with_custom_key(self, flavor_name, image_name, servername, args.volume_ids_path_new = volume_ids_path_new args.volume_ids_path_attach = volume_ids_path_attach args.additional_security_group_ids = additional_security_group_ids - args.additional_keys = additional_keys + args.additional_owner_keys = additional_owner_keys + args.addtional_user_keys = addtional_user_keys args.metadata_token = metadata_token args.metadata_endpoint = metadata_endpoint args.write(self._oprot) @@ -1815,7 +1978,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): """ @@ -1829,7 +1995,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) @@ -1849,9 +2015,20 @@ def recv_exist_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "exist_server failed: unknown result") - - def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): + raise TApplicationException( + TApplicationException.MISSING_RESULT, "exist_server failed: unknown result" + ) + + def create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): """ Create and deploy an ansible playbook @@ -1865,11 +2042,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 @@ -1897,7 +2093,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): """ @@ -1911,7 +2110,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) @@ -1933,7 +2134,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): """ @@ -1944,7 +2148,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() @@ -1963,14 +2167,18 @@ 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_access_url(self): self.send_get_forc_access_url() return self.recv_get_forc_access_url() def send_get_forc_access_url(self): - self._oprot.writeMessageBegin('get_forc_access_url', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_forc_access_url", TMessageType.CALL, self._seqid + ) args = get_forc_access_url_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1989,7 +2197,10 @@ def recv_get_forc_access_url(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_forc_access_url failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_forc_access_url failed: unknown result", + ) def create_backend(self, owner, user_path, template, upstream_url): """ @@ -2006,7 +2217,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 @@ -2033,7 +2244,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): """ @@ -2044,7 +2258,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() @@ -2065,7 +2279,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): """ @@ -2079,7 +2295,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) @@ -2101,7 +2319,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): """ @@ -2115,7 +2336,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) @@ -2137,7 +2360,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): """ @@ -2151,7 +2377,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) @@ -2175,7 +2403,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 set_metadata_server_data(self, ip, metadata): """ @@ -2188,7 +2419,9 @@ def set_metadata_server_data(self, ip, metadata): self.recv_set_metadata_server_data() def send_set_metadata_server_data(self, ip, metadata): - self._oprot.writeMessageBegin('set_metadata_server_data', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "set_metadata_server_data", TMessageType.CALL, self._seqid + ) args = set_metadata_server_data_args() args.ip = ip args.metadata = metadata @@ -2223,7 +2456,9 @@ def remove_metadata_server_data(self, ip): self.recv_remove_metadata_server_data() def send_remove_metadata_server_data(self, ip): - self._oprot.writeMessageBegin('remove_metadata_server_data', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "remove_metadata_server_data", TMessageType.CALL, self._seqid + ) args = remove_metadata_server_data_args() args.ip = ip args.write(self._oprot) @@ -2252,7 +2487,9 @@ def is_metadata_server_available(self): self.recv_is_metadata_server_available() def send_is_metadata_server_available(self): - self._oprot.writeMessageBegin('is_metadata_server_available', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "is_metadata_server_available", TMessageType.CALL, self._seqid + ) args = is_metadata_server_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2287,7 +2524,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) @@ -2322,7 +2559,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 @@ -2345,7 +2584,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): """ @@ -2359,7 +2601,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) @@ -2381,7 +2625,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): """ @@ -2396,7 +2643,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 @@ -2419,14 +2668,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() @@ -2445,7 +2699,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): """ @@ -2457,7 +2714,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() @@ -2476,7 +2733,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): """ @@ -2491,7 +2750,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) @@ -2511,7 +2772,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): """ @@ -2526,7 +2790,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) @@ -2546,7 +2812,10 @@ 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 get_security_group_id_by_name(self, name): """ @@ -2558,7 +2827,9 @@ def get_security_group_id_by_name(self, name): return self.recv_get_security_group_id_by_name() def send_get_security_group_id_by_name(self, name): - self._oprot.writeMessageBegin('get_security_group_id_by_name', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_security_group_id_by_name", TMessageType.CALL, self._seqid + ) args = get_security_group_id_by_name_args() args.name = name args.write(self._oprot) @@ -2580,9 +2851,14 @@ def recv_get_security_group_id_by_name(self): return result.success if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_security_group_id_by_name failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_security_group_id_by_name 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 @@ -2594,11 +2870,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 @@ -2624,9 +2906,23 @@ def recv_scale_up_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "scale_up_cluster failed: unknown result") - - def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "scale_up_cluster failed: unknown result", + ) + + def add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): """ Parameters: - cluster_id @@ -2640,11 +2936,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 @@ -2672,7 +2991,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): """ @@ -2684,7 +3006,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) @@ -2706,7 +3030,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): """ @@ -2718,7 +3045,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) @@ -2740,7 +3069,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_keypair_public_key_by_name(self, key_name): """ @@ -2752,7 +3084,9 @@ def get_keypair_public_key_by_name(self, key_name): return self.recv_get_keypair_public_key_by_name() def send_get_keypair_public_key_by_name(self, key_name): - self._oprot.writeMessageBegin('get_keypair_public_key_by_name', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_keypair_public_key_by_name", TMessageType.CALL, self._seqid + ) args = get_keypair_public_key_by_name_args() args.key_name = key_name args.write(self._oprot) @@ -2772,7 +3106,10 @@ def recv_get_keypair_public_key_by_name(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_keypair_public_key_by_name failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_keypair_public_key_by_name failed: unknown result", + ) def delete_keypair(self, key_name): """ @@ -2784,7 +3121,7 @@ def delete_keypair(self, key_name): self.recv_delete_keypair() def send_delete_keypair(self, key_name): - self._oprot.writeMessageBegin('delete_keypair', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("delete_keypair", TMessageType.CALL, self._seqid) args = delete_keypair_args() args.key_name = key_name args.write(self._oprot) @@ -2814,7 +3151,9 @@ def add_default_security_groups_to_server(self, openstack_id): self.recv_add_default_security_groups_to_server() def send_add_default_security_groups_to_server(self, openstack_id): - self._oprot.writeMessageBegin('add_default_security_groups_to_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_default_security_groups_to_server", TMessageType.CALL, self._seqid + ) args = add_default_security_groups_to_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2850,7 +3189,7 @@ def get_server(self, openstack_id, no_connection): return self.recv_get_server() def send_get_server(self, openstack_id, no_connection): - 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.no_connection = no_connection @@ -2873,7 +3212,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 get_server_by_unique_name(self, unique_name, no_connection): """ @@ -2886,7 +3227,9 @@ def get_server_by_unique_name(self, unique_name, no_connection): return self.recv_get_server_by_unique_name() def send_get_server_by_unique_name(self, unique_name, no_connection): - self._oprot.writeMessageBegin('get_server_by_unique_name', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_server_by_unique_name", TMessageType.CALL, self._seqid + ) args = get_server_by_unique_name_args() args.unique_name = unique_name args.no_connection = no_connection @@ -2909,7 +3252,10 @@ def recv_get_server_by_unique_name(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server_by_unique_name failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_server_by_unique_name failed: unknown result", + ) def stop_server(self, openstack_id): """ @@ -2924,7 +3270,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) @@ -2965,8 +3311,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 @@ -2994,7 +3342,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): """ @@ -3008,7 +3359,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() @@ -3027,7 +3378,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_keys, master_instance, worker_instances, user): """ @@ -3042,7 +3395,7 @@ def start_cluster(self, public_keys, master_instance, worker_instances, user): return self.recv_start_cluster() def send_start_cluster(self, public_keys, 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_keys = public_keys args.master_instance = master_instance @@ -3065,7 +3418,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): """ @@ -3077,7 +3432,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) @@ -3099,7 +3456,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): """ @@ -3114,7 +3474,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) @@ -3149,7 +3509,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 @@ -3188,7 +3548,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) @@ -3226,7 +3586,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 @@ -3251,7 +3613,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): """ @@ -3265,7 +3630,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) @@ -3303,7 +3668,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 @@ -3329,7 +3694,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): """ @@ -3341,11 +3708,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 @@ -3371,7 +3744,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): """ @@ -3387,7 +3763,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 @@ -3413,7 +3791,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): """ @@ -3430,7 +3811,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 @@ -3456,7 +3839,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): """ @@ -3471,7 +3857,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) @@ -3493,7 +3881,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): """ @@ -3507,7 +3898,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) @@ -3543,7 +3936,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) @@ -3579,7 +3974,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) @@ -3611,13 +4008,23 @@ 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_research_environment_security_group"] = Processor.process_add_research_environment_security_group - self._processMap["add_project_security_group_to_server"] = Processor.process_add_project_security_group_to_server - 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_project_security_group_to_server"] = ( + Processor.process_add_project_security_group_to_server + ) + 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 @@ -3626,47 +4033,87 @@ 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["remove_security_groups_from_server"] = Processor.process_remove_security_groups_from_server + 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["remove_security_groups_from_server"] = ( + Processor.process_remove_security_groups_from_server + ) self._processMap["delete_server"] = Processor.process_delete_server self._processMap["rescue_server"] = Processor.process_rescue_server self._processMap["unrescue_server"] = Processor.process_unrescue_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_access_url"] = Processor.process_get_forc_access_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["set_metadata_server_data"] = Processor.process_set_metadata_server_data - self._processMap["remove_metadata_server_data"] = Processor.process_remove_metadata_server_data - self._processMap["is_metadata_server_available"] = Processor.process_is_metadata_server_available + self._processMap["set_metadata_server_data"] = ( + Processor.process_set_metadata_server_data + ) + self._processMap["remove_metadata_server_data"] = ( + Processor.process_remove_metadata_server_data + ) + self._processMap["is_metadata_server_available"] = ( + Processor.process_is_metadata_server_available + ) 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_security_group_id_by_name"] = Processor.process_get_security_group_id_by_name + self._processMap["get_servers_by_bibigrid_id"] = ( + Processor.process_get_servers_by_bibigrid_id + ) + self._processMap["get_security_group_id_by_name"] = ( + Processor.process_get_security_group_id_by_name + ) 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 self._processMap["get_cluster_status"] = Processor.process_get_cluster_status - self._processMap["get_keypair_public_key_by_name"] = Processor.process_get_keypair_public_key_by_name + self._processMap["get_keypair_public_key_by_name"] = ( + Processor.process_get_keypair_public_key_by_name + ) self._processMap["delete_keypair"] = Processor.process_delete_keypair - self._processMap["add_default_security_groups_to_server"] = Processor.process_add_default_security_groups_to_server + self._processMap["add_default_security_groups_to_server"] = ( + Processor.process_add_default_security_groups_to_server + ) self._processMap["get_server"] = Processor.process_get_server - self._processMap["get_server_by_unique_name"] = Processor.process_get_server_by_unique_name + self._processMap["get_server_by_unique_name"] = ( + Processor.process_get_server_by_unique_name + ) self._processMap["stop_server"] = Processor.process_stop_server self._processMap["create_snapshot"] = Processor.process_create_snapshot self._processMap["get_limits"] = Processor.process_get_limits @@ -3675,14 +4122,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 @@ -3697,7 +4154,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() @@ -3718,13 +4177,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() @@ -3741,13 +4202,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() @@ -3764,13 +4227,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() @@ -3787,13 +4252,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() @@ -3810,13 +4277,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() @@ -3836,13 +4305,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() @@ -3865,13 +4336,15 @@ def process_add_udp_security_group(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_udp_security_group", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3883,7 +4356,9 @@ def process_add_research_environment_security_group(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_research_environment_security_group_result() try: - self._handler.add_research_environment_security_group(args.server_id, args.security_group_name) + self._handler.add_research_environment_security_group( + args.server_id, args.security_group_name + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3894,14 +4369,18 @@ def process_add_research_environment_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') - oprot.writeMessageBegin("add_research_environment_security_group", msg_type, seqid) + 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() @@ -3912,7 +4391,9 @@ def process_add_project_security_group_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_project_security_group_to_server_result() try: - self._handler.add_project_security_group_to_server(args.server_id, args.project_name, args.project_id) + self._handler.add_project_security_group_to_server( + args.server_id, args.project_name, args.project_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3923,13 +4404,15 @@ def process_add_project_security_group_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_project_security_group_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3952,13 +4435,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() @@ -3975,13 +4460,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() @@ -3998,13 +4485,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() @@ -4021,13 +4510,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() @@ -4044,13 +4535,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() @@ -4062,7 +4555,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 @@ -4070,13 +4565,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() @@ -4096,13 +4593,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() @@ -4119,13 +4618,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() @@ -4145,13 +4646,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() @@ -4163,7 +4666,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 @@ -4177,13 +4686,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() @@ -4206,13 +4717,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() @@ -4235,13 +4748,15 @@ def process_remove_security_groups_from_server(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("remove_security_groups_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4264,13 +4779,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() @@ -4282,7 +4799,9 @@ def process_rescue_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = rescue_server_result() try: - self._handler.rescue_server(args.openstack_id, args.admin_pass, args.image_ref) + self._handler.rescue_server( + args.openstack_id, args.admin_pass, args.image_ref + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4293,13 +4812,15 @@ def process_rescue_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("rescue_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4322,13 +4843,15 @@ def process_unrescue_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("unrescue_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4340,7 +4863,22 @@ 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, args.slurm_version, args.metadata_token, args.metadata_endpoint) + 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_owner_keys, + args.addtional_user_keys, + args.research_environment, + args.additional_security_group_ids, + args.slurm_version, + args.metadata_token, + args.metadata_endpoint, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4360,13 +4898,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() @@ -4383,13 +4923,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() @@ -4409,13 +4951,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() @@ -4427,7 +4971,20 @@ 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, args.additional_keys, args.metadata_token, args.metadata_endpoint) + 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, + args.additional_owner_keys, + args.addtional_user_keys, + args.metadata_token, + args.metadata_endpoint, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4447,13 +5004,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() @@ -4470,13 +5029,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() @@ -4488,7 +5049,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 @@ -4496,13 +5065,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() @@ -4522,13 +5093,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() @@ -4545,13 +5118,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() @@ -4568,13 +5143,15 @@ def process_get_forc_access_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_access_url", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4586,7 +5163,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 @@ -4597,13 +5176,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() @@ -4623,13 +5204,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() @@ -4649,13 +5232,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() @@ -4675,13 +5260,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() @@ -4704,13 +5291,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() @@ -4733,13 +5322,15 @@ def process_set_metadata_server_data(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("set_metadata_server_data", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4762,13 +5353,15 @@ def process_remove_metadata_server_data(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("remove_metadata_server_data", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4791,13 +5384,15 @@ def process_is_metadata_server_available(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("is_metadata_server_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4817,13 +5412,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() @@ -4835,7 +5432,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 @@ -4843,13 +5442,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() @@ -4869,13 +5470,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() @@ -4887,7 +5490,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 @@ -4895,13 +5500,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() @@ -4918,13 +5525,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() @@ -4941,13 +5550,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() @@ -4964,13 +5575,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() @@ -4987,13 +5600,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() @@ -5013,13 +5628,15 @@ def process_get_security_group_id_by_name(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_security_group_id_by_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5031,18 +5648,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() @@ -5054,18 +5681,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() @@ -5085,13 +5724,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() @@ -5111,13 +5752,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() @@ -5134,13 +5777,15 @@ def process_get_keypair_public_key_by_name(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_keypair_public_key_by_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5157,13 +5802,15 @@ def process_delete_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("delete_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5183,14 +5830,18 @@ def process_add_default_security_groups_to_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') - oprot.writeMessageBegin("add_default_security_groups_to_server", msg_type, seqid) + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) + oprot.writeMessageBegin( + "add_default_security_groups_to_server", msg_type, seqid + ) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -5201,7 +5852,9 @@ def process_get_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_server_result() try: - result.success = self._handler.get_server(args.openstack_id, args.no_connection) + result.success = self._handler.get_server( + args.openstack_id, args.no_connection + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5209,13 +5862,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() @@ -5227,7 +5882,9 @@ def process_get_server_by_unique_name(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_server_by_unique_name_result() try: - result.success = self._handler.get_server_by_unique_name(args.unique_name, args.no_connection) + result.success = self._handler.get_server_by_unique_name( + args.unique_name, args.no_connection + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5235,13 +5892,15 @@ def process_get_server_by_unique_name(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_by_unique_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5264,13 +5923,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() @@ -5282,7 +5943,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 @@ -5293,13 +5960,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() @@ -5316,13 +5985,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() @@ -5334,18 +6005,22 @@ def process_start_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_cluster_result() try: - result.success = self._handler.start_cluster(args.public_keys, args.master_instance, args.worker_instances, args.user) + result.success = self._handler.start_cluster( + args.public_keys, 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() @@ -5365,13 +6040,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() @@ -5391,13 +6068,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() @@ -5423,13 +6102,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() @@ -5452,13 +6133,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() @@ -5470,7 +6153,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 @@ -5481,13 +6166,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() @@ -5510,13 +6197,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() @@ -5528,7 +6217,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 @@ -5539,13 +6230,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() @@ -5557,7 +6250,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 @@ -5568,13 +6263,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() @@ -5586,7 +6283,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 @@ -5597,13 +6296,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() @@ -5615,7 +6316,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 @@ -5626,13 +6329,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() @@ -5652,13 +6357,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() @@ -5681,13 +6388,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() @@ -5710,13 +6419,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() @@ -5739,18 +6450,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 @@ -5761,12 +6475,20 @@ class is_version_args(object): """ + thrift_spec = None - 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() @@ -5785,12 +6507,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -5800,19 +6525,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 ) @@ -5823,12 +6555,20 @@ class is_version_result(object): """ + thrift_spec = None - 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() @@ -5847,12 +6587,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -5862,26 +6605,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5895,10 +6649,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -5906,18 +6663,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): @@ -5927,12 +6684,20 @@ class get_client_version_result(object): """ + thrift_spec = None - 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() @@ -5942,7 +6707,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: @@ -5951,13 +6720,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -5966,26 +6742,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(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,10 +6786,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -6010,18 +6800,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): @@ -6031,12 +6821,20 @@ class get_gateway_ip_result(object): """ + thrift_spec = None - 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() @@ -6049,8 +6847,16 @@ def read(self, iprot): self.success = {} (_ktype49, _vtype50, _size48) = iprot.readMapBegin() for _i52 in range(_size48): - _key53 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val54 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key53 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val54 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key53] = _val54 iprot.readMapEnd() else: @@ -6061,16 +6867,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter55, viter56 in self.success.items(): - oprot.writeString(kiter55.encode('utf-8') if sys.version_info[0] == 2 else kiter55) - oprot.writeString(viter56.encode('utf-8') if sys.version_info[0] == 2 else viter56) + oprot.writeString( + kiter55.encode("utf-8") if sys.version_info[0] == 2 else kiter55 + ) + oprot.writeString( + viter56.encode("utf-8") if sys.version_info[0] == 2 else viter56 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6080,26 +6893,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6113,10 +6937,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -6124,18 +6951,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): @@ -6145,12 +6972,20 @@ class get_calculation_values_result(object): """ + thrift_spec = None - 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() @@ -6163,8 +6998,16 @@ def read(self, iprot): self.success = {} (_ktype58, _vtype59, _size57) = iprot.readMapBegin() for _i61 in range(_size57): - _key62 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val63 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key62 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val63 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key62] = _val63 iprot.readMapEnd() else: @@ -6175,16 +7018,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter64, viter65 in self.success.items(): - oprot.writeString(kiter64.encode('utf-8') if sys.version_info[0] == 2 else kiter64) - oprot.writeString(viter65.encode('utf-8') if sys.version_info[0] == 2 else viter65) + oprot.writeString( + kiter64.encode("utf-8") if sys.version_info[0] == 2 else kiter64 + ) + oprot.writeString( + viter65.encode("utf-8") if sys.version_info[0] == 2 else viter65 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6194,18 +7044,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 ) @@ -6217,13 +7074,22 @@ class import_keypair_args(object): """ + thrift_spec = None - 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() @@ -6233,12 +7099,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: @@ -6247,17 +7121,28 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -6266,20 +7151,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 ) @@ -6290,12 +7188,20 @@ class import_keypair_result(object): """ + thrift_spec = None - 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() @@ -6305,7 +7211,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: @@ -6314,13 +7224,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -6329,18 +7246,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 ) @@ -6351,12 +7275,20 @@ class get_vm_ports_args(object): """ + thrift_spec = None - 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() @@ -6366,7 +7298,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: @@ -6375,13 +7311,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -6390,19 +7333,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 ) @@ -6414,13 +7364,22 @@ class get_vm_ports_result(object): """ + thrift_spec = None - 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() @@ -6433,8 +7392,16 @@ def read(self, iprot): self.success = {} (_ktype67, _vtype68, _size66) = iprot.readMapBegin() for _i70 in range(_size66): - _key71 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val72 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key71 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val72 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key71] = _val72 iprot.readMapEnd() else: @@ -6450,20 +7417,27 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter73, viter74 in self.success.items(): - oprot.writeString(kiter73.encode('utf-8') if sys.version_info[0] == 2 else kiter73) - oprot.writeString(viter74.encode('utf-8') if sys.version_info[0] == 2 else viter74) + oprot.writeString( + kiter73.encode("utf-8") if sys.version_info[0] == 2 else kiter73 + ) + oprot.writeString( + viter74.encode("utf-8") if sys.version_info[0] == 2 else viter74 + ) 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() @@ -6473,19 +7447,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_vm_ports_result) get_vm_ports_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -6496,12 +7483,20 @@ class add_udp_security_group_args(object): """ + thrift_spec = None - 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() @@ -6511,7 +7506,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: @@ -6520,13 +7519,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -6535,19 +7541,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 ) @@ -6559,13 +7572,22 @@ class add_udp_security_group_result(object): """ + thrift_spec = None - 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() @@ -6589,16 +7611,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -6608,20 +7633,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_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 ) @@ -6633,13 +7671,22 @@ class add_research_environment_security_group_args(object): """ + thrift_spec = None - def __init__(self, server_id=None, security_group_name=None,): + 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: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6649,12 +7696,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.security_group_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + 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: @@ -6663,17 +7718,28 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_research_environment_security_group_args') + 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.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.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() @@ -6682,20 +7748,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_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 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "security_group_name", + "UTF8", + None, + ), # 2 ) @@ -6707,13 +7786,22 @@ class add_research_environment_security_group_result(object): """ + thrift_spec = None - 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() @@ -6737,16 +7825,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_research_environment_security_group_result') + oprot.writeStructBegin("add_research_environment_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() @@ -6756,20 +7847,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_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 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 2 ) @@ -6782,14 +7886,24 @@ class add_project_security_group_to_server_args(object): """ + thrift_spec = None - def __init__(self, server_id=None, project_name=None, project_id=None,): + def __init__( + self, + server_id=None, + project_name=None, + project_id=None, + ): self.server_id = server_id self.project_name = project_name self.project_id = project_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() @@ -6799,17 +7913,29 @@ 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.project_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.project_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.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) else: @@ -6818,21 +7944,36 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_project_security_group_to_server_args') + oprot.writeStructBegin("add_project_security_group_to_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.project_name is not None: - oprot.writeFieldBegin('project_name', TType.STRING, 2) - oprot.writeString(self.project_name.encode('utf-8') if sys.version_info[0] == 2 else self.project_name) + oprot.writeFieldBegin("project_name", TType.STRING, 2) + oprot.writeString( + self.project_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.project_name + ) oprot.writeFieldEnd() if self.project_id is not None: - oprot.writeFieldBegin('project_id', TType.STRING, 3) - oprot.writeString(self.project_id.encode('utf-8') if sys.version_info[0] == 2 else self.project_id) + oprot.writeFieldBegin("project_id", TType.STRING, 3) + oprot.writeString( + self.project_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.project_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6841,21 +7982,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(add_project_security_group_to_server_args) add_project_security_group_to_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'project_name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'project_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "project_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "project_id", + "UTF8", + None, + ), # 3 ) @@ -6867,13 +8027,22 @@ class add_project_security_group_to_server_result(object): """ + thrift_spec = None - 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() @@ -6897,16 +8066,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_project_security_group_to_server_result') + oprot.writeStructBegin("add_project_security_group_to_server_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() @@ -6916,20 +8088,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_project_security_group_to_server_result) add_project_security_group_to_server_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 ) @@ -6941,13 +8126,22 @@ class add_metadata_to_server_args(object): """ + thrift_spec = None - 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() @@ -6957,7 +8151,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: @@ -6965,8 +8163,16 @@ def read(self, iprot): self.metadata = {} (_ktype76, _vtype77, _size75) = iprot.readMapBegin() for _i79 in range(_size75): - _key80 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val81 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key80 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val81 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key80] = _val81 iprot.readMapEnd() else: @@ -6977,20 +8183,31 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter82, viter83 in self.metadata.items(): - oprot.writeString(kiter82.encode('utf-8') if sys.version_info[0] == 2 else kiter82) - oprot.writeString(viter83.encode('utf-8') if sys.version_info[0] == 2 else viter83) + oprot.writeString( + kiter82.encode("utf-8") if sys.version_info[0] == 2 else kiter82 + ) + oprot.writeString( + viter83.encode("utf-8") if sys.version_info[0] == 2 else viter83 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7000,20 +8217,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 ) @@ -7025,13 +8255,22 @@ class add_metadata_to_server_result(object): """ + thrift_spec = None - 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() @@ -7055,16 +8294,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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.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() @@ -7074,28 +8316,45 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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 = ( None, # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 2 ) class get_flavors_args(object): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7109,10 +8368,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7120,18 +8382,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): @@ -7141,12 +8403,20 @@ class get_flavors_result(object): """ + thrift_spec = None - 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() @@ -7171,12 +8441,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter90 in self.success: iter90.write(oprot) @@ -7189,26 +8462,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7222,10 +8506,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7233,18 +8520,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): @@ -7254,12 +8541,20 @@ class get_images_result(object): """ + thrift_spec = None - 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() @@ -7284,12 +8579,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter97 in self.success: iter97.write(oprot) @@ -7302,26 +8600,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7335,10 +8644,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7346,18 +8658,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): @@ -7367,12 +8679,20 @@ class get_public_images_result(object): """ + thrift_spec = None - 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() @@ -7397,12 +8717,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter104 in self.success: iter104.write(oprot) @@ -7415,26 +8738,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7448,10 +8782,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7459,18 +8796,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): @@ -7480,12 +8817,20 @@ class get_private_images_result(object): """ + thrift_spec = None - 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() @@ -7510,12 +8855,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter111 in self.success: iter111.write(oprot) @@ -7528,18 +8876,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 ) @@ -7551,13 +8906,22 @@ class get_image_args(object): """ + thrift_spec = None - 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() @@ -7567,7 +8931,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: @@ -7581,16 +8949,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7600,20 +8975,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 ) @@ -7625,13 +9013,22 @@ class get_image_result(object): """ + thrift_spec = None - 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() @@ -7656,16 +9053,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7675,19 +9075,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 ) @@ -7698,12 +9111,20 @@ class get_volume_args(object): """ + thrift_spec = None - 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() @@ -7713,7 +9134,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: @@ -7722,13 +9147,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7737,19 +9169,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 ) @@ -7761,13 +9200,22 @@ class get_volume_result(object): """ + thrift_spec = None - 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() @@ -7792,16 +9240,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -7811,19 +9262,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 ) @@ -7834,12 +9298,20 @@ class get_volumes_by_ids_args(object): """ + thrift_spec = None - 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() @@ -7852,7 +9324,11 @@ def read(self, iprot): self.volume_ids = [] (_etype115, _size112) = iprot.readListBegin() for _i116 in range(_size112): - _elem117 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem117 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.volume_ids.append(_elem117) iprot.readListEnd() else: @@ -7863,15 +9339,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter118 in self.volume_ids: - oprot.writeString(iter118.encode('utf-8') if sys.version_info[0] == 2 else iter118) + oprot.writeString( + iter118.encode("utf-8") if sys.version_info[0] == 2 else iter118 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7881,19 +9362,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 ) @@ -7904,12 +9392,20 @@ class get_volumes_by_ids_result(object): """ + thrift_spec = None - 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() @@ -7934,12 +9430,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter125 in self.success: iter125.write(oprot) @@ -7952,18 +9451,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 ) @@ -7975,13 +9481,22 @@ class resize_volume_args(object): """ + thrift_spec = None - 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() @@ -7991,7 +9506,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: @@ -8005,16 +9524,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8024,20 +9550,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 ) @@ -8048,12 +9587,20 @@ class resize_volume_result(object): """ + thrift_spec = None - 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() @@ -8072,12 +9619,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8087,19 +9637,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 ) @@ -8114,8 +9671,16 @@ class open_port_range_for_vm_in_project_args(object): """ + thrift_spec = None - 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 @@ -8123,7 +9688,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() @@ -8143,17 +9712,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: @@ -8162,29 +9743,44 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8193,23 +9789,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 ) @@ -8223,15 +9850,26 @@ class open_port_range_for_vm_in_project_result(object): """ + thrift_spec = None - 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() @@ -8241,7 +9879,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: @@ -8265,24 +9907,31 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8292,21 +9941,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 ) @@ -8317,12 +9991,20 @@ class delete_security_group_rule_args(object): """ + thrift_spec = None - 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() @@ -8332,7 +10014,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: @@ -8341,13 +10027,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8356,19 +10049,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 ) @@ -8380,13 +10080,22 @@ class delete_security_group_rule_result(object): """ + thrift_spec = None - def __init__(self, e=None, f=None,): + def __init__( + self, + e=None, + f=None, + ): self.e = e self.f = f def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8410,16 +10119,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_security_group_rule_result') + oprot.writeStructBegin("delete_security_group_rule_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 2) + oprot.writeFieldBegin("f", TType.STRUCT, 2) self.f.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8429,20 +10141,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_security_group_rule_result) delete_security_group_rule_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [SecurityGroupRuleNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'f', [DefaultException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [SecurityGroupRuleNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "f", + [DefaultException, None], + None, + ), # 2 ) @@ -8453,12 +10178,20 @@ class remove_security_groups_from_server_args(object): """ + thrift_spec = None - 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() @@ -8468,7 +10201,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: @@ -8477,13 +10214,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('remove_security_groups_from_server_args') + oprot.writeStructBegin("remove_security_groups_from_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() @@ -8492,19 +10236,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(remove_security_groups_from_server_args) remove_security_groups_from_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -8516,13 +10267,22 @@ class remove_security_groups_from_server_result(object): """ + thrift_spec = None - def __init__(self, e=None, f=None,): + def __init__( + self, + e=None, + f=None, + ): self.e = e self.f = f def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8546,16 +10306,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('remove_security_groups_from_server_result') + oprot.writeStructBegin("remove_security_groups_from_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.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 2) + oprot.writeFieldBegin("f", TType.STRUCT, 2) self.f.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8565,20 +10328,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(remove_security_groups_from_server_result) remove_security_groups_from_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [SecurityGroupRuleNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'f', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [SecurityGroupRuleNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "f", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -8589,12 +10365,20 @@ class delete_server_args(object): """ + thrift_spec = None - 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() @@ -8604,7 +10388,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: @@ -8613,13 +10401,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8628,19 +10423,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 ) @@ -8652,13 +10454,22 @@ class delete_server_result(object): """ + thrift_spec = None - 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() @@ -8682,16 +10493,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8701,20 +10515,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 ) @@ -8727,14 +10554,24 @@ class rescue_server_args(object): """ + thrift_spec = None - def __init__(self, openstack_id=None, admin_pass=None, image_ref=None,): + def __init__( + self, + openstack_id=None, + admin_pass=None, + image_ref=None, + ): self.openstack_id = openstack_id self.admin_pass = admin_pass self.image_ref = image_ref def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8744,17 +10581,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.admin_pass = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.admin_pass = ( + 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.image_ref = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_ref = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8763,21 +10612,36 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('rescue_server_args') + oprot.writeStructBegin("rescue_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.admin_pass is not None: - oprot.writeFieldBegin('admin_pass', TType.STRING, 2) - oprot.writeString(self.admin_pass.encode('utf-8') if sys.version_info[0] == 2 else self.admin_pass) + oprot.writeFieldBegin("admin_pass", TType.STRING, 2) + oprot.writeString( + self.admin_pass.encode("utf-8") + if sys.version_info[0] == 2 + else self.admin_pass + ) oprot.writeFieldEnd() if self.image_ref is not None: - oprot.writeFieldBegin('image_ref', TType.STRING, 3) - oprot.writeString(self.image_ref.encode('utf-8') if sys.version_info[0] == 2 else self.image_ref) + oprot.writeFieldBegin("image_ref", TType.STRING, 3) + oprot.writeString( + self.image_ref.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_ref + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8786,21 +10650,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(rescue_server_args) rescue_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'admin_pass', 'UTF8', None, ), # 2 - (3, TType.STRING, 'image_ref', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "admin_pass", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "image_ref", + "UTF8", + None, + ), # 3 ) @@ -8812,13 +10695,22 @@ class rescue_server_result(object): """ + thrift_spec = None - 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() @@ -8842,16 +10734,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('rescue_server_result') + oprot.writeStructBegin("rescue_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() @@ -8861,20 +10756,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(rescue_server_result) rescue_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 ) @@ -8885,12 +10793,20 @@ class unrescue_server_args(object): """ + thrift_spec = None - 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() @@ -8900,7 +10816,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: @@ -8909,13 +10829,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('unrescue_server_args') + oprot.writeStructBegin("unrescue_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() @@ -8924,19 +10851,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(unrescue_server_args) unrescue_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -8948,13 +10882,22 @@ class unrescue_server_result(object): """ + thrift_spec = None - 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() @@ -8978,16 +10921,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('unrescue_server_result') + oprot.writeStructBegin("unrescue_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() @@ -8997,20 +10943,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(unrescue_server_result) unrescue_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 ) @@ -9024,7 +10983,8 @@ class start_server_args(object): - metadata: Metadata for the new instance - volume_ids_path_new - volume_ids_path_attach - - additional_keys + - additional_owner_keys + - addtional_user_keys - research_environment - additional_security_group_ids - slurm_version @@ -9033,8 +10993,25 @@ 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, slurm_version=None, metadata_token=None, metadata_endpoint=None,): + thrift_spec = 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_owner_keys=None, + addtional_user_keys=None, + research_environment=None, + additional_security_group_ids=None, + slurm_version=None, + metadata_token=None, + metadata_endpoint=None, + ): self.flavor_name = flavor_name self.image_name = image_name self.public_key = public_key @@ -9042,7 +11019,8 @@ def __init__(self, flavor_name=None, image_name=None, public_key=None, servernam self.metadata = metadata self.volume_ids_path_new = volume_ids_path_new self.volume_ids_path_attach = volume_ids_path_attach - self.additional_keys = additional_keys + self.additional_owner_keys = additional_owner_keys + self.addtional_user_keys = addtional_user_keys self.research_environment = research_environment self.additional_security_group_ids = additional_security_group_ids self.slurm_version = slurm_version @@ -9050,7 +11028,11 @@ def __init__(self, flavor_name=None, image_name=None, public_key=None, servernam self.metadata_endpoint = metadata_endpoint def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9060,22 +11042,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: @@ -9083,8 +11081,16 @@ def read(self, iprot): self.metadata = {} (_ktype127, _vtype128, _size126) = iprot.readMapBegin() for _i130 in range(_size126): - _key131 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val132 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key131 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val132 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key131] = _val132 iprot.readMapEnd() else: @@ -9097,8 +11103,16 @@ def read(self, iprot): _elem138 = {} (_ktype140, _vtype141, _size139) = iprot.readMapBegin() for _i143 in range(_size139): - _key144 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val145 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key144 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val145 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem138[_key144] = _val145 iprot.readMapEnd() self.volume_ids_path_new.append(_elem138) @@ -9113,8 +11127,16 @@ def read(self, iprot): _elem151 = {} (_ktype153, _vtype154, _size152) = iprot.readMapBegin() for _i156 in range(_size152): - _key157 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val158 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key157 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val158 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem151[_key157] = _val158 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem151) @@ -9123,42 +11145,80 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: - self.additional_keys = [] + self.additional_owner_keys = [] (_etype162, _size159) = iprot.readListBegin() for _i163 in range(_size159): - _elem164 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.additional_keys.append(_elem164) + _elem164 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.additional_owner_keys.append(_elem164) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 10: - if ftype == TType.STRING: - self.research_environment = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 11: if ftype == TType.LIST: - self.additional_security_group_ids = [] + self.addtional_user_keys = [] (_etype168, _size165) = iprot.readListBegin() for _i169 in range(_size165): - _elem170 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.additional_security_group_ids.append(_elem170) + _elem170 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.addtional_user_keys.append(_elem170) iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 12: + elif fid == 11: if ftype == TType.STRING: - self.slurm_version = 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 == 12: + if ftype == TType.LIST: + self.additional_security_group_ids = [] + (_etype174, _size171) = iprot.readListBegin() + for _i175 in range(_size171): + _elem176 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.additional_security_group_ids.append(_elem176) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.STRING: - self.metadata_token = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.slurm_version = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 14: if ftype == TType.STRING: - self.metadata_endpoint = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.metadata_token = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.STRING: + self.metadata_endpoint = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9167,85 +11227,153 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter171, viter172 in self.metadata.items(): - oprot.writeString(kiter171.encode('utf-8') if sys.version_info[0] == 2 else kiter171) - oprot.writeString(viter172.encode('utf-8') if sys.version_info[0] == 2 else viter172) + for kiter177, viter178 in self.metadata.items(): + oprot.writeString( + kiter177.encode("utf-8") if sys.version_info[0] == 2 else kiter177 + ) + oprot.writeString( + viter178.encode("utf-8") if sys.version_info[0] == 2 else viter178 + ) 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 iter173 in self.volume_ids_path_new: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter173)) - for kiter174, viter175 in iter173.items(): - oprot.writeString(kiter174.encode('utf-8') if sys.version_info[0] == 2 else kiter174) - oprot.writeString(viter175.encode('utf-8') if sys.version_info[0] == 2 else viter175) + for iter179 in self.volume_ids_path_new: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter179)) + for kiter180, viter181 in iter179.items(): + oprot.writeString( + kiter180.encode("utf-8") + if sys.version_info[0] == 2 + else kiter180 + ) + oprot.writeString( + viter181.encode("utf-8") + if sys.version_info[0] == 2 + else viter181 + ) 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 iter176 in self.volume_ids_path_attach: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter176)) - for kiter177, viter178 in iter176.items(): - oprot.writeString(kiter177.encode('utf-8') if sys.version_info[0] == 2 else kiter177) - oprot.writeString(viter178.encode('utf-8') if sys.version_info[0] == 2 else viter178) + for iter182 in self.volume_ids_path_attach: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter182)) + for kiter183, viter184 in iter182.items(): + oprot.writeString( + kiter183.encode("utf-8") + if sys.version_info[0] == 2 + else kiter183 + ) + oprot.writeString( + viter184.encode("utf-8") + if sys.version_info[0] == 2 + else viter184 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() - if self.additional_keys is not None: - oprot.writeFieldBegin('additional_keys', TType.LIST, 9) - oprot.writeListBegin(TType.STRING, len(self.additional_keys)) - for iter179 in self.additional_keys: - oprot.writeString(iter179.encode('utf-8') if sys.version_info[0] == 2 else iter179) + if self.additional_owner_keys is not None: + oprot.writeFieldBegin("additional_owner_keys", TType.LIST, 9) + oprot.writeListBegin(TType.STRING, len(self.additional_owner_keys)) + for iter185 in self.additional_owner_keys: + oprot.writeString( + iter185.encode("utf-8") if sys.version_info[0] == 2 else iter185 + ) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.addtional_user_keys is not None: + oprot.writeFieldBegin("addtional_user_keys", TType.LIST, 10) + oprot.writeListBegin(TType.STRING, len(self.addtional_user_keys)) + for iter186 in self.addtional_user_keys: + oprot.writeString( + iter186.encode("utf-8") if sys.version_info[0] == 2 else iter186 + ) 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, 11) + 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, 12) oprot.writeListBegin(TType.STRING, len(self.additional_security_group_ids)) - for iter180 in self.additional_security_group_ids: - oprot.writeString(iter180.encode('utf-8') if sys.version_info[0] == 2 else iter180) + for iter187 in self.additional_security_group_ids: + oprot.writeString( + iter187.encode("utf-8") if sys.version_info[0] == 2 else iter187 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.slurm_version is not None: - oprot.writeFieldBegin('slurm_version', TType.STRING, 12) - oprot.writeString(self.slurm_version.encode('utf-8') if sys.version_info[0] == 2 else self.slurm_version) + oprot.writeFieldBegin("slurm_version", TType.STRING, 13) + oprot.writeString( + self.slurm_version.encode("utf-8") + if sys.version_info[0] == 2 + else self.slurm_version + ) oprot.writeFieldEnd() if self.metadata_token is not None: - oprot.writeFieldBegin('metadata_token', TType.STRING, 13) - oprot.writeString(self.metadata_token.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_token) + oprot.writeFieldBegin("metadata_token", TType.STRING, 14) + oprot.writeString( + self.metadata_token.encode("utf-8") + if sys.version_info[0] == 2 + else self.metadata_token + ) oprot.writeFieldEnd() if self.metadata_endpoint is not None: - oprot.writeFieldBegin('metadata_endpoint', TType.STRING, 14) - oprot.writeString(self.metadata_endpoint.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_endpoint) + oprot.writeFieldBegin("metadata_endpoint", TType.STRING, 15) + oprot.writeString( + self.metadata_endpoint.encode("utf-8") + if sys.version_info[0] == 2 + else self.metadata_endpoint + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9254,32 +11382,118 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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 - (12, TType.STRING, 'slurm_version', 'UTF8', None, ), # 12 - (13, TType.STRING, 'metadata_token', 'UTF8', None, ), # 13 - (14, TType.STRING, 'metadata_endpoint', 'UTF8', None, ), # 14 + ( + 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_owner_keys", + (TType.STRING, "UTF8", False), + None, + ), # 9 + ( + 10, + TType.LIST, + "addtional_user_keys", + (TType.STRING, "UTF8", False), + None, + ), # 10 + ( + 11, + TType.STRING, + "research_environment", + "UTF8", + None, + ), # 11 + ( + 12, + TType.LIST, + "additional_security_group_ids", + (TType.STRING, "UTF8", False), + None, + ), # 12 + ( + 13, + TType.STRING, + "slurm_version", + "UTF8", + None, + ), # 13 + ( + 14, + TType.STRING, + "metadata_token", + "UTF8", + None, + ), # 14 + ( + 15, + TType.STRING, + "metadata_endpoint", + "UTF8", + None, + ), # 15 ) @@ -9295,8 +11509,17 @@ class start_server_result(object): """ + thrift_spec = None - 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 @@ -9305,7 +11528,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() @@ -9315,7 +11542,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: @@ -9349,32 +11580,39 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -9384,33 +11622,74 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9424,10 +11703,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -9435,18 +11717,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): @@ -9456,12 +11738,20 @@ class is_bibigrid_available_result(object): """ + thrift_spec = None - 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() @@ -9480,12 +11770,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -9495,18 +11788,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 ) @@ -9518,13 +11818,22 @@ class detach_ip_from_server_args(object): """ + thrift_spec = None - 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() @@ -9534,12 +11843,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: @@ -9548,17 +11865,28 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -9567,20 +11895,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 ) @@ -9591,12 +11932,20 @@ class detach_ip_from_server_result(object): """ + thrift_spec = None - 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() @@ -9615,12 +11964,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -9630,19 +11982,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 ) @@ -9657,14 +12016,30 @@ class start_server_with_custom_key_args(object): - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids - - additional_keys + - additional_owner_keys + - addtional_user_keys - metadata_token - metadata_endpoint """ - - 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, additional_keys=None, metadata_token=None, metadata_endpoint=None,): + thrift_spec = 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, + additional_owner_keys=None, + addtional_user_keys=None, + metadata_token=None, + metadata_endpoint=None, + ): self.flavor_name = flavor_name self.image_name = image_name self.servername = servername @@ -9673,12 +12048,17 @@ def __init__(self, flavor_name=None, image_name=None, servername=None, metadata= self.volume_ids_path_new = volume_ids_path_new self.volume_ids_path_attach = volume_ids_path_attach self.additional_security_group_ids = additional_security_group_ids - self.additional_keys = additional_keys + self.additional_owner_keys = additional_owner_keys + self.addtional_user_keys = addtional_user_keys self.metadata_token = metadata_token self.metadata_endpoint = metadata_endpoint def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(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,95 +12068,165 @@ 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: if ftype == TType.MAP: self.metadata = {} - (_ktype182, _vtype183, _size181) = iprot.readMapBegin() - for _i185 in range(_size181): - _key186 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val187 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key186] = _val187 + (_ktype189, _vtype190, _size188) = iprot.readMapBegin() + for _i192 in range(_size188): + _key193 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val194 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key193] = _val194 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: if ftype == TType.LIST: self.volume_ids_path_new = [] - (_etype191, _size188) = iprot.readListBegin() - for _i192 in range(_size188): - _elem193 = {} - (_ktype195, _vtype196, _size194) = iprot.readMapBegin() - for _i198 in range(_size194): - _key199 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val200 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _elem193[_key199] = _val200 + (_etype198, _size195) = iprot.readListBegin() + for _i199 in range(_size195): + _elem200 = {} + (_ktype202, _vtype203, _size201) = iprot.readMapBegin() + for _i205 in range(_size201): + _key206 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val207 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _elem200[_key206] = _val207 iprot.readMapEnd() - self.volume_ids_path_new.append(_elem193) + self.volume_ids_path_new.append(_elem200) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.LIST: self.volume_ids_path_attach = [] - (_etype204, _size201) = iprot.readListBegin() - for _i205 in range(_size201): - _elem206 = {} - (_ktype208, _vtype209, _size207) = iprot.readMapBegin() - for _i211 in range(_size207): - _key212 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val213 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _elem206[_key212] = _val213 + (_etype211, _size208) = iprot.readListBegin() + for _i212 in range(_size208): + _elem213 = {} + (_ktype215, _vtype216, _size214) = iprot.readMapBegin() + for _i218 in range(_size214): + _key219 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val220 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _elem213[_key219] = _val220 iprot.readMapEnd() - self.volume_ids_path_attach.append(_elem206) + self.volume_ids_path_attach.append(_elem213) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.additional_security_group_ids = [] - (_etype217, _size214) = iprot.readListBegin() - for _i218 in range(_size214): - _elem219 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.additional_security_group_ids.append(_elem219) + (_etype224, _size221) = iprot.readListBegin() + for _i225 in range(_size221): + _elem226 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.additional_security_group_ids.append(_elem226) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.LIST: - self.additional_keys = [] - (_etype223, _size220) = iprot.readListBegin() - for _i224 in range(_size220): - _elem225 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.additional_keys.append(_elem225) + self.additional_owner_keys = [] + (_etype230, _size227) = iprot.readListBegin() + for _i231 in range(_size227): + _elem232 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.additional_owner_keys.append(_elem232) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 11: - if ftype == TType.STRING: - self.metadata_token = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + if ftype == TType.LIST: + self.addtional_user_keys = [] + (_etype236, _size233) = iprot.readListBegin() + for _i237 in range(_size233): + _elem238 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.addtional_user_keys.append(_elem238) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: - self.metadata_endpoint = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.metadata_token = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRING: + self.metadata_endpoint = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9785,77 +12235,137 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter226, viter227 in self.metadata.items(): - oprot.writeString(kiter226.encode('utf-8') if sys.version_info[0] == 2 else kiter226) - oprot.writeString(viter227.encode('utf-8') if sys.version_info[0] == 2 else viter227) + for kiter239, viter240 in self.metadata.items(): + oprot.writeString( + kiter239.encode("utf-8") if sys.version_info[0] == 2 else kiter239 + ) + oprot.writeString( + viter240.encode("utf-8") if sys.version_info[0] == 2 else viter240 + ) 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 iter228 in self.volume_ids_path_new: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter228)) - for kiter229, viter230 in iter228.items(): - oprot.writeString(kiter229.encode('utf-8') if sys.version_info[0] == 2 else kiter229) - oprot.writeString(viter230.encode('utf-8') if sys.version_info[0] == 2 else viter230) + for iter241 in self.volume_ids_path_new: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter241)) + for kiter242, viter243 in iter241.items(): + oprot.writeString( + kiter242.encode("utf-8") + if sys.version_info[0] == 2 + else kiter242 + ) + oprot.writeString( + viter243.encode("utf-8") + if sys.version_info[0] == 2 + else viter243 + ) 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 iter231 in self.volume_ids_path_attach: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter231)) - for kiter232, viter233 in iter231.items(): - oprot.writeString(kiter232.encode('utf-8') if sys.version_info[0] == 2 else kiter232) - oprot.writeString(viter233.encode('utf-8') if sys.version_info[0] == 2 else viter233) + for iter244 in self.volume_ids_path_attach: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter244)) + for kiter245, viter246 in iter244.items(): + oprot.writeString( + kiter245.encode("utf-8") + if sys.version_info[0] == 2 + else kiter245 + ) + oprot.writeString( + viter246.encode("utf-8") + if sys.version_info[0] == 2 + else viter246 + ) 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 iter234 in self.additional_security_group_ids: - oprot.writeString(iter234.encode('utf-8') if sys.version_info[0] == 2 else iter234) + for iter247 in self.additional_security_group_ids: + oprot.writeString( + iter247.encode("utf-8") if sys.version_info[0] == 2 else iter247 + ) oprot.writeListEnd() oprot.writeFieldEnd() - if self.additional_keys is not None: - oprot.writeFieldBegin('additional_keys', TType.LIST, 10) - oprot.writeListBegin(TType.STRING, len(self.additional_keys)) - for iter235 in self.additional_keys: - oprot.writeString(iter235.encode('utf-8') if sys.version_info[0] == 2 else iter235) + if self.additional_owner_keys is not None: + oprot.writeFieldBegin("additional_owner_keys", TType.LIST, 10) + oprot.writeListBegin(TType.STRING, len(self.additional_owner_keys)) + for iter248 in self.additional_owner_keys: + oprot.writeString( + iter248.encode("utf-8") if sys.version_info[0] == 2 else iter248 + ) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.addtional_user_keys is not None: + oprot.writeFieldBegin("addtional_user_keys", TType.LIST, 11) + oprot.writeListBegin(TType.STRING, len(self.addtional_user_keys)) + for iter249 in self.addtional_user_keys: + oprot.writeString( + iter249.encode("utf-8") if sys.version_info[0] == 2 else iter249 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.metadata_token is not None: - oprot.writeFieldBegin('metadata_token', TType.STRING, 11) - oprot.writeString(self.metadata_token.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_token) + oprot.writeFieldBegin("metadata_token", TType.STRING, 12) + oprot.writeString( + self.metadata_token.encode("utf-8") + if sys.version_info[0] == 2 + else self.metadata_token + ) oprot.writeFieldEnd() if self.metadata_endpoint is not None: - oprot.writeFieldBegin('metadata_endpoint', TType.STRING, 12) - oprot.writeString(self.metadata_endpoint.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_endpoint) + oprot.writeFieldBegin("metadata_endpoint", TType.STRING, 13) + oprot.writeString( + self.metadata_endpoint.encode("utf-8") + if sys.version_info[0] == 2 + else self.metadata_endpoint + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9864,30 +12374,104 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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 - (10, TType.LIST, 'additional_keys', (TType.STRING, 'UTF8', False), None, ), # 10 - (11, TType.STRING, 'metadata_token', 'UTF8', None, ), # 11 - (12, TType.STRING, 'metadata_endpoint', 'UTF8', None, ), # 12 + ( + 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 + ( + 10, + TType.LIST, + "additional_owner_keys", + (TType.STRING, "UTF8", False), + None, + ), # 10 + ( + 11, + TType.LIST, + "addtional_user_keys", + (TType.STRING, "UTF8", False), + None, + ), # 11 + ( + 12, + TType.STRING, + "metadata_token", + "UTF8", + None, + ), # 12 + ( + 13, + TType.STRING, + "metadata_endpoint", + "UTF8", + None, + ), # 13 ) @@ -9903,8 +12487,17 @@ class start_server_with_custom_key_result(object): """ + thrift_spec = None - 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 @@ -9913,7 +12506,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() @@ -9923,7 +12520,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: @@ -9957,32 +12558,39 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -9992,23 +12600,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 ) @@ -10019,12 +12664,20 @@ class exist_server_args(object): """ + thrift_spec = None - 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() @@ -10034,7 +12687,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: @@ -10043,13 +12700,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10058,19 +12720,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 ) @@ -10081,12 +12750,20 @@ class exist_server_result(object): """ + thrift_spec = None - 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() @@ -10105,12 +12782,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10120,18 +12800,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 ) @@ -10148,8 +12835,18 @@ class create_and_deploy_playbook_args(object): """ + thrift_spec = 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,): + 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 @@ -10159,7 +12856,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() @@ -10169,37 +12870,53 @@ 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: if ftype == TType.LIST: self.conda_packages = [] - (_etype239, _size236) = iprot.readListBegin() - for _i240 in range(_size236): - _elem241 = CondaPackage() - _elem241.read(iprot) - self.conda_packages.append(_elem241) + (_etype253, _size250) = iprot.readListBegin() + for _i254 in range(_size250): + _elem255 = CondaPackage() + _elem255.read(iprot) + self.conda_packages.append(_elem255) iprot.readListEnd() else: 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: if ftype == TType.LIST: self.apt_packages = [] - (_etype245, _size242) = iprot.readListBegin() - for _i246 in range(_size242): - _elem247 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.apt_packages.append(_elem247) + (_etype259, _size256) = iprot.readListBegin() + for _i260 in range(_size256): + _elem261 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.apt_packages.append(_elem261) iprot.readListEnd() else: iprot.skip(ftype) @@ -10210,7 +12927,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: @@ -10219,43 +12940,64 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter248 in self.conda_packages: - iter248.write(oprot) + for iter262 in self.conda_packages: + iter262.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 iter249 in self.apt_packages: - oprot.writeString(iter249.encode('utf-8') if sys.version_info[0] == 2 else iter249) + for iter263 in self.apt_packages: + oprot.writeString( + iter263.encode("utf-8") if sys.version_info[0] == 2 else iter263 + ) 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() @@ -10264,25 +13006,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 ) @@ -10294,13 +13079,22 @@ class create_and_deploy_playbook_result(object): """ + thrift_spec = None - 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() @@ -10324,16 +13118,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10343,19 +13140,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 ) @@ -10366,12 +13176,20 @@ class get_playbook_logs_args(object): """ + thrift_spec = None - 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() @@ -10381,7 +13199,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: @@ -10390,13 +13212,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10405,19 +13234,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 ) @@ -10429,13 +13265,22 @@ class get_playbook_logs_result(object): """ + thrift_spec = None - 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() @@ -10460,16 +13305,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10479,27 +13327,44 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10513,10 +13378,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10524,18 +13392,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): @@ -10545,12 +13413,20 @@ class has_forc_result(object): """ + thrift_spec = None - 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() @@ -10569,12 +13445,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10584,26 +13463,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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_access_url_args(object): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10617,10 +13507,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_access_url_args') + oprot.writeStructBegin("get_forc_access_url_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -10628,18 +13521,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_access_url_args) -get_forc_access_url_args.thrift_spec = ( -) +get_forc_access_url_args.thrift_spec = () class get_forc_access_url_result(object): @@ -10649,12 +13542,20 @@ class get_forc_access_url_result(object): """ + thrift_spec = None - 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() @@ -10664,7 +13565,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: @@ -10673,13 +13578,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_access_url_result') + oprot.writeStructBegin("get_forc_access_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() @@ -10688,18 +13600,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_access_url_result) get_forc_access_url_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -10713,15 +13632,26 @@ class create_backend_args(object): """ + thrift_spec = None - 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() @@ -10731,22 +13661,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: @@ -10755,25 +13701,42 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10782,22 +13745,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 ) @@ -10810,14 +13798,24 @@ class create_backend_result(object): """ + thrift_spec = None - 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() @@ -10847,20 +13845,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10870,28 +13871,51 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10905,10 +13929,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -10916,18 +13943,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): @@ -10938,13 +13965,22 @@ class get_backends_result(object): """ + thrift_spec = None - 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() @@ -10955,11 +13991,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype253, _size250) = iprot.readListBegin() - for _i254 in range(_size250): - _elem255 = Backend() - _elem255.read(iprot) - self.success.append(_elem255) + (_etype267, _size264) = iprot.readListBegin() + for _i268 in range(_size264): + _elem269 = Backend() + _elem269.read(iprot) + self.success.append(_elem269) iprot.readListEnd() else: iprot.skip(ftype) @@ -10974,19 +14010,22 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter256 in self.success: - iter256.write(oprot) + for iter270 in self.success: + iter270.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() @@ -10996,19 +14035,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 ) @@ -11019,12 +14071,20 @@ class get_backends_by_owner_args(object): """ + thrift_spec = None - 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() @@ -11034,7 +14094,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: @@ -11043,13 +14107,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -11058,19 +14127,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 ) @@ -11082,13 +14158,22 @@ class get_backends_by_owner_result(object): """ + thrift_spec = None - 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() @@ -11099,11 +14184,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype260, _size257) = iprot.readListBegin() - for _i261 in range(_size257): - _elem262 = Backend() - _elem262.read(iprot) - self.success.append(_elem262) + (_etype274, _size271) = iprot.readListBegin() + for _i275 in range(_size271): + _elem276 = Backend() + _elem276.read(iprot) + self.success.append(_elem276) iprot.readListEnd() else: iprot.skip(ftype) @@ -11118,19 +14203,22 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter263 in self.success: - iter263.write(oprot) + for iter277 in self.success: + iter277.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() @@ -11140,19 +14228,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 ) @@ -11163,12 +14264,20 @@ class get_backends_by_template_args(object): """ + thrift_spec = None - 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() @@ -11178,7 +14287,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: @@ -11187,13 +14300,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -11202,19 +14322,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 ) @@ -11226,13 +14353,22 @@ class get_backends_by_template_result(object): """ + thrift_spec = None - 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() @@ -11243,11 +14379,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype267, _size264) = iprot.readListBegin() - for _i268 in range(_size264): - _elem269 = Backend() - _elem269.read(iprot) - self.success.append(_elem269) + (_etype281, _size278) = iprot.readListBegin() + for _i282 in range(_size278): + _elem283 = Backend() + _elem283.read(iprot) + self.success.append(_elem283) iprot.readListEnd() else: iprot.skip(ftype) @@ -11262,19 +14398,22 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter270 in self.success: - iter270.write(oprot) + for iter284 in self.success: + iter284.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() @@ -11284,19 +14423,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 ) @@ -11307,12 +14459,20 @@ class get_backend_by_id_args(object): """ + thrift_spec = None - 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() @@ -11331,12 +14491,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -11346,19 +14509,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 ) @@ -11371,14 +14541,24 @@ class get_backend_by_id_result(object): """ + thrift_spec = None - 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() @@ -11408,20 +14588,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -11431,20 +14614,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 ) @@ -11456,13 +14658,22 @@ class set_metadata_server_data_args(object): """ + thrift_spec = None - def __init__(self, ip=None, metadata=None,): + def __init__( + self, + ip=None, + metadata=None, + ): self.ip = ip 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() @@ -11472,7 +14683,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.ip = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: @@ -11487,16 +14702,21 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('set_metadata_server_data_args') + oprot.writeStructBegin("set_metadata_server_data_args") if self.ip is not None: - oprot.writeFieldBegin('ip', TType.STRING, 1) - oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) + oprot.writeFieldBegin("ip", TType.STRING, 1) + oprot.writeString( + self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.STRUCT, 3) + oprot.writeFieldBegin("metadata", TType.STRUCT, 3) self.metadata.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11506,21 +14726,34 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(set_metadata_server_data_args) set_metadata_server_data_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "ip", + "UTF8", + None, + ), # 1 None, # 2 - (3, TType.STRUCT, 'metadata', [VirtualMachineServerMetadata, None], None, ), # 3 + ( + 3, + TType.STRUCT, + "metadata", + [VirtualMachineServerMetadata, None], + None, + ), # 3 ) @@ -11532,13 +14765,22 @@ class set_metadata_server_data_result(object): """ + thrift_spec = None - def __init__(self, m=None, b=None,): + def __init__( + self, + m=None, + b=None, + ): self.m = m 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() @@ -11562,16 +14804,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('set_metadata_server_data_result') + oprot.writeStructBegin("set_metadata_server_data_result") if self.m is not None: - oprot.writeFieldBegin('m', TType.STRUCT, 1) + oprot.writeFieldBegin("m", TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 2) + oprot.writeFieldBegin("b", TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11581,20 +14826,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(set_metadata_server_data_result) set_metadata_server_data_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 - (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "m", + [MetadataServerNotAvailableException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "b", + [MetadataServerNotAllowedException, None], + None, + ), # 2 ) @@ -11605,12 +14863,20 @@ class remove_metadata_server_data_args(object): """ + thrift_spec = None - def __init__(self, ip=None,): + def __init__( + self, + ip=None, + ): self.ip = 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() @@ -11620,7 +14886,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.ip = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11629,13 +14899,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('remove_metadata_server_data_args') + oprot.writeStructBegin("remove_metadata_server_data_args") if self.ip is not None: - oprot.writeFieldBegin('ip', TType.STRING, 1) - oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) + oprot.writeFieldBegin("ip", TType.STRING, 1) + oprot.writeString( + self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11644,19 +14919,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(remove_metadata_server_data_args) remove_metadata_server_data_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "ip", + "UTF8", + None, + ), # 1 ) @@ -11668,13 +14950,22 @@ class remove_metadata_server_data_result(object): """ + thrift_spec = None - def __init__(self, m=None, b=None,): + def __init__( + self, + m=None, + b=None, + ): self.m = m 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() @@ -11698,16 +14989,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('remove_metadata_server_data_result') + oprot.writeStructBegin("remove_metadata_server_data_result") if self.m is not None: - oprot.writeFieldBegin('m', TType.STRUCT, 1) + oprot.writeFieldBegin("m", TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 2) + oprot.writeFieldBegin("b", TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11717,28 +15011,45 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(remove_metadata_server_data_result) remove_metadata_server_data_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 - (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "m", + [MetadataServerNotAvailableException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "b", + [MetadataServerNotAllowedException, None], + None, + ), # 2 ) class is_metadata_server_available_args(object): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11752,10 +15063,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_metadata_server_available_args') + oprot.writeStructBegin("is_metadata_server_available_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -11763,18 +15077,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_metadata_server_available_args) -is_metadata_server_available_args.thrift_spec = ( -) +is_metadata_server_available_args.thrift_spec = () class is_metadata_server_available_result(object): @@ -11785,13 +15099,22 @@ class is_metadata_server_available_result(object): """ + thrift_spec = None - def __init__(self, m=None, b=None,): + def __init__( + self, + m=None, + b=None, + ): self.m = m 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() @@ -11815,16 +15138,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_metadata_server_available_result') + oprot.writeStructBegin("is_metadata_server_available_result") if self.m is not None: - oprot.writeFieldBegin('m', TType.STRUCT, 1) + oprot.writeFieldBegin("m", TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 2) + oprot.writeFieldBegin("b", TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11834,20 +15160,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(is_metadata_server_available_result) is_metadata_server_available_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 - (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "m", + [MetadataServerNotAvailableException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "b", + [MetadataServerNotAllowedException, None], + None, + ), # 2 ) @@ -11858,12 +15197,20 @@ class delete_backend_args(object): """ + thrift_spec = None - 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() @@ -11882,12 +15229,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -11897,19 +15247,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 ) @@ -11920,12 +15277,20 @@ class delete_backend_result(object): """ + thrift_spec = None - 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() @@ -11944,12 +15309,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -11959,19 +15327,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 ) @@ -11983,13 +15358,22 @@ class add_user_to_backend_args(object): """ + thrift_spec = None - 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() @@ -12004,7 +15388,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: @@ -12013,17 +15401,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -12032,20 +15427,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 ) @@ -12057,13 +15465,22 @@ class add_user_to_backend_result(object): """ + thrift_spec = None - 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() @@ -12074,11 +15491,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype272, _vtype273, _size271) = iprot.readMapBegin() - for _i275 in range(_size271): - _key276 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val277 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key276] = _val277 + (_ktype286, _vtype287, _size285) = iprot.readMapBegin() + for _i289 in range(_size285): + _key290 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val291 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key290] = _val291 iprot.readMapEnd() else: iprot.skip(ftype) @@ -12093,20 +15518,27 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter278, viter279 in self.success.items(): - oprot.writeString(kiter278.encode('utf-8') if sys.version_info[0] == 2 else kiter278) - oprot.writeString(viter279.encode('utf-8') if sys.version_info[0] == 2 else viter279) + for kiter292, viter293 in self.success.items(): + oprot.writeString( + kiter292.encode("utf-8") if sys.version_info[0] == 2 else kiter292 + ) + oprot.writeString( + viter293.encode("utf-8") if sys.version_info[0] == 2 else viter293 + ) 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() @@ -12116,19 +15548,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 ) @@ -12139,12 +15584,20 @@ class get_users_from_backend_args(object): """ + thrift_spec = None - 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() @@ -12163,12 +15616,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -12178,19 +15634,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 ) @@ -12202,13 +15665,22 @@ class get_users_from_backend_result(object): """ + thrift_spec = None - 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() @@ -12219,10 +15691,14 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype283, _size280) = iprot.readListBegin() - for _i284 in range(_size280): - _elem285 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success.append(_elem285) + (_etype297, _size294) = iprot.readListBegin() + for _i298 in range(_size294): + _elem299 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem299) iprot.readListEnd() else: iprot.skip(ftype) @@ -12237,19 +15713,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter286 in self.success: - oprot.writeString(iter286.encode('utf-8') if sys.version_info[0] == 2 else iter286) + for iter300 in self.success: + oprot.writeString( + iter300.encode("utf-8") if sys.version_info[0] == 2 else iter300 + ) 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() @@ -12259,19 +15740,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 ) @@ -12283,13 +15777,22 @@ class delete_user_from_backend_args(object): """ + thrift_spec = None - 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() @@ -12304,7 +15807,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: @@ -12313,17 +15820,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -12332,20 +15846,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 ) @@ -12357,13 +15884,22 @@ class delete_user_from_backend_result(object): """ + thrift_spec = None - 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() @@ -12374,11 +15910,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype288, _vtype289, _size287) = iprot.readMapBegin() - for _i291 in range(_size287): - _key292 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val293 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key292] = _val293 + (_ktype302, _vtype303, _size301) = iprot.readMapBegin() + for _i305 in range(_size301): + _key306 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val307 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key306] = _val307 iprot.readMapEnd() else: iprot.skip(ftype) @@ -12393,20 +15937,27 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter294, viter295 in self.success.items(): - oprot.writeString(kiter294.encode('utf-8') if sys.version_info[0] == 2 else kiter294) - oprot.writeString(viter295.encode('utf-8') if sys.version_info[0] == 2 else viter295) + for kiter308, viter309 in self.success.items(): + oprot.writeString( + kiter308.encode("utf-8") if sys.version_info[0] == 2 else kiter308 + ) + oprot.writeString( + viter309.encode("utf-8") if sys.version_info[0] == 2 else viter309 + ) 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() @@ -12416,27 +15967,44 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12450,10 +16018,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -12461,18 +16032,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): @@ -12482,12 +16053,20 @@ class get_allowed_templates_result(object): """ + thrift_spec = None - 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() @@ -12498,11 +16077,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype299, _size296) = iprot.readListBegin() - for _i300 in range(_size296): - _elem301 = ResearchEnvironmentTemplate() - _elem301.read(iprot) - self.success.append(_elem301) + (_etype313, _size310) = iprot.readListBegin() + for _i314 in range(_size310): + _elem315 = ResearchEnvironmentTemplate() + _elem315.read(iprot) + self.success.append(_elem315) iprot.readListEnd() else: iprot.skip(ftype) @@ -12512,15 +16091,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter302 in self.success: - iter302.write(oprot) + for iter316 in self.success: + iter316.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12530,26 +16112,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12563,10 +16156,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -12574,18 +16170,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): @@ -12595,12 +16191,20 @@ class get_servers_result(object): """ + thrift_spec = None - 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() @@ -12611,11 +16215,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype306, _size303) = iprot.readListBegin() - for _i307 in range(_size303): - _elem308 = VM() - _elem308.read(iprot) - self.success.append(_elem308) + (_etype320, _size317) = iprot.readListBegin() + for _i321 in range(_size317): + _elem322 = VM() + _elem322.read(iprot) + self.success.append(_elem322) iprot.readListEnd() else: iprot.skip(ftype) @@ -12625,15 +16229,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter309 in self.success: - iter309.write(oprot) + for iter323 in self.success: + iter323.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12643,18 +16250,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 ) @@ -12665,12 +16279,20 @@ class get_servers_by_ids_args(object): """ + thrift_spec = None - 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() @@ -12681,10 +16303,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.server_ids = [] - (_etype313, _size310) = iprot.readListBegin() - for _i314 in range(_size310): - _elem315 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.server_ids.append(_elem315) + (_etype327, _size324) = iprot.readListBegin() + for _i328 in range(_size324): + _elem329 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.server_ids.append(_elem329) iprot.readListEnd() else: iprot.skip(ftype) @@ -12694,15 +16320,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter316 in self.server_ids: - oprot.writeString(iter316.encode('utf-8') if sys.version_info[0] == 2 else iter316) + for iter330 in self.server_ids: + oprot.writeString( + iter330.encode("utf-8") if sys.version_info[0] == 2 else iter330 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12712,19 +16343,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 ) @@ -12735,12 +16373,20 @@ class get_servers_by_ids_result(object): """ + thrift_spec = None - 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() @@ -12751,11 +16397,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype320, _size317) = iprot.readListBegin() - for _i321 in range(_size317): - _elem322 = VM() - _elem322.read(iprot) - self.success.append(_elem322) + (_etype334, _size331) = iprot.readListBegin() + for _i335 in range(_size331): + _elem336 = VM() + _elem336.read(iprot) + self.success.append(_elem336) iprot.readListEnd() else: iprot.skip(ftype) @@ -12765,15 +16411,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter323 in self.success: - iter323.write(oprot) + for iter337 in self.success: + iter337.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12783,18 +16432,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 ) @@ -12805,12 +16461,20 @@ class get_servers_by_bibigrid_id_args(object): """ + thrift_spec = None - 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() @@ -12820,7 +16484,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: @@ -12829,13 +16497,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -12844,19 +16519,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 ) @@ -12867,12 +16549,20 @@ class get_servers_by_bibigrid_id_result(object): """ + thrift_spec = None - 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() @@ -12883,11 +16573,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype327, _size324) = iprot.readListBegin() - for _i328 in range(_size324): - _elem329 = VM() - _elem329.read(iprot) - self.success.append(_elem329) + (_etype341, _size338) = iprot.readListBegin() + for _i342 in range(_size338): + _elem343 = VM() + _elem343.read(iprot) + self.success.append(_elem343) iprot.readListEnd() else: iprot.skip(ftype) @@ -12897,15 +16587,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter330 in self.success: - iter330.write(oprot) + for iter344 in self.success: + iter344.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12915,18 +16608,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 ) @@ -12937,12 +16637,20 @@ class get_security_group_id_by_name_args(object): """ + thrift_spec = None - 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() @@ -12952,7 +16660,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: @@ -12961,13 +16673,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_security_group_id_by_name_args') + oprot.writeStructBegin("get_security_group_id_by_name_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() @@ -12976,19 +16693,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_security_group_id_by_name_args) get_security_group_id_by_name_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 ) @@ -13000,13 +16724,22 @@ class get_security_group_id_by_name_result(object): """ + thrift_spec = None - 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() @@ -13016,7 +16749,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: @@ -13030,16 +16767,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_security_group_id_by_name_result') + oprot.writeStructBegin("get_security_group_id_by_name_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.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13049,19 +16793,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_security_group_id_by_name_result) get_security_group_id_by_name_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 's', [SecurityGroupNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "s", + [SecurityGroupNotFoundException, None], + None, + ), # 1 ) @@ -13078,8 +16835,18 @@ class scale_up_cluster_args(object): """ + thrift_spec = None - 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 @@ -13089,7 +16856,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() @@ -13099,17 +16870,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: @@ -13120,10 +16903,14 @@ def read(self, iprot): elif fid == 5: if ftype == TType.LIST: self.names = [] - (_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() - self.names.append(_elem336) + (_etype348, _size345) = iprot.readListBegin() + for _i349 in range(_size345): + _elem350 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.names.append(_elem350) iprot.readListEnd() else: iprot.skip(ftype) @@ -13143,39 +16930,56 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter337 in self.names: - oprot.writeString(iter337.encode('utf-8') if sys.version_info[0] == 2 else iter337) + for iter351 in self.names: + oprot.writeString( + iter351.encode("utf-8") if sys.version_info[0] == 2 else iter351 + ) 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() @@ -13185,25 +16989,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 ) @@ -13214,12 +17061,20 @@ class scale_up_cluster_result(object): """ + thrift_spec = None - 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() @@ -13230,16 +17085,24 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype339, _vtype340, _size338) = iprot.readMapBegin() - for _i342 in range(_size338): - _key343 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val344 = [] - (_etype348, _size345) = iprot.readListBegin() - for _i349 in range(_size345): - _elem350 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val344.append(_elem350) + (_ktype353, _vtype354, _size352) = iprot.readMapBegin() + for _i356 in range(_size352): + _key357 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val358 = [] + (_etype362, _size359) = iprot.readListBegin() + for _i363 in range(_size359): + _elem364 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val358.append(_elem364) iprot.readListEnd() - self.success[_key343] = _val344 + self.success[_key357] = _val358 iprot.readMapEnd() else: iprot.skip(ftype) @@ -13249,18 +17112,25 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter351, viter352 in self.success.items(): - oprot.writeString(kiter351.encode('utf-8') if sys.version_info[0] == 2 else kiter351) - oprot.writeListBegin(TType.STRING, len(viter352)) - for iter353 in viter352: - oprot.writeString(iter353.encode('utf-8') if sys.version_info[0] == 2 else iter353) + for kiter365, viter366 in self.success.items(): + oprot.writeString( + kiter365.encode("utf-8") if sys.version_info[0] == 2 else kiter365 + ) + oprot.writeListBegin(TType.STRING, len(viter366)) + for iter367 in viter366: + oprot.writeString( + iter367.encode("utf-8") if sys.version_info[0] == 2 else iter367 + ) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -13271,18 +17141,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 ) @@ -13301,8 +17178,20 @@ class add_cluster_machine_args(object): """ + thrift_spec = 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,): + 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 @@ -13314,7 +17203,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() @@ -13324,37 +17217,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: @@ -13373,44 +17294,73 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -13420,27 +17370,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 ) @@ -13451,12 +17456,20 @@ class add_cluster_machine_result(object): """ + thrift_spec = None - 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() @@ -13466,7 +17479,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: @@ -13475,13 +17492,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -13490,18 +17514,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 ) @@ -13512,12 +17543,20 @@ class get_cluster_info_args(object): """ + thrift_spec = None - 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() @@ -13527,7 +17566,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: @@ -13536,13 +17579,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -13551,19 +17601,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 ) @@ -13575,13 +17632,22 @@ class get_cluster_info_result(object): """ + thrift_spec = None - 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() @@ -13606,16 +17672,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -13625,19 +17694,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 ) @@ -13648,12 +17730,20 @@ class get_cluster_status_args(object): """ + thrift_spec = None - 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() @@ -13663,7 +17753,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: @@ -13672,13 +17766,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -13687,19 +17788,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 ) @@ -13711,13 +17819,22 @@ class get_cluster_status_result(object): """ + thrift_spec = None - 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() @@ -13728,11 +17845,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype355, _vtype356, _size354) = iprot.readMapBegin() - for _i358 in range(_size354): - _key359 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val360 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key359] = _val360 + (_ktype369, _vtype370, _size368) = iprot.readMapBegin() + for _i372 in range(_size368): + _key373 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val374 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key373] = _val374 iprot.readMapEnd() else: iprot.skip(ftype) @@ -13747,20 +17872,27 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter361, viter362 in self.success.items(): - oprot.writeString(kiter361.encode('utf-8') if sys.version_info[0] == 2 else kiter361) - oprot.writeString(viter362.encode('utf-8') if sys.version_info[0] == 2 else viter362) + for kiter375, viter376 in self.success.items(): + oprot.writeString( + kiter375.encode("utf-8") if sys.version_info[0] == 2 else kiter375 + ) + oprot.writeString( + viter376.encode("utf-8") if sys.version_info[0] == 2 else viter376 + ) 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() @@ -13770,19 +17902,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 ) @@ -13793,12 +17938,20 @@ class get_keypair_public_key_by_name_args(object): """ + thrift_spec = None - def __init__(self, key_name=None,): + def __init__( + self, + key_name=None, + ): 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() @@ -13808,7 +17961,11 @@ def read(self, iprot): break if fid == 1: 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: @@ -13817,13 +17974,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_keypair_public_key_by_name_args') + oprot.writeStructBegin("get_keypair_public_key_by_name_args") if self.key_name is not None: - oprot.writeFieldBegin('key_name', TType.STRING, 1) - oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) + oprot.writeFieldBegin("key_name", TType.STRING, 1) + oprot.writeString( + self.key_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.key_name + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13832,19 +17996,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_keypair_public_key_by_name_args) get_keypair_public_key_by_name_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'key_name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "key_name", + "UTF8", + None, + ), # 1 ) @@ -13855,12 +18026,20 @@ class get_keypair_public_key_by_name_result(object): """ + thrift_spec = None - 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() @@ -13870,7 +18049,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: @@ -13879,13 +18062,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_keypair_public_key_by_name_result') + oprot.writeStructBegin("get_keypair_public_key_by_name_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() @@ -13894,18 +18084,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_keypair_public_key_by_name_result) get_keypair_public_key_by_name_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -13916,12 +18113,20 @@ class delete_keypair_args(object): """ + thrift_spec = None - def __init__(self, key_name=None,): + def __init__( + self, + key_name=None, + ): 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() @@ -13931,7 +18136,11 @@ def read(self, iprot): break if fid == 1: 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: @@ -13940,13 +18149,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_keypair_args') + oprot.writeStructBegin("delete_keypair_args") if self.key_name is not None: - oprot.writeFieldBegin('key_name', TType.STRING, 1) - oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) + oprot.writeFieldBegin("key_name", TType.STRING, 1) + oprot.writeString( + self.key_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.key_name + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13955,27 +18171,38 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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_keypair_args) delete_keypair_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'key_name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "key_name", + "UTF8", + None, + ), # 1 ) class delete_keypair_result(object): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13989,10 +18216,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_keypair_result') + oprot.writeStructBegin("delete_keypair_result") oprot.writeFieldStop() oprot.writeStructEnd() @@ -14000,18 +18230,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(delete_keypair_result) -delete_keypair_result.thrift_spec = ( -) +delete_keypair_result.thrift_spec = () class add_default_security_groups_to_server_args(object): @@ -14021,12 +18251,20 @@ class add_default_security_groups_to_server_args(object): """ + thrift_spec = None - 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() @@ -14036,7 +18274,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: @@ -14045,13 +18287,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_default_security_groups_to_server_args') + oprot.writeStructBegin("add_default_security_groups_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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14060,19 +18309,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_default_security_groups_to_server_args) add_default_security_groups_to_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -14083,12 +18339,20 @@ class add_default_security_groups_to_server_result(object): """ + thrift_spec = None - 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() @@ -14107,12 +18371,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_default_security_groups_to_server_result') + oprot.writeStructBegin("add_default_security_groups_to_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() oprot.writeFieldStop() @@ -14122,19 +18389,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_default_security_groups_to_server_result) add_default_security_groups_to_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -14146,13 +18420,22 @@ class get_server_args(object): """ + thrift_spec = None - def __init__(self, openstack_id=None, no_connection=None,): + def __init__( + self, + openstack_id=None, + no_connection=None, + ): self.openstack_id = openstack_id self.no_connection = no_connection def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14162,7 +18445,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: @@ -14176,16 +18463,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() if self.no_connection is not None: - oprot.writeFieldBegin('no_connection', TType.BOOL, 2) + oprot.writeFieldBegin("no_connection", TType.BOOL, 2) oprot.writeBool(self.no_connection) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14195,20 +18489,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_server_args) get_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.BOOL, 'no_connection', None, None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.BOOL, + "no_connection", + None, + None, + ), # 2 ) @@ -14220,13 +18527,22 @@ class get_server_result(object): """ + thrift_spec = None - 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() @@ -14251,16 +18567,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -14270,19 +18589,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 ) @@ -14294,13 +18626,22 @@ class get_server_by_unique_name_args(object): """ + thrift_spec = None - def __init__(self, unique_name=None, no_connection=None,): + def __init__( + self, + unique_name=None, + no_connection=None, + ): self.unique_name = unique_name self.no_connection = no_connection def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14310,7 +18651,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.unique_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.unique_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -14324,16 +18669,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_by_unique_name_args') + oprot.writeStructBegin("get_server_by_unique_name_args") if self.unique_name is not None: - oprot.writeFieldBegin('unique_name', TType.STRING, 1) - oprot.writeString(self.unique_name.encode('utf-8') if sys.version_info[0] == 2 else self.unique_name) + oprot.writeFieldBegin("unique_name", TType.STRING, 1) + oprot.writeString( + self.unique_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.unique_name + ) oprot.writeFieldEnd() if self.no_connection is not None: - oprot.writeFieldBegin('no_connection', TType.BOOL, 2) + oprot.writeFieldBegin("no_connection", TType.BOOL, 2) oprot.writeBool(self.no_connection) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14343,20 +18695,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_server_by_unique_name_args) get_server_by_unique_name_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'unique_name', 'UTF8', None, ), # 1 - (2, TType.BOOL, 'no_connection', None, None, ), # 2 + ( + 1, + TType.STRING, + "unique_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.BOOL, + "no_connection", + None, + None, + ), # 2 ) @@ -14368,13 +18733,22 @@ class get_server_by_unique_name_result(object): """ + thrift_spec = None - 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() @@ -14399,16 +18773,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_by_unique_name_result') + oprot.writeStructBegin("get_server_by_unique_name_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() @@ -14418,19 +18795,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_by_unique_name_result) get_server_by_unique_name_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 ) @@ -14441,12 +18831,20 @@ class stop_server_args(object): """ + thrift_spec = None - 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() @@ -14456,7 +18854,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: @@ -14465,13 +18867,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -14480,19 +18889,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 ) @@ -14504,13 +18920,22 @@ class stop_server_result(object): """ + thrift_spec = None - 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() @@ -14534,16 +18959,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -14553,20 +18981,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 ) @@ -14581,8 +19022,16 @@ class create_snapshot_args(object): """ + thrift_spec = None - 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 @@ -14590,7 +19039,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() @@ -14600,32 +19053,52 @@ 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: if ftype == TType.LIST: self.base_tags = [] - (_etype366, _size363) = iprot.readListBegin() - for _i367 in range(_size363): - _elem368 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.base_tags.append(_elem368) + (_etype380, _size377) = iprot.readListBegin() + for _i381 in range(_size377): + _elem382 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.base_tags.append(_elem382) 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: @@ -14634,32 +19107,51 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter369 in self.base_tags: - oprot.writeString(iter369.encode('utf-8') if sys.version_info[0] == 2 else iter369) + for iter383 in self.base_tags: + oprot.writeString( + iter383.encode("utf-8") if sys.version_info[0] == 2 else iter383 + ) 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() @@ -14668,23 +19160,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 ) @@ -14697,14 +19220,24 @@ class create_snapshot_result(object): """ + thrift_spec = None - 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() @@ -14714,7 +19247,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: @@ -14733,20 +19270,27 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -14756,28 +19300,51 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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): - + thrift_spec = None def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14791,10 +19358,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -14802,18 +19372,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): @@ -14823,12 +19393,20 @@ class get_limits_result(object): """ + thrift_spec = None - 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() @@ -14839,11 +19417,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype371, _vtype372, _size370) = iprot.readMapBegin() - for _i374 in range(_size370): - _key375 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val376 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key375] = _val376 + (_ktype385, _vtype386, _size384) = iprot.readMapBegin() + for _i388 in range(_size384): + _key389 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val390 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key389] = _val390 iprot.readMapEnd() else: iprot.skip(ftype) @@ -14853,16 +19439,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter377, viter378 in self.success.items(): - oprot.writeString(kiter377.encode('utf-8') if sys.version_info[0] == 2 else kiter377) - oprot.writeString(viter378.encode('utf-8') if sys.version_info[0] == 2 else viter378) + for kiter391, viter392 in self.success.items(): + oprot.writeString( + kiter391.encode("utf-8") if sys.version_info[0] == 2 else kiter391 + ) + oprot.writeString( + viter392.encode("utf-8") if sys.version_info[0] == 2 else viter392 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14872,18 +19465,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 ) @@ -14897,15 +19497,26 @@ class start_cluster_args(object): """ + thrift_spec = None - def __init__(self, public_keys=None, master_instance=None, worker_instances=None, user=None,): + def __init__( + self, + public_keys=None, + master_instance=None, + worker_instances=None, + user=None, + ): self.public_keys = public_keys 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() @@ -14916,10 +19527,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.public_keys = [] - (_etype382, _size379) = iprot.readListBegin() - for _i383 in range(_size379): - _elem384 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.public_keys.append(_elem384) + (_etype396, _size393) = iprot.readListBegin() + for _i397 in range(_size393): + _elem398 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.public_keys.append(_elem398) iprot.readListEnd() else: iprot.skip(ftype) @@ -14932,17 +19547,21 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.worker_instances = [] - (_etype388, _size385) = iprot.readListBegin() - for _i389 in range(_size385): - _elem390 = ClusterInstance() - _elem390.read(iprot) - self.worker_instances.append(_elem390) + (_etype402, _size399) = iprot.readListBegin() + for _i403 in range(_size399): + _elem404 = ClusterInstance() + _elem404.read(iprot) + self.worker_instances.append(_elem404) iprot.readListEnd() else: 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: @@ -14951,31 +19570,38 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_keys is not None: - oprot.writeFieldBegin('public_keys', TType.LIST, 1) + oprot.writeFieldBegin("public_keys", TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.public_keys)) - for iter391 in self.public_keys: - oprot.writeString(iter391.encode('utf-8') if sys.version_info[0] == 2 else iter391) + for iter405 in self.public_keys: + oprot.writeString( + iter405.encode("utf-8") if sys.version_info[0] == 2 else iter405 + ) oprot.writeListEnd() 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 iter392 in self.worker_instances: - iter392.write(oprot) + for iter406 in self.worker_instances: + iter406.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() @@ -14984,22 +19610,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.LIST, 'public_keys', (TType.STRING, 'UTF8', False), 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.LIST, + "public_keys", + (TType.STRING, "UTF8", False), + 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 ) @@ -15010,12 +19661,20 @@ class start_cluster_result(object): """ + thrift_spec = None - 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() @@ -15026,11 +19685,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype394, _vtype395, _size393) = iprot.readMapBegin() - for _i397 in range(_size393): - _key398 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val399 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key398] = _val399 + (_ktype408, _vtype409, _size407) = iprot.readMapBegin() + for _i411 in range(_size407): + _key412 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val413 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key412] = _val413 iprot.readMapEnd() else: iprot.skip(ftype) @@ -15040,16 +19707,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter400, viter401 in self.success.items(): - oprot.writeString(kiter400.encode('utf-8') if sys.version_info[0] == 2 else kiter400) - oprot.writeString(viter401.encode('utf-8') if sys.version_info[0] == 2 else viter401) + for kiter414, viter415 in self.success.items(): + oprot.writeString( + kiter414.encode("utf-8") if sys.version_info[0] == 2 else kiter414 + ) + oprot.writeString( + viter415.encode("utf-8") if sys.version_info[0] == 2 else viter415 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15059,18 +19733,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 ) @@ -15081,12 +19762,20 @@ class terminate_cluster_args(object): """ + thrift_spec = None - 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() @@ -15096,7 +19785,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: @@ -15105,13 +19798,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15120,19 +19820,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 ) @@ -15144,13 +19851,22 @@ class terminate_cluster_result(object): """ + thrift_spec = None - 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() @@ -15161,11 +19877,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype403, _vtype404, _size402) = iprot.readMapBegin() - for _i406 in range(_size402): - _key407 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val408 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key407] = _val408 + (_ktype417, _vtype418, _size416) = iprot.readMapBegin() + for _i420 in range(_size416): + _key421 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val422 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key421] = _val422 iprot.readMapEnd() else: iprot.skip(ftype) @@ -15180,20 +19904,27 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter409, viter410 in self.success.items(): - oprot.writeString(kiter409.encode('utf-8') if sys.version_info[0] == 2 else kiter409) - oprot.writeString(viter410.encode('utf-8') if sys.version_info[0] == 2 else viter410) + for kiter423, viter424 in self.success.items(): + oprot.writeString( + kiter423.encode("utf-8") if sys.version_info[0] == 2 else kiter423 + ) + oprot.writeString( + viter424.encode("utf-8") if sys.version_info[0] == 2 else viter424 + ) 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() @@ -15203,19 +19934,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 ) @@ -15226,12 +19970,20 @@ class delete_image_args(object): """ + thrift_spec = None - 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() @@ -15241,7 +19993,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: @@ -15250,13 +20006,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15265,19 +20028,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 ) @@ -15288,12 +20058,20 @@ class delete_image_result(object): """ + thrift_spec = None - 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() @@ -15312,12 +20090,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15327,19 +20108,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 ) @@ -15351,13 +20139,22 @@ class detach_volume_args(object): """ + thrift_spec = None - 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() @@ -15367,12 +20164,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: @@ -15381,17 +20186,28 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15400,20 +20216,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 ) @@ -15426,14 +20255,24 @@ class detach_volume_result(object): """ + thrift_spec = None - 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() @@ -15462,20 +20301,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15485,21 +20327,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 ) @@ -15510,12 +20371,20 @@ class delete_volume_args(object): """ + thrift_spec = None - 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() @@ -15525,7 +20394,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: @@ -15534,13 +20407,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15549,19 +20429,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 ) @@ -15573,13 +20460,22 @@ class delete_volume_result(object): """ + thrift_spec = None - 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() @@ -15603,16 +20499,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15622,20 +20521,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 ) @@ -15647,13 +20559,22 @@ class attach_volume_to_server_args(object): """ + thrift_spec = None - 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() @@ -15663,12 +20584,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: @@ -15677,17 +20606,28 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15696,20 +20636,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 ) @@ -15722,14 +20675,24 @@ class attach_volume_to_server_result(object): """ + thrift_spec = None - 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() @@ -15740,11 +20703,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype412, _vtype413, _size411) = iprot.readMapBegin() - for _i415 in range(_size411): - _key416 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val417 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key416] = _val417 + (_ktype426, _vtype427, _size425) = iprot.readMapBegin() + for _i429 in range(_size425): + _key430 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val431 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key430] = _val431 iprot.readMapEnd() else: iprot.skip(ftype) @@ -15764,24 +20735,31 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter418, viter419 in self.success.items(): - oprot.writeString(kiter418.encode('utf-8') if sys.version_info[0] == 2 else kiter418) - oprot.writeString(viter419.encode('utf-8') if sys.version_info[0] == 2 else viter419) + for kiter432, viter433 in self.success.items(): + oprot.writeString( + kiter432.encode("utf-8") if sys.version_info[0] == 2 else kiter432 + ) + oprot.writeString( + viter433.encode("utf-8") if sys.version_info[0] == 2 else viter433 + ) 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() @@ -15791,20 +20769,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 ) @@ -15815,12 +20812,20 @@ class resume_server_args(object): """ + thrift_spec = None - 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() @@ -15830,7 +20835,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: @@ -15839,13 +20848,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15854,19 +20870,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 ) @@ -15878,13 +20901,22 @@ class resume_server_result(object): """ + thrift_spec = None - 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() @@ -15908,16 +20940,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -15927,20 +20962,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 ) @@ -15953,14 +21001,24 @@ class create_volume_args(object): """ + thrift_spec = None - 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() @@ -15970,7 +21028,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: @@ -15981,11 +21043,19 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.metadata = {} - (_ktype421, _vtype422, _size420) = iprot.readMapBegin() - for _i424 in range(_size420): - _key425 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val426 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key425] = _val426 + (_ktype435, _vtype436, _size434) = iprot.readMapBegin() + for _i438 in range(_size434): + _key439 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val440 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key439] = _val440 iprot.readMapEnd() else: iprot.skip(ftype) @@ -15995,24 +21065,35 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter427, viter428 in self.metadata.items(): - oprot.writeString(kiter427.encode('utf-8') if sys.version_info[0] == 2 else kiter427) - oprot.writeString(viter428.encode('utf-8') if sys.version_info[0] == 2 else viter428) + for kiter441, viter442 in self.metadata.items(): + oprot.writeString( + kiter441.encode("utf-8") if sys.version_info[0] == 2 else kiter441 + ) + oprot.writeString( + viter442.encode("utf-8") if sys.version_info[0] == 2 else viter442 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -16022,21 +21103,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 ) @@ -16049,14 +21149,24 @@ class create_volume_result(object): """ + thrift_spec = None - 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() @@ -16086,20 +21196,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16109,20 +21222,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 ) @@ -16135,14 +21267,24 @@ class create_volume_by_source_volume_args(object): """ + thrift_spec = None - 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() @@ -16152,23 +21294,39 @@ 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: if ftype == TType.MAP: self.metadata = {} - (_ktype430, _vtype431, _size429) = iprot.readMapBegin() - for _i433 in range(_size429): - _key434 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val435 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key434] = _val435 + (_ktype444, _vtype445, _size443) = iprot.readMapBegin() + for _i447 in range(_size443): + _key448 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val449 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key448] = _val449 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: @@ -16177,25 +21335,40 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter436, viter437 in self.metadata.items(): - oprot.writeString(kiter436.encode('utf-8') if sys.version_info[0] == 2 else kiter436) - oprot.writeString(viter437.encode('utf-8') if sys.version_info[0] == 2 else viter437) + for kiter450, viter451 in self.metadata.items(): + oprot.writeString( + kiter450.encode("utf-8") if sys.version_info[0] == 2 else kiter450 + ) + oprot.writeString( + viter451.encode("utf-8") if sys.version_info[0] == 2 else viter451 + ) 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() @@ -16204,21 +21377,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 ) @@ -16231,14 +21423,24 @@ class create_volume_by_source_volume_result(object): """ + thrift_spec = None - 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() @@ -16268,20 +21470,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16291,20 +21496,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 ) @@ -16317,14 +21541,24 @@ class create_volume_by_volume_snap_args(object): """ + thrift_spec = None - 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() @@ -16334,23 +21568,39 @@ 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: if ftype == TType.MAP: self.metadata = {} - (_ktype439, _vtype440, _size438) = iprot.readMapBegin() - for _i442 in range(_size438): - _key443 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val444 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key443] = _val444 + (_ktype453, _vtype454, _size452) = iprot.readMapBegin() + for _i456 in range(_size452): + _key457 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val458 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key457] = _val458 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: @@ -16359,25 +21609,40 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter445, viter446 in self.metadata.items(): - oprot.writeString(kiter445.encode('utf-8') if sys.version_info[0] == 2 else kiter445) - oprot.writeString(viter446.encode('utf-8') if sys.version_info[0] == 2 else viter446) + for kiter459, viter460 in self.metadata.items(): + oprot.writeString( + kiter459.encode("utf-8") if sys.version_info[0] == 2 else kiter459 + ) + oprot.writeString( + viter460.encode("utf-8") if sys.version_info[0] == 2 else viter460 + ) 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() @@ -16386,21 +21651,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 ) @@ -16413,14 +21697,24 @@ class create_volume_by_volume_snap_result(object): """ + thrift_spec = None - 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() @@ -16450,20 +21744,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16473,20 +21770,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 ) @@ -16499,14 +21815,24 @@ class create_volume_snapshot_args(object): """ + thrift_spec = None - 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() @@ -16516,17 +21842,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: @@ -16535,21 +21873,34 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16558,21 +21909,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 ) @@ -16585,14 +21955,24 @@ class create_volume_snapshot_result(object): """ + thrift_spec = None - 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() @@ -16602,7 +21982,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: @@ -16621,20 +22005,27 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16644,20 +22035,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 ) @@ -16668,12 +22078,20 @@ class get_volume_snapshot_args(object): """ + thrift_spec = None - 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() @@ -16683,7 +22101,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: @@ -16692,13 +22114,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16707,19 +22136,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 ) @@ -16731,13 +22167,22 @@ class get_volume_snapshot_result(object): """ + thrift_spec = None - 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() @@ -16762,16 +22207,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16781,19 +22229,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 ) @@ -16804,12 +22265,20 @@ class delete_volume_snapshot_args(object): """ + thrift_spec = None - 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() @@ -16819,7 +22288,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: @@ -16828,13 +22301,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16843,19 +22323,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 ) @@ -16867,13 +22354,22 @@ class delete_volume_snapshot_result(object): """ + thrift_spec = None - 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() @@ -16897,16 +22393,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16916,20 +22415,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 ) @@ -16940,12 +22452,20 @@ class reboot_hard_server_args(object): """ + thrift_spec = None - 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() @@ -16955,7 +22475,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: @@ -16964,13 +22488,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -16979,19 +22510,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 ) @@ -17003,13 +22541,22 @@ class reboot_hard_server_result(object): """ + thrift_spec = None - 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() @@ -17033,16 +22580,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -17052,20 +22602,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 ) @@ -17076,12 +22639,20 @@ class reboot_soft_server_args(object): """ + thrift_spec = None - 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() @@ -17091,7 +22662,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: @@ -17100,13 +22675,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -17115,19 +22697,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 ) @@ -17139,13 +22728,22 @@ class reboot_soft_server_result(object): """ + thrift_spec = None - 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() @@ -17169,16 +22767,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -17188,20 +22789,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/constants.py b/simple_vm_client/constants.py index 04f3806d..9960013e 100644 --- a/simple_vm_client/constants.py +++ b/simple_vm_client/constants.py @@ -1,15 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.20.0) +# Autogenerated by Thrift Compiler (0.22.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -from thrift.TRecursive import fix_spec -import sys -from .ttypes import * VERSION = "1.0.0" diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index ac13d736..e310d926 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -512,18 +512,31 @@ def delete_keypair(self, key_name: str) -> None: if key_pair: self.openstack_connection.delete_keypair(name=key_name) - def create_add_keys_script(self, keys: list[str]) -> str: + def create_add_keys_script( + self, additional_owner_keys: list[str], addtional_user_keys: list[str] + ) -> str: logger.info("create add key script") file_dir = os.path.dirname(os.path.abspath(__file__)) key_script = os.path.join(file_dir, "scripts/bash/add_keys_to_authorized.sh") - bash_keys_array = "(" - for key in keys: - bash_keys_array += f'"{key}" ' - bash_keys_array += ")" - + if not additional_owner_keys: + additional_owner_keys = [] + if not addtional_user_keys: + addtional_user_keys = [] + + bash_addtional_user_keys_array = "(" + for key in addtional_user_keys: + bash_addtional_user_keys_array += f'"{key}" ' + bash_addtional_user_keys_array += ")" + bash_addtional_owner_keys_array = "(" + for key in additional_owner_keys: + bash_addtional_owner_keys_array += f'"{key}" ' + bash_addtional_owner_keys_array += ")" with open(key_script, "r") as file: text = file.read() - text = text.replace("KEYS_TO_ADD", bash_keys_array) + text = text.replace( + "ADDITIONAL_USER_KEYS_TO_ADD", bash_addtional_user_keys_array + ) + text = text.replace("OWNER_KEYS_TO_ADD", bash_addtional_owner_keys_array) text = encodeutils.safe_encode(text.encode("utf-8")) key_script = text return key_script @@ -1212,7 +1225,9 @@ def set_server_metadata(self, openstack_id: str, metadata) -> None: message=f"Error when setting server {openstack_id} metadata --> {metadata}! - {e}" ) - def get_server_by_unique_name(self, unique_name: str, no_connection: bool = False) -> Server: + def get_server_by_unique_name( + self, unique_name: str, no_connection: bool = False + ) -> Server: logger.info(f"Get Server by unique_name: {unique_name}") filters = {"name": unique_name} @@ -1358,7 +1373,7 @@ def _remove_security_groups_from_server(self, server: Server) -> None: logger.info( f"Could not remoeve security group {sec.id} from server" ) - + def remove_security_groups_from_server(self, openstack_id): logger.info(f"Delete Security Groups for {openstack_id}") try: @@ -1471,7 +1486,8 @@ def create_userdata( self, volume_ids_path_new: list[dict[str, str]], volume_ids_path_attach: list[dict[str, str]], - additional_keys: list[str], + additional_owner_keys: list[str], + additional_user_keys: list[str], metadata_token: str = None, metadata_endpoint: str = None, ) -> str: @@ -1483,8 +1499,11 @@ def create_userdata( logger.info( f"Metadata token {metadata_token} | Metadata Endpoint {metadata_endpoint}" ) - if additional_keys: - add_key_script = self.create_add_keys_script(keys=additional_keys) + if additional_owner_keys or additional_user_keys: + add_key_script = self.create_add_keys_script( + additional_owner_keys=additional_owner_keys, + addtional_user_keys=additional_user_keys, + ) init_script = ( add_key_script + encodeutils.safe_encode("\n".encode("utf-8")) @@ -1522,7 +1541,8 @@ def start_server( research_environment_metadata: Union[ResearchEnvironmentMetadata, None] = None, volume_ids_path_new: Union[list[dict[str, str]], None] = None, volume_ids_path_attach: Union[list[dict[str, str]], None] = None, - additional_keys: Union[list[str], None] = None, + additional_owner_keys: Union[list[str], None] = None, + additional_user_keys: Union[list[str], None] = None, additional_security_group_ids: Union[list[str], None] = None, slurm_version: str = None, metadata_token: str = None, @@ -1568,7 +1588,8 @@ def start_server( init_script = self.create_userdata( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, - additional_keys=additional_keys, + additional_owner_keys=additional_owner_keys, + additional_user_keys=additional_user_keys, metadata_token=metadata_token, metadata_endpoint=metadata_endpoint, ) @@ -1652,7 +1673,8 @@ def start_server_with_playbook( research_environment_metadata: ResearchEnvironmentMetadata, volume_ids_path_new: list[dict[str, str]] = None, # type: ignore volume_ids_path_attach: list[dict[str, str]] = None, # type: ignore - additional_keys: Union[list[str], None] = None, + additional_owner_keys: Union[list[str], None] = None, + additional_user_keys: Union[list[str], None] = None, additional_security_group_ids=None, # type: ignore metadata_token: str = None, metadata_endpoint: str = None, @@ -1688,7 +1710,8 @@ def start_server_with_playbook( init_script = self.create_userdata( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, - additional_keys=additional_keys, + additional_owner_keys=additional_owner_keys, + additional_user_keys=additional_user_keys, metadata_token=metadata_token, metadata_endpoint=metadata_endpoint, ) @@ -1742,7 +1765,7 @@ def add_research_environment_security_group( self.openstack_connection.compute.add_security_group_to_server( server=server, security_group=security_group ) - + def add_project_security_group_to_server( self, server_id: str, project_name: str, project_id: str ): @@ -1751,7 +1774,9 @@ def add_project_security_group_to_server( security_group_id = self.get_or_create_project_security_group( project_name=project_name, project_id=project_id ) - security_group = self.openstack_connection.get_security_group(name_or_id=security_group_id) + security_group = self.openstack_connection.get_security_group( + name_or_id=security_group_id + ) if self._is_security_group_already_added_to_server( server=server, security_group_name=security_group.name ): diff --git a/simple_vm_client/openstack_connector/scripts/bash/add_keys_to_authorized.sh b/simple_vm_client/openstack_connector/scripts/bash/add_keys_to_authorized.sh index a514b2bc..05b4efc2 100644 --- a/simple_vm_client/openstack_connector/scripts/bash/add_keys_to_authorized.sh +++ b/simple_vm_client/openstack_connector/scripts/bash/add_keys_to_authorized.sh @@ -1,26 +1,30 @@ #!/bin/bash -declare -a keys_to_add=KEYS_TO_ADD +declare -a additional_user_keys_to_add=ADDITIONAL_USER_KEYS_TO_ADD +declare -a additional_owner_keys_to_add=OWNER_KEYS_TO_ADD USER_TO_SET="${USER_TO_SET:-ubuntu}" USER_HOME="/home/${USER_TO_SET}" METADATA_AUTHORIZED_KEYS_FILE="${USER_HOME}/.ssh/metadata_authorized_keys" +AUTHORIZED_KEYS_FILE="${USER_HOME}/.ssh/authorized_keys" SSHD_CONFIG_FILE="/etc/ssh/sshd_config" AUTHORIZED_KEYS_LINE="AuthorizedKeysFile .ssh/authorized_keys /home/%u/.ssh/authorized_keys /home/%u/.ssh/metadata_authorized_keys" -# Validate if KEYS_TO_ADD is set properly to avoid empty file operations -if [ ${#keys_to_add[@]} -eq 0 ]; then - echo "No keys provided in KEYS_TO_ADD." - exit 1 -fi - -# Create the authorized keys file and add the keys -touch "$METADATA_AUTHORIZED_KEYS_FILE" -echo "Adding ${#keys_to_add[@]} keys to $METADATA_AUTHORIZED_KEYS_FILE" -for key in "${keys_to_add[@]}"; do - printf "\n%s" "$key" >> "$METADATA_AUTHORIZED_KEYS_FILE" -done -# Set correct permissions for the metadata_authorized_keys file -chown "$USER_TO_SET:$USER_TO_SET" "$METADATA_AUTHORIZED_KEYS_FILE" +if [ ${#additional_owner_keys_to_add[@]} -gt 0 ]; then + echo "Adding ${#additional_owner_keys_to_add[@]} keys to $AUTHORIZED_KEYS_FILE" + for key in "${additional_owner_keys_to_add[@]}"; do + printf "\n%s" "$key" >> "$AUTHORIZED_KEYS_FILE" + done +fi +if [ ${#additional_user_keys_to_add[@]} -gt 0 ]; then + # Create the authorized keys file and add the keys + touch "$METADATA_AUTHORIZED_KEYS_FILE" + echo "Adding ${#additional_user_keys_to_add[@]} keys to $METADATA_AUTHORIZED_KEYS_FILE" + for key in "${additional_user_keys_to_add[@]}"; do + printf "\n%s" "$key" >> "$METADATA_AUTHORIZED_KEYS_FILE" + done + # Set correct permissions for the metadata_authorized_keys file + chown "$USER_TO_SET:$USER_TO_SET" "$METADATA_AUTHORIZED_KEYS_FILE" +fi # Check if the line is already in the configuration file and update or append accordingly if grep -qE '^#?[[:space:]]*AuthorizedKeysFile' "$SSHD_CONFIG_FILE"; then @@ -33,4 +37,4 @@ fi echo "Reloading and restarting SSH service..." systemctl daemon-reload -service sshd restart +systemctl restart ssh diff --git a/simple_vm_client/ttypes.py b/simple_vm_client/ttypes.py index 825c425d..82058366 100644 --- a/simple_vm_client/ttypes.py +++ b/simple_vm_client/ttypes.py @@ -1,18 +1,18 @@ # -# Autogenerated by Thrift Compiler (0.20.0) +# Autogenerated by Thrift Compiler (0.22.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -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 = [] @@ -25,14 +25,24 @@ class User(object): """ + thrift_spec = None - def __init__(self, username=None, user_id=None, public_keys=None,): + def __init__( + self, + username=None, + user_id=None, + public_keys=None, + ): self.username = username self.user_id = user_id self.public_keys = public_keys def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -42,12 +52,20 @@ def read(self, iprot): break if fid == 1: 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 == 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) elif fid == 3: @@ -55,7 +73,11 @@ def read(self, iprot): self.public_keys = [] (_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.public_keys.append(_elem5) iprot.readListEnd() else: @@ -66,23 +88,36 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('User') + oprot.writeStructBegin("User") if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 1) - oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) + oprot.writeFieldBegin("username", TType.STRING, 1) + oprot.writeString( + self.username.encode("utf-8") + if sys.version_info[0] == 2 + else self.username + ) 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() if self.public_keys is not None: - oprot.writeFieldBegin('public_keys', TType.LIST, 3) + oprot.writeFieldBegin("public_keys", TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.public_keys)) for iter6 in self.public_keys: - oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6) + oprot.writeString( + iter6.encode("utf-8") if sys.version_info[0] == 2 else iter6 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -90,13 +125,12 @@ def write(self, oprot): def validate(self): if self.user_id is None: - raise TProtocolException(message='Required field user_id is unset!') + raise TProtocolException(message="Required field user_id 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__ @@ -112,16 +146,22 @@ class UserData(object): """ + thrift_spec = None - def __init__(self, data={ - },): + def __init__( + self, + data={}, + ): if data is self.thrift_spec[2][4]: - data = { - } + data = {} self.data = data def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -134,7 +174,11 @@ def read(self, iprot): self.data = {} (_ktype8, _vtype9, _size7) = iprot.readMapBegin() for _i11 in range(_size7): - _key12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key12 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) _val13 = User() _val13.read(iprot) self.data[_key12] = _val13 @@ -147,15 +191,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('UserData') + oprot.writeStructBegin("UserData") if self.data is not None: - oprot.writeFieldBegin('data', TType.MAP, 2) + oprot.writeFieldBegin("data", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.data)) for kiter14, viter15 in self.data.items(): - oprot.writeString(kiter14.encode('utf-8') if sys.version_info[0] == 2 else kiter14) + oprot.writeString( + kiter14.encode("utf-8") if sys.version_info[0] == 2 else kiter14 + ) viter15.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -164,13 +213,12 @@ def write(self, oprot): def validate(self): if self.data is None: - raise TProtocolException(message='Required field data is unset!') + raise TProtocolException(message="Required field data 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__ @@ -188,14 +236,24 @@ class VirtualMachineServerMetadata(object): """ + thrift_spec = None - def __init__(self, ip=None, hashed_auth_token=None, userdata=None,): + def __init__( + self, + ip=None, + hashed_auth_token=None, + userdata=None, + ): self.ip = ip self.hashed_auth_token = hashed_auth_token self.userdata = userdata def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -205,12 +263,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.ip = ( + 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.hashed_auth_token = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.hashed_auth_token = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: @@ -225,20 +291,29 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('VirtualMachineServerMetadata') + oprot.writeStructBegin("VirtualMachineServerMetadata") if self.ip is not None: - oprot.writeFieldBegin('ip', TType.STRING, 1) - oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) + oprot.writeFieldBegin("ip", TType.STRING, 1) + oprot.writeString( + self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip + ) oprot.writeFieldEnd() if self.hashed_auth_token is not None: - oprot.writeFieldBegin('hashed_auth_token', TType.STRING, 2) - oprot.writeString(self.hashed_auth_token.encode('utf-8') if sys.version_info[0] == 2 else self.hashed_auth_token) + oprot.writeFieldBegin("hashed_auth_token", TType.STRING, 2) + oprot.writeString( + self.hashed_auth_token.encode("utf-8") + if sys.version_info[0] == 2 + else self.hashed_auth_token + ) oprot.writeFieldEnd() if self.userdata is not None: - oprot.writeFieldBegin('userdata', TType.STRUCT, 3) + oprot.writeFieldBegin("userdata", TType.STRUCT, 3) self.userdata.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -246,15 +321,16 @@ def write(self, oprot): def validate(self): if self.ip is None: - raise TProtocolException(message='Required field ip is unset!') + raise TProtocolException(message="Required field ip is unset!") if self.hashed_auth_token is None: - raise TProtocolException(message='Required field hashed_auth_token is unset!') + raise TProtocolException( + message="Required field hashed_auth_token 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__ @@ -274,8 +350,16 @@ class Backend(object): """ + thrift_spec = None - 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 @@ -283,7 +367,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() @@ -298,22 +386,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: @@ -322,29 +426,46 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -353,9 +474,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__ @@ -382,8 +502,23 @@ class ResearchEnvironmentTemplate(object): """ - - def __init__(self, template_name=None, title=None, description=None, logo_url=None, info_url=None, port=None, incompatible_versions=None, is_maintained=None, information_for_display=None, min_ram=0, min_cores=0, securitygroup_name=None,): + thrift_spec = None + + 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 @@ -402,7 +537,11 @@ def __init__(self, template_name=None, title=None, description=None, logo_url=No 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() @@ -412,27 +551,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: @@ -445,7 +604,11 @@ def read(self, iprot): self.incompatible_versions = [] (_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.incompatible_versions.append(_elem21) iprot.readListEnd() else: @@ -460,8 +623,16 @@ def read(self, iprot): self.information_for_display = {} (_ktype23, _vtype24, _size22) = iprot.readMapBegin() for _i26 in range(_size22): - _key27 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val28 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key27 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val28 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.information_for_display[_key27] = _val28 iprot.readMapEnd() else: @@ -478,7 +649,11 @@ def read(self, iprot): 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() + self.securitygroup_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -487,64 +662,97 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter29 in self.incompatible_versions: - oprot.writeString(iter29.encode('utf-8') if sys.version_info[0] == 2 else iter29) + oprot.writeString( + iter29.encode("utf-8") if sys.version_info[0] == 2 else iter29 + ) 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 kiter30, viter31 in self.information_for_display.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.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.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() @@ -553,9 +761,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__ @@ -575,8 +782,16 @@ class CondaPackage(object): """ + thrift_spec = None - 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 @@ -584,7 +799,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() @@ -594,27 +813,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: @@ -623,29 +862,46 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -654,9 +910,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__ @@ -680,8 +935,20 @@ 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,): + thrift_spec = 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 @@ -693,7 +960,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() @@ -703,32 +974,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: @@ -738,12 +1033,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: @@ -752,45 +1055,78 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -799,9 +1135,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__ @@ -824,8 +1159,19 @@ class Volume(object): """ - - def __init__(self, id=None, name=None, description=None, status=None, created_at=None, device=None, size=None, server_id=None,): + thrift_spec = 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 @@ -836,7 +1182,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() @@ -846,32 +1196,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: @@ -881,7 +1255,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: @@ -890,41 +1268,64 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -933,9 +1334,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__ @@ -959,8 +1359,18 @@ class Snapshot(object): """ - - def __init__(self, id=None, name=None, description=None, status=None, created_at=None, size=None, volume_id=None,): + thrift_spec = 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 @@ -970,7 +1380,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() @@ -980,27 +1394,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: @@ -1010,7 +1444,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: @@ -1019,37 +1457,58 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -1058,9 +1517,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__ @@ -1083,8 +1541,17 @@ class Flavor(object): """ - - def __init__(self, vcpus=None, ram=None, disk=None, name=None, description=None, ephemeral_disk=None,): + thrift_spec = 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 @@ -1093,7 +1560,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() @@ -1118,12 +1589,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: @@ -1137,32 +1616,41 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -1170,19 +1658,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__ @@ -1213,8 +1700,25 @@ 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, os_distro=None, title=None, slurm_version=None,): + thrift_spec = 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, + os_distro=None, + title=None, + slurm_version=None, + ): self.name = name self.min_disk = min_disk self.min_ram = min_ram @@ -1231,7 +1735,11 @@ def __init__(self, name=None, min_disk=None, min_ram=None, status=None, created_ self.slurm_version = slurm_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() @@ -1241,7 +1749,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: @@ -1256,27 +1768,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: @@ -1284,7 +1816,11 @@ def read(self, iprot): self.tags = [] (_etype35, _size32) = iprot.readListBegin() for _i36 in range(_size32): - _elem37 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _elem37 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.tags.append(_elem37) iprot.readListEnd() else: @@ -1296,22 +1832,38 @@ 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) elif fid == 12: if ftype == TType.STRING: - self.os_distro = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.os_distro = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 13: 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 == 14: if ftype == TType.STRING: - self.slurm_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.slurm_version = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1320,91 +1872,129 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 iter38 in self.tags: - oprot.writeString(iter38.encode('utf-8') if sys.version_info[0] == 2 else iter38) + oprot.writeString( + iter38.encode("utf-8") if sys.version_info[0] == 2 else iter38 + ) 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() if self.os_distro is not None: - oprot.writeFieldBegin('os_distro', TType.STRING, 12) - oprot.writeString(self.os_distro.encode('utf-8') if sys.version_info[0] == 2 else self.os_distro) + oprot.writeFieldBegin("os_distro", TType.STRING, 12) + oprot.writeString( + self.os_distro.encode("utf-8") + if sys.version_info[0] == 2 + else self.os_distro + ) oprot.writeFieldEnd() if self.title is not None: - oprot.writeFieldBegin('title', TType.STRING, 13) - oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) + oprot.writeFieldBegin("title", TType.STRING, 13) + oprot.writeString( + self.title.encode("utf-8") if sys.version_info[0] == 2 else self.title + ) oprot.writeFieldEnd() if self.slurm_version is not None: - oprot.writeFieldBegin('slurm_version', TType.STRING, 14) - oprot.writeString(self.slurm_version.encode('utf-8') if sys.version_info[0] == 2 else self.slurm_version) + oprot.writeFieldBegin("slurm_version", TType.STRING, 14) + oprot.writeString( + self.slurm_version.encode("utf-8") + if sys.version_info[0] == 2 + else self.slurm_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__ @@ -1433,8 +2023,23 @@ 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,): + thrift_spec = 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 @@ -1449,7 +2054,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() @@ -1474,55 +2083,99 @@ def read(self, iprot): self.metadata = {} (_ktype40, _vtype41, _size39) = iprot.readMapBegin() for _i43 in range(_size39): - _key44 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val45 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _key44 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val45 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key44] = _val45 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: @@ -1531,84 +2184,124 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter46, viter47 in self.metadata.items(): - oprot.writeString(kiter46.encode('utf-8') if sys.version_info[0] == 2 else kiter46) - oprot.writeString(viter47.encode('utf-8') if sys.version_info[0] == 2 else viter47) + oprot.writeString( + kiter46.encode("utf-8") if sys.version_info[0] == 2 else kiter46 + ) + oprot.writeString( + viter47.encode("utf-8") if sys.version_info[0] == 2 else viter47 + ) 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__ @@ -1626,14 +2319,24 @@ class ClusterInstance(object): """ + thrift_spec = None - 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() @@ -1643,12 +2346,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: @@ -1662,20 +2373,27 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -1683,15 +2401,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__ @@ -1711,14 +2428,24 @@ class PlaybookResult(object): """ + thrift_spec = None - 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() @@ -1733,12 +2460,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: @@ -1747,38 +2482,44 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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__ @@ -1794,9 +2535,13 @@ class MetadataServerNotAvailableException(TException): """ + thrift_spec = None - def __init__(self, message=None,): - super(MetadataServerNotAvailableException, self).__setattr__('message', message) + def __init__( + self, + message=None, + ): + super(MetadataServerNotAvailableException, self).__setattr__("message", message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -1805,11 +2550,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 @@ -1819,7 +2568,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: @@ -1831,13 +2584,20 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('MetadataServerNotAvailableException') + oprot.writeStructBegin("MetadataServerNotAvailableException") 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() @@ -1849,9 +2609,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__ @@ -1867,9 +2626,13 @@ class MetadataServerNotAllowedException(TException): """ + thrift_spec = None - def __init__(self, message=None,): - super(MetadataServerNotAllowedException, self).__setattr__('message', message) + def __init__( + self, + message=None, + ): + super(MetadataServerNotAllowedException, self).__setattr__("message", message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -1878,11 +2641,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 @@ -1892,7 +2659,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: @@ -1904,13 +2675,20 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('MetadataServerNotAllowedException') + oprot.writeStructBegin("MetadataServerNotAllowedException") 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() @@ -1922,9 +2700,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__ @@ -1942,11 +2719,19 @@ 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) + thrift_spec = None + + 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") @@ -1955,11 +2740,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 @@ -1971,17 +2766,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: @@ -1995,21 +2802,36 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2021,9 +2843,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__ @@ -2039,9 +2860,13 @@ class ResourceNotAvailableException(TException): """ + thrift_spec = None - 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") @@ -2050,11 +2875,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 @@ -2064,7 +2893,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: @@ -2076,13 +2909,20 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2094,9 +2934,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__ @@ -2113,10 +2952,15 @@ class TemplateNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2125,11 +2969,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 @@ -2140,12 +2993,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: @@ -2158,17 +3019,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2180,9 +3052,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__ @@ -2199,10 +3070,15 @@ class NameAlreadyUsedException(TException): """ + thrift_spec = None - 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") @@ -2211,11 +3087,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 @@ -2226,12 +3111,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: @@ -2244,17 +3137,26 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2266,9 +3168,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__ @@ -2285,10 +3186,15 @@ class ServerNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2297,11 +3203,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 @@ -2312,12 +3227,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: @@ -2330,17 +3253,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2352,9 +3286,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__ @@ -2371,10 +3304,17 @@ class SecurityGroupNotFoundException(TException): """ + thrift_spec = None - def __init__(self, message=None, name_or_id=None,): - super(SecurityGroupNotFoundException, self).__setattr__('message', message) - super(SecurityGroupNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(SecurityGroupNotFoundException, self).__setattr__("message", message) + super(SecurityGroupNotFoundException, self).__setattr__( + "name_or_id", name_or_id + ) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2383,11 +3323,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 @@ -2398,12 +3347,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: @@ -2416,17 +3373,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('SecurityGroupNotFoundException') + oprot.writeStructBegin("SecurityGroupNotFoundException") 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() @@ -2438,9 +3406,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__ @@ -2457,10 +3424,17 @@ class SecurityGroupRuleNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2469,11 +3443,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 @@ -2484,12 +3467,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: @@ -2502,17 +3493,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2524,9 +3526,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__ @@ -2543,10 +3544,15 @@ class FlavorNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2555,11 +3561,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 @@ -2570,12 +3585,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: @@ -2588,17 +3611,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2610,9 +3644,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__ @@ -2629,10 +3662,15 @@ class VolumeNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2641,11 +3679,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 @@ -2656,12 +3703,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: @@ -2674,17 +3729,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2696,9 +3762,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__ @@ -2715,10 +3780,15 @@ class SnapshotNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2727,11 +3797,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 @@ -2742,12 +3821,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: @@ -2760,17 +3847,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2782,9 +3880,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__ @@ -2801,10 +3898,15 @@ class ImageNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2813,11 +3915,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 @@ -2828,12 +3939,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: @@ -2846,17 +3965,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2868,9 +3998,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__ @@ -2887,10 +4016,15 @@ class ClusterNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2899,11 +4033,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 @@ -2914,12 +4057,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: @@ -2932,17 +4083,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -2954,9 +4116,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__ @@ -2973,10 +4134,15 @@ class BackendNotFoundException(TException): """ + thrift_spec = None - 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") @@ -2985,11 +4151,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 @@ -3000,12 +4175,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: @@ -3018,17 +4201,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -3040,9 +4234,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__ @@ -3059,10 +4252,15 @@ class PlaybookNotFoundException(TException): """ + thrift_spec = None - 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") @@ -3071,11 +4269,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 @@ -3086,12 +4293,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: @@ -3104,17 +4319,28 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -3126,9 +4352,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__ @@ -3144,9 +4369,13 @@ class DefaultException(TException): """ + thrift_spec = None - 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") @@ -3155,11 +4384,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 @@ -3169,7 +4402,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: @@ -3181,13 +4418,20 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -3199,9 +4443,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__ @@ -3219,9 +4462,13 @@ class OpenStackConflictException(TException): """ + thrift_spec = None - 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") @@ -3230,11 +4477,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 @@ -3244,7 +4495,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: @@ -3256,13 +4511,20 @@ def read(cls, iprot): ) def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -3274,267 +4536,1005 @@ 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(User) User.thrift_spec = ( None, # 0 - (1, TType.STRING, 'username', 'UTF8', None, ), # 1 - (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 - (3, TType.LIST, 'public_keys', (TType.STRING, 'UTF8', False), None, ), # 3 + ( + 1, + TType.STRING, + "username", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "public_keys", + (TType.STRING, "UTF8", False), + None, + ), # 3 ) all_structs.append(UserData) UserData.thrift_spec = ( None, # 0 None, # 1 - (2, TType.MAP, 'data', (TType.STRING, 'UTF8', TType.STRUCT, [User, None], False), { - }, ), # 2 + ( + 2, + TType.MAP, + "data", + (TType.STRING, "UTF8", TType.STRUCT, [User, None], False), + {}, + ), # 2 ) all_structs.append(VirtualMachineServerMetadata) VirtualMachineServerMetadata.thrift_spec = ( None, # 0 - (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 - (2, TType.STRING, 'hashed_auth_token', 'UTF8', None, ), # 2 - (3, TType.STRUCT, 'userdata', [UserData, None], None, ), # 3 + ( + 1, + TType.STRING, + "ip", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "hashed_auth_token", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRUCT, + "userdata", + [UserData, None], + None, + ), # 3 ) 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 - (12, TType.STRING, 'securitygroup_name', 'UTF8', None, ), # 12 + ( + 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 - (12, TType.STRING, 'os_distro', 'UTF8', None, ), # 12 - (13, TType.STRING, 'title', 'UTF8', None, ), # 13 - (14, TType.STRING, 'slurm_version', 'UTF8', None, ), # 14 + ( + 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 + ( + 12, + TType.STRING, + "os_distro", + "UTF8", + None, + ), # 12 + ( + 13, + TType.STRING, + "title", + "UTF8", + None, + ), # 13 + ( + 14, + TType.STRING, + "slurm_version", + "UTF8", + None, + ), # 14 ) 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(MetadataServerNotAvailableException) MetadataServerNotAvailableException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 ) all_structs.append(MetadataServerNotAllowedException) MetadataServerNotAllowedException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 ) 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(SecurityGroupNotFoundException) SecurityGroupNotFoundException.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 From 18548f7be4d477fc1cb0627849b5d4411d0dc44a Mon Sep 17 00:00:00 2001 From: dweinholz Date: Thu, 2 Jan 2025 16:55:06 +0100 Subject: [PATCH 5/5] fixed typo --- portal_client.thrift | 4 +- simple_vm_client/VirtualMachineService-remote | 4 +- simple_vm_client/VirtualMachineService.py | 72 +++++++++---------- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index cc527b44..9e4af592 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -508,7 +508,7 @@ service VirtualMachineService { 7:list> volume_ids_path_new, 8:list> volume_ids_path_attach, 9:list additional_owner_keys, - 10:list addtional_user_keys, + 10:list additional_user_keys, 11:optional string research_environment 12:optional list additional_security_group_ids, 13:optional string slurm_version, @@ -548,7 +548,7 @@ service VirtualMachineService { 8:list> volume_ids_path_attach, 9:optional list additional_security_group_ids, 10:list additional_owner_keys, - 11:list addtional_user_keys, + 11:list additional_user_keys, 12:optional string metadata_token, 13:optional string metadata_endpoint, diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index e901e35d..e542a372 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -61,12 +61,12 @@ if len(sys.argv) <= 1 or sys.argv[1] == "--help": ) print(" void unrescue_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_owner_keys, addtional_user_keys, string research_environment, additional_security_group_ids, string slurm_version, string metadata_token, string metadata_endpoint)" + " string start_server(string flavor_name, string image_name, string public_key, string servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_owner_keys, additional_user_keys, string research_environment, additional_security_group_ids, string slurm_version, string metadata_token, string metadata_endpoint)" ) 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, additional_owner_keys, addtional_user_keys, string metadata_token, string metadata_endpoint)" + " 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, additional_owner_keys, additional_user_keys, string metadata_token, string metadata_endpoint)" ) print(" bool exist_server(string name)") print( diff --git a/simple_vm_client/VirtualMachineService.py b/simple_vm_client/VirtualMachineService.py index 22add231..b6a50328 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -232,7 +232,7 @@ def start_server( volume_ids_path_new, volume_ids_path_attach, additional_owner_keys, - addtional_user_keys, + additional_user_keys, research_environment, additional_security_group_ids, slurm_version, @@ -249,7 +249,7 @@ def start_server( - volume_ids_path_new - volume_ids_path_attach - additional_owner_keys - - addtional_user_keys + - additional_user_keys - research_environment - additional_security_group_ids - slurm_version @@ -280,7 +280,7 @@ def start_server_with_custom_key( volume_ids_path_attach, additional_security_group_ids, additional_owner_keys, - addtional_user_keys, + additional_user_keys, metadata_token, metadata_endpoint, ): @@ -297,7 +297,7 @@ def start_server_with_custom_key( - volume_ids_path_attach - additional_security_group_ids - additional_owner_keys - - addtional_user_keys + - additional_user_keys - metadata_token - metadata_endpoint @@ -1697,7 +1697,7 @@ def start_server( volume_ids_path_new, volume_ids_path_attach, additional_owner_keys, - addtional_user_keys, + additional_user_keys, research_environment, additional_security_group_ids, slurm_version, @@ -1714,7 +1714,7 @@ def start_server( - volume_ids_path_new - volume_ids_path_attach - additional_owner_keys - - addtional_user_keys + - additional_user_keys - research_environment - additional_security_group_ids - slurm_version @@ -1731,7 +1731,7 @@ def start_server( volume_ids_path_new, volume_ids_path_attach, additional_owner_keys, - addtional_user_keys, + additional_user_keys, research_environment, additional_security_group_ids, slurm_version, @@ -1750,7 +1750,7 @@ def send_start_server( volume_ids_path_new, volume_ids_path_attach, additional_owner_keys, - addtional_user_keys, + additional_user_keys, research_environment, additional_security_group_ids, slurm_version, @@ -1767,7 +1767,7 @@ def send_start_server( args.volume_ids_path_new = volume_ids_path_new args.volume_ids_path_attach = volume_ids_path_attach args.additional_owner_keys = additional_owner_keys - args.addtional_user_keys = addtional_user_keys + args.additional_user_keys = additional_user_keys args.research_environment = research_environment args.additional_security_group_ids = additional_security_group_ids args.slurm_version = slurm_version @@ -1882,7 +1882,7 @@ def start_server_with_custom_key( volume_ids_path_attach, additional_security_group_ids, additional_owner_keys, - addtional_user_keys, + additional_user_keys, metadata_token, metadata_endpoint, ): @@ -1899,7 +1899,7 @@ def start_server_with_custom_key( - volume_ids_path_attach - additional_security_group_ids - additional_owner_keys - - addtional_user_keys + - additional_user_keys - metadata_token - metadata_endpoint @@ -1914,7 +1914,7 @@ def start_server_with_custom_key( volume_ids_path_attach, additional_security_group_ids, additional_owner_keys, - addtional_user_keys, + additional_user_keys, metadata_token, metadata_endpoint, ) @@ -1931,7 +1931,7 @@ def send_start_server_with_custom_key( volume_ids_path_attach, additional_security_group_ids, additional_owner_keys, - addtional_user_keys, + additional_user_keys, metadata_token, metadata_endpoint, ): @@ -1948,7 +1948,7 @@ def send_start_server_with_custom_key( args.volume_ids_path_attach = volume_ids_path_attach args.additional_security_group_ids = additional_security_group_ids args.additional_owner_keys = additional_owner_keys - args.addtional_user_keys = addtional_user_keys + args.additional_user_keys = additional_user_keys args.metadata_token = metadata_token args.metadata_endpoint = metadata_endpoint args.write(self._oprot) @@ -4872,7 +4872,7 @@ def process_start_server(self, seqid, iprot, oprot): args.volume_ids_path_new, args.volume_ids_path_attach, args.additional_owner_keys, - args.addtional_user_keys, + args.additional_user_keys, args.research_environment, args.additional_security_group_ids, args.slurm_version, @@ -4981,7 +4981,7 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): args.volume_ids_path_attach, args.additional_security_group_ids, args.additional_owner_keys, - args.addtional_user_keys, + args.additional_user_keys, args.metadata_token, args.metadata_endpoint, ) @@ -10984,7 +10984,7 @@ class start_server_args(object): - volume_ids_path_new - volume_ids_path_attach - additional_owner_keys - - addtional_user_keys + - additional_user_keys - research_environment - additional_security_group_ids - slurm_version @@ -11005,7 +11005,7 @@ def __init__( volume_ids_path_new=None, volume_ids_path_attach=None, additional_owner_keys=None, - addtional_user_keys=None, + additional_user_keys=None, research_environment=None, additional_security_group_ids=None, slurm_version=None, @@ -11020,7 +11020,7 @@ def __init__( self.volume_ids_path_new = volume_ids_path_new self.volume_ids_path_attach = volume_ids_path_attach self.additional_owner_keys = additional_owner_keys - self.addtional_user_keys = addtional_user_keys + self.additional_user_keys = additional_user_keys self.research_environment = research_environment self.additional_security_group_ids = additional_security_group_ids self.slurm_version = slurm_version @@ -11159,7 +11159,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 10: if ftype == TType.LIST: - self.addtional_user_keys = [] + self.additional_user_keys = [] (_etype168, _size165) = iprot.readListBegin() for _i169 in range(_size165): _elem170 = ( @@ -11167,7 +11167,7 @@ def read(self, iprot): if sys.version_info[0] == 2 else iprot.readString() ) - self.addtional_user_keys.append(_elem170) + self.additional_user_keys.append(_elem170) iprot.readListEnd() else: iprot.skip(ftype) @@ -11325,10 +11325,10 @@ def write(self, oprot): ) oprot.writeListEnd() oprot.writeFieldEnd() - if self.addtional_user_keys is not None: - oprot.writeFieldBegin("addtional_user_keys", TType.LIST, 10) - oprot.writeListBegin(TType.STRING, len(self.addtional_user_keys)) - for iter186 in self.addtional_user_keys: + if self.additional_user_keys is not None: + oprot.writeFieldBegin("additional_user_keys", TType.LIST, 10) + oprot.writeListBegin(TType.STRING, len(self.additional_user_keys)) + for iter186 in self.additional_user_keys: oprot.writeString( iter186.encode("utf-8") if sys.version_info[0] == 2 else iter186 ) @@ -11455,7 +11455,7 @@ def __ne__(self, other): ( 10, TType.LIST, - "addtional_user_keys", + "additional_user_keys", (TType.STRING, "UTF8", False), None, ), # 10 @@ -12017,7 +12017,7 @@ class start_server_with_custom_key_args(object): - volume_ids_path_attach - additional_security_group_ids - additional_owner_keys - - addtional_user_keys + - additional_user_keys - metadata_token - metadata_endpoint @@ -12036,7 +12036,7 @@ def __init__( volume_ids_path_attach=None, additional_security_group_ids=None, additional_owner_keys=None, - addtional_user_keys=None, + additional_user_keys=None, metadata_token=None, metadata_endpoint=None, ): @@ -12049,7 +12049,7 @@ def __init__( self.volume_ids_path_attach = volume_ids_path_attach self.additional_security_group_ids = additional_security_group_ids self.additional_owner_keys = additional_owner_keys - self.addtional_user_keys = addtional_user_keys + self.additional_user_keys = additional_user_keys self.metadata_token = metadata_token self.metadata_endpoint = metadata_endpoint @@ -12199,7 +12199,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 11: if ftype == TType.LIST: - self.addtional_user_keys = [] + self.additional_user_keys = [] (_etype236, _size233) = iprot.readListBegin() for _i237 in range(_size233): _elem238 = ( @@ -12207,7 +12207,7 @@ def read(self, iprot): if sys.version_info[0] == 2 else iprot.readString() ) - self.addtional_user_keys.append(_elem238) + self.additional_user_keys.append(_elem238) iprot.readListEnd() else: iprot.skip(ftype) @@ -12342,10 +12342,10 @@ def write(self, oprot): ) oprot.writeListEnd() oprot.writeFieldEnd() - if self.addtional_user_keys is not None: - oprot.writeFieldBegin("addtional_user_keys", TType.LIST, 11) - oprot.writeListBegin(TType.STRING, len(self.addtional_user_keys)) - for iter249 in self.addtional_user_keys: + if self.additional_user_keys is not None: + oprot.writeFieldBegin("additional_user_keys", TType.LIST, 11) + oprot.writeListBegin(TType.STRING, len(self.additional_user_keys)) + for iter249 in self.additional_user_keys: oprot.writeString( iter249.encode("utf-8") if sys.version_info[0] == 2 else iter249 ) @@ -12454,7 +12454,7 @@ def __ne__(self, other): ( 11, TType.LIST, - "addtional_user_keys", + "additional_user_keys", (TType.STRING, "UTF8", False), None, ), # 11