diff --git a/docker-compose.bibigrid.host.yml b/docker-compose.bibigrid.host.yml index 5b6cac6..ea68dde 100644 --- a/docker-compose.bibigrid.host.yml +++ b/docker-compose.bibigrid.host.yml @@ -1,4 +1,3 @@ -version: '3.5' services: simplevm-client: container_name: simplevm-client diff --git a/docker-compose.bibigrid.yml b/docker-compose.bibigrid.yml index b08e4db..0b55cff 100644 --- a/docker-compose.bibigrid.yml +++ b/docker-compose.bibigrid.yml @@ -1,4 +1,3 @@ -version: '3.5' services: simplevm-client: container_name: simplevm-client diff --git a/docker-compose.dev.bibigrid.yml b/docker-compose.dev.bibigrid.yml index 271f510..bd02ec1 100644 --- a/docker-compose.dev.bibigrid.yml +++ b/docker-compose.dev.bibigrid.yml @@ -1,4 +1,3 @@ -version: '3.5' services: simplevm-client: container_name: simplevm-client diff --git a/docker-compose.dev.giessen.yml b/docker-compose.dev.giessen.yml index 6ef86f9..63fdebf 100644 --- a/docker-compose.dev.giessen.yml +++ b/docker-compose.dev.giessen.yml @@ -1,4 +1,3 @@ -version: '3.5' services: simplevm-client-giessen: container_name: simplevm-client-giessen diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 7645467..e20f302 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,4 +1,3 @@ -version: '3.5' services: simplevm-client: container_name: simplevm-client diff --git a/docker-compose.host.yml b/docker-compose.host.yml index cdc3367..72a1f5a 100644 --- a/docker-compose.host.yml +++ b/docker-compose.host.yml @@ -1,4 +1,3 @@ -version: '3.5' services: simplevm-client: container_name: simplevm-client diff --git a/docker-compose.yml b/docker-compose.yml index dc37b27..ab7a2e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.5' services: simplevm-client: container_name: simplevm-client diff --git a/portal_client.thrift b/portal_client.thrift index fd331de..e5155bd 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -534,9 +534,11 @@ service VirtualMachineService { 5:optional string research_environment, 7:list> volume_ids_path_new, 8:list> volume_ids_path_attach, - 9:optional list additional_security_group_ids, - 10:optional string metadata_token, - 11:optional string metadata_endpoint + 9:optional list additional_security_group_ids, + 10:optional list additional_keys, + 11:optional string metadata_token, + 12:optional string metadata_endpoint, + ) throws (1:NameAlreadyUsedException e,2:ResourceNotAvailableException r,3: ImageNotFoundException i,4: FlavorNotFoundException f,5:DefaultException d) diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 0985a31..6501b53 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -140,15 +140,15 @@ def stop_server(self, openstack_id: str) -> None: def delete_server(self, openstack_id: str) -> None: return self.openstack_connector.delete_server(openstack_id=openstack_id) - def rescue_server(self, openstack_id: str, - admin_pass: str = None, - image_ref: str = None) -> None: - return self.openstack_connector.rescue_server(openstack_id=openstack_id, - admin_pass=admin_pass, - image_ref=image_ref) + def rescue_server( + self, openstack_id: str, admin_pass: str = None, image_ref: str = None + ) -> None: + return self.openstack_connector.rescue_server( + openstack_id=openstack_id, admin_pass=admin_pass, image_ref=image_ref + ) def unrescue_server(self, openstack_id: str) -> None: - return self.openstack_connector.unrescue_server(openstack_id=openstack_id) + return self.openstack_connector.unrescue_server(openstack_id=openstack_id) def reboot_hard_server(self, openstack_id: str) -> None: return self.openstack_connector.reboot_hard_server(openstack_id=openstack_id) @@ -429,6 +429,7 @@ 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], metadata_token: str = None, metadata_endpoint: str = None, ) -> str: @@ -445,6 +446,7 @@ def start_server_with_custom_key( image_name=image_name, servername=servername, metadata=metadata, + additional_keys=additional_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 14a9403..a4160e7 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -1,111 +1,145 @@ #!/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_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, 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_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('') + +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_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("") sys.exit(0) pp = pprint.PrettyPrinter(indent=2) -host = 'localhost' +host = "localhost" port = 9090 -uri = '' +uri = "" framed = False ssl = False validate = True @@ -115,16 +149,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]) @@ -132,42 +166,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: @@ -178,458 +219,775 @@ 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_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": 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') + 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') - sys.exit(1) - pp.pprint(client.detach_ip_from_server(args[0], args[1],)) - -elif cmd == 'start_server_with_custom_key': - if len(args) != 10: - print('start_server_with_custom_key requires 10 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]), args[8], args[9],)) - -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) != 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": 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_url': +elif cmd == "get_forc_url": if len(args) != 0: - print('get_forc_url requires 0 args') + print("get_forc_url requires 0 args") sys.exit(1) pp.pprint(client.get_forc_url()) -elif cmd == 'create_backend': +elif cmd == "create_backend": if len(args) != 4: - print('create_backend requires 4 args') - sys.exit(1) - pp.pprint(client.create_backend(args[0], args[1], args[2], args[3],)) - -elif cmd == 'get_backends': + print("create_backend requires 4 args") + sys.exit(1) + pp.pprint( + client.create_backend( + args[0], + args[1], + args[2], + args[3], + ) + ) + +elif cmd == "get_backends": if len(args) != 0: - print('get_backends requires 0 args') + print("get_backends requires 0 args") sys.exit(1) pp.pprint(client.get_backends()) -elif cmd == 'get_backends_by_owner': +elif cmd == "get_backends_by_owner": if len(args) != 1: - print('get_backends_by_owner requires 1 args') + print("get_backends_by_owner requires 1 args") sys.exit(1) - pp.pprint(client.get_backends_by_owner(args[0],)) + pp.pprint( + client.get_backends_by_owner( + args[0], + ) + ) -elif cmd == 'get_backends_by_template': +elif cmd == "get_backends_by_template": if len(args) != 1: - print('get_backends_by_template requires 1 args') + print("get_backends_by_template requires 1 args") sys.exit(1) - pp.pprint(client.get_backends_by_template(args[0],)) + pp.pprint( + client.get_backends_by_template( + args[0], + ) + ) -elif cmd == 'get_backend_by_id': +elif cmd == "get_backend_by_id": if len(args) != 1: - print('get_backend_by_id requires 1 args') + print("get_backend_by_id requires 1 args") sys.exit(1) - pp.pprint(client.get_backend_by_id(eval(args[0]),)) + pp.pprint( + client.get_backend_by_id( + eval(args[0]), + ) + ) -elif cmd == '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) != 1: - print('get_server requires 1 args') + print("get_server requires 1 args") sys.exit(1) - pp.pprint(client.get_server(args[0],)) + pp.pprint( + client.get_server( + args[0], + ) + ) -elif cmd == 'get_server_by_unique_name': +elif cmd == "get_server_by_unique_name": if len(args) != 1: - print('get_server_by_unique_name requires 1 args') + print("get_server_by_unique_name requires 1 args") sys.exit(1) - pp.pprint(client.get_server_by_unique_name(args[0],)) + pp.pprint( + client.get_server_by_unique_name( + args[0], + ) + ) -elif cmd == 'stop_server': +elif cmd == "stop_server": if len(args) != 1: - print('stop_server requires 1 args') + print("stop_server requires 1 args") sys.exit(1) - pp.pprint(client.stop_server(args[0],)) + pp.pprint( + client.stop_server( + args[0], + ) + ) -elif cmd == 'create_snapshot': +elif cmd == "create_snapshot": if len(args) != 5: - print('create_snapshot requires 5 args') - sys.exit(1) - pp.pprint(client.create_snapshot(args[0], args[1], args[2], eval(args[3]), args[4],)) - -elif cmd == 'get_limits': + print("create_snapshot requires 5 args") + sys.exit(1) + pp.pprint( + client.create_snapshot( + args[0], + args[1], + args[2], + eval(args[3]), + args[4], + ) + ) + +elif cmd == "get_limits": if len(args) != 0: - print('get_limits requires 0 args') + print("get_limits requires 0 args") sys.exit(1) pp.pprint(client.get_limits()) -elif cmd == 'start_cluster': +elif cmd == "start_cluster": if len(args) != 4: - print('start_cluster requires 4 args') + 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 ee1c0c9..c29eb7f 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_metadata_to_server(self, openstack_id, metadata): """ @@ -102,7 +96,6 @@ def add_metadata_to_server(self, openstack_id, metadata): - metadata """ - pass def get_flavors(self): """ @@ -110,7 +103,6 @@ def get_flavors(self): Returns: List of flavor instances. """ - pass def get_images(self): """ @@ -118,7 +110,6 @@ def get_images(self): Returns: List of Image instances. """ - pass def get_public_images(self): """ @@ -126,7 +117,6 @@ def get_public_images(self): Returns: List of public Image instances. """ - pass def get_private_images(self): """ @@ -134,7 +124,6 @@ def get_private_images(self): Returns: List of private Image instances. """ - pass def get_image(self, openstack_id, ignore_not_active): """ @@ -146,7 +135,6 @@ def get_image(self, openstack_id, ignore_not_active): - ignore_not_active """ - pass def get_volume(self, volume_id): """ @@ -154,7 +142,6 @@ def get_volume(self, volume_id): - volume_id """ - pass def get_volumes_by_ids(self, volume_ids): """ @@ -162,7 +149,6 @@ def get_volumes_by_ids(self, volume_ids): - volume_ids """ - pass def resize_volume(self, volume_id, size): """ @@ -171,9 +157,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 @@ -185,7 +172,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): """ @@ -193,7 +179,6 @@ def delete_security_group_rule(self, openstack_id): - openstack_id """ - pass def delete_server(self, openstack_id): """ @@ -204,7 +189,6 @@ def delete_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def rescue_server(self, openstack_id, admin_pass, image_ref): """ @@ -214,7 +198,6 @@ def rescue_server(self, openstack_id, admin_pass, image_ref): - image_ref """ - pass def unrescue_server(self, openstack_id): """ @@ -222,9 +205,23 @@ 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. @@ -242,7 +239,6 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - metadata_endpoint """ - pass def is_bibigrid_available(self): pass @@ -254,9 +250,21 @@ 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, 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. @@ -269,11 +277,11 @@ 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 - metadata_token - metadata_endpoint """ - pass def exist_server(self, name): """ @@ -283,9 +291,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 @@ -299,7 +315,6 @@ def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, r - base_url """ - pass def get_playbook_logs(self, openstack_id): """ @@ -309,14 +324,12 @@ def get_playbook_logs(self, openstack_id): - openstack_id """ - pass def has_forc(self): """ Get boolean if client has backend url configured """ - pass def get_forc_url(self): pass @@ -332,14 +345,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): """ @@ -349,7 +360,6 @@ def get_backends_by_owner(self, owner): - owner """ - pass def get_backends_by_template(self, template): """ @@ -359,7 +369,6 @@ def get_backends_by_template(self, template): - template """ - pass def get_backend_by_id(self, id): """ @@ -369,7 +378,6 @@ def get_backend_by_id(self, id): - id """ - pass def set_metadata_server_data(self, ip, metadata): """ @@ -378,7 +386,6 @@ def set_metadata_server_data(self, ip, metadata): - metadata """ - pass def remove_metadata_server_data(self, ip): """ @@ -386,7 +393,6 @@ def remove_metadata_server_data(self, ip): - ip """ - pass def is_metadata_server_available(self): pass @@ -399,7 +405,6 @@ def delete_backend(self, id): - id """ - pass def add_user_to_backend(self, backend_id, user_id): """ @@ -410,7 +415,6 @@ def add_user_to_backend(self, backend_id, user_id): - user_id """ - pass def get_users_from_backend(self, backend_id): """ @@ -420,7 +424,6 @@ def get_users_from_backend(self, backend_id): - backend_id """ - pass def delete_user_from_backend(self, backend_id, user_id): """ @@ -431,7 +434,6 @@ def delete_user_from_backend(self, backend_id, user_id): - user_id """ - pass def get_allowed_templates(self): pass @@ -442,7 +444,6 @@ def get_servers(self): Returns: List of server instances. """ - pass def get_servers_by_ids(self, server_ids): """ @@ -453,7 +454,6 @@ def get_servers_by_ids(self, server_ids): - server_ids """ - pass def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -464,7 +464,6 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): - bibigrid_id """ - pass def get_security_group_id_by_name(self, name): """ @@ -472,9 +471,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 @@ -486,9 +486,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 @@ -502,7 +512,6 @@ def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_ - worker_idx """ - pass def get_cluster_info(self, cluster_id): """ @@ -510,7 +519,6 @@ def get_cluster_info(self, cluster_id): - cluster_id """ - pass def get_cluster_status(self, cluster_id): """ @@ -518,7 +526,6 @@ def get_cluster_status(self, cluster_id): - cluster_id """ - pass def get_keypair_public_key_by_name(self, key_name): """ @@ -526,7 +533,6 @@ def get_keypair_public_key_by_name(self, key_name): - key_name """ - pass def delete_keypair(self, key_name): """ @@ -534,7 +540,6 @@ def delete_keypair(self, key_name): - key_name """ - pass def add_default_security_groups_to_server(self, openstack_id): """ @@ -542,7 +547,6 @@ def add_default_security_groups_to_server(self, openstack_id): - openstack_id """ - pass def get_server(self, openstack_id): """ @@ -553,7 +557,6 @@ def get_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def get_server_by_unique_name(self, unique_name): """ @@ -561,7 +564,6 @@ def get_server_by_unique_name(self, unique_name): - unique_name: Id of the server. """ - pass def stop_server(self, openstack_id): """ @@ -572,7 +574,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): """ @@ -588,7 +589,6 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): - description: Description of the new snapshot """ - pass def get_limits(self): """ @@ -598,7 +598,6 @@ def get_limits(self): 'totalInstancesUsed': totalInstancesUsed} """ - pass def start_cluster(self, public_keys, master_instance, worker_instances, user): """ @@ -609,7 +608,6 @@ def start_cluster(self, public_keys, master_instance, worker_instances, user): - user """ - pass def terminate_cluster(self, cluster_id): """ @@ -617,7 +615,6 @@ def terminate_cluster(self, cluster_id): - cluster_id """ - pass def delete_image(self, image_id): """ @@ -628,7 +625,6 @@ def delete_image(self, image_id): - image_id: Id of image """ - pass def detach_volume(self, volume_id, server_id): """ @@ -639,7 +635,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): """ @@ -649,7 +644,6 @@ def delete_volume(self, volume_id): - volume_id """ - pass def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -661,7 +655,6 @@ def attach_volume_to_server(self, openstack_id, volume_id): - volume_id: Id of volume """ - pass def resume_server(self, openstack_id): """ @@ -671,7 +664,6 @@ def resume_server(self, openstack_id): - openstack_id: Id of the server """ - pass def create_volume(self, volume_name, volume_storage, metadata): """ @@ -683,7 +675,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): """ @@ -695,7 +686,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): """ @@ -707,7 +697,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): """ @@ -720,7 +709,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): """ @@ -731,7 +719,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): """ @@ -741,7 +728,6 @@ def delete_volume_snapshot(self, snapshot_id): - snapshot_id """ - pass def reboot_hard_server(self, openstack_id): """ @@ -751,7 +737,6 @@ def reboot_hard_server(self, openstack_id): - openstack_id: Id of the server """ - pass def reboot_soft_server(self, openstack_id): """ @@ -761,7 +746,6 @@ def reboot_soft_server(self, openstack_id): - openstack_id: Id of the server """ - pass class Client(Iface): @@ -769,6 +753,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: @@ -785,7 +770,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) @@ -805,7 +790,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): """ @@ -817,7 +804,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() @@ -836,7 +825,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): """ @@ -847,7 +839,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() @@ -866,14 +858,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() @@ -892,7 +889,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): """ @@ -908,7 +908,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,7 +929,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): """ @@ -944,7 +947,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) @@ -966,7 +969,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): """ @@ -980,7 +985,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) @@ -1013,11 +1020,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 @@ -1055,7 +1068,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 @@ -1090,7 +1105,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() @@ -1109,7 +1124,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): """ @@ -1121,7 +1138,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() @@ -1140,7 +1157,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): """ @@ -1152,7 +1171,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() @@ -1171,7 +1192,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): """ @@ -1183,7 +1207,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() @@ -1202,7 +1228,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): """ @@ -1218,7 +1247,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 @@ -1241,7 +1270,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): """ @@ -1253,7 +1284,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) @@ -1275,7 +1306,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): """ @@ -1287,7 +1320,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) @@ -1307,7 +1342,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): """ @@ -1320,7 +1358,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 @@ -1343,7 +1381,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 @@ -1355,11 +1395,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 @@ -1389,7 +1435,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): """ @@ -1401,7 +1450,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) @@ -1438,7 +1489,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) @@ -1474,7 +1525,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 @@ -1510,7 +1561,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) @@ -1534,7 +1585,22 @@ 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. @@ -1552,11 +1618,40 @@ 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_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 @@ -1598,14 +1693,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() @@ -1624,7 +1723,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): """ @@ -1637,7 +1739,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 @@ -1660,7 +1764,20 @@ 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, 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. @@ -1673,15 +1790,43 @@ 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 - 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, 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, 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 @@ -1691,6 +1836,7 @@ 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.metadata_token = metadata_token args.metadata_endpoint = metadata_endpoint args.write(self._oprot) @@ -1720,7 +1866,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): """ @@ -1734,7 +1883,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) @@ -1754,9 +1903,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 @@ -1770,11 +1930,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 @@ -1802,7 +1981,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): """ @@ -1816,7 +1998,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) @@ -1838,7 +2022,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): """ @@ -1849,7 +2036,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() @@ -1868,14 +2055,16 @@ def recv_has_forc(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "has_forc failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "has_forc failed: unknown result" + ) def get_forc_url(self): self.send_get_forc_url() return self.recv_get_forc_url() def send_get_forc_url(self): - self._oprot.writeMessageBegin('get_forc_url', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_forc_url", TMessageType.CALL, self._seqid) args = get_forc_url_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1894,7 +2083,9 @@ def recv_get_forc_url(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result" + ) def create_backend(self, owner, user_path, template, upstream_url): """ @@ -1911,7 +2102,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 @@ -1938,7 +2129,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): """ @@ -1949,7 +2143,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() @@ -1970,7 +2164,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): """ @@ -1984,7 +2180,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) @@ -2006,7 +2204,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): """ @@ -2020,7 +2221,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) @@ -2042,7 +2245,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): """ @@ -2056,7 +2262,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) @@ -2080,7 +2288,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): """ @@ -2093,7 +2304,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 @@ -2128,7 +2341,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) @@ -2157,7 +2372,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() @@ -2192,7 +2409,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) @@ -2227,7 +2444,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 @@ -2250,7 +2469,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): """ @@ -2264,7 +2486,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) @@ -2286,7 +2510,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): """ @@ -2301,7 +2528,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 @@ -2324,14 +2553,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() @@ -2350,7 +2584,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): """ @@ -2362,7 +2599,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() @@ -2381,7 +2618,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): """ @@ -2396,7 +2635,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) @@ -2416,7 +2657,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): """ @@ -2431,7 +2675,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) @@ -2451,7 +2697,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): """ @@ -2463,7 +2712,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) @@ -2485,9 +2736,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 @@ -2499,11 +2755,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 @@ -2529,9 +2791,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 @@ -2545,11 +2821,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 @@ -2577,7 +2876,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): """ @@ -2589,7 +2891,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) @@ -2611,7 +2915,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): """ @@ -2623,7 +2930,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) @@ -2645,7 +2954,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): """ @@ -2657,7 +2969,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) @@ -2677,7 +2991,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): """ @@ -2689,7 +3006,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) @@ -2719,7 +3036,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) @@ -2754,7 +3073,7 @@ def get_server(self, openstack_id): return self.recv_get_server() def send_get_server(self, openstack_id): - self._oprot.writeMessageBegin('get_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_server", TMessageType.CALL, self._seqid) args = get_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2776,7 +3095,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): """ @@ -2788,7 +3109,9 @@ def get_server_by_unique_name(self, unique_name): 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) + 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.write(self._oprot) @@ -2810,7 +3133,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): """ @@ -2825,7 +3151,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) @@ -2866,8 +3192,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 @@ -2895,7 +3223,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): """ @@ -2909,7 +3240,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() @@ -2928,7 +3259,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): """ @@ -2943,7 +3276,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 @@ -2966,7 +3299,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): """ @@ -2978,7 +3313,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) @@ -3000,7 +3337,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): """ @@ -3015,7 +3355,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) @@ -3050,7 +3390,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 @@ -3089,7 +3429,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) @@ -3127,7 +3467,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 @@ -3152,7 +3494,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): """ @@ -3166,7 +3511,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) @@ -3204,7 +3549,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 @@ -3230,7 +3575,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): """ @@ -3242,11 +3589,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 @@ -3272,7 +3625,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): """ @@ -3288,7 +3644,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 @@ -3314,7 +3672,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): """ @@ -3331,7 +3692,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 @@ -3357,7 +3720,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): """ @@ -3372,7 +3738,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) @@ -3394,7 +3762,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): """ @@ -3408,7 +3779,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) @@ -3444,7 +3817,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) @@ -3480,7 +3855,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) @@ -3512,12 +3889,20 @@ def __init__(self, handler): self._processMap["is_version"] = Processor.process_is_version self._processMap["get_client_version"] = Processor.process_get_client_version self._processMap["get_gateway_ip"] = Processor.process_get_gateway_ip - self._processMap["get_calculation_values"] = Processor.process_get_calculation_values + self._processMap["get_calculation_values"] = ( + Processor.process_get_calculation_values + ) self._processMap["import_keypair"] = Processor.process_import_keypair self._processMap["get_vm_ports"] = Processor.process_get_vm_ports - self._processMap["add_udp_security_group"] = Processor.process_add_udp_security_group - self._processMap["add_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_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 @@ -3526,46 +3911,84 @@ def __init__(self, handler): self._processMap["get_volume"] = Processor.process_get_volume self._processMap["get_volumes_by_ids"] = Processor.process_get_volumes_by_ids self._processMap["resize_volume"] = Processor.process_resize_volume - self._processMap["open_port_range_for_vm_in_project"] = Processor.process_open_port_range_for_vm_in_project - self._processMap["delete_security_group_rule"] = Processor.process_delete_security_group_rule + self._processMap["open_port_range_for_vm_in_project"] = ( + Processor.process_open_port_range_for_vm_in_project + ) + self._processMap["delete_security_group_rule"] = ( + Processor.process_delete_security_group_rule + ) self._processMap["delete_server"] = Processor.process_delete_server self._processMap["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_url"] = Processor.process_get_forc_url self._processMap["create_backend"] = Processor.process_create_backend self._processMap["get_backends"] = Processor.process_get_backends - self._processMap["get_backends_by_owner"] = Processor.process_get_backends_by_owner - self._processMap["get_backends_by_template"] = Processor.process_get_backends_by_template + self._processMap["get_backends_by_owner"] = ( + Processor.process_get_backends_by_owner + ) + self._processMap["get_backends_by_template"] = ( + Processor.process_get_backends_by_template + ) self._processMap["get_backend_by_id"] = Processor.process_get_backend_by_id - self._processMap["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 @@ -3574,14 +3997,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 @@ -3596,7 +4029,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() @@ -3617,13 +4052,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() @@ -3640,13 +4077,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() @@ -3663,13 +4102,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() @@ -3686,13 +4127,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() @@ -3709,13 +4152,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() @@ -3735,13 +4180,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() @@ -3764,13 +4211,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() @@ -3782,7 +4231,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 @@ -3793,14 +4244,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() @@ -3822,13 +4277,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() @@ -3845,13 +4302,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() @@ -3868,13 +4327,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() @@ -3891,13 +4352,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() @@ -3914,13 +4377,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() @@ -3932,7 +4397,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 @@ -3940,13 +4407,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() @@ -3966,13 +4435,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() @@ -3989,13 +4460,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() @@ -4015,13 +4488,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() @@ -4033,7 +4508,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 @@ -4047,13 +4528,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() @@ -4076,13 +4559,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() @@ -4105,13 +4590,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() @@ -4123,7 +4610,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 @@ -4134,13 +4623,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() @@ -4163,13 +4654,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() @@ -4181,7 +4674,21 @@ 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 @@ -4201,13 +4708,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() @@ -4224,13 +4733,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() @@ -4250,13 +4761,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() @@ -4268,7 +4781,19 @@ 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.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 @@ -4288,13 +4813,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() @@ -4311,13 +4838,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() @@ -4329,7 +4858,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 @@ -4337,13 +4874,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() @@ -4363,13 +4902,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() @@ -4386,13 +4927,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() @@ -4409,13 +4952,15 @@ def process_get_forc_url(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_forc_url", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4427,7 +4972,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 @@ -4438,13 +4985,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() @@ -4464,13 +5013,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() @@ -4490,13 +5041,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() @@ -4516,13 +5069,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() @@ -4545,13 +5100,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() @@ -4574,13 +5131,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() @@ -4603,13 +5162,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() @@ -4632,13 +5193,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() @@ -4658,13 +5221,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() @@ -4676,7 +5241,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 @@ -4684,13 +5251,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() @@ -4710,13 +5279,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() @@ -4728,7 +5299,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 @@ -4736,13 +5309,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() @@ -4759,13 +5334,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() @@ -4782,13 +5359,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() @@ -4805,13 +5384,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() @@ -4828,13 +5409,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() @@ -4854,13 +5437,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() @@ -4872,18 +5457,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() @@ -4895,18 +5490,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() @@ -4926,13 +5533,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() @@ -4952,13 +5561,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() @@ -4975,13 +5586,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() @@ -4998,13 +5611,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() @@ -5024,14 +5639,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() @@ -5050,13 +5669,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() @@ -5076,13 +5697,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() @@ -5105,13 +5728,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() @@ -5123,7 +5748,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 @@ -5134,13 +5765,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() @@ -5157,13 +5790,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() @@ -5175,18 +5810,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() @@ -5206,13 +5845,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() @@ -5232,13 +5873,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() @@ -5264,13 +5907,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() @@ -5293,13 +5938,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() @@ -5311,7 +5958,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 @@ -5322,13 +5971,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() @@ -5351,13 +6002,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() @@ -5369,7 +6022,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 @@ -5380,13 +6035,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() @@ -5398,7 +6055,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 @@ -5409,13 +6068,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() @@ -5427,7 +6088,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 @@ -5438,13 +6101,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() @@ -5456,7 +6121,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 @@ -5467,13 +6134,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() @@ -5493,13 +6162,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() @@ -5522,13 +6193,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() @@ -5551,13 +6224,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() @@ -5580,18 +6255,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 @@ -5602,12 +6280,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() @@ -5626,12 +6312,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() @@ -5641,19 +6330,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 ) @@ -5664,12 +6360,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() @@ -5688,12 +6392,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() @@ -5703,26 +6410,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() @@ -5736,10 +6454,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() @@ -5747,18 +6468,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): @@ -5768,12 +6489,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() @@ -5783,7 +6512,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: @@ -5792,13 +6525,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() @@ -5807,26 +6547,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() @@ -5840,10 +6591,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() @@ -5851,18 +6605,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): @@ -5872,12 +6626,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() @@ -5890,8 +6652,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: @@ -5902,16 +6672,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() @@ -5921,26 +6698,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() @@ -5954,10 +6742,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() @@ -5965,18 +6756,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): @@ -5986,12 +6777,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() @@ -6004,8 +6803,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: @@ -6016,16 +6823,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() @@ -6035,18 +6849,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 ) @@ -6058,13 +6879,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() @@ -6074,12 +6904,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: @@ -6088,17 +6926,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() @@ -6107,20 +6956,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 ) @@ -6131,12 +6993,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() @@ -6146,7 +7016,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: @@ -6155,13 +7029,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() @@ -6170,18 +7051,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 ) @@ -6192,12 +7080,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() @@ -6207,7 +7103,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: @@ -6216,13 +7116,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() @@ -6231,19 +7138,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 ) @@ -6255,13 +7169,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() @@ -6274,8 +7197,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: @@ -6291,20 +7222,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() @@ -6314,19 +7252,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 ) @@ -6337,12 +7288,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() @@ -6352,7 +7311,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: @@ -6361,13 +7324,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() @@ -6376,19 +7346,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 ) @@ -6400,13 +7377,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() @@ -6430,16 +7416,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() @@ -6449,20 +7438,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 ) @@ -6474,13 +7476,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() @@ -6490,12 +7501,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: @@ -6504,17 +7523,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() @@ -6523,20 +7553,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 ) @@ -6548,13 +7591,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() @@ -6578,16 +7630,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() @@ -6597,20 +7652,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 ) @@ -6622,13 +7690,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() @@ -6638,7 +7715,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: @@ -6646,8 +7727,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: @@ -6658,20 +7747,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() @@ -6681,20 +7781,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 ) @@ -6706,13 +7819,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() @@ -6736,16 +7858,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() @@ -6755,28 +7880,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() @@ -6790,10 +7932,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() @@ -6801,18 +7946,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): @@ -6822,12 +7967,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() @@ -6852,12 +8005,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) @@ -6870,26 +8026,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() @@ -6903,10 +8070,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() @@ -6914,18 +8084,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): @@ -6935,12 +8105,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() @@ -6965,12 +8143,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) @@ -6983,26 +8164,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() @@ -7016,10 +8208,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() @@ -7027,18 +8222,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): @@ -7048,12 +8243,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() @@ -7078,12 +8281,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) @@ -7096,26 +8302,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() @@ -7129,10 +8346,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() @@ -7140,18 +8360,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): @@ -7161,12 +8381,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() @@ -7191,12 +8419,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) @@ -7209,18 +8440,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 ) @@ -7232,13 +8470,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() @@ -7248,7 +8495,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: @@ -7262,16 +8513,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() @@ -7281,20 +8539,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 ) @@ -7306,13 +8577,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() @@ -7337,16 +8617,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() @@ -7356,19 +8639,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 ) @@ -7379,12 +8675,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() @@ -7394,7 +8698,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: @@ -7403,13 +8711,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() @@ -7418,19 +8733,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 ) @@ -7442,13 +8764,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() @@ -7473,16 +8804,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() @@ -7492,19 +8826,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 ) @@ -7515,12 +8862,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() @@ -7533,7 +8888,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: @@ -7544,15 +8903,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() @@ -7562,19 +8926,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 ) @@ -7585,12 +8956,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() @@ -7615,12 +8994,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) @@ -7633,18 +9015,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 ) @@ -7656,13 +9045,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() @@ -7672,7 +9070,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: @@ -7686,16 +9088,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() @@ -7705,20 +9114,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 ) @@ -7729,12 +9151,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() @@ -7753,12 +9183,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() @@ -7768,19 +9201,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 ) @@ -7795,8 +9235,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 @@ -7804,7 +9252,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() @@ -7824,17 +9276,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: @@ -7843,29 +9307,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() @@ -7874,23 +9353,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 ) @@ -7904,15 +9414,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() @@ -7922,7 +9443,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: @@ -7946,24 +9471,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() @@ -7973,21 +9505,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 ) @@ -7998,12 +9555,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() @@ -8013,7 +9578,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: @@ -8022,13 +9591,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() @@ -8037,19 +9613,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 ) @@ -8061,13 +9644,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() @@ -8091,16 +9683,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() @@ -8110,20 +9705,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 ) @@ -8134,12 +9742,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() @@ -8149,7 +9765,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: @@ -8158,13 +9778,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() @@ -8173,19 +9800,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 ) @@ -8197,13 +9831,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() @@ -8227,16 +9870,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() @@ -8246,20 +9892,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 ) @@ -8272,14 +9931,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() @@ -8289,17 +9958,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: @@ -8308,21 +9989,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() @@ -8331,21 +10027,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 ) @@ -8357,13 +10072,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() @@ -8387,16 +10111,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() @@ -8406,20 +10133,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 ) @@ -8430,12 +10170,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() @@ -8445,7 +10193,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: @@ -8454,13 +10206,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() @@ -8469,19 +10228,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 ) @@ -8493,13 +10259,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() @@ -8523,16 +10298,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() @@ -8542,20 +10320,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 ) @@ -8578,8 +10369,24 @@ 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_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 @@ -8595,7 +10402,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() @@ -8605,22 +10416,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: @@ -8628,8 +10455,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: @@ -8642,8 +10477,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) @@ -8658,8 +10501,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) @@ -8671,14 +10522,22 @@ 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: @@ -8686,24 +10545,40 @@ 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: @@ -8712,85 +10587,144 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() @@ -8799,32 +10733,111 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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 ) @@ -8840,8 +10853,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 @@ -8850,7 +10872,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() @@ -8860,7 +10886,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: @@ -8894,32 +10924,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() @@ -8929,33 +10966,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() @@ -8969,10 +11047,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() @@ -8980,18 +11061,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): @@ -9001,12 +11082,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() @@ -9025,12 +11114,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() @@ -9040,18 +11132,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 ) @@ -9063,13 +11162,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() @@ -9079,12 +11187,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: @@ -9093,17 +11209,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() @@ -9112,20 +11239,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 ) @@ -9136,12 +11276,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() @@ -9160,12 +11308,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() @@ -9175,19 +11326,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 ) @@ -9202,13 +11360,28 @@ class start_server_with_custom_key_args(object): - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids + - additional_keys - metadata_token - metadata_endpoint """ + 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, 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 @@ -9217,11 +11390,16 @@ 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.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() @@ -9231,17 +11409,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -9249,15 +11439,27 @@ 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: @@ -9268,8 +11470,16 @@ 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) @@ -9284,8 +11494,16 @@ 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) @@ -9297,19 +11515,45 @@ 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: iprot.skip(ftype) elif fid == 10: - 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.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) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 11: 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 == 12: + 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: @@ -9318,70 +11562,128 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter220, viter221 in self.metadata.items(): - oprot.writeString(kiter220.encode('utf-8') if sys.version_info[0] == 2 else kiter220) - oprot.writeString(viter221.encode('utf-8') if sys.version_info[0] == 2 else viter221) + 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.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 iter222 in self.volume_ids_path_new: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter222)) - for kiter223, viter224 in iter222.items(): - oprot.writeString(kiter223.encode('utf-8') if sys.version_info[0] == 2 else kiter223) - oprot.writeString(viter224.encode('utf-8') if sys.version_info[0] == 2 else viter224) + 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.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 iter225 in self.volume_ids_path_attach: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter225)) - for kiter226, viter227 in iter225.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 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.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 iter228 in self.additional_security_group_ids: - oprot.writeString(iter228.encode('utf-8') if sys.version_info[0] == 2 else iter228) + for iter234 in self.additional_security_group_ids: + 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.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.writeListEnd() oprot.writeFieldEnd() if self.metadata_token is not None: - oprot.writeFieldBegin('metadata_token', TType.STRING, 10) - 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, 11) - 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() @@ -9390,29 +11692,97 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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.STRING, 'metadata_token', 'UTF8', None, ), # 10 - (11, TType.STRING, 'metadata_endpoint', 'UTF8', None, ), # 11 + ( + 7, + TType.LIST, + "volume_ids_path_new", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 7 + ( + 8, + TType.LIST, + "volume_ids_path_attach", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 8 + ( + 9, + TType.LIST, + "additional_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 ) @@ -9428,8 +11798,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 @@ -9438,7 +11817,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() @@ -9448,7 +11831,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: @@ -9482,32 +11869,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() @@ -9517,23 +11911,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 ) @@ -9544,12 +11975,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() @@ -9559,7 +11998,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: @@ -9568,13 +12011,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() @@ -9583,19 +12031,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 ) @@ -9606,12 +12061,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() @@ -9630,12 +12093,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() @@ -9645,18 +12111,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 ) @@ -9673,8 +12146,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 @@ -9684,7 +12167,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() @@ -9694,37 +12181,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 = [] - (_etype232, _size229) = iprot.readListBegin() - for _i233 in range(_size229): - _elem234 = CondaPackage() - _elem234.read(iprot) - self.conda_packages.append(_elem234) + (_etype239, _size236) = iprot.readListBegin() + for _i240 in range(_size236): + _elem241 = CondaPackage() + _elem241.read(iprot) + self.conda_packages.append(_elem241) 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 = [] - (_etype238, _size235) = iprot.readListBegin() - for _i239 in range(_size235): - _elem240 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.apt_packages.append(_elem240) + (_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) iprot.readListEnd() else: iprot.skip(ftype) @@ -9735,7 +12238,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: @@ -9744,43 +12251,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 iter241 in self.conda_packages: - iter241.write(oprot) + 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 iter242 in self.apt_packages: - oprot.writeString(iter242.encode('utf-8') if sys.version_info[0] == 2 else iter242) + for iter249 in self.apt_packages: + 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() @@ -9789,25 +12317,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 ) @@ -9819,13 +12390,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() @@ -9849,16 +12429,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() @@ -9868,19 +12451,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 ) @@ -9891,12 +12487,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() @@ -9906,7 +12510,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: @@ -9915,13 +12523,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() @@ -9930,19 +12545,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 ) @@ -9954,13 +12576,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() @@ -9985,16 +12616,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() @@ -10004,27 +12638,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() @@ -10038,10 +12689,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() @@ -10049,18 +12703,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): @@ -10070,12 +12724,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() @@ -10094,12 +12756,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() @@ -10109,26 +12774,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_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() @@ -10142,10 +12818,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_url_args') + oprot.writeStructBegin("get_forc_url_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -10153,18 +12832,18 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_forc_url_args) -get_forc_url_args.thrift_spec = ( -) +get_forc_url_args.thrift_spec = () class get_forc_url_result(object): @@ -10174,12 +12853,20 @@ class get_forc_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() @@ -10189,7 +12876,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: @@ -10198,13 +12889,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_url_result') + oprot.writeStructBegin("get_forc_url_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10213,18 +12911,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_forc_url_result) get_forc_url_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -10238,15 +12943,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() @@ -10256,22 +12972,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: @@ -10280,25 +13012,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() @@ -10307,22 +13056,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 ) @@ -10335,14 +13109,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() @@ -10372,20 +13156,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() @@ -10395,28 +13182,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() @@ -10430,10 +13240,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() @@ -10441,18 +13254,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): @@ -10463,13 +13276,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() @@ -10480,11 +13302,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype246, _size243) = iprot.readListBegin() - for _i247 in range(_size243): - _elem248 = Backend() - _elem248.read(iprot) - self.success.append(_elem248) + (_etype253, _size250) = iprot.readListBegin() + for _i254 in range(_size250): + _elem255 = Backend() + _elem255.read(iprot) + self.success.append(_elem255) iprot.readListEnd() else: iprot.skip(ftype) @@ -10499,19 +13321,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 iter249 in self.success: - iter249.write(oprot) + 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() @@ -10521,19 +13346,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 ) @@ -10544,12 +13382,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() @@ -10559,7 +13405,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: @@ -10568,13 +13418,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() @@ -10583,19 +13438,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 ) @@ -10607,13 +13469,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() @@ -10624,11 +13495,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) + (_etype260, _size257) = iprot.readListBegin() + for _i261 in range(_size257): + _elem262 = Backend() + _elem262.read(iprot) + self.success.append(_elem262) iprot.readListEnd() else: iprot.skip(ftype) @@ -10643,19 +13514,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 iter256 in self.success: - iter256.write(oprot) + 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() @@ -10665,19 +13539,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 ) @@ -10688,12 +13575,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() @@ -10703,7 +13598,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: @@ -10712,13 +13611,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() @@ -10727,19 +13633,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 ) @@ -10751,13 +13664,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() @@ -10768,11 +13690,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) + (_etype267, _size264) = iprot.readListBegin() + for _i268 in range(_size264): + _elem269 = Backend() + _elem269.read(iprot) + self.success.append(_elem269) iprot.readListEnd() else: iprot.skip(ftype) @@ -10787,19 +13709,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 iter263 in self.success: - iter263.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() @@ -10809,19 +13734,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 ) @@ -10832,12 +13770,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() @@ -10856,12 +13802,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() @@ -10871,19 +13820,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 ) @@ -10896,14 +13852,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() @@ -10933,20 +13899,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() @@ -10956,20 +13925,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 ) @@ -10981,13 +13969,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() @@ -10997,7 +13994,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: @@ -11012,16 +14013,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() @@ -11031,21 +14037,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 ) @@ -11057,13 +14076,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() @@ -11087,16 +14115,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() @@ -11106,20 +14137,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 ) @@ -11130,12 +14174,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() @@ -11145,7 +14197,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: @@ -11154,13 +14210,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() @@ -11169,19 +14230,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 ) @@ -11193,13 +14261,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() @@ -11223,16 +14300,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() @@ -11242,28 +14322,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() @@ -11277,10 +14374,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() @@ -11288,18 +14388,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): @@ -11310,13 +14410,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() @@ -11340,16 +14449,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() @@ -11359,20 +14471,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 ) @@ -11383,12 +14508,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() @@ -11407,12 +14540,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() @@ -11422,19 +14558,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 ) @@ -11445,12 +14588,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() @@ -11469,12 +14620,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() @@ -11484,19 +14638,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 ) @@ -11508,13 +14669,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() @@ -11529,7 +14699,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: @@ -11538,17 +14712,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() @@ -11557,20 +14738,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 ) @@ -11582,13 +14776,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() @@ -11599,11 +14802,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype265, _vtype266, _size264) = iprot.readMapBegin() - for _i268 in range(_size264): - _key269 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val270 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key269] = _val270 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -11618,20 +14829,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 kiter271, viter272 in self.success.items(): - oprot.writeString(kiter271.encode('utf-8') if sys.version_info[0] == 2 else kiter271) - oprot.writeString(viter272.encode('utf-8') if sys.version_info[0] == 2 else viter272) + 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.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() @@ -11641,19 +14859,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 ) @@ -11664,12 +14895,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() @@ -11688,12 +14927,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() @@ -11703,19 +14945,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 ) @@ -11727,13 +14976,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() @@ -11744,10 +15002,14 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype276, _size273) = iprot.readListBegin() - for _i277 in range(_size273): - _elem278 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success.append(_elem278) + (_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) iprot.readListEnd() else: iprot.skip(ftype) @@ -11762,19 +15024,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 iter279 in self.success: - oprot.writeString(iter279.encode('utf-8') if sys.version_info[0] == 2 else iter279) + for iter286 in self.success: + 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() @@ -11784,19 +15051,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 ) @@ -11808,13 +15088,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() @@ -11829,7 +15118,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: @@ -11838,17 +15131,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() @@ -11857,20 +15157,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 ) @@ -11882,13 +15195,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() @@ -11899,11 +15221,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype281, _vtype282, _size280) = iprot.readMapBegin() - for _i284 in range(_size280): - _key285 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val286 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key285] = _val286 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -11918,20 +15248,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 kiter287, viter288 in self.success.items(): - oprot.writeString(kiter287.encode('utf-8') if sys.version_info[0] == 2 else kiter287) - oprot.writeString(viter288.encode('utf-8') if sys.version_info[0] == 2 else viter288) + 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.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() @@ -11941,27 +15278,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() @@ -11975,10 +15329,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() @@ -11986,18 +15343,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): @@ -12007,12 +15364,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() @@ -12023,11 +15388,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype292, _size289) = iprot.readListBegin() - for _i293 in range(_size289): - _elem294 = ResearchEnvironmentTemplate() - _elem294.read(iprot) - self.success.append(_elem294) + (_etype299, _size296) = iprot.readListBegin() + for _i300 in range(_size296): + _elem301 = ResearchEnvironmentTemplate() + _elem301.read(iprot) + self.success.append(_elem301) iprot.readListEnd() else: iprot.skip(ftype) @@ -12037,15 +15402,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 iter295 in self.success: - iter295.write(oprot) + for iter302 in self.success: + iter302.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12055,26 +15423,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() @@ -12088,10 +15467,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() @@ -12099,18 +15481,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): @@ -12120,12 +15502,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() @@ -12136,11 +15526,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype299, _size296) = iprot.readListBegin() - for _i300 in range(_size296): - _elem301 = VM() - _elem301.read(iprot) - self.success.append(_elem301) + (_etype306, _size303) = iprot.readListBegin() + for _i307 in range(_size303): + _elem308 = VM() + _elem308.read(iprot) + self.success.append(_elem308) iprot.readListEnd() else: iprot.skip(ftype) @@ -12150,15 +15540,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 iter302 in self.success: - iter302.write(oprot) + for iter309 in self.success: + iter309.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12168,18 +15561,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 ) @@ -12190,12 +15590,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() @@ -12206,10 +15614,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.server_ids = [] - (_etype306, _size303) = iprot.readListBegin() - for _i307 in range(_size303): - _elem308 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.server_ids.append(_elem308) + (_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) iprot.readListEnd() else: iprot.skip(ftype) @@ -12219,15 +15631,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 iter309 in self.server_ids: - oprot.writeString(iter309.encode('utf-8') if sys.version_info[0] == 2 else iter309) + for iter316 in self.server_ids: + oprot.writeString( + iter316.encode("utf-8") if sys.version_info[0] == 2 else iter316 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12237,19 +15654,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 ) @@ -12260,12 +15684,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() @@ -12276,11 +15708,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype313, _size310) = iprot.readListBegin() - for _i314 in range(_size310): - _elem315 = VM() - _elem315.read(iprot) - self.success.append(_elem315) + (_etype320, _size317) = iprot.readListBegin() + for _i321 in range(_size317): + _elem322 = VM() + _elem322.read(iprot) + self.success.append(_elem322) iprot.readListEnd() else: iprot.skip(ftype) @@ -12290,15 +15722,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 iter316 in self.success: - iter316.write(oprot) + for iter323 in self.success: + iter323.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12308,18 +15743,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 ) @@ -12330,12 +15772,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() @@ -12345,7 +15795,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: @@ -12354,13 +15808,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() @@ -12369,19 +15830,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 ) @@ -12392,12 +15860,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() @@ -12408,11 +15884,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) + (_etype327, _size324) = iprot.readListBegin() + for _i328 in range(_size324): + _elem329 = VM() + _elem329.read(iprot) + self.success.append(_elem329) iprot.readListEnd() else: iprot.skip(ftype) @@ -12422,15 +15898,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 iter323 in self.success: - iter323.write(oprot) + for iter330 in self.success: + iter330.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12440,18 +15919,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 ) @@ -12462,12 +15948,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() @@ -12477,7 +15971,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: @@ -12486,13 +15984,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() @@ -12501,19 +16004,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 ) @@ -12525,13 +16035,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() @@ -12541,7 +16060,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: @@ -12555,16 +16078,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() @@ -12574,19 +16104,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 ) @@ -12603,8 +16146,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 @@ -12614,7 +16167,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() @@ -12624,17 +16181,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: @@ -12645,10 +16214,14 @@ def read(self, iprot): elif fid == 5: if ftype == TType.LIST: self.names = [] - (_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.names.append(_elem329) + (_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) iprot.readListEnd() else: iprot.skip(ftype) @@ -12668,39 +16241,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 iter330 in self.names: - oprot.writeString(iter330.encode('utf-8') if sys.version_info[0] == 2 else iter330) + for iter337 in self.names: + 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() @@ -12710,25 +16300,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 ) @@ -12739,12 +16372,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() @@ -12755,16 +16396,24 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype332, _vtype333, _size331) = iprot.readMapBegin() - for _i335 in range(_size331): - _key336 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val337 = [] - (_etype341, _size338) = iprot.readListBegin() - for _i342 in range(_size338): - _elem343 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val337.append(_elem343) + (_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) iprot.readListEnd() - self.success[_key336] = _val337 + self.success[_key343] = _val344 iprot.readMapEnd() else: iprot.skip(ftype) @@ -12774,18 +16423,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 kiter344, viter345 in self.success.items(): - oprot.writeString(kiter344.encode('utf-8') if sys.version_info[0] == 2 else kiter344) - oprot.writeListBegin(TType.STRING, len(viter345)) - for iter346 in viter345: - oprot.writeString(iter346.encode('utf-8') if sys.version_info[0] == 2 else iter346) + 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 + ) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -12796,18 +16452,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 ) @@ -12826,8 +16489,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 @@ -12839,7 +16514,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() @@ -12849,37 +16528,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: @@ -12898,44 +16605,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() @@ -12945,27 +16681,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 ) @@ -12976,12 +16767,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() @@ -12991,7 +16790,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: @@ -13000,13 +16803,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() @@ -13015,18 +16825,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 ) @@ -13037,12 +16854,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() @@ -13052,7 +16877,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: @@ -13061,13 +16890,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() @@ -13076,19 +16912,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 ) @@ -13100,13 +16943,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() @@ -13131,16 +16983,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() @@ -13150,19 +17005,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 ) @@ -13173,12 +17041,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() @@ -13188,7 +17064,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: @@ -13197,13 +17077,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() @@ -13212,19 +17099,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 ) @@ -13236,13 +17130,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() @@ -13253,11 +17156,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype348, _vtype349, _size347) = iprot.readMapBegin() - for _i351 in range(_size347): - _key352 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val353 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key352] = _val353 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -13272,20 +17183,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 kiter354, viter355 in self.success.items(): - oprot.writeString(kiter354.encode('utf-8') if sys.version_info[0] == 2 else kiter354) - oprot.writeString(viter355.encode('utf-8') if sys.version_info[0] == 2 else viter355) + 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.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() @@ -13295,19 +17213,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 ) @@ -13318,12 +17249,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() @@ -13333,7 +17272,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: @@ -13342,13 +17285,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() @@ -13357,19 +17307,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 ) @@ -13380,12 +17337,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() @@ -13395,7 +17360,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: @@ -13404,13 +17373,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() @@ -13419,18 +17395,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 ) @@ -13441,12 +17424,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() @@ -13456,7 +17447,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: @@ -13465,13 +17460,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() @@ -13480,27 +17482,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() @@ -13514,10 +17527,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() @@ -13525,18 +17541,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): @@ -13546,12 +17562,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() @@ -13561,7 +17585,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: @@ -13570,13 +17598,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() @@ -13585,19 +17620,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 ) @@ -13608,12 +17650,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() @@ -13632,12 +17682,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() @@ -13647,19 +17700,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 ) @@ -13670,12 +17730,20 @@ class get_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() @@ -13685,7 +17753,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: @@ -13694,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_server_args') + oprot.writeStructBegin("get_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13709,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_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 ) @@ -13733,13 +17819,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() @@ -13764,16 +17859,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() @@ -13783,19 +17881,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 ) @@ -13806,12 +17917,20 @@ class get_server_by_unique_name_args(object): """ + thrift_spec = None - def __init__(self, unique_name=None,): + def __init__( + self, + unique_name=None, + ): self.unique_name = unique_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() @@ -13821,7 +17940,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) else: @@ -13830,13 +17953,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_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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13845,19 +17975,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_server_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 ) @@ -13869,13 +18006,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() @@ -13900,16 +18046,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() @@ -13919,19 +18068,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 ) @@ -13942,12 +18104,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() @@ -13957,7 +18127,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: @@ -13966,13 +18140,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() @@ -13981,19 +18162,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 ) @@ -14005,13 +18193,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() @@ -14035,16 +18232,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() @@ -14054,20 +18254,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 ) @@ -14082,8 +18295,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 @@ -14091,7 +18312,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() @@ -14101,32 +18326,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 = [] - (_etype359, _size356) = iprot.readListBegin() - for _i360 in range(_size356): - _elem361 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.base_tags.append(_elem361) + (_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) 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: @@ -14135,32 +18380,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 iter362 in self.base_tags: - oprot.writeString(iter362.encode('utf-8') if sys.version_info[0] == 2 else iter362) + for iter369 in self.base_tags: + 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() @@ -14169,23 +18433,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 ) @@ -14198,14 +18493,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() @@ -14215,7 +18520,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: @@ -14234,20 +18543,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() @@ -14257,28 +18573,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() @@ -14292,10 +18631,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() @@ -14303,18 +18645,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): @@ -14324,12 +18666,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() @@ -14340,11 +18690,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype364, _vtype365, _size363) = iprot.readMapBegin() - for _i367 in range(_size363): - _key368 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val369 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key368] = _val369 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -14354,16 +18712,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 kiter370, viter371 in self.success.items(): - oprot.writeString(kiter370.encode('utf-8') if sys.version_info[0] == 2 else kiter370) - oprot.writeString(viter371.encode('utf-8') if sys.version_info[0] == 2 else viter371) + 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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14373,18 +18738,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 ) @@ -14398,15 +18770,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() @@ -14417,10 +18800,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.public_keys = [] - (_etype375, _size372) = iprot.readListBegin() - for _i376 in range(_size372): - _elem377 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.public_keys.append(_elem377) + (_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) iprot.readListEnd() else: iprot.skip(ftype) @@ -14433,17 +18820,21 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.worker_instances = [] - (_etype381, _size378) = iprot.readListBegin() - for _i382 in range(_size378): - _elem383 = ClusterInstance() - _elem383.read(iprot) - self.worker_instances.append(_elem383) + (_etype388, _size385) = iprot.readListBegin() + for _i389 in range(_size385): + _elem390 = ClusterInstance() + _elem390.read(iprot) + self.worker_instances.append(_elem390) 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: @@ -14452,31 +18843,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 iter384 in self.public_keys: - oprot.writeString(iter384.encode('utf-8') if sys.version_info[0] == 2 else iter384) + for iter391 in self.public_keys: + 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 iter385 in self.worker_instances: - iter385.write(oprot) + 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() @@ -14485,22 +18883,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 ) @@ -14511,12 +18934,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() @@ -14527,11 +18958,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype387, _vtype388, _size386) = iprot.readMapBegin() - for _i390 in range(_size386): - _key391 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val392 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key391] = _val392 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -14541,16 +18980,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 kiter393, viter394 in self.success.items(): - oprot.writeString(kiter393.encode('utf-8') if sys.version_info[0] == 2 else kiter393) - oprot.writeString(viter394.encode('utf-8') if sys.version_info[0] == 2 else viter394) + 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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14560,18 +19006,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 ) @@ -14582,12 +19035,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() @@ -14597,7 +19058,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: @@ -14606,13 +19071,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() @@ -14621,19 +19093,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 ) @@ -14645,13 +19124,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() @@ -14662,11 +19150,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype396, _vtype397, _size395) = iprot.readMapBegin() - for _i399 in range(_size395): - _key400 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val401 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key400] = _val401 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -14681,20 +19177,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 kiter402, viter403 in self.success.items(): - oprot.writeString(kiter402.encode('utf-8') if sys.version_info[0] == 2 else kiter402) - oprot.writeString(viter403.encode('utf-8') if sys.version_info[0] == 2 else viter403) + 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.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() @@ -14704,19 +19207,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 ) @@ -14727,12 +19243,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() @@ -14742,7 +19266,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: @@ -14751,13 +19279,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() @@ -14766,19 +19301,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 ) @@ -14789,12 +19331,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() @@ -14813,12 +19363,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() @@ -14828,19 +19381,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 ) @@ -14852,13 +19412,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() @@ -14868,12 +19437,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: @@ -14882,17 +19459,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() @@ -14901,20 +19489,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 ) @@ -14927,14 +19528,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() @@ -14963,20 +19574,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() @@ -14986,21 +19600,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 ) @@ -15011,12 +19644,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() @@ -15026,7 +19667,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: @@ -15035,13 +19680,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() @@ -15050,19 +19702,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 ) @@ -15074,13 +19733,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() @@ -15104,16 +19772,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() @@ -15123,20 +19794,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 ) @@ -15148,13 +19832,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() @@ -15164,12 +19857,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: @@ -15178,17 +19879,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() @@ -15197,20 +19909,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 ) @@ -15223,14 +19948,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() @@ -15241,11 +19976,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype405, _vtype406, _size404) = iprot.readMapBegin() - for _i408 in range(_size404): - _key409 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val410 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key409] = _val410 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -15265,24 +20008,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 kiter411, viter412 in self.success.items(): - oprot.writeString(kiter411.encode('utf-8') if sys.version_info[0] == 2 else kiter411) - oprot.writeString(viter412.encode('utf-8') if sys.version_info[0] == 2 else viter412) + 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.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() @@ -15292,20 +20042,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 ) @@ -15316,12 +20085,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() @@ -15331,7 +20108,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: @@ -15340,13 +20121,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() @@ -15355,19 +20143,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 ) @@ -15379,13 +20174,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() @@ -15409,16 +20213,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() @@ -15428,20 +20235,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 ) @@ -15454,14 +20274,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() @@ -15471,7 +20301,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: @@ -15482,11 +20316,19 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.metadata = {} - (_ktype414, _vtype415, _size413) = iprot.readMapBegin() - for _i417 in range(_size413): - _key418 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val419 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key418] = _val419 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -15496,24 +20338,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 kiter420, viter421 in self.metadata.items(): - oprot.writeString(kiter420.encode('utf-8') if sys.version_info[0] == 2 else kiter420) - oprot.writeString(viter421.encode('utf-8') if sys.version_info[0] == 2 else viter421) + 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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15523,21 +20376,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 ) @@ -15550,14 +20422,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() @@ -15587,20 +20469,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() @@ -15610,20 +20495,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 ) @@ -15636,14 +20540,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() @@ -15653,23 +20567,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 = {} - (_ktype423, _vtype424, _size422) = iprot.readMapBegin() - for _i426 in range(_size422): - _key427 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val428 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key427] = _val428 + (_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 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: @@ -15678,25 +20608,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 kiter429, viter430 in self.metadata.items(): - oprot.writeString(kiter429.encode('utf-8') if sys.version_info[0] == 2 else kiter429) - oprot.writeString(viter430.encode('utf-8') if sys.version_info[0] == 2 else viter430) + 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.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() @@ -15705,21 +20650,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 ) @@ -15732,14 +20696,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() @@ -15769,20 +20743,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() @@ -15792,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(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 ) @@ -15818,14 +20814,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() @@ -15835,23 +20841,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 = {} - (_ktype432, _vtype433, _size431) = iprot.readMapBegin() - for _i435 in range(_size431): - _key436 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val437 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key436] = _val437 + (_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 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: @@ -15860,25 +20882,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 kiter438, viter439 in self.metadata.items(): - oprot.writeString(kiter438.encode('utf-8') if sys.version_info[0] == 2 else kiter438) - oprot.writeString(viter439.encode('utf-8') if sys.version_info[0] == 2 else viter439) + 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.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() @@ -15887,21 +20924,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 ) @@ -15914,14 +20970,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() @@ -15951,20 +21017,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() @@ -15974,20 +21043,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 ) @@ -16000,14 +21088,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() @@ -16017,17 +21115,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: @@ -16036,21 +21146,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() @@ -16059,21 +21182,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 ) @@ -16086,14 +21228,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() @@ -16103,7 +21255,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: @@ -16122,20 +21278,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() @@ -16145,20 +21308,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 ) @@ -16169,12 +21351,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() @@ -16184,7 +21374,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: @@ -16193,13 +21387,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() @@ -16208,19 +21409,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 ) @@ -16232,13 +21440,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() @@ -16263,16 +21480,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() @@ -16282,19 +21502,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 ) @@ -16305,12 +21538,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() @@ -16320,7 +21561,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: @@ -16329,13 +21574,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() @@ -16344,19 +21596,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 ) @@ -16368,13 +21627,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() @@ -16398,16 +21666,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() @@ -16417,20 +21688,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 ) @@ -16441,12 +21725,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() @@ -16456,7 +21748,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: @@ -16465,13 +21761,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() @@ -16480,19 +21783,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 ) @@ -16504,13 +21814,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() @@ -16534,16 +21853,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() @@ -16553,20 +21875,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 ) @@ -16577,12 +21912,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() @@ -16592,7 +21935,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: @@ -16601,13 +21948,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() @@ -16616,19 +21970,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 ) @@ -16640,13 +22001,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() @@ -16670,16 +22040,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() @@ -16689,20 +22062,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/config/config.yml b/simple_vm_client/config/config.yml index a72d81b..cf1b386 100644 --- a/simple_vm_client/config/config.yml +++ b/simple_vm_client/config/config.yml @@ -75,8 +75,8 @@ forc: activated: False # If Forc ist activated -- defaults to True forc_url: https://proxy-dev.bi.denbi.de:5000/ - # URL for FORC. - forc_access_url: https://proxy-dev.bi.denbi.de/ + # URL for FORC backend. + forc_backend_url: https://proxy-dev.bi.denbi.de/ # Access URL for FORC - optional - default is forc_url without port. github_playbooks_repo: https://github.com/deNBI/resenvs/archive/refs/heads/staging.zip # GitHub repository URL for FORC playbooks. diff --git a/simple_vm_client/config/config_local.yml b/simple_vm_client/config/config_local.yml index fa8950d..22505b3 100644 --- a/simple_vm_client/config/config_local.yml +++ b/simple_vm_client/config/config_local.yml @@ -78,7 +78,7 @@ forc: # URL for FORC. forc_access_url: https://proxy-dev.bi.denbi.de/ # Access URL for FORC - optional - default is forc_url without port. - github_playbooks_repo: https://github.com/deNBI/resenvs/archive/refs/heads/staging.zip + github_playbooks_repo: https://github.com/deNBI/resenvs/archive/refs/heads/feat/generic_playbook.zip # GitHub repository URL for FORC playbooks. metadata_server: activated: True diff --git a/simple_vm_client/constants.py b/simple_vm_client/constants.py index 04f3806..9960013 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/forc_connector/playbook/playbook.py b/simple_vm_client/forc_connector/playbook/playbook.py index d8ad862..53fbf05 100644 --- a/simple_vm_client/forc_connector/playbook/playbook.py +++ b/simple_vm_client/forc_connector/playbook/playbook.py @@ -111,11 +111,17 @@ def copy_playbooks_and_init(self, public_key: str) -> None: self.copy_and_init_apt_packages() self.copy_and_init_research_environment() self.copy_and_init_change_keys(public_key=public_key) + shutil.copytree( + f"{self.playbooks_dir}/generic", + self.directory.name, + dirs_exist_ok=True, + ) # write all vars_files and tasks in generic_playbook shutil.copy( self.playbooks_dir + "/" + self.playbook_exec_name, self.directory.name ) + with open( self.directory.name + "/" + self.playbook_exec_name, mode="r" ) as generic_playbook: diff --git a/simple_vm_client/forc_connector/template/plays/generic_playbook.yml b/simple_vm_client/forc_connector/template/plays/generic_playbook.yml index ed57084..79a3756 100644 --- a/simple_vm_client/forc_connector/template/plays/generic_playbook.yml +++ b/simple_vm_client/forc_connector/template/plays/generic_playbook.yml @@ -1,56 +1,11 @@ -- name: Setting up your virtual machine +- name: Generic PRE-TASK Playbook hosts: vm become: yes gather_facts: yes vars_files: pre_tasks: - - - name: Populate service facts - ansible.builtin.service_facts: - - - name: Wait till Apt_Mirror de.NBI Bielefeld Service is done - ansible.builtin.service_facts: - until: services['de.NBI_Bielefeld_environment.service'].state == 'stopped' - retries: 35 - delay: 10 - when: services['de.NBI_Bielefeld_environment.service'] is defined - - - name: PRE_TASK Disable unattended upgrades - lineinfile: - path: /etc/apt/apt.conf.d/10periodic - regexp: "^APT::Periodic::Unattended-Upgrade" - line: 'APT::Periodic::Unattended-Upgrade "0";' - create: yes - - name: PRE_TASK Stop apt-daily.* systemd services - service: - name: "{{ item }}" - state: stopped - with_items: - - unattended-upgrades - - apt-daily - - apt-daily.timer - - apt-daily-upgrade - - apt-daily-upgrade.timer - - - name: PRE_TASK Wait for automatic system updates 1 - shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; - - - name: PRE_TASK Wait for automatic system updates 2 - shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; - - - name: PRE_TASK Update apt cache - become: true - ansible.builtin.apt: - upgrade: true - update_cache: true - autoremove: true - autoclean: true - - - - name: Pip - ansible.builtin.apt: - name: python3-pip - state: latest + - name: Generic PRE Tasks + ansible.builtin.import_tasks: ./generic_pre_tasks.yml tasks: - name: Setting up your virtual machine @@ -58,17 +13,5 @@ always: post_tasks: - - name: POST_TASK enable unattended upgrades - lineinfile: - path: /etc/apt/apt.conf.d/10periodic - regexp: "^APT::Periodic::Unattended-Upgrade" - line: 'APT::Periodic::Unattended-Upgrade "1";' - create: yes - - name: POST_TASK Start apt-daily.* systemd services - service: - name: "{{ item }}" - state: started - with_items: - - unattended-upgrades - - apt-daily - - apt-daily.timer + - name: Generic POST Tasks + ansible.builtin.import_tasks: ./generic_post_tasks.yml diff --git a/simple_vm_client/forc_connector/template/template.py b/simple_vm_client/forc_connector/template/template.py index 8c6c3ea..6efb546 100644 --- a/simple_vm_client/forc_connector/template/template.py +++ b/simple_vm_client/forc_connector/template/template.py @@ -26,7 +26,7 @@ DIRECTION = "direction" PROTOCOL = "protocol" INFORMATION_FOR_DISPLAY = "information_for_display" -NO_TEMPLATE_NAMES = ["packer", "optional", ".github", "cluster", "conda"] +NO_TEMPLATE_NAMES = ["packer", "optional", ".github", "cluster", "conda", "generic"] NEEDS_FORC_SUPPORT = "needs_forc_support" MIN_RAM = "min_ram" MIN_CORES = "min_cores" @@ -95,7 +95,6 @@ def __init__(self, github_playbook_repo: str, forc_url: str, forc_api_key: str): self._loaded_resenv_metadata: dict[str, ResearchEnvironmentMetadata] = {} self._allowed_forc_templates: list[ResearchEnvironmentTemplate] = [] self.update_playbooks() - self.fix_rstudio_ansible_role_vars() @property def loaded_research_env_metadata(self) -> dict[str, ResearchEnvironmentMetadata]: @@ -160,26 +159,6 @@ def _process_template_metadata( template_metadata ) - def fix_rstudio_ansible_role_vars(self): - def create_vars_file(file_path, rstudio_server_download_url): - if not os.path.exists(file_path): - with open(file_path, "w") as f: - f.write("# vars file\n") - f.write("---\n") - f.write(f"{rstudio_server_download_url}\n") - logger.info(f"File created: {file_path}") - else: - logger.info(f"The file already exists. Skipping creation: {file_path}") - - focal_file_path = "/root/.ansible/roles/oefenweb.rstudio_server/vars/_focal.yml" - noble_file_path = "/root/.ansible/roles/oefenweb.rstudio_server/vars/_noble.yml" - - rstudio_server_download_url_focal = 'rstudio_server_download_url: "https://download2.rstudio.org/server/focal/{{ rstudio_server_machine_map[ansible_machine] }}/rstudio-server-{{ rstudio_server_version }}-{{ rstudio_server_machine_map[ansible_machine] }}.deb"' - rstudio_server_download_url_noble = 'rstudio_server_download_url: "https://download2.rstudio.org/server/jammy/{{ rstudio_server_machine_map[ansible_machine] }}/rstudio-server-{{ rstudio_server_version }}-{{ rstudio_server_machine_map[ansible_machine] }}.deb"' - - create_vars_file(focal_file_path, rstudio_server_download_url_focal) - create_vars_file(noble_file_path, rstudio_server_download_url_noble) - def update_playbooks(self) -> None: if not self.GITHUB_PLAYBOOKS_REPO: logger.warning( diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index 1045ca1..e5fdc58 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -1363,8 +1363,10 @@ def delete_server(self, openstack_id: str) -> None: logger.error(f"Delete Server {openstack_id} failed!") raise OpenStackConflictException(message=e.message) - - def rescue_server(self, openstack_id: str, admin_pass: str = None, image_ref: str = None) -> None: + + def rescue_server( + self, openstack_id: str, admin_pass: str = None, image_ref: str = None + ) -> None: logger.info(f"Rescue Server {openstack_id}") try: server: Server = self.get_server(openstack_id=openstack_id) @@ -1374,12 +1376,14 @@ def rescue_server(self, openstack_id: str, admin_pass: str = None, image_ref: st message=f"Instance {openstack_id} not found", name_or_id=openstack_id, ) - self.openstack_connection.compute.rescue_server(server.id, admin_pass, image_ref) + self.openstack_connection.compute.rescue_server( + server.id, admin_pass, image_ref + ) except ConflictException as e: logger.error(f"Rescue Server {openstack_id} failed!") - raise OpenStackConflictException(message=e.message) + raise OpenStackConflictException(message=e.message) def unrescue_server(self, openstack_id: str) -> None: logger.info(f"Unrescue Server {openstack_id}") @@ -1392,12 +1396,14 @@ def unrescue_server(self, openstack_id: str) -> None: name_or_id=openstack_id, ) - self.openstack_connection.compute.unrescue_server(server.id,) + self.openstack_connection.compute.unrescue_server( + server.id, + ) except ConflictException as e: logger.error(f"Unrescue Server {openstack_id} failed!") - raise OpenStackConflictException(message=e.message) + raise OpenStackConflictException(message=e.message) def _calculate_vm_ports(self, server: Server): fixed_ip = server.private_v4 @@ -1610,7 +1616,7 @@ 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: list[str] = None, # type: ignore + additional_keys: Union[list[str], None] = None, additional_security_group_ids=None, # type: ignore metadata_token: str = None, metadata_endpoint: str = None, diff --git a/simple_vm_client/ttypes.py b/simple_vm_client/ttypes.py index 2b1eaad..8205836 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): """ + 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 @@ -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): """ + 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 @@ -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): """ + 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 @@ -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,50 +1255,77 @@ 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() - else: - iprot.skip(ftype) + self.server_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): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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): """ + 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 @@ -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): """ + 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 @@ -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,6 +1700,7 @@ class Image(object): """ + thrift_spec = None def __init__( self, @@ -1247,7 +1735,11 @@ 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() @@ -1257,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: @@ -1272,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: @@ -1300,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: @@ -1312,12 +1832,20 @@ 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: @@ -1344,60 +1872,93 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): + self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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) @@ -1418,23 +1979,22 @@ def write(self, oprot): 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__ @@ -1463,8 +2023,23 @@ 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 @@ -1479,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() @@ -1504,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: @@ -1561,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__ @@ -1656,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() @@ -1673,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: @@ -1692,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() @@ -1713,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__ @@ -1741,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() @@ -1763,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: @@ -1777,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__ @@ -1824,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") @@ -1835,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 @@ -1849,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: @@ -1861,14 +2584,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('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.writeFieldEnd() + 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() @@ -1879,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__ @@ -1897,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") @@ -1908,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 @@ -1922,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: @@ -1934,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() @@ -1952,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__ @@ -1972,11 +2719,19 @@ 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") @@ -1985,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 @@ -2001,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: @@ -2025,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() @@ -2051,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__ @@ -2069,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") @@ -2080,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 @@ -2094,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: @@ -2106,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() @@ -2124,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__ @@ -2143,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") @@ -2155,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 @@ -2170,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: @@ -2188,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() @@ -2210,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__ @@ -2229,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") @@ -2241,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 @@ -2256,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: @@ -2274,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() @@ -2296,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__ @@ -2315,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") @@ -2327,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 @@ -2342,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: @@ -2360,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() @@ -2382,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__ @@ -2401,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") @@ -2413,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 @@ -2428,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: @@ -2446,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() @@ -2468,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__ @@ -2487,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") @@ -2499,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 @@ -2514,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: @@ -2532,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() @@ -2554,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__ @@ -2573,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") @@ -2585,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 @@ -2600,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: @@ -2618,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() @@ -2640,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__ @@ -2659,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") @@ -2671,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 @@ -2686,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: @@ -2704,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() @@ -2726,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__ @@ -2745,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") @@ -2757,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 @@ -2772,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: @@ -2790,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() @@ -2812,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__ @@ -2831,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") @@ -2843,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 @@ -2858,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: @@ -2876,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() @@ -2898,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__ @@ -2917,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") @@ -2929,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 @@ -2944,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: @@ -2962,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() @@ -2984,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__ @@ -3003,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") @@ -3015,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 @@ -3030,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: @@ -3048,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() @@ -3070,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__ @@ -3089,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") @@ -3101,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 @@ -3116,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: @@ -3134,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() @@ -3156,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__ @@ -3174,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") @@ -3185,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 @@ -3199,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: @@ -3211,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() @@ -3229,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__ @@ -3249,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") @@ -3260,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 @@ -3274,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: @@ -3286,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() @@ -3304,351 +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 -) -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 -) -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 -) -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 -) -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 -) -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 -) -all_structs.append(Image) -Image.thrift_spec = ( None, # 0 ( 1, TType.STRING, - "name", + "template_name", "UTF8", None, ), # 1 ( 2, - TType.I32, - "min_disk", - None, + TType.STRING, + "title", + "UTF8", None, ), # 2 ( 3, - TType.I32, - "min_ram", - None, + TType.STRING, + "description", + "UTF8", None, ), # 3 ( 4, TType.STRING, - "status", + "logo_url", "UTF8", None, ), # 4 ( 5, TType.STRING, - "created_at", + "info_url", "UTF8", None, ), # 5 ( 6, - TType.STRING, - "updated_at", - "UTF8", + TType.I32, + "port", + None, None, ), # 6 ( 7, - TType.STRING, - "openstack_id", - "UTF8", + TType.LIST, + "incompatible_versions", + (TType.STRING, "UTF8", False), None, ), # 7 ( 8, - TType.STRING, - "description", - "UTF8", + TType.BOOL, + "is_maintained", + None, None, ), # 8 ( 9, - TType.LIST, - "tags", - (TType.STRING, "UTF8", False), + TType.MAP, + "information_for_display", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), None, ), # 9 ( 10, - TType.BOOL, - "is_snapshot", - None, + TType.I32, + "min_ram", None, + 0, ), # 10 ( 11, - TType.STRING, - "os_version", - "UTF8", + TType.I32, + "min_cores", None, + 0, ), # 11 ( 12, TType.STRING, - "os_distro", + "securitygroup_name", "UTF8", None, ), # 12 +) +all_structs.append(CondaPackage) +CondaPackage.thrift_spec = ( + None, # 0 ( - 13, + 1, TType.STRING, - "title", + "build", "UTF8", None, - ), # 13 + ), # 1 ( - 14, + 2, TType.STRING, - "slurm_version", + "build_number", "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 -) -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 -) -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 -) -all_structs.append(MetadataServerNotAvailableException) -MetadataServerNotAvailableException.thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 -) -all_structs.append(MetadataServerNotAllowedException) -MetadataServerNotAllowedException.thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + ), # 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(ResourceNotFoundException) -ResourceNotFoundException.thrift_spec = ( +all_structs.append(ClusterInfo) +ClusterInfo.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 -) -all_structs.append(ResourceNotAvailableException) + ( + 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 +) +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 +) +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 +) +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 +) +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 +) +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 +) +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 +) +all_structs.append(MetadataServerNotAvailableException) +MetadataServerNotAvailableException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 +) +all_structs.append(MetadataServerNotAllowedException) +MetadataServerNotAllowedException.thrift_spec = ( + None, # 0 + ( + 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 +) +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