From d1b767ca25bce19537abab144c10e81aa2da0cea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 13:43:14 +0000 Subject: [PATCH 1/5] feat(Dependencies): Update dependency setuptools to v75.2.0 | datasource | package | from | to | | ---------- | ---------- | ------ | ------ | | pypi | setuptools | 75.1.0 | 75.2.0 | --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d806043..9d2da2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -setuptools==75.1.0 +setuptools==75.2.0 thrift==0.21.0 openstacksdk==4.0.0 deprecated==1.2.14 From 3c7d660b19e21d9e71e977778914a88f1875161b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:18:17 +0000 Subject: [PATCH 2/5] feat(Dependencies): Update docker.elastic.co/beats/filebeat Docker tag to v8.15.3 | datasource | package | from | to | | ---------- | -------------------------------- | ------ | ------ | | docker | docker.elastic.co/beats/filebeat | 8.15.2 | 8.15.3 | --- docker-compose.bibigrid.host.yml | 2 +- docker-compose.bibigrid.yml | 2 +- docker-compose.host.yml | 2 +- docker-compose.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.bibigrid.host.yml b/docker-compose.bibigrid.host.yml index b23c5f1..5b6cac6 100644 --- a/docker-compose.bibigrid.host.yml +++ b/docker-compose.bibigrid.host.yml @@ -43,7 +43,7 @@ services: simplevm_client_filebeat: container_name: simplevm_client_filebeat - image: docker.elastic.co/beats/filebeat:8.15.2 + image: docker.elastic.co/beats/filebeat:8.15.3 network_mode: host # Use the host network namespace env_file: diff --git a/docker-compose.bibigrid.yml b/docker-compose.bibigrid.yml index 3704989..b08e4db 100644 --- a/docker-compose.bibigrid.yml +++ b/docker-compose.bibigrid.yml @@ -44,7 +44,7 @@ services: # filebeat simplevm_filebeat: - image: docker.elastic.co/beats/filebeat:8.15.2 + image: docker.elastic.co/beats/filebeat:8.15.3 env_file: - .env volumes: diff --git a/docker-compose.host.yml b/docker-compose.host.yml index 170c694..cdc3367 100644 --- a/docker-compose.host.yml +++ b/docker-compose.host.yml @@ -30,7 +30,7 @@ services: simplevm_client_filebeat: container_name: simplevm_client_filebeat - image: docker.elastic.co/beats/filebeat:8.15.2 + image: docker.elastic.co/beats/filebeat:8.15.3 env_file: - .env volumes: diff --git a/docker-compose.yml b/docker-compose.yml index 6668c74..dc37b27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: # filebeat simplevm_client_filebeat: container_name: simplevm_client_filebeat - image: docker.elastic.co/beats/filebeat:8.15.2 + image: docker.elastic.co/beats/filebeat:8.15.3 env_file: - .env volumes: From 13cd41eb2e8f2c7f449bf46917aac2c9df2c26e6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:13:42 +0000 Subject: [PATCH 3/5] feat(Dependencies): Update dependency gevent to v24.10.3 | datasource | package | from | to | | ---------- | ------- | ------- | ------- | | pypi | gevent | 24.10.2 | 24.10.3 | --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9d2da2f..8e12a8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ pre-commit==4.0.1 types-PyYAML==6.0.12.20240917 sympy==1.13.3 colorama==0.4.6 -gevent==24.10.2 +gevent==24.10.3 pytest==8.3.3 types-redis==4.6.0.20241004 oslo.utils==7.3.0 From 2702ed107a40cdfbe6f84e2325a0d702cb77aee8 Mon Sep 17 00:00:00 2001 From: qqmok <qiqi.mok@uni-bielefeld.de> Date: Tue, 22 Oct 2024 22:24:42 +0200 Subject: [PATCH 4/5] feat(rescue): added rescue server methods --- portal_client.thrift | 9 + simple_vm_client/VirtualMachineHandler.py | 7 + simple_vm_client/VirtualMachineService-remote | 1004 +- simple_vm_client/VirtualMachineService.py | 10295 ++++------------ simple_vm_client/constants.py | 7 +- .../openstack_connector.py | 17 + simple_vm_client/ttypes.py | 3523 ++---- 7 files changed, 3803 insertions(+), 11059 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index e4772ba..56b2206 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -459,6 +459,15 @@ service VirtualMachineService { throws (1:ServerNotFoundException e, 2: OpenStackConflictException c) + void rescue_server( + + /** Id of the server. */ + 1:string openstack_id + 2:optional string admin_pass + 3:optional string image_ref) + + throws (1:ServerNotFoundException e, 2: OpenStackConflictException c) + string start_server( /** Name of the Flavor to use.*/ diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 4998a79..c874105 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -140,6 +140,13 @@ 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 reboot_hard_server(self, openstack_id: str) -> None: return self.openstack_connector.reboot_hard_server(openstack_id=openstack_id) diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index d71001f..a70076e 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -1,141 +1,110 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.22.0) +# Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import pprint import sys - +import pprint if sys.version_info[0] > 2: from urllib.parse import urlparse else: from urlparse import urlparse - +from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient from thrift.protocol.TBinaryProtocol import TBinaryProtocol -from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport -from VirtualMachineService import VirtualMachineService -if len(sys.argv) <= 1 or sys.argv[1] == "--help": - print("") - print( - "Usage: " - + sys.argv[0] - + " [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]" - ) - print("") - print("Functions:") - print(" bool is_version(double version)") - print(" string get_client_version()") - print(" get_gateway_ip()") - print(" get_calculation_values()") - print(" string import_keypair(string keyname, string public_key)") - print(" get_vm_ports(string openstack_id)") - print(" void add_udp_security_group(string server_id)") - print( - " void add_research_environment_security_group(string server_id, string security_group_name)" - ) - print(" void add_metadata_to_server(string openstack_id, metadata)") - print(" get_flavors()") - print(" get_images()") - print(" get_public_images()") - print(" get_private_images()") - print(" Image get_image(string openstack_id, bool ignore_not_active)") - print(" Volume get_volume(string volume_id)") - print(" get_volumes_by_ids( volume_ids)") - print(" void resize_volume(string volume_id, int size)") - print( - " string open_port_range_for_vm_in_project(int range_start, int range_stop, string openstack_id, string ethertype, string protocol)" - ) - print(" void delete_security_group_rule(string openstack_id)") - print(" void delete_server(string openstack_id)") - print( - " 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("") +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(' 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('') sys.exit(0) pp = pprint.PrettyPrinter(indent=2) -host = "localhost" +host = 'localhost' port = 9090 -uri = "" +uri = '' framed = False ssl = False validate = True @@ -145,16 +114,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]) @@ -162,49 +131,42 @@ if sys.argv[argi] == "-u": port = 80 uri = url[2] if url[4]: - uri += "?%s" % url[4] + uri += '?%s' % url[4] http = True argi += 2 -if sys.argv[argi] == "-f" or sys.argv[argi] == "-framed": +if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': framed = True argi += 1 -if sys.argv[argi] == "-s" or sys.argv[argi] == "-ssl": +if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': ssl = True argi += 1 -if sys.argv[argi] == "-novalidate": +if sys.argv[argi] == '-novalidate': validate = False argi += 1 -if sys.argv[argi] == "-ca_certs": - ca_certs = sys.argv[argi + 1] +if sys.argv[argi] == '-ca_certs': + ca_certs = sys.argv[argi+1] argi += 2 -if sys.argv[argi] == "-keyfile": - keyfile = sys.argv[argi + 1] +if sys.argv[argi] == '-keyfile': + keyfile = sys.argv[argi+1] argi += 2 -if sys.argv[argi] == "-certfile": - certfile = sys.argv[argi + 1] +if sys.argv[argi] == '-certfile': + certfile = sys.argv[argi+1] argi += 2 cmd = sys.argv[argi] -args = sys.argv[argi + 1 :] +args = sys.argv[argi + 1:] if http: transport = THttpClient.THttpClient(host, port, uri) else: if ssl: - socket = TSSLSocket.TSSLSocket( - host, - port, - validate=validate, - ca_certs=ca_certs, - keyfile=keyfile, - certfile=certfile, - ) + socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) else: socket = TSocket.TSocket(host, port) if framed: @@ -215,752 +177,452 @@ 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],)) + +elif cmd == 'rescue_server': + if len(args) != 3: + print('rescue_server requires 3 args') sys.exit(1) - pp.pprint( - client.delete_server( - args[0], - ) - ) + pp.pprint(client.rescue_server(args[0], args[1], args[2],)) -elif cmd == "start_server": +elif cmd == 'start_server': if len(args) != 13: - print("start_server requires 13 args") - sys.exit(1) - pp.pprint( - client.start_server( - args[0], - args[1], - args[2], - args[3], - eval(args[4]), - eval(args[5]), - eval(args[6]), - eval(args[7]), - args[8], - eval(args[9]), - args[10], - args[11], - args[12], - ) - ) - -elif cmd == "is_bibigrid_available": + print('start_server requires 13 args') + sys.exit(1) + pp.pprint(client.start_server(args[0], args[1], args[2], args[3], eval(args[4]), eval(args[5]), eval(args[6]), eval(args[7]), args[8], eval(args[9]), args[10], args[11], args[12],)) + +elif cmd == 'is_bibigrid_available': if len(args) != 0: - print("is_bibigrid_available requires 0 args") + print('is_bibigrid_available requires 0 args') sys.exit(1) pp.pprint(client.is_bibigrid_available()) -elif cmd == "detach_ip_from_server": +elif cmd == 'detach_ip_from_server': if len(args) != 2: - print("detach_ip_from_server requires 2 args") + print('detach_ip_from_server requires 2 args') sys.exit(1) - pp.pprint( - client.detach_ip_from_server( - args[0], - args[1], - ) - ) + pp.pprint(client.detach_ip_from_server(args[0], args[1],)) -elif cmd == "start_server_with_custom_key": +elif cmd == 'start_server_with_custom_key': if len(args) != 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('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': 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 1fd17a8..9cc78d9 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -1,20 +1,20 @@ # -# Autogenerated by Thrift Compiler (0.22.0) +# Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import logging -import sys - -from thrift.Thrift import TApplicationException, TMessageType, TProcessor, TType -from thrift.transport import TTransport +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec +import sys +import logging from .ttypes import * - +from thrift.Thrift import TProcessor +from thrift.transport import TTransport all_structs = [] @@ -23,13 +23,13 @@ class Iface(object): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ - def is_version(self, version): """ Parameters: - version """ + pass def get_client_version(self): """ @@ -37,12 +37,14 @@ def get_client_version(self): Returns Version of the client """ + pass def get_gateway_ip(self): """ Gets the gateway ip. """ + pass def get_calculation_values(self): pass @@ -57,6 +59,7 @@ def import_keypair(self, keyname, public_key): - public_key: The public key """ + pass def get_vm_ports(self, openstack_id): """ @@ -67,6 +70,7 @@ def get_vm_ports(self, openstack_id): - openstack_id: Id of server """ + pass def add_udp_security_group(self, server_id): """ @@ -76,6 +80,7 @@ def add_udp_security_group(self, server_id): - server_id: OpenStack id of the server """ + pass def add_research_environment_security_group(self, server_id, security_group_name): """ @@ -86,6 +91,7 @@ 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): """ @@ -96,6 +102,7 @@ def add_metadata_to_server(self, openstack_id, metadata): - metadata """ + pass def get_flavors(self): """ @@ -103,6 +110,7 @@ def get_flavors(self): Returns: List of flavor instances. """ + pass def get_images(self): """ @@ -110,6 +118,7 @@ def get_images(self): Returns: List of Image instances. """ + pass def get_public_images(self): """ @@ -117,6 +126,7 @@ def get_public_images(self): Returns: List of public Image instances. """ + pass def get_private_images(self): """ @@ -124,6 +134,7 @@ def get_private_images(self): Returns: List of private Image instances. """ + pass def get_image(self, openstack_id, ignore_not_active): """ @@ -135,6 +146,7 @@ def get_image(self, openstack_id, ignore_not_active): - ignore_not_active """ + pass def get_volume(self, volume_id): """ @@ -142,6 +154,7 @@ def get_volume(self, volume_id): - volume_id """ + pass def get_volumes_by_ids(self, volume_ids): """ @@ -149,6 +162,7 @@ def get_volumes_by_ids(self, volume_ids): - volume_ids """ + pass def resize_volume(self, volume_id, size): """ @@ -157,10 +171,9 @@ def resize_volume(self, volume_id, size): - size """ + pass - def open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): + def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): """ Creates/Updates a security group for a vm with a specific port range for a project @@ -172,6 +185,7 @@ def open_port_range_for_vm_in_project( - protocol """ + pass def delete_security_group_rule(self, openstack_id): """ @@ -179,6 +193,7 @@ def delete_security_group_rule(self, openstack_id): - openstack_id """ + pass def delete_server(self, openstack_id): """ @@ -189,23 +204,19 @@ def delete_server(self, openstack_id): - openstack_id: Id of the server. """ + pass + + def rescue_server(self, openstack_id, admin_pass, image_ref): + """ + Parameters: + - openstack_id: Id of the server. + - admin_pass + - image_ref + + """ + 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. @@ -223,6 +234,7 @@ def start_server( - metadata_endpoint """ + pass def is_bibigrid_available(self): pass @@ -234,20 +246,9 @@ def detach_ip_from_server(self, server_id, floating_ip): - floating_ip """ + pass - def start_server_with_custom_key( - self, - flavor_name, - image_name, - servername, - metadata, - research_environment, - volume_ids_path_new, - volume_ids_path_attach, - additional_security_group_ids, - 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, metadata_token, metadata_endpoint): """ Start a new server with custom key for ansible. @@ -264,6 +265,7 @@ def start_server_with_custom_key( - metadata_endpoint """ + pass def exist_server(self, name): """ @@ -273,17 +275,9 @@ def exist_server(self, name): - name """ + pass - def create_and_deploy_playbook( - self, - public_key, - openstack_id, - conda_packages, - research_environment_template, - apt_packages, - create_only_backend, - base_url, - ): + def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): """ Create and deploy an ansible playbook @@ -297,6 +291,7 @@ def create_and_deploy_playbook( - base_url """ + pass def get_playbook_logs(self, openstack_id): """ @@ -306,12 +301,14 @@ def get_playbook_logs(self, openstack_id): - openstack_id """ + pass def has_forc(self): """ Get boolean if client has backend url configured """ + pass def get_forc_url(self): pass @@ -327,12 +324,14 @@ def create_backend(self, owner, user_path, template, upstream_url): - upstream_url """ + pass def get_backends(self): """ Get all backends """ + pass def get_backends_by_owner(self, owner): """ @@ -342,6 +341,7 @@ def get_backends_by_owner(self, owner): - owner """ + pass def get_backends_by_template(self, template): """ @@ -351,6 +351,7 @@ def get_backends_by_template(self, template): - template """ + pass def get_backend_by_id(self, id): """ @@ -360,6 +361,7 @@ def get_backend_by_id(self, id): - id """ + pass def set_metadata_server_data(self, ip, metadata): """ @@ -368,6 +370,7 @@ def set_metadata_server_data(self, ip, metadata): - metadata """ + pass def remove_metadata_server_data(self, ip): """ @@ -375,6 +378,7 @@ def remove_metadata_server_data(self, ip): - ip """ + pass def is_metadata_server_available(self): pass @@ -387,6 +391,7 @@ def delete_backend(self, id): - id """ + pass def add_user_to_backend(self, backend_id, user_id): """ @@ -397,6 +402,7 @@ def add_user_to_backend(self, backend_id, user_id): - user_id """ + pass def get_users_from_backend(self, backend_id): """ @@ -406,6 +412,7 @@ def get_users_from_backend(self, backend_id): - backend_id """ + pass def delete_user_from_backend(self, backend_id, user_id): """ @@ -416,6 +423,7 @@ def delete_user_from_backend(self, backend_id, user_id): - user_id """ + pass def get_allowed_templates(self): pass @@ -426,6 +434,7 @@ def get_servers(self): Returns: List of server instances. """ + pass def get_servers_by_ids(self, server_ids): """ @@ -436,6 +445,7 @@ def get_servers_by_ids(self, server_ids): - server_ids """ + pass def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -446,6 +456,7 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): - bibigrid_id """ + pass def get_security_group_id_by_name(self, name): """ @@ -453,10 +464,9 @@ def get_security_group_id_by_name(self, name): - name """ + pass - def scale_up_cluster( - self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx - ): + def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): """ Parameters: - cluster_id @@ -468,19 +478,9 @@ def scale_up_cluster( - batch_idx """ + pass - def add_cluster_machine( - self, - cluster_id, - cluster_user, - cluster_group_id, - image_name, - flavor_name, - name, - key_name, - batch_idx, - worker_idx, - ): + def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): """ Parameters: - cluster_id @@ -494,6 +494,7 @@ def add_cluster_machine( - worker_idx """ + pass def get_cluster_info(self, cluster_id): """ @@ -501,6 +502,7 @@ def get_cluster_info(self, cluster_id): - cluster_id """ + pass def get_cluster_status(self, cluster_id): """ @@ -508,6 +510,7 @@ def get_cluster_status(self, cluster_id): - cluster_id """ + pass def get_keypair_public_key_by_name(self, key_name): """ @@ -515,6 +518,7 @@ def get_keypair_public_key_by_name(self, key_name): - key_name """ + pass def delete_keypair(self, key_name): """ @@ -522,6 +526,7 @@ def delete_keypair(self, key_name): - key_name """ + pass def add_default_security_groups_to_server(self, openstack_id): """ @@ -529,6 +534,7 @@ def add_default_security_groups_to_server(self, openstack_id): - openstack_id """ + pass def get_server(self, openstack_id): """ @@ -539,6 +545,7 @@ def get_server(self, openstack_id): - openstack_id: Id of the server. """ + pass def get_server_by_unique_name(self, unique_name): """ @@ -546,6 +553,7 @@ def get_server_by_unique_name(self, unique_name): - unique_name: Id of the server. """ + pass def stop_server(self, openstack_id): """ @@ -556,6 +564,7 @@ def stop_server(self, openstack_id): - openstack_id: Id of the server. """ + pass def create_snapshot(self, openstack_id, name, username, base_tags, description): """ @@ -571,6 +580,7 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): - description: Description of the new snapshot """ + pass def get_limits(self): """ @@ -580,6 +590,7 @@ def get_limits(self): 'totalInstancesUsed': totalInstancesUsed} """ + pass def start_cluster(self, public_keys, master_instance, worker_instances, user): """ @@ -590,6 +601,7 @@ def start_cluster(self, public_keys, master_instance, worker_instances, user): - user """ + pass def terminate_cluster(self, cluster_id): """ @@ -597,6 +609,7 @@ def terminate_cluster(self, cluster_id): - cluster_id """ + pass def delete_image(self, image_id): """ @@ -607,6 +620,7 @@ def delete_image(self, image_id): - image_id: Id of image """ + pass def detach_volume(self, volume_id, server_id): """ @@ -617,6 +631,7 @@ def detach_volume(self, volume_id, server_id): - server_id: Id of the server where the volume is attached """ + pass def delete_volume(self, volume_id): """ @@ -626,6 +641,7 @@ def delete_volume(self, volume_id): - volume_id """ + pass def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -637,6 +653,7 @@ def attach_volume_to_server(self, openstack_id, volume_id): - volume_id: Id of volume """ + pass def resume_server(self, openstack_id): """ @@ -646,6 +663,7 @@ def resume_server(self, openstack_id): - openstack_id: Id of the server """ + pass def create_volume(self, volume_name, volume_storage, metadata): """ @@ -657,6 +675,7 @@ def create_volume(self, volume_name, volume_storage, metadata): - metadata: Metadata for the new volume """ + pass def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -668,6 +687,7 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ + pass def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -679,6 +699,7 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - volume_snap_id: ID of volume snapshot """ + pass def create_volume_snapshot(self, volume_id, name, description): """ @@ -691,6 +712,7 @@ def create_volume_snapshot(self, volume_id, name, description): - description: Description for the volume snapshot """ + pass def get_volume_snapshot(self, name_or_id): """ @@ -701,6 +723,7 @@ def get_volume_snapshot(self, name_or_id): - name_or_id: Name or ID of volume snapshot """ + pass def delete_volume_snapshot(self, snapshot_id): """ @@ -710,6 +733,7 @@ def delete_volume_snapshot(self, snapshot_id): - snapshot_id """ + pass def reboot_hard_server(self, openstack_id): """ @@ -719,6 +743,7 @@ def reboot_hard_server(self, openstack_id): - openstack_id: Id of the server """ + pass def reboot_soft_server(self, openstack_id): """ @@ -728,6 +753,7 @@ def reboot_soft_server(self, openstack_id): - openstack_id: Id of the server """ + pass class Client(Iface): @@ -735,7 +761,6 @@ class Client(Iface): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ - def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: @@ -752,7 +777,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) @@ -772,9 +797,7 @@ def recv_is_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "is_version failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "is_version failed: unknown result") def get_client_version(self): """ @@ -786,9 +809,7 @@ def get_client_version(self): return self.recv_get_client_version() def send_get_client_version(self): - self._oprot.writeMessageBegin( - "get_client_version", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_client_version', TMessageType.CALL, self._seqid) args = get_client_version_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -807,10 +828,7 @@ def recv_get_client_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_client_version failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_client_version failed: unknown result") def get_gateway_ip(self): """ @@ -821,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() @@ -840,19 +858,14 @@ def recv_get_gateway_ip(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_gateway_ip failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_gateway_ip failed: unknown result") def get_calculation_values(self): self.send_get_calculation_values() return self.recv_get_calculation_values() def send_get_calculation_values(self): - self._oprot.writeMessageBegin( - "get_calculation_values", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_calculation_values', TMessageType.CALL, self._seqid) args = get_calculation_values_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -871,10 +884,7 @@ def recv_get_calculation_values(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_calculation_values failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_calculation_values failed: unknown result") def import_keypair(self, keyname, public_key): """ @@ -890,7 +900,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 @@ -911,10 +921,7 @@ def recv_import_keypair(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "import_keypair failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "import_keypair failed: unknown result") def get_vm_ports(self, openstack_id): """ @@ -929,7 +936,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) @@ -951,9 +958,7 @@ def recv_get_vm_ports(self): return result.success if result.s is not None: raise result.s - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result") def add_udp_security_group(self, server_id): """ @@ -967,9 +972,7 @@ def add_udp_security_group(self, server_id): self.recv_add_udp_security_group() def send_add_udp_security_group(self, server_id): - self._oprot.writeMessageBegin( - "add_udp_security_group", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_udp_security_group', TMessageType.CALL, self._seqid) args = add_udp_security_group_args() args.server_id = server_id args.write(self._oprot) @@ -1002,17 +1005,11 @@ def add_research_environment_security_group(self, server_id, security_group_name - security_group_name """ - self.send_add_research_environment_security_group( - server_id, security_group_name - ) + self.send_add_research_environment_security_group(server_id, security_group_name) self.recv_add_research_environment_security_group() - def send_add_research_environment_security_group( - self, server_id, security_group_name - ): - self._oprot.writeMessageBegin( - "add_research_environment_security_group", TMessageType.CALL, self._seqid - ) + def send_add_research_environment_security_group(self, server_id, security_group_name): + self._oprot.writeMessageBegin('add_research_environment_security_group', TMessageType.CALL, self._seqid) args = add_research_environment_security_group_args() args.server_id = server_id args.security_group_name = security_group_name @@ -1050,9 +1047,7 @@ def add_metadata_to_server(self, openstack_id, metadata): self.recv_add_metadata_to_server() def send_add_metadata_to_server(self, openstack_id, metadata): - self._oprot.writeMessageBegin( - "add_metadata_to_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_metadata_to_server', TMessageType.CALL, self._seqid) args = add_metadata_to_server_args() args.openstack_id = openstack_id args.metadata = metadata @@ -1087,7 +1082,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() @@ -1106,9 +1101,7 @@ def recv_get_flavors(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result") def get_images(self): """ @@ -1120,7 +1113,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() @@ -1139,9 +1132,7 @@ def recv_get_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_images failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_images failed: unknown result") def get_public_images(self): """ @@ -1153,9 +1144,7 @@ def get_public_images(self): return self.recv_get_public_images() def send_get_public_images(self): - self._oprot.writeMessageBegin( - "get_public_images", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_public_images', TMessageType.CALL, self._seqid) args = get_public_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1174,10 +1163,7 @@ def recv_get_public_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_public_images failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_public_images failed: unknown result") def get_private_images(self): """ @@ -1189,9 +1175,7 @@ def get_private_images(self): return self.recv_get_private_images() def send_get_private_images(self): - self._oprot.writeMessageBegin( - "get_private_images", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_private_images', TMessageType.CALL, self._seqid) args = get_private_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1210,10 +1194,7 @@ def recv_get_private_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_private_images failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_private_images failed: unknown result") def get_image(self, openstack_id, ignore_not_active): """ @@ -1229,7 +1210,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 @@ -1252,9 +1233,7 @@ def recv_get_image(self): return result.success if result.i is not None: raise result.i - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_image failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_image failed: unknown result") def get_volume(self, volume_id): """ @@ -1266,7 +1245,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) @@ -1288,9 +1267,7 @@ def recv_get_volume(self): return result.success if result.v is not None: raise result.v - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_volume failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume failed: unknown result") def get_volumes_by_ids(self, volume_ids): """ @@ -1302,9 +1279,7 @@ def get_volumes_by_ids(self, volume_ids): return self.recv_get_volumes_by_ids() def send_get_volumes_by_ids(self, volume_ids): - self._oprot.writeMessageBegin( - "get_volumes_by_ids", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_volumes_by_ids', TMessageType.CALL, self._seqid) args = get_volumes_by_ids_args() args.volume_ids = volume_ids args.write(self._oprot) @@ -1324,10 +1299,7 @@ def recv_get_volumes_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_volumes_by_ids failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volumes_by_ids failed: unknown result") def resize_volume(self, volume_id, size): """ @@ -1340,7 +1312,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 @@ -1363,9 +1335,7 @@ def recv_resize_volume(self): raise result.v return - def open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): + def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): """ Creates/Updates a security group for a vm with a specific port range for a project @@ -1377,17 +1347,11 @@ def open_port_range_for_vm_in_project( - protocol """ - self.send_open_port_range_for_vm_in_project( - range_start, range_stop, openstack_id, ethertype, protocol - ) + self.send_open_port_range_for_vm_in_project(range_start, range_stop, openstack_id, ethertype, protocol) return self.recv_open_port_range_for_vm_in_project() - def send_open_port_range_for_vm_in_project( - self, range_start, range_stop, openstack_id, ethertype, protocol - ): - self._oprot.writeMessageBegin( - "open_port_range_for_vm_in_project", TMessageType.CALL, self._seqid - ) + def send_open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): + self._oprot.writeMessageBegin('open_port_range_for_vm_in_project', TMessageType.CALL, self._seqid) args = open_port_range_for_vm_in_project_args() args.range_start = range_start args.range_stop = range_stop @@ -1417,10 +1381,7 @@ def recv_open_port_range_for_vm_in_project(self): raise result.v if result.o is not None: raise result.o - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "open_port_range_for_vm_in_project failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "open_port_range_for_vm_in_project failed: unknown result") def delete_security_group_rule(self, openstack_id): """ @@ -1432,9 +1393,7 @@ def delete_security_group_rule(self, openstack_id): self.recv_delete_security_group_rule() def send_delete_security_group_rule(self, openstack_id): - self._oprot.writeMessageBegin( - "delete_security_group_rule", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_security_group_rule', TMessageType.CALL, self._seqid) args = delete_security_group_rule_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1471,7 +1430,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) @@ -1495,22 +1454,45 @@ def recv_delete_server(self): raise result.c return - def start_server( - self, - flavor_name, - image_name, - public_key, - servername, - metadata, - volume_ids_path_new, - volume_ids_path_attach, - additional_keys, - research_environment, - additional_security_group_ids, - slurm_version, - metadata_token, - metadata_endpoint, - ): + def rescue_server(self, openstack_id, admin_pass, image_ref): + """ + Parameters: + - openstack_id: Id of the server. + - admin_pass + - image_ref + + """ + self.send_rescue_server(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) + args = rescue_server_args() + args.openstack_id = openstack_id + args.admin_pass = admin_pass + args.image_ref = image_ref + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_rescue_server(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = rescue_server_result() + result.read(iprot) + iprot.readMessageEnd() + if result.e is not None: + raise result.e + if result.c is not None: + 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): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -1528,40 +1510,11 @@ def start_server( - metadata_endpoint """ - self.send_start_server( - flavor_name, - image_name, - public_key, - servername, - metadata, - volume_ids_path_new, - volume_ids_path_attach, - additional_keys, - research_environment, - additional_security_group_ids, - slurm_version, - metadata_token, - metadata_endpoint, - ) + self.send_start_server(flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys, research_environment, additional_security_group_ids, slurm_version, metadata_token, metadata_endpoint) return self.recv_start_server() - def send_start_server( - self, - flavor_name, - image_name, - public_key, - servername, - metadata, - volume_ids_path_new, - volume_ids_path_attach, - additional_keys, - research_environment, - additional_security_group_ids, - slurm_version, - metadata_token, - metadata_endpoint, - ): - self._oprot.writeMessageBegin("start_server", TMessageType.CALL, self._seqid) + def send_start_server(self, flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys, research_environment, additional_security_group_ids, slurm_version, metadata_token, metadata_endpoint): + self._oprot.writeMessageBegin('start_server', TMessageType.CALL, self._seqid) args = start_server_args() args.flavor_name = flavor_name args.image_name = image_name @@ -1603,18 +1556,14 @@ def recv_start_server(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException( - TApplicationException.MISSING_RESULT, "start_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server failed: unknown result") def is_bibigrid_available(self): self.send_is_bibigrid_available() return self.recv_is_bibigrid_available() def send_is_bibigrid_available(self): - self._oprot.writeMessageBegin( - "is_bibigrid_available", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('is_bibigrid_available', TMessageType.CALL, self._seqid) args = is_bibigrid_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1633,10 +1582,7 @@ def recv_is_bibigrid_available(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "is_bibigrid_available failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "is_bibigrid_available failed: unknown result") def detach_ip_from_server(self, server_id, floating_ip): """ @@ -1649,9 +1595,7 @@ def detach_ip_from_server(self, server_id, floating_ip): self.recv_detach_ip_from_server() def send_detach_ip_from_server(self, server_id, floating_ip): - self._oprot.writeMessageBegin( - "detach_ip_from_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('detach_ip_from_server', TMessageType.CALL, self._seqid) args = detach_ip_from_server_args() args.server_id = server_id args.floating_ip = floating_ip @@ -1674,19 +1618,7 @@ def recv_detach_ip_from_server(self): raise result.s return - def start_server_with_custom_key( - self, - flavor_name, - image_name, - servername, - metadata, - research_environment, - volume_ids_path_new, - volume_ids_path_attach, - additional_security_group_ids, - 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, metadata_token, metadata_endpoint): """ Start a new server with custom key for ansible. @@ -1703,36 +1635,11 @@ def start_server_with_custom_key( - metadata_endpoint """ - self.send_start_server_with_custom_key( - flavor_name, - image_name, - servername, - metadata, - research_environment, - volume_ids_path_new, - volume_ids_path_attach, - additional_security_group_ids, - 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) 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, 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 @@ -1771,10 +1678,7 @@ def recv_start_server_with_custom_key(self): raise result.f if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "start_server_with_custom_key failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_with_custom_key failed: unknown result") def exist_server(self, name): """ @@ -1788,7 +1692,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) @@ -1808,20 +1712,9 @@ def recv_exist_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "exist_server failed: unknown result" - ) - - def create_and_deploy_playbook( - self, - public_key, - openstack_id, - conda_packages, - research_environment_template, - apt_packages, - create_only_backend, - base_url, - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "exist_server failed: unknown result") + + def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): """ Create and deploy an ansible playbook @@ -1835,30 +1728,11 @@ def create_and_deploy_playbook( - base_url """ - self.send_create_and_deploy_playbook( - public_key, - openstack_id, - conda_packages, - research_environment_template, - apt_packages, - create_only_backend, - base_url, - ) + self.send_create_and_deploy_playbook(public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url) return self.recv_create_and_deploy_playbook() - def send_create_and_deploy_playbook( - self, - public_key, - openstack_id, - conda_packages, - research_environment_template, - apt_packages, - create_only_backend, - base_url, - ): - self._oprot.writeMessageBegin( - "create_and_deploy_playbook", TMessageType.CALL, self._seqid - ) + def send_create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): + self._oprot.writeMessageBegin('create_and_deploy_playbook', TMessageType.CALL, self._seqid) args = create_and_deploy_playbook_args() args.public_key = public_key args.openstack_id = openstack_id @@ -1886,10 +1760,7 @@ def recv_create_and_deploy_playbook(self): return result.success if result.s is not None: raise result.s - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_and_deploy_playbook failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_and_deploy_playbook failed: unknown result") def get_playbook_logs(self, openstack_id): """ @@ -1903,9 +1774,7 @@ def get_playbook_logs(self, openstack_id): return self.recv_get_playbook_logs() def send_get_playbook_logs(self, openstack_id): - self._oprot.writeMessageBegin( - "get_playbook_logs", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_playbook_logs', TMessageType.CALL, self._seqid) args = get_playbook_logs_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1927,10 +1796,7 @@ def recv_get_playbook_logs(self): return result.success if result.p is not None: raise result.p - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_playbook_logs failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_playbook_logs failed: unknown result") def has_forc(self): """ @@ -1941,7 +1807,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() @@ -1960,16 +1826,14 @@ def recv_has_forc(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "has_forc failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "has_forc failed: unknown result") def get_forc_url(self): self.send_get_forc_url() return self.recv_get_forc_url() def send_get_forc_url(self): - self._oprot.writeMessageBegin("get_forc_url", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_forc_url', TMessageType.CALL, self._seqid) args = get_forc_url_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1988,9 +1852,7 @@ def recv_get_forc_url(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result") def create_backend(self, owner, user_path, template, upstream_url): """ @@ -2007,7 +1869,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 @@ -2034,10 +1896,7 @@ def recv_create_backend(self): raise result.e if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_backend failed: unknown result") def get_backends(self): """ @@ -2048,7 +1907,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() @@ -2069,9 +1928,7 @@ def recv_get_backends(self): return result.success if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_backends failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends failed: unknown result") def get_backends_by_owner(self, owner): """ @@ -2085,9 +1942,7 @@ def get_backends_by_owner(self, owner): return self.recv_get_backends_by_owner() def send_get_backends_by_owner(self, owner): - self._oprot.writeMessageBegin( - "get_backends_by_owner", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_backends_by_owner', TMessageType.CALL, self._seqid) args = get_backends_by_owner_args() args.owner = owner args.write(self._oprot) @@ -2109,10 +1964,7 @@ def recv_get_backends_by_owner(self): return result.success if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_backends_by_owner failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_owner failed: unknown result") def get_backends_by_template(self, template): """ @@ -2126,9 +1978,7 @@ def get_backends_by_template(self, template): return self.recv_get_backends_by_template() def send_get_backends_by_template(self, template): - self._oprot.writeMessageBegin( - "get_backends_by_template", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_backends_by_template', TMessageType.CALL, self._seqid) args = get_backends_by_template_args() args.template = template args.write(self._oprot) @@ -2150,10 +2000,7 @@ def recv_get_backends_by_template(self): return result.success if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_backends_by_template failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_template failed: unknown result") def get_backend_by_id(self, id): """ @@ -2167,9 +2014,7 @@ def get_backend_by_id(self, id): return self.recv_get_backend_by_id() def send_get_backend_by_id(self, id): - self._oprot.writeMessageBegin( - "get_backend_by_id", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_backend_by_id', TMessageType.CALL, self._seqid) args = get_backend_by_id_args() args.id = id args.write(self._oprot) @@ -2193,10 +2038,7 @@ def recv_get_backend_by_id(self): raise result.b if result.d is not None: raise result.d - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_backend_by_id failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backend_by_id failed: unknown result") def set_metadata_server_data(self, ip, metadata): """ @@ -2209,9 +2051,7 @@ def set_metadata_server_data(self, ip, metadata): self.recv_set_metadata_server_data() def send_set_metadata_server_data(self, ip, metadata): - self._oprot.writeMessageBegin( - "set_metadata_server_data", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('set_metadata_server_data', TMessageType.CALL, self._seqid) args = set_metadata_server_data_args() args.ip = ip args.metadata = metadata @@ -2246,9 +2086,7 @@ def remove_metadata_server_data(self, ip): self.recv_remove_metadata_server_data() def send_remove_metadata_server_data(self, ip): - self._oprot.writeMessageBegin( - "remove_metadata_server_data", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('remove_metadata_server_data', TMessageType.CALL, self._seqid) args = remove_metadata_server_data_args() args.ip = ip args.write(self._oprot) @@ -2277,9 +2115,7 @@ def is_metadata_server_available(self): self.recv_is_metadata_server_available() def send_is_metadata_server_available(self): - self._oprot.writeMessageBegin( - "is_metadata_server_available", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('is_metadata_server_available', TMessageType.CALL, self._seqid) args = is_metadata_server_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2314,7 +2150,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) @@ -2349,9 +2185,7 @@ def add_user_to_backend(self, backend_id, user_id): return self.recv_add_user_to_backend() def send_add_user_to_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin( - "add_user_to_backend", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_user_to_backend', TMessageType.CALL, self._seqid) args = add_user_to_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -2374,10 +2208,7 @@ def recv_add_user_to_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "add_user_to_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_user_to_backend failed: unknown result") def get_users_from_backend(self, backend_id): """ @@ -2391,9 +2222,7 @@ def get_users_from_backend(self, backend_id): return self.recv_get_users_from_backend() def send_get_users_from_backend(self, backend_id): - self._oprot.writeMessageBegin( - "get_users_from_backend", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_users_from_backend', TMessageType.CALL, self._seqid) args = get_users_from_backend_args() args.backend_id = backend_id args.write(self._oprot) @@ -2415,10 +2244,7 @@ def recv_get_users_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_users_from_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_users_from_backend failed: unknown result") def delete_user_from_backend(self, backend_id, user_id): """ @@ -2433,9 +2259,7 @@ def delete_user_from_backend(self, backend_id, user_id): return self.recv_delete_user_from_backend() def send_delete_user_from_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin( - "delete_user_from_backend", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_user_from_backend', TMessageType.CALL, self._seqid) args = delete_user_from_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -2458,19 +2282,14 @@ def recv_delete_user_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "delete_user_from_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_user_from_backend failed: unknown result") def get_allowed_templates(self): self.send_get_allowed_templates() return self.recv_get_allowed_templates() def send_get_allowed_templates(self): - self._oprot.writeMessageBegin( - "get_allowed_templates", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_allowed_templates', TMessageType.CALL, self._seqid) args = get_allowed_templates_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2489,10 +2308,7 @@ def recv_get_allowed_templates(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_allowed_templates failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_allowed_templates failed: unknown result") def get_servers(self): """ @@ -2504,7 +2320,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() @@ -2523,9 +2339,7 @@ def recv_get_servers(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_servers failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers failed: unknown result") def get_servers_by_ids(self, server_ids): """ @@ -2540,9 +2354,7 @@ def get_servers_by_ids(self, server_ids): return self.recv_get_servers_by_ids() def send_get_servers_by_ids(self, server_ids): - self._oprot.writeMessageBegin( - "get_servers_by_ids", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_servers_by_ids', TMessageType.CALL, self._seqid) args = get_servers_by_ids_args() args.server_ids = server_ids args.write(self._oprot) @@ -2562,10 +2374,7 @@ def recv_get_servers_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_servers_by_ids failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_ids failed: unknown result") def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -2580,9 +2389,7 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): return self.recv_get_servers_by_bibigrid_id() def send_get_servers_by_bibigrid_id(self, bibigrid_id): - self._oprot.writeMessageBegin( - "get_servers_by_bibigrid_id", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_servers_by_bibigrid_id', TMessageType.CALL, self._seqid) args = get_servers_by_bibigrid_id_args() args.bibigrid_id = bibigrid_id args.write(self._oprot) @@ -2602,10 +2409,7 @@ def recv_get_servers_by_bibigrid_id(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_servers_by_bibigrid_id failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_bibigrid_id failed: unknown result") def get_security_group_id_by_name(self, name): """ @@ -2617,9 +2421,7 @@ def get_security_group_id_by_name(self, name): return self.recv_get_security_group_id_by_name() def send_get_security_group_id_by_name(self, name): - self._oprot.writeMessageBegin( - "get_security_group_id_by_name", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_security_group_id_by_name', TMessageType.CALL, self._seqid) args = get_security_group_id_by_name_args() args.name = name args.write(self._oprot) @@ -2641,14 +2443,9 @@ def recv_get_security_group_id_by_name(self): return result.success if result.s is not None: raise result.s - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_security_group_id_by_name failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_security_group_id_by_name failed: unknown result") - def scale_up_cluster( - self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx - ): + def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): """ Parameters: - cluster_id @@ -2660,17 +2457,11 @@ def scale_up_cluster( - batch_idx """ - self.send_scale_up_cluster( - cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx - ) + self.send_scale_up_cluster(cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx) return self.recv_scale_up_cluster() - def send_scale_up_cluster( - self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx - ): - self._oprot.writeMessageBegin( - "scale_up_cluster", TMessageType.CALL, self._seqid - ) + def send_scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): + self._oprot.writeMessageBegin('scale_up_cluster', TMessageType.CALL, self._seqid) args = scale_up_cluster_args() args.cluster_id = cluster_id args.image_name = image_name @@ -2696,23 +2487,9 @@ def recv_scale_up_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "scale_up_cluster failed: unknown result", - ) - - def add_cluster_machine( - self, - cluster_id, - cluster_user, - cluster_group_id, - image_name, - flavor_name, - name, - key_name, - batch_idx, - worker_idx, - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "scale_up_cluster failed: unknown result") + + def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): """ Parameters: - cluster_id @@ -2726,34 +2503,11 @@ def add_cluster_machine( - worker_idx """ - self.send_add_cluster_machine( - cluster_id, - cluster_user, - cluster_group_id, - image_name, - flavor_name, - name, - key_name, - batch_idx, - worker_idx, - ) + self.send_add_cluster_machine(cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx) return self.recv_add_cluster_machine() - def send_add_cluster_machine( - self, - cluster_id, - cluster_user, - cluster_group_id, - image_name, - flavor_name, - name, - key_name, - batch_idx, - worker_idx, - ): - self._oprot.writeMessageBegin( - "add_cluster_machine", TMessageType.CALL, self._seqid - ) + def send_add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): + self._oprot.writeMessageBegin('add_cluster_machine', TMessageType.CALL, self._seqid) args = add_cluster_machine_args() args.cluster_id = cluster_id args.cluster_user = cluster_user @@ -2781,10 +2535,7 @@ def recv_add_cluster_machine(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "add_cluster_machine failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_cluster_machine failed: unknown result") def get_cluster_info(self, cluster_id): """ @@ -2796,9 +2547,7 @@ def get_cluster_info(self, cluster_id): return self.recv_get_cluster_info() def send_get_cluster_info(self, cluster_id): - self._oprot.writeMessageBegin( - "get_cluster_info", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_cluster_info', TMessageType.CALL, self._seqid) args = get_cluster_info_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2820,10 +2569,7 @@ def recv_get_cluster_info(self): return result.success if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_cluster_info failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_info failed: unknown result") def get_cluster_status(self, cluster_id): """ @@ -2835,9 +2581,7 @@ def get_cluster_status(self, cluster_id): return self.recv_get_cluster_status() def send_get_cluster_status(self, cluster_id): - self._oprot.writeMessageBegin( - "get_cluster_status", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_cluster_status', TMessageType.CALL, self._seqid) args = get_cluster_status_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2859,10 +2603,7 @@ def recv_get_cluster_status(self): return result.success if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_cluster_status failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_status failed: unknown result") def get_keypair_public_key_by_name(self, key_name): """ @@ -2874,9 +2615,7 @@ def get_keypair_public_key_by_name(self, key_name): return self.recv_get_keypair_public_key_by_name() def send_get_keypair_public_key_by_name(self, key_name): - self._oprot.writeMessageBegin( - "get_keypair_public_key_by_name", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_keypair_public_key_by_name', TMessageType.CALL, self._seqid) args = get_keypair_public_key_by_name_args() args.key_name = key_name args.write(self._oprot) @@ -2896,10 +2635,7 @@ def recv_get_keypair_public_key_by_name(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_keypair_public_key_by_name failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_keypair_public_key_by_name failed: unknown result") def delete_keypair(self, key_name): """ @@ -2911,7 +2647,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) @@ -2941,9 +2677,7 @@ def add_default_security_groups_to_server(self, openstack_id): self.recv_add_default_security_groups_to_server() def send_add_default_security_groups_to_server(self, openstack_id): - self._oprot.writeMessageBegin( - "add_default_security_groups_to_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_default_security_groups_to_server', TMessageType.CALL, self._seqid) args = add_default_security_groups_to_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2978,7 +2712,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) @@ -3000,9 +2734,7 @@ def recv_get_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server failed: unknown result") def get_server_by_unique_name(self, unique_name): """ @@ -3014,9 +2746,7 @@ 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) @@ -3038,10 +2768,7 @@ def recv_get_server_by_unique_name(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_server_by_unique_name failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server_by_unique_name failed: unknown result") def stop_server(self, openstack_id): """ @@ -3056,7 +2783,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) @@ -3097,10 +2824,8 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): self.send_create_snapshot(openstack_id, name, username, base_tags, description) return self.recv_create_snapshot() - def send_create_snapshot( - self, openstack_id, name, username, base_tags, description - ): - self._oprot.writeMessageBegin("create_snapshot", TMessageType.CALL, self._seqid) + def send_create_snapshot(self, openstack_id, name, username, base_tags, description): + self._oprot.writeMessageBegin('create_snapshot', TMessageType.CALL, self._seqid) args = create_snapshot_args() args.openstack_id = openstack_id args.name = name @@ -3128,10 +2853,7 @@ def recv_create_snapshot(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_snapshot failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_snapshot failed: unknown result") def get_limits(self): """ @@ -3145,7 +2867,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() @@ -3164,9 +2886,7 @@ def recv_get_limits(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_limits failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_limits failed: unknown result") def start_cluster(self, public_keys, master_instance, worker_instances, user): """ @@ -3181,7 +2901,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 @@ -3204,9 +2924,7 @@ def recv_start_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result") def terminate_cluster(self, cluster_id): """ @@ -3218,9 +2936,7 @@ def terminate_cluster(self, cluster_id): return self.recv_terminate_cluster() def send_terminate_cluster(self, cluster_id): - self._oprot.writeMessageBegin( - "terminate_cluster", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('terminate_cluster', TMessageType.CALL, self._seqid) args = terminate_cluster_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -3242,10 +2958,7 @@ def recv_terminate_cluster(self): return result.success if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "terminate_cluster failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "terminate_cluster failed: unknown result") def delete_image(self, image_id): """ @@ -3260,7 +2973,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) @@ -3295,7 +3008,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 @@ -3334,7 +3047,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) @@ -3372,9 +3085,7 @@ def attach_volume_to_server(self, openstack_id, volume_id): return self.recv_attach_volume_to_server() def send_attach_volume_to_server(self, openstack_id, volume_id): - self._oprot.writeMessageBegin( - "attach_volume_to_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('attach_volume_to_server', TMessageType.CALL, self._seqid) args = attach_volume_to_server_args() args.openstack_id = openstack_id args.volume_id = volume_id @@ -3399,10 +3110,7 @@ def recv_attach_volume_to_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "attach_volume_to_server failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "attach_volume_to_server failed: unknown result") def resume_server(self, openstack_id): """ @@ -3416,7 +3124,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) @@ -3454,7 +3162,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 @@ -3480,9 +3188,7 @@ def recv_create_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException( - TApplicationException.MISSING_RESULT, "create_volume failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume failed: unknown result") def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -3494,17 +3200,11 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ - self.send_create_volume_by_source_volume( - volume_name, metadata, source_volume_id - ) + self.send_create_volume_by_source_volume(volume_name, metadata, source_volume_id) return self.recv_create_volume_by_source_volume() - def send_create_volume_by_source_volume( - self, volume_name, metadata, source_volume_id - ): - self._oprot.writeMessageBegin( - "create_volume_by_source_volume", TMessageType.CALL, self._seqid - ) + def send_create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): + self._oprot.writeMessageBegin('create_volume_by_source_volume', TMessageType.CALL, self._seqid) args = create_volume_by_source_volume_args() args.volume_name = volume_name args.metadata = metadata @@ -3530,10 +3230,7 @@ def recv_create_volume_by_source_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_volume_by_source_volume failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_source_volume failed: unknown result") def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -3549,9 +3246,7 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): return self.recv_create_volume_by_volume_snap() def send_create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - self._oprot.writeMessageBegin( - "create_volume_by_volume_snap", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('create_volume_by_volume_snap', TMessageType.CALL, self._seqid) args = create_volume_by_volume_snap_args() args.volume_name = volume_name args.metadata = metadata @@ -3577,10 +3272,7 @@ def recv_create_volume_by_volume_snap(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_volume_by_volume_snap failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_volume_snap failed: unknown result") def create_volume_snapshot(self, volume_id, name, description): """ @@ -3597,9 +3289,7 @@ def create_volume_snapshot(self, volume_id, name, description): return self.recv_create_volume_snapshot() def send_create_volume_snapshot(self, volume_id, name, description): - self._oprot.writeMessageBegin( - "create_volume_snapshot", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('create_volume_snapshot', TMessageType.CALL, self._seqid) args = create_volume_snapshot_args() args.volume_id = volume_id args.name = name @@ -3625,10 +3315,7 @@ def recv_create_volume_snapshot(self): raise result.e if result.r is not None: raise result.r - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_volume_snapshot failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_snapshot failed: unknown result") def get_volume_snapshot(self, name_or_id): """ @@ -3643,9 +3330,7 @@ def get_volume_snapshot(self, name_or_id): return self.recv_get_volume_snapshot() def send_get_volume_snapshot(self, name_or_id): - self._oprot.writeMessageBegin( - "get_volume_snapshot", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_volume_snapshot', TMessageType.CALL, self._seqid) args = get_volume_snapshot_args() args.name_or_id = name_or_id args.write(self._oprot) @@ -3667,10 +3352,7 @@ def recv_get_volume_snapshot(self): return result.success if result.r is not None: raise result.r - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_volume_snapshot failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume_snapshot failed: unknown result") def delete_volume_snapshot(self, snapshot_id): """ @@ -3684,9 +3366,7 @@ def delete_volume_snapshot(self, snapshot_id): self.recv_delete_volume_snapshot() def send_delete_volume_snapshot(self, snapshot_id): - self._oprot.writeMessageBegin( - "delete_volume_snapshot", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_volume_snapshot', TMessageType.CALL, self._seqid) args = delete_volume_snapshot_args() args.snapshot_id = snapshot_id args.write(self._oprot) @@ -3722,9 +3402,7 @@ def reboot_hard_server(self, openstack_id): self.recv_reboot_hard_server() def send_reboot_hard_server(self, openstack_id): - self._oprot.writeMessageBegin( - "reboot_hard_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('reboot_hard_server', TMessageType.CALL, self._seqid) args = reboot_hard_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3760,9 +3438,7 @@ def reboot_soft_server(self, openstack_id): self.recv_reboot_soft_server() def send_reboot_soft_server(self, openstack_id): - self._oprot.writeMessageBegin( - "reboot_soft_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('reboot_soft_server', TMessageType.CALL, self._seqid) args = reboot_soft_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3794,20 +3470,12 @@ 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 @@ -3816,82 +3484,45 @@ 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["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 @@ -3900,24 +3531,14 @@ def __init__(self, handler): self._processMap["delete_image"] = Processor.process_delete_image self._processMap["detach_volume"] = Processor.process_detach_volume self._processMap["delete_volume"] = Processor.process_delete_volume - self._processMap["attach_volume_to_server"] = ( - Processor.process_attach_volume_to_server - ) + self._processMap["attach_volume_to_server"] = Processor.process_attach_volume_to_server self._processMap["resume_server"] = Processor.process_resume_server self._processMap["create_volume"] = Processor.process_create_volume - self._processMap["create_volume_by_source_volume"] = ( - Processor.process_create_volume_by_source_volume - ) - self._processMap["create_volume_by_volume_snap"] = ( - Processor.process_create_volume_by_volume_snap - ) - self._processMap["create_volume_snapshot"] = ( - Processor.process_create_volume_snapshot - ) + self._processMap["create_volume_by_source_volume"] = Processor.process_create_volume_by_source_volume + self._processMap["create_volume_by_volume_snap"] = Processor.process_create_volume_by_volume_snap + self._processMap["create_volume_snapshot"] = Processor.process_create_volume_snapshot self._processMap["get_volume_snapshot"] = Processor.process_get_volume_snapshot - self._processMap["delete_volume_snapshot"] = ( - Processor.process_delete_volume_snapshot - ) + self._processMap["delete_volume_snapshot"] = Processor.process_delete_volume_snapshot self._processMap["reboot_hard_server"] = Processor.process_reboot_hard_server self._processMap["reboot_soft_server"] = Processor.process_reboot_soft_server self._on_message_begin = None @@ -3932,9 +3553,7 @@ def process(self, iprot, oprot): if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() - x = TApplicationException( - TApplicationException.UNKNOWN_METHOD, "Unknown function %s" % (name) - ) + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() @@ -3955,15 +3574,13 @@ def process_is_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("is_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3980,15 +3597,13 @@ def process_get_client_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_client_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4005,15 +3620,13 @@ def process_get_gateway_ip(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_gateway_ip", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4030,15 +3643,13 @@ def process_get_calculation_values(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_calculation_values", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4055,15 +3666,13 @@ def process_import_keypair(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("import_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4083,15 +3692,13 @@ def process_get_vm_ports(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_vm_ports", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4114,15 +3721,13 @@ def process_add_udp_security_group(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_udp_security_group", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4134,9 +3739,7 @@ def process_add_research_environment_security_group(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_research_environment_security_group_result() try: - self._handler.add_research_environment_security_group( - args.server_id, args.security_group_name - ) + self._handler.add_research_environment_security_group(args.server_id, args.security_group_name) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4147,18 +3750,14 @@ 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() @@ -4180,15 +3779,13 @@ def process_add_metadata_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_metadata_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4205,15 +3802,13 @@ def process_get_flavors(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_flavors", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4230,15 +3825,13 @@ def process_get_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4255,15 +3848,13 @@ def process_get_public_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_public_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4280,15 +3871,13 @@ def process_get_private_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_private_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4300,9 +3889,7 @@ def process_get_image(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_image_result() try: - result.success = self._handler.get_image( - args.openstack_id, args.ignore_not_active - ) + result.success = self._handler.get_image(args.openstack_id, args.ignore_not_active) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4310,15 +3897,13 @@ def process_get_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.i = i except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4338,15 +3923,13 @@ def process_get_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4363,15 +3946,13 @@ def process_get_volumes_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_volumes_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4391,15 +3972,13 @@ def process_resize_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resize_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4411,13 +3990,7 @@ def process_open_port_range_for_vm_in_project(self, seqid, iprot, oprot): iprot.readMessageEnd() result = open_port_range_for_vm_in_project_result() try: - result.success = self._handler.open_port_range_for_vm_in_project( - args.range_start, - args.range_stop, - args.openstack_id, - args.ethertype, - args.protocol, - ) + result.success = self._handler.open_port_range_for_vm_in_project(args.range_start, args.range_stop, args.openstack_id, args.ethertype, args.protocol) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4431,15 +4004,13 @@ def process_open_port_range_for_vm_in_project(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("open_port_range_for_vm_in_project", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4462,15 +4033,13 @@ 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() @@ -4493,41 +4062,54 @@ 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() oprot.trans.flush() + def process_rescue_server(self, seqid, iprot, oprot): + args = rescue_server_args() + args.read(iprot) + iprot.readMessageEnd() + result = rescue_server_result() + try: + self._handler.rescue_server(args.openstack_id, args.admin_pass, args.image_ref) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except ServerNotFoundException as e: + msg_type = TMessageType.REPLY + result.e = e + except OpenStackConflictException as c: + msg_type = TMessageType.REPLY + result.c = c + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("rescue_server", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_start_server(self, seqid, iprot, oprot): args = start_server_args() args.read(iprot) 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 @@ -4547,15 +4129,13 @@ def process_start_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("start_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4572,15 +4152,13 @@ def process_is_bibigrid_available(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("is_bibigrid_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4600,15 +4178,13 @@ def process_detach_ip_from_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("detach_ip_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4620,18 +4196,7 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_with_custom_key_result() try: - result.success = self._handler.start_server_with_custom_key( - args.flavor_name, - args.image_name, - args.servername, - args.metadata, - args.research_environment, - args.volume_ids_path_new, - args.volume_ids_path_attach, - args.additional_security_group_ids, - args.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.metadata_token, args.metadata_endpoint) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4651,15 +4216,13 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("start_server_with_custom_key", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4676,15 +4239,13 @@ def process_exist_server(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("exist_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4696,15 +4257,7 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_and_deploy_playbook_result() try: - result.success = self._handler.create_and_deploy_playbook( - args.public_key, - args.openstack_id, - args.conda_packages, - args.research_environment_template, - args.apt_packages, - args.create_only_backend, - args.base_url, - ) + result.success = self._handler.create_and_deploy_playbook(args.public_key, args.openstack_id, args.conda_packages, args.research_environment_template, args.apt_packages, args.create_only_backend, args.base_url) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4712,15 +4265,13 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_and_deploy_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4740,15 +4291,13 @@ def process_get_playbook_logs(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.p = p except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_playbook_logs", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4765,15 +4314,13 @@ def process_has_forc(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("has_forc", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4790,15 +4337,13 @@ def process_get_forc_url(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_forc_url", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4810,9 +4355,7 @@ def process_create_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_backend_result() try: - result.success = self._handler.create_backend( - args.owner, args.user_path, args.template, args.upstream_url - ) + result.success = self._handler.create_backend(args.owner, args.user_path, args.template, args.upstream_url) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4823,15 +4366,13 @@ def process_create_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4851,15 +4392,13 @@ def process_get_backends(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_backends", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4879,15 +4418,13 @@ def process_get_backends_by_owner(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_backends_by_owner", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4907,15 +4444,13 @@ def process_get_backends_by_template(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_backends_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4938,15 +4473,13 @@ def process_get_backend_by_id(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_backend_by_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4969,15 +4502,13 @@ def process_set_metadata_server_data(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("set_metadata_server_data", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5000,15 +4531,13 @@ def process_remove_metadata_server_data(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("remove_metadata_server_data", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5031,15 +4560,13 @@ def process_is_metadata_server_available(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("is_metadata_server_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5059,15 +4586,13 @@ def process_delete_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5079,9 +4604,7 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_user_to_backend_result() try: - result.success = self._handler.add_user_to_backend( - args.backend_id, args.user_id - ) + result.success = self._handler.add_user_to_backend(args.backend_id, args.user_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5089,15 +4612,13 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_user_to_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5117,15 +4638,13 @@ def process_get_users_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_users_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5137,9 +4656,7 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_user_from_backend_result() try: - result.success = self._handler.delete_user_from_backend( - args.backend_id, args.user_id - ) + result.success = self._handler.delete_user_from_backend(args.backend_id, args.user_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5147,15 +4664,13 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_user_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5172,15 +4687,13 @@ def process_get_allowed_templates(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_allowed_templates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5197,15 +4710,13 @@ def process_get_servers(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5222,15 +4733,13 @@ def process_get_servers_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5247,15 +4756,13 @@ def process_get_servers_by_bibigrid_id(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers_by_bibigrid_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5275,15 +4782,13 @@ def process_get_security_group_id_by_name(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_security_group_id_by_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5295,28 +4800,18 @@ def process_scale_up_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = scale_up_cluster_result() try: - result.success = self._handler.scale_up_cluster( - args.cluster_id, - args.image_name, - args.flavor_name, - args.count, - args.names, - args.start_idx, - args.batch_idx, - ) + result.success = self._handler.scale_up_cluster(args.cluster_id, args.image_name, args.flavor_name, args.count, args.names, args.start_idx, args.batch_idx) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("scale_up_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5328,30 +4823,18 @@ def process_add_cluster_machine(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_cluster_machine_result() try: - result.success = self._handler.add_cluster_machine( - args.cluster_id, - args.cluster_user, - args.cluster_group_id, - args.image_name, - args.flavor_name, - args.name, - args.key_name, - args.batch_idx, - args.worker_idx, - ) + result.success = self._handler.add_cluster_machine(args.cluster_id, args.cluster_user, args.cluster_group_id, args.image_name, args.flavor_name, args.name, args.key_name, args.batch_idx, args.worker_idx) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_cluster_machine", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5371,15 +4854,13 @@ def process_get_cluster_info(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_cluster_info", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5399,15 +4880,13 @@ def process_get_cluster_status(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_cluster_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5424,15 +4903,13 @@ def process_get_keypair_public_key_by_name(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_keypair_public_key_by_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5449,15 +4926,13 @@ def process_delete_keypair(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5477,18 +4952,14 @@ def process_add_default_security_groups_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) - oprot.writeMessageBegin( - "add_default_security_groups_to_server", msg_type, seqid - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_default_security_groups_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -5507,15 +4978,13 @@ def process_get_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5535,15 +5004,13 @@ def process_get_server_by_unique_name(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_server_by_unique_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5566,15 +5033,13 @@ def process_stop_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("stop_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5586,13 +5051,7 @@ def process_create_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_snapshot_result() try: - result.success = self._handler.create_snapshot( - args.openstack_id, - args.name, - args.username, - args.base_tags, - args.description, - ) + result.success = self._handler.create_snapshot(args.openstack_id, args.name, args.username, args.base_tags, args.description) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5603,15 +5062,13 @@ def process_create_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5628,15 +5085,13 @@ def process_get_limits(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_limits", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5648,22 +5103,18 @@ def process_start_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_cluster_result() try: - result.success = self._handler.start_cluster( - args.public_keys, args.master_instance, args.worker_instances, args.user - ) + result.success = self._handler.start_cluster(args.public_keys, args.master_instance, args.worker_instances, args.user) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("start_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5683,15 +5134,13 @@ def process_terminate_cluster(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("terminate_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5711,15 +5160,13 @@ def process_delete_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5745,15 +5192,13 @@ def process_detach_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("detach_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5776,15 +5221,13 @@ def process_delete_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5796,9 +5239,7 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = attach_volume_to_server_result() try: - result.success = self._handler.attach_volume_to_server( - args.openstack_id, args.volume_id - ) + result.success = self._handler.attach_volume_to_server(args.openstack_id, args.volume_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5809,15 +5250,13 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("attach_volume_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5840,15 +5279,13 @@ def process_resume_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resume_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5860,9 +5297,7 @@ def process_create_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_result() try: - result.success = self._handler.create_volume( - args.volume_name, args.volume_storage, args.metadata - ) + result.success = self._handler.create_volume(args.volume_name, args.volume_storage, args.metadata) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5873,15 +5308,13 @@ def process_create_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5893,9 +5326,7 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_source_volume_result() try: - result.success = self._handler.create_volume_by_source_volume( - args.volume_name, args.metadata, args.source_volume_id - ) + result.success = self._handler.create_volume_by_source_volume(args.volume_name, args.metadata, args.source_volume_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5906,15 +5337,13 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_volume_by_source_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5926,9 +5355,7 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_volume_snap_result() try: - result.success = self._handler.create_volume_by_volume_snap( - args.volume_name, args.metadata, args.volume_snap_id - ) + result.success = self._handler.create_volume_by_volume_snap(args.volume_name, args.metadata, args.volume_snap_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5939,15 +5366,13 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_volume_by_volume_snap", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5959,9 +5384,7 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_snapshot_result() try: - result.success = self._handler.create_volume_snapshot( - args.volume_id, args.name, args.description - ) + result.success = self._handler.create_volume_snapshot(args.volume_id, args.name, args.description) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5972,15 +5395,13 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6000,15 +5421,13 @@ def process_get_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6031,15 +5450,13 @@ def process_delete_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6062,15 +5479,13 @@ def process_reboot_hard_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reboot_hard_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -6093,21 +5508,18 @@ def process_reboot_soft_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reboot_soft_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - # HELPER FUNCTIONS AND STRUCTURES @@ -6118,20 +5530,12 @@ class is_version_args(object): """ - thrift_spec = None - def __init__( - self, - version=None, - ): + def __init__(self, version=None,): self.version = version def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6150,15 +5554,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("is_version_args") + oprot.writeStructBegin('is_version_args') if self.version is not None: - oprot.writeFieldBegin("version", TType.DOUBLE, 1) + oprot.writeFieldBegin('version', TType.DOUBLE, 1) oprot.writeDouble(self.version) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6168,26 +5569,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(is_version_args) is_version_args.thrift_spec = ( None, # 0 - ( - 1, - TType.DOUBLE, - "version", - None, - None, - ), # 1 + (1, TType.DOUBLE, 'version', None, None, ), # 1 ) @@ -6198,20 +5592,12 @@ class is_version_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6230,15 +5616,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("is_version_result") + oprot.writeStructBegin('is_version_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6248,37 +5631,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(is_version_result) is_version_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) class get_client_version_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6292,13 +5664,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_client_version_args") + oprot.writeStructBegin('get_client_version_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -6306,18 +5675,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): @@ -6327,20 +5696,12 @@ class get_client_version_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6350,11 +5711,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6363,20 +5720,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_client_version_result") + oprot.writeStructBegin('get_client_version_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6385,37 +5735,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_client_version_result) get_client_version_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) class get_gateway_ip_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6429,13 +5768,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_gateway_ip_args") + oprot.writeStructBegin('get_gateway_ip_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -6443,18 +5779,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): @@ -6464,20 +5800,12 @@ class get_gateway_ip_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6490,16 +5818,8 @@ def read(self, iprot): self.success = {} (_ktype49, _vtype50, _size48) = iprot.readMapBegin() for _i52 in range(_size48): - _key53 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val54 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key53 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val54 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key53] = _val54 iprot.readMapEnd() else: @@ -6510,23 +5830,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_gateway_ip_result") + oprot.writeStructBegin('get_gateway_ip_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter55, viter56 in self.success.items(): - oprot.writeString( - kiter55.encode("utf-8") if sys.version_info[0] == 2 else kiter55 - ) - oprot.writeString( - viter56.encode("utf-8") if sys.version_info[0] == 2 else viter56 - ) + oprot.writeString(kiter55.encode('utf-8') if sys.version_info[0] == 2 else kiter55) + oprot.writeString(viter56.encode('utf-8') if sys.version_info[0] == 2 else viter56) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6536,37 +5849,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_gateway_ip_result) get_gateway_ip_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) class get_calculation_values_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6580,13 +5882,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_calculation_values_args") + oprot.writeStructBegin('get_calculation_values_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -6594,18 +5893,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): @@ -6615,20 +5914,12 @@ class get_calculation_values_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6641,16 +5932,8 @@ def read(self, iprot): self.success = {} (_ktype58, _vtype59, _size57) = iprot.readMapBegin() for _i61 in range(_size57): - _key62 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val63 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key62 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val63 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key62] = _val63 iprot.readMapEnd() else: @@ -6661,23 +5944,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_calculation_values_result") + oprot.writeStructBegin('get_calculation_values_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter64, viter65 in self.success.items(): - oprot.writeString( - kiter64.encode("utf-8") if sys.version_info[0] == 2 else kiter64 - ) - oprot.writeString( - viter65.encode("utf-8") if sys.version_info[0] == 2 else viter65 - ) + oprot.writeString(kiter64.encode('utf-8') if sys.version_info[0] == 2 else kiter64) + oprot.writeString(viter65.encode('utf-8') if sys.version_info[0] == 2 else viter65) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6687,25 +5963,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_calculation_values_result) get_calculation_values_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -6717,22 +5986,13 @@ class import_keypair_args(object): """ - thrift_spec = None - def __init__( - self, - keyname=None, - public_key=None, - ): + def __init__(self, keyname=None, public_key=None,): self.keyname = keyname self.public_key = public_key def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6742,20 +6002,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.keyname = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.keyname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.public_key = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6764,28 +6016,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("import_keypair_args") + oprot.writeStructBegin('import_keypair_args') if self.keyname is not None: - oprot.writeFieldBegin("keyname", TType.STRING, 1) - oprot.writeString( - self.keyname.encode("utf-8") - if sys.version_info[0] == 2 - else self.keyname - ) + oprot.writeFieldBegin('keyname', TType.STRING, 1) + oprot.writeString(self.keyname.encode('utf-8') if sys.version_info[0] == 2 else self.keyname) oprot.writeFieldEnd() if self.public_key is not None: - oprot.writeFieldBegin("public_key", TType.STRING, 2) - oprot.writeString( - self.public_key.encode("utf-8") - if sys.version_info[0] == 2 - else self.public_key - ) + oprot.writeFieldBegin('public_key', TType.STRING, 2) + oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6794,33 +6035,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(import_keypair_args) import_keypair_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "keyname", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "public_key", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'keyname', 'UTF8', None, ), # 1 + (2, TType.STRING, 'public_key', 'UTF8', None, ), # 2 ) @@ -6831,20 +6059,12 @@ class import_keypair_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6854,11 +6074,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6867,20 +6083,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("import_keypair_result") + oprot.writeStructBegin('import_keypair_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6889,25 +6098,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(import_keypair_result) import_keypair_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -6918,20 +6120,12 @@ class get_vm_ports_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6941,11 +6135,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6954,20 +6144,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_vm_ports_args") + oprot.writeStructBegin('get_vm_ports_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6976,26 +6159,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_vm_ports_args) get_vm_ports_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -7007,22 +6183,13 @@ class get_vm_ports_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - s=None, - ): + def __init__(self, success=None, s=None,): self.success = success self.s = s def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7035,16 +6202,8 @@ def read(self, iprot): self.success = {} (_ktype67, _vtype68, _size66) = iprot.readMapBegin() for _i70 in range(_size66): - _key71 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val72 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key71 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val72 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success[_key71] = _val72 iprot.readMapEnd() else: @@ -7060,27 +6219,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_vm_ports_result") + oprot.writeStructBegin('get_vm_ports_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter73, viter74 in self.success.items(): - oprot.writeString( - kiter73.encode("utf-8") if sys.version_info[0] == 2 else kiter73 - ) - oprot.writeString( - viter74.encode("utf-8") if sys.version_info[0] == 2 else viter74 - ) + oprot.writeString(kiter73.encode('utf-8') if sys.version_info[0] == 2 else kiter73) + oprot.writeString(viter74.encode('utf-8') if sys.version_info[0] == 2 else viter74) oprot.writeMapEnd() oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 1) + oprot.writeFieldBegin('s', TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7090,32 +6242,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_vm_ports_result) get_vm_ports_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 ) @@ -7126,20 +6265,12 @@ class add_udp_security_group_args(object): """ - thrift_spec = None - def __init__( - self, - server_id=None, - ): + def __init__(self, server_id=None,): self.server_id = server_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7149,11 +6280,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7162,20 +6289,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_udp_security_group_args") + oprot.writeStructBegin('add_udp_security_group_args') if self.server_id is not None: - oprot.writeFieldBegin("server_id", TType.STRING, 1) - oprot.writeString( - self.server_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.server_id - ) + oprot.writeFieldBegin('server_id', TType.STRING, 1) + oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7184,26 +6304,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_udp_security_group_args) add_udp_security_group_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 ) @@ -7215,22 +6328,13 @@ class add_udp_security_group_result(object): """ - thrift_spec = None - def __init__( - self, - r=None, - s=None, - ): + def __init__(self, r=None, s=None,): self.r = r self.s = s def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7254,19 +6358,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_udp_security_group_result") + oprot.writeStructBegin('add_udp_security_group_result') if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 2) + oprot.writeFieldBegin('s', TType.STRUCT, 2) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7276,33 +6377,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_udp_security_group_result) add_udp_security_group_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 2 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 ) @@ -7314,22 +6402,13 @@ class add_research_environment_security_group_args(object): """ - thrift_spec = None - def __init__( - self, - server_id=None, - security_group_name=None, - ): + def __init__(self, server_id=None, security_group_name=None,): self.server_id = server_id self.security_group_name = security_group_name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7339,20 +6418,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.security_group_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.security_group_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7361,28 +6432,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_research_environment_security_group_args") + oprot.writeStructBegin('add_research_environment_security_group_args') if self.server_id is not None: - oprot.writeFieldBegin("server_id", TType.STRING, 1) - oprot.writeString( - self.server_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.server_id - ) + oprot.writeFieldBegin('server_id', TType.STRING, 1) + oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) oprot.writeFieldEnd() if self.security_group_name is not None: - oprot.writeFieldBegin("security_group_name", TType.STRING, 2) - oprot.writeString( - self.security_group_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.security_group_name - ) + oprot.writeFieldBegin('security_group_name', TType.STRING, 2) + oprot.writeString(self.security_group_name.encode('utf-8') if sys.version_info[0] == 2 else self.security_group_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7391,33 +6451,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_research_environment_security_group_args) add_research_environment_security_group_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "security_group_name", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'security_group_name', 'UTF8', None, ), # 2 ) @@ -7429,22 +6476,13 @@ class add_research_environment_security_group_result(object): """ - thrift_spec = None - def __init__( - self, - r=None, - s=None, - ): + def __init__(self, r=None, s=None,): self.r = r self.s = s def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7468,19 +6506,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_research_environment_security_group_result") + oprot.writeStructBegin('add_research_environment_security_group_result') if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 2) + oprot.writeFieldBegin('s', TType.STRUCT, 2) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7490,33 +6525,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_research_environment_security_group_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 ) @@ -7528,22 +6550,13 @@ class add_metadata_to_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - metadata=None, - ): + def __init__(self, openstack_id=None, metadata=None,): self.openstack_id = openstack_id self.metadata = metadata def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7553,11 +6566,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -7565,16 +6574,8 @@ def read(self, iprot): self.metadata = {} (_ktype76, _vtype77, _size75) = iprot.readMapBegin() for _i79 in range(_size75): - _key80 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val81 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key80 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val81 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key80] = _val81 iprot.readMapEnd() else: @@ -7585,31 +6586,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_metadata_to_server_args") + oprot.writeStructBegin('add_metadata_to_server_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin("metadata", TType.MAP, 2) + oprot.writeFieldBegin('metadata', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter82, viter83 in self.metadata.items(): - oprot.writeString( - kiter82.encode("utf-8") if sys.version_info[0] == 2 else kiter82 - ) - oprot.writeString( - viter83.encode("utf-8") if sys.version_info[0] == 2 else viter83 - ) + oprot.writeString(kiter82.encode('utf-8') if sys.version_info[0] == 2 else kiter82) + oprot.writeString(viter83.encode('utf-8') if sys.version_info[0] == 2 else viter83) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7619,33 +6609,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_metadata_to_server_args) add_metadata_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 ) @@ -7657,22 +6634,13 @@ class add_metadata_to_server_result(object): """ - thrift_spec = None - def __init__( - self, - r=None, - s=None, - ): + def __init__(self, r=None, s=None,): self.r = r self.s = s def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7696,19 +6664,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_metadata_to_server_result") + oprot.writeStructBegin('add_metadata_to_server_result') if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 2) + oprot.writeFieldBegin('s', TType.STRUCT, 2) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7718,45 +6683,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_metadata_to_server_result) add_metadata_to_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 2 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 ) class get_flavors_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7770,13 +6718,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_flavors_args") + oprot.writeStructBegin('get_flavors_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -7784,18 +6729,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): @@ -7805,20 +6750,12 @@ class get_flavors_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7843,15 +6780,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_flavors_result") + oprot.writeStructBegin('get_flavors_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter90 in self.success: iter90.write(oprot) @@ -7864,37 +6798,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_flavors_result) get_flavors_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Flavor, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Flavor, None], False), None, ), # 0 ) class get_images_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7908,13 +6831,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_images_args") + oprot.writeStructBegin('get_images_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -7922,18 +6842,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): @@ -7943,20 +6863,12 @@ class get_images_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7981,15 +6893,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_images_result") + oprot.writeStructBegin('get_images_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter97 in self.success: iter97.write(oprot) @@ -8002,37 +6911,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_images_result) get_images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) class get_public_images_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8046,13 +6944,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_public_images_args") + oprot.writeStructBegin('get_public_images_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -8060,18 +6955,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): @@ -8081,20 +6976,12 @@ class get_public_images_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8119,15 +7006,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_public_images_result") + oprot.writeStructBegin('get_public_images_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter104 in self.success: iter104.write(oprot) @@ -8140,37 +7024,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_public_images_result) get_public_images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) class get_private_images_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8184,13 +7057,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_private_images_args") + oprot.writeStructBegin('get_private_images_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -8198,18 +7068,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): @@ -8219,20 +7089,12 @@ class get_private_images_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8257,15 +7119,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_private_images_result") + oprot.writeStructBegin('get_private_images_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter111 in self.success: iter111.write(oprot) @@ -8278,25 +7137,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_private_images_result) get_private_images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) @@ -8308,22 +7160,13 @@ class get_image_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ignore_not_active=None, - ): + def __init__(self, openstack_id=None, ignore_not_active=None,): self.openstack_id = openstack_id self.ignore_not_active = ignore_not_active def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8333,11 +7176,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -8351,23 +7190,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_image_args") + oprot.writeStructBegin('get_image_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.ignore_not_active is not None: - oprot.writeFieldBegin("ignore_not_active", TType.BOOL, 2) + oprot.writeFieldBegin('ignore_not_active', TType.BOOL, 2) oprot.writeBool(self.ignore_not_active) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8377,33 +7209,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_image_args) get_image_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.BOOL, - "ignore_not_active", - None, - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.BOOL, 'ignore_not_active', None, None, ), # 2 ) @@ -8415,22 +7234,13 @@ class get_image_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - i=None, - ): + def __init__(self, success=None, i=None,): self.success = success self.i = i def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8455,19 +7265,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_image_result") + oprot.writeStructBegin('get_image_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin("i", TType.STRUCT, 1) + oprot.writeFieldBegin('i', TType.STRUCT, 1) self.i.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8477,32 +7284,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_image_result) get_image_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Image, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "i", - [ImageNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [Image, None], None, ), # 0 + (1, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 1 ) @@ -8513,20 +7307,12 @@ class get_volume_args(object): """ - thrift_spec = None - def __init__( - self, - volume_id=None, - ): + def __init__(self, volume_id=None,): self.volume_id = volume_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8536,11 +7322,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -8549,20 +7331,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_volume_args") + oprot.writeStructBegin('get_volume_args') if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 1) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 1) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8571,26 +7346,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_args) get_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 ) @@ -8602,22 +7370,13 @@ class get_volume_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - v=None, - ): + def __init__(self, success=None, v=None,): self.success = success self.v = v def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8642,19 +7401,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_volume_result") + oprot.writeStructBegin('get_volume_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin("v", TType.STRUCT, 1) + oprot.writeFieldBegin('v', TType.STRUCT, 1) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8664,32 +7420,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_result) get_volume_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "v", - [VolumeNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 ) @@ -8700,20 +7443,12 @@ class get_volumes_by_ids_args(object): """ - thrift_spec = None - def __init__( - self, - volume_ids=None, - ): + def __init__(self, volume_ids=None,): self.volume_ids = volume_ids def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8726,11 +7461,7 @@ def read(self, iprot): self.volume_ids = [] (_etype115, _size112) = iprot.readListBegin() for _i116 in range(_size112): - _elem117 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem117 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.volume_ids.append(_elem117) iprot.readListEnd() else: @@ -8741,20 +7472,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_volumes_by_ids_args") + oprot.writeStructBegin('get_volumes_by_ids_args') if self.volume_ids is not None: - oprot.writeFieldBegin("volume_ids", TType.LIST, 1) + oprot.writeFieldBegin('volume_ids', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.volume_ids)) for iter118 in self.volume_ids: - oprot.writeString( - iter118.encode("utf-8") if sys.version_info[0] == 2 else iter118 - ) + oprot.writeString(iter118.encode('utf-8') if sys.version_info[0] == 2 else iter118) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8764,26 +7490,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volumes_by_ids_args) get_volumes_by_ids_args.thrift_spec = ( None, # 0 - ( - 1, - TType.LIST, - "volume_ids", - (TType.STRING, "UTF8", False), - None, - ), # 1 + (1, TType.LIST, 'volume_ids', (TType.STRING, 'UTF8', False), None, ), # 1 ) @@ -8794,20 +7513,12 @@ class get_volumes_by_ids_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8832,15 +7543,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_volumes_by_ids_result") + oprot.writeStructBegin('get_volumes_by_ids_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter125 in self.success: iter125.write(oprot) @@ -8853,25 +7561,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volumes_by_ids_result) get_volumes_by_ids_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Volume, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Volume, None], False), None, ), # 0 ) @@ -8883,22 +7584,13 @@ class resize_volume_args(object): """ - thrift_spec = None - def __init__( - self, - volume_id=None, - size=None, - ): + def __init__(self, volume_id=None, size=None,): self.volume_id = volume_id self.size = size def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8908,11 +7600,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -8926,23 +7614,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("resize_volume_args") + oprot.writeStructBegin('resize_volume_args') if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 1) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 1) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin("size", TType.I32, 2) + oprot.writeFieldBegin('size', TType.I32, 2) oprot.writeI32(self.size) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8952,33 +7633,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resize_volume_args) resize_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.I32, - "size", - None, - None, - ), # 2 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + (2, TType.I32, 'size', None, None, ), # 2 ) @@ -8989,20 +7657,12 @@ class resize_volume_result(object): """ - thrift_spec = None - def __init__( - self, - v=None, - ): + def __init__(self, v=None,): self.v = v def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9021,15 +7681,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("resize_volume_result") + oprot.writeStructBegin('resize_volume_result') if self.v is not None: - oprot.writeFieldBegin("v", TType.STRUCT, 1) + oprot.writeFieldBegin('v', TType.STRUCT, 1) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9039,26 +7696,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resize_volume_result) resize_volume_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "v", - [VolumeNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 ) @@ -9073,16 +7723,8 @@ class open_port_range_for_vm_in_project_args(object): """ - thrift_spec = None - def __init__( - self, - range_start=None, - range_stop=None, - openstack_id=None, - ethertype="IPv4", - protocol="TCP", - ): + def __init__(self, range_start=None, range_stop=None, openstack_id=None, ethertype="IPv4", protocol="TCP",): self.range_start = range_start self.range_stop = range_stop self.openstack_id = openstack_id @@ -9090,11 +7732,7 @@ def __init__( self.protocol = protocol def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9114,29 +7752,17 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.ethertype = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ethertype = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.protocol = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.protocol = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9145,44 +7771,29 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("open_port_range_for_vm_in_project_args") + oprot.writeStructBegin('open_port_range_for_vm_in_project_args') if self.range_start is not None: - oprot.writeFieldBegin("range_start", TType.I32, 1) + oprot.writeFieldBegin('range_start', TType.I32, 1) oprot.writeI32(self.range_start) oprot.writeFieldEnd() if self.range_stop is not None: - oprot.writeFieldBegin("range_stop", TType.I32, 2) + oprot.writeFieldBegin('range_stop', TType.I32, 2) oprot.writeI32(self.range_stop) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 3) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 3) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.ethertype is not None: - oprot.writeFieldBegin("ethertype", TType.STRING, 4) - oprot.writeString( - self.ethertype.encode("utf-8") - if sys.version_info[0] == 2 - else self.ethertype - ) + oprot.writeFieldBegin('ethertype', TType.STRING, 4) + oprot.writeString(self.ethertype.encode('utf-8') if sys.version_info[0] == 2 else self.ethertype) oprot.writeFieldEnd() if self.protocol is not None: - oprot.writeFieldBegin("protocol", TType.STRING, 5) - oprot.writeString( - self.protocol.encode("utf-8") - if sys.version_info[0] == 2 - else self.protocol - ) + oprot.writeFieldBegin('protocol', TType.STRING, 5) + oprot.writeString(self.protocol.encode('utf-8') if sys.version_info[0] == 2 else self.protocol) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9191,54 +7802,23 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(open_port_range_for_vm_in_project_args) open_port_range_for_vm_in_project_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I32, - "range_start", - None, - None, - ), # 1 - ( - 2, - TType.I32, - "range_stop", - None, - None, - ), # 2 - ( - 3, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "ethertype", - "UTF8", - "IPv4", - ), # 4 - ( - 5, - TType.STRING, - "protocol", - "UTF8", - "TCP", - ), # 5 + (1, TType.I32, 'range_start', None, None, ), # 1 + (2, TType.I32, 'range_stop', None, None, ), # 2 + (3, TType.STRING, 'openstack_id', 'UTF8', None, ), # 3 + (4, TType.STRING, 'ethertype', 'UTF8', "IPv4", ), # 4 + (5, TType.STRING, 'protocol', 'UTF8', "TCP", ), # 5 ) @@ -9252,26 +7832,15 @@ class open_port_range_for_vm_in_project_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - v=None, - o=None, - ): + def __init__(self, success=None, e=None, v=None, o=None,): self.success = success self.e = e self.v = v self.o = o def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9281,11 +7850,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -9309,31 +7874,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("open_port_range_for_vm_in_project_result") + oprot.writeStructBegin('open_port_range_for_vm_in_project_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin("v", TType.STRUCT, 2) + oprot.writeFieldBegin('v', TType.STRUCT, 2) self.v.write(oprot) oprot.writeFieldEnd() if self.o is not None: - oprot.writeFieldBegin("o", TType.STRUCT, 3) + oprot.writeFieldBegin('o', TType.STRUCT, 3) self.o.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9343,46 +7901,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(open_port_range_for_vm_in_project_result) open_port_range_for_vm_in_project_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "v", - [DefaultException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "o", - [OpenStackConflictException, None], - None, - ), # 3 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'v', [DefaultException, None], None, ), # 2 + (3, TType.STRUCT, 'o', [OpenStackConflictException, None], None, ), # 3 ) @@ -9393,20 +7926,12 @@ class delete_security_group_rule_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9416,11 +7941,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9429,20 +7950,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_security_group_rule_args") + oprot.writeStructBegin('delete_security_group_rule_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9451,26 +7965,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_security_group_rule_args) delete_security_group_rule_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -9482,22 +7989,13 @@ class delete_security_group_rule_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - f=None, - ): + def __init__(self, e=None, f=None,): self.e = e self.f = f def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9521,19 +8019,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_security_group_rule_result") + oprot.writeStructBegin('delete_security_group_rule_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin("f", TType.STRUCT, 2) + oprot.writeFieldBegin('f', TType.STRUCT, 2) self.f.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9543,33 +8038,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_security_group_rule_result) delete_security_group_rule_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [SecurityGroupRuleNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "f", - [DefaultException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [SecurityGroupRuleNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'f', [DefaultException, None], None, ), # 2 ) @@ -9580,20 +8062,12 @@ class delete_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9603,11 +8077,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9616,20 +8086,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_server_args") + oprot.writeStructBegin('delete_server_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9638,26 +8101,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_server_args) delete_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -9669,22 +8125,13 @@ class delete_server_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - c=None, - ): + def __init__(self, e=None, c=None,): self.e = e self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9708,19 +8155,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_server_result") + oprot.writeStructBegin('delete_server_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 2) + oprot.writeFieldBegin('c', TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9730,93 +8174,220 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __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 ) -class start_server_args(object): +class rescue_server_args(object): """ Attributes: - - flavor_name: Name of the Flavor to use. - - image_name: Name of the image to use. - - public_key: Public Key to use - - servername: Name for the new server - - metadata: Metadata for the new instance - - volume_ids_path_new - - volume_ids_path_attach - - additional_keys - - research_environment - - additional_security_group_ids - - slurm_version - - metadata_token - - metadata_endpoint + - openstack_id: Id of the server. + - admin_pass + - image_ref """ - 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 - self.servername = servername - self.metadata = metadata - self.volume_ids_path_new = volume_ids_path_new - self.volume_ids_path_attach = volume_ids_path_attach - self.additional_keys = additional_keys - self.research_environment = research_environment - self.additional_security_group_ids = additional_security_group_ids - self.slurm_version = slurm_version - self.metadata_token = metadata_token + + 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: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + 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() + 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() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('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.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.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.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(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 +) + + +class rescue_server_result(object): + """ + Attributes: + - e + - c + + """ + + + 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: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.e = ServerNotFoundException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.c = OpenStackConflictException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('rescue_server_result') + if self.e is not None: + oprot.writeFieldBegin('e', TType.STRUCT, 1) + self.e.write(oprot) + oprot.writeFieldEnd() + if self.c is not None: + oprot.writeFieldBegin('c', TType.STRUCT, 2) + self.c.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(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 +) + + +class start_server_args(object): + """ + Attributes: + - flavor_name: Name of the Flavor to use. + - image_name: Name of the image to use. + - public_key: Public Key to use + - servername: Name for the new server + - metadata: Metadata for the new instance + - volume_ids_path_new + - volume_ids_path_attach + - additional_keys + - research_environment + - additional_security_group_ids + - slurm_version + - metadata_token + - metadata_endpoint + + """ + + + 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 + self.servername = servername + self.metadata = metadata + self.volume_ids_path_new = volume_ids_path_new + self.volume_ids_path_attach = volume_ids_path_attach + self.additional_keys = additional_keys + self.research_environment = research_environment + self.additional_security_group_ids = additional_security_group_ids + self.slurm_version = slurm_version + 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() @@ -9826,38 +8397,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.public_key = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.servername = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: @@ -9865,16 +8420,8 @@ def read(self, iprot): self.metadata = {} (_ktype127, _vtype128, _size126) = iprot.readMapBegin() for _i130 in range(_size126): - _key131 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val132 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key131 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val132 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key131] = _val132 iprot.readMapEnd() else: @@ -9887,16 +8434,8 @@ def read(self, iprot): _elem138 = {} (_ktype140, _vtype141, _size139) = iprot.readMapBegin() for _i143 in range(_size139): - _key144 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val145 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key144 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val145 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem138[_key144] = _val145 iprot.readMapEnd() self.volume_ids_path_new.append(_elem138) @@ -9911,16 +8450,8 @@ def read(self, iprot): _elem151 = {} (_ktype153, _vtype154, _size152) = iprot.readMapBegin() for _i156 in range(_size152): - _key157 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val158 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key157 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val158 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem151[_key157] = _val158 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem151) @@ -9932,22 +8463,14 @@ def read(self, iprot): self.additional_keys = [] (_etype162, _size159) = iprot.readListBegin() for _i163 in range(_size159): - _elem164 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem164 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_keys.append(_elem164) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: - self.research_environment = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.research_environment = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: @@ -9955,40 +8478,24 @@ def read(self, iprot): self.additional_security_group_ids = [] (_etype168, _size165) = iprot.readListBegin() for _i169 in range(_size165): - _elem170 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem170 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.additional_security_group_ids.append(_elem170) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: - self.slurm_version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.slurm_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.STRING: - self.metadata_token = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.metadata_token = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 14: if ftype == TType.STRING: - self.metadata_endpoint = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.metadata_endpoint = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9997,144 +8504,85 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("start_server_args") + oprot.writeStructBegin('start_server_args') if self.flavor_name is not None: - oprot.writeFieldBegin("flavor_name", TType.STRING, 1) - oprot.writeString( - self.flavor_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.flavor_name - ) + oprot.writeFieldBegin('flavor_name', TType.STRING, 1) + oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin("image_name", TType.STRING, 2) - oprot.writeString( - self.image_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.image_name - ) + oprot.writeFieldBegin('image_name', TType.STRING, 2) + oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) oprot.writeFieldEnd() if self.public_key is not None: - oprot.writeFieldBegin("public_key", TType.STRING, 3) - oprot.writeString( - self.public_key.encode("utf-8") - if sys.version_info[0] == 2 - else self.public_key - ) + oprot.writeFieldBegin('public_key', TType.STRING, 3) + oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) oprot.writeFieldEnd() if self.servername is not None: - oprot.writeFieldBegin("servername", TType.STRING, 4) - oprot.writeString( - self.servername.encode("utf-8") - if sys.version_info[0] == 2 - else self.servername - ) + oprot.writeFieldBegin('servername', TType.STRING, 4) + oprot.writeString(self.servername.encode('utf-8') if sys.version_info[0] == 2 else self.servername) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin("metadata", TType.MAP, 5) + oprot.writeFieldBegin('metadata', TType.MAP, 5) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter171, viter172 in self.metadata.items(): - oprot.writeString( - kiter171.encode("utf-8") if sys.version_info[0] == 2 else kiter171 - ) - oprot.writeString( - viter172.encode("utf-8") if sys.version_info[0] == 2 else viter172 - ) + oprot.writeString(kiter171.encode('utf-8') if sys.version_info[0] == 2 else kiter171) + oprot.writeString(viter172.encode('utf-8') if sys.version_info[0] == 2 else viter172) oprot.writeMapEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 7) + oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 7) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter173 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter173)) for kiter174, viter175 in iter173.items(): - oprot.writeString( - kiter174.encode("utf-8") - if sys.version_info[0] == 2 - else kiter174 - ) - oprot.writeString( - viter175.encode("utf-8") - if sys.version_info[0] == 2 - else viter175 - ) + oprot.writeString(kiter174.encode('utf-8') if sys.version_info[0] == 2 else kiter174) + oprot.writeString(viter175.encode('utf-8') if sys.version_info[0] == 2 else viter175) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 8) + oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 8) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter176 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter176)) for kiter177, viter178 in iter176.items(): - oprot.writeString( - kiter177.encode("utf-8") - if sys.version_info[0] == 2 - else kiter177 - ) - oprot.writeString( - viter178.encode("utf-8") - if sys.version_info[0] == 2 - else viter178 - ) + oprot.writeString(kiter177.encode('utf-8') if sys.version_info[0] == 2 else kiter177) + oprot.writeString(viter178.encode('utf-8') if sys.version_info[0] == 2 else viter178) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.additional_keys is not None: - oprot.writeFieldBegin("additional_keys", TType.LIST, 9) + oprot.writeFieldBegin('additional_keys', TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.additional_keys)) for iter179 in self.additional_keys: - oprot.writeString( - iter179.encode("utf-8") if sys.version_info[0] == 2 else iter179 - ) + oprot.writeString(iter179.encode('utf-8') if sys.version_info[0] == 2 else iter179) oprot.writeListEnd() oprot.writeFieldEnd() if self.research_environment is not None: - oprot.writeFieldBegin("research_environment", TType.STRING, 10) - oprot.writeString( - self.research_environment.encode("utf-8") - if sys.version_info[0] == 2 - else self.research_environment - ) + oprot.writeFieldBegin('research_environment', TType.STRING, 10) + oprot.writeString(self.research_environment.encode('utf-8') if sys.version_info[0] == 2 else self.research_environment) oprot.writeFieldEnd() if self.additional_security_group_ids is not None: - oprot.writeFieldBegin("additional_security_group_ids", TType.LIST, 11) + oprot.writeFieldBegin('additional_security_group_ids', TType.LIST, 11) oprot.writeListBegin(TType.STRING, len(self.additional_security_group_ids)) for iter180 in self.additional_security_group_ids: - oprot.writeString( - iter180.encode("utf-8") if sys.version_info[0] == 2 else iter180 - ) + oprot.writeString(iter180.encode('utf-8') if sys.version_info[0] == 2 else iter180) oprot.writeListEnd() oprot.writeFieldEnd() if self.slurm_version is not None: - oprot.writeFieldBegin("slurm_version", TType.STRING, 12) - oprot.writeString( - self.slurm_version.encode("utf-8") - if sys.version_info[0] == 2 - else self.slurm_version - ) + oprot.writeFieldBegin('slurm_version', TType.STRING, 12) + oprot.writeString(self.slurm_version.encode('utf-8') if sys.version_info[0] == 2 else self.slurm_version) oprot.writeFieldEnd() if self.metadata_token is not None: - oprot.writeFieldBegin("metadata_token", TType.STRING, 13) - oprot.writeString( - self.metadata_token.encode("utf-8") - if sys.version_info[0] == 2 - else self.metadata_token - ) + oprot.writeFieldBegin('metadata_token', TType.STRING, 13) + oprot.writeString(self.metadata_token.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_token) oprot.writeFieldEnd() if self.metadata_endpoint is not None: - oprot.writeFieldBegin("metadata_endpoint", TType.STRING, 14) - oprot.writeString( - self.metadata_endpoint.encode("utf-8") - if sys.version_info[0] == 2 - else self.metadata_endpoint - ) + oprot.writeFieldBegin('metadata_endpoint', TType.STRING, 14) + oprot.writeString(self.metadata_endpoint.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_endpoint) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10143,111 +8591,32 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_args) start_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "flavor_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image_name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "public_key", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "servername", - "UTF8", - None, - ), # 4 - ( - 5, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 5 + (1, TType.STRING, 'flavor_name', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'public_key', 'UTF8', None, ), # 3 + (4, TType.STRING, 'servername', 'UTF8', None, ), # 4 + (5, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 5 None, # 6 - ( - 7, - TType.LIST, - "volume_ids_path_new", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 7 - ( - 8, - TType.LIST, - "volume_ids_path_attach", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 8 - ( - 9, - TType.LIST, - "additional_keys", - (TType.STRING, "UTF8", False), - None, - ), # 9 - ( - 10, - TType.STRING, - "research_environment", - "UTF8", - None, - ), # 10 - ( - 11, - TType.LIST, - "additional_security_group_ids", - (TType.STRING, "UTF8", False), - None, - ), # 11 - ( - 12, - TType.STRING, - "slurm_version", - "UTF8", - None, - ), # 12 - ( - 13, - TType.STRING, - "metadata_token", - "UTF8", - None, - ), # 13 - ( - 14, - TType.STRING, - "metadata_endpoint", - "UTF8", - None, - ), # 14 + (7, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 7 + (8, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 8 + (9, TType.LIST, 'additional_keys', (TType.STRING, 'UTF8', False), None, ), # 9 + (10, TType.STRING, 'research_environment', 'UTF8', None, ), # 10 + (11, TType.LIST, 'additional_security_group_ids', (TType.STRING, 'UTF8', False), None, ), # 11 + (12, TType.STRING, 'slurm_version', 'UTF8', None, ), # 12 + (13, TType.STRING, 'metadata_token', 'UTF8', None, ), # 13 + (14, TType.STRING, 'metadata_endpoint', 'UTF8', None, ), # 14 ) @@ -10263,17 +8632,8 @@ class start_server_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - r=None, - i=None, - f=None, - o=None, - ): + def __init__(self, success=None, e=None, r=None, i=None, f=None, o=None,): self.success = success self.e = e self.r = r @@ -10282,11 +8642,7 @@ def __init__( self.o = o def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10296,11 +8652,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -10334,39 +8686,32 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("start_server_result") + oprot.writeStructBegin('start_server_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 2) + oprot.writeFieldBegin('r', TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin("i", TType.STRUCT, 5) + oprot.writeFieldBegin('i', TType.STRUCT, 5) self.i.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin("f", TType.STRUCT, 6) + oprot.writeFieldBegin('f', TType.STRUCT, 6) self.f.write(oprot) oprot.writeFieldEnd() if self.o is not None: - oprot.writeFieldBegin("o", TType.STRUCT, 7) + oprot.writeFieldBegin('o', TType.STRUCT, 7) self.o.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10376,74 +8721,33 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_result) start_server_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [NameAlreadyUsedException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ResourceNotAvailableException, None], - None, - ), # 2 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 None, # 3 None, # 4 - ( - 5, - TType.STRUCT, - "i", - [ImageNotFoundException, None], - None, - ), # 5 - ( - 6, - TType.STRUCT, - "f", - [FlavorNotFoundException, None], - None, - ), # 6 - ( - 7, - TType.STRUCT, - "o", - [DefaultException, None], - None, - ), # 7 + (5, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 5 + (6, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 6 + (7, TType.STRUCT, 'o', [DefaultException, None], None, ), # 7 ) class is_bibigrid_available_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10457,13 +8761,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("is_bibigrid_available_args") + oprot.writeStructBegin('is_bibigrid_available_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -10471,18 +8772,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): @@ -10492,20 +8793,12 @@ class is_bibigrid_available_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10524,15 +8817,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("is_bibigrid_available_result") + oprot.writeStructBegin('is_bibigrid_available_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10542,25 +8832,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(is_bibigrid_available_result) is_bibigrid_available_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -10572,22 +8855,13 @@ class detach_ip_from_server_args(object): """ - thrift_spec = None - def __init__( - self, - server_id=None, - floating_ip=None, - ): + def __init__(self, server_id=None, floating_ip=None,): self.server_id = server_id self.floating_ip = floating_ip def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10597,20 +8871,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.floating_ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.floating_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -10619,28 +8885,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("detach_ip_from_server_args") + oprot.writeStructBegin('detach_ip_from_server_args') if self.server_id is not None: - oprot.writeFieldBegin("server_id", TType.STRING, 1) - oprot.writeString( - self.server_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.server_id - ) + oprot.writeFieldBegin('server_id', TType.STRING, 1) + oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) oprot.writeFieldEnd() if self.floating_ip is not None: - oprot.writeFieldBegin("floating_ip", TType.STRING, 2) - oprot.writeString( - self.floating_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.floating_ip - ) + oprot.writeFieldBegin('floating_ip', TType.STRING, 2) + oprot.writeString(self.floating_ip.encode('utf-8') if sys.version_info[0] == 2 else self.floating_ip) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10649,33 +8904,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_ip_from_server_args) detach_ip_from_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "floating_ip", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'floating_ip', 'UTF8', None, ), # 2 ) @@ -10686,20 +8928,12 @@ class detach_ip_from_server_result(object): """ - thrift_spec = None - def __init__( - self, - s=None, - ): + def __init__(self, s=None,): self.s = s def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10718,15 +8952,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("detach_ip_from_server_result") + oprot.writeStructBegin('detach_ip_from_server_result') if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 1) + oprot.writeFieldBegin('s', TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10736,26 +8967,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_ip_from_server_result) detach_ip_from_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 ) @@ -10775,21 +8999,8 @@ class start_server_with_custom_key_args(object): """ - thrift_spec = None - def __init__( - self, - flavor_name=None, - image_name=None, - servername=None, - metadata=None, - research_environment=None, - volume_ids_path_new=None, - volume_ids_path_attach=None, - additional_security_group_ids=None, - 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, metadata_token=None, metadata_endpoint=None,): self.flavor_name = flavor_name self.image_name = image_name self.servername = servername @@ -10802,11 +9013,7 @@ def __init__( self.metadata_endpoint = metadata_endpoint def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10816,29 +9023,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.servername = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -10846,27 +9041,15 @@ def read(self, iprot): self.metadata = {} (_ktype182, _vtype183, _size181) = iprot.readMapBegin() for _i185 in range(_size181): - _key186 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val187 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key186 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val187 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key186] = _val187 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.research_environment = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.research_environment = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -10877,16 +9060,8 @@ def read(self, iprot): _elem193 = {} (_ktype195, _vtype196, _size194) = iprot.readMapBegin() for _i198 in range(_size194): - _key199 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val200 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key199 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val200 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem193[_key199] = _val200 iprot.readMapEnd() self.volume_ids_path_new.append(_elem193) @@ -10901,16 +9076,8 @@ def read(self, iprot): _elem206 = {} (_ktype208, _vtype209, _size207) = iprot.readMapBegin() for _i211 in range(_size207): - _key212 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val213 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key212 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val213 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _elem206[_key212] = _val213 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem206) @@ -10922,31 +9089,19 @@ 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() - ) + 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 == 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_endpoint = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -10955,119 +9110,70 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 - ) + 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) 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 - ) + 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) 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 - ) + 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.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 - ) + oprot.writeString(iter228.encode('utf-8') if sys.version_info[0] == 2 else iter228) 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, 10) + 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, 11) + oprot.writeString(self.metadata_endpoint.encode('utf-8') if sys.version_info[0] == 2 else self.metadata_endpoint) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11076,90 +9182,29 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_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.STRING, 'metadata_token', 'UTF8', None, ), # 10 + (11, TType.STRING, 'metadata_endpoint', 'UTF8', None, ), # 11 ) @@ -11175,17 +9220,8 @@ class start_server_with_custom_key_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - r=None, - i=None, - f=None, - d=None, - ): + def __init__(self, success=None, e=None, r=None, i=None, f=None, d=None,): self.success = success self.e = e self.r = r @@ -11194,11 +9230,7 @@ def __init__( self.d = d def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11208,11 +9240,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -11246,39 +9274,32 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("start_server_with_custom_key_result") + oprot.writeStructBegin('start_server_with_custom_key_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 2) + oprot.writeFieldBegin('r', TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin("i", TType.STRUCT, 3) + oprot.writeFieldBegin('i', TType.STRUCT, 3) self.i.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin("f", TType.STRUCT, 4) + oprot.writeFieldBegin('f', TType.STRUCT, 4) self.f.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin("d", TType.STRUCT, 5) + oprot.writeFieldBegin('d', TType.STRUCT, 5) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11288,60 +9309,23 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_with_custom_key_result) start_server_with_custom_key_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [NameAlreadyUsedException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ResourceNotAvailableException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "i", - [ImageNotFoundException, None], - None, - ), # 3 - ( - 4, - TType.STRUCT, - "f", - [FlavorNotFoundException, None], - None, - ), # 4 - ( - 5, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 5 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 + (3, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 3 + (4, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 4 + (5, TType.STRUCT, 'd', [DefaultException, None], None, ), # 5 ) @@ -11352,20 +9336,12 @@ class exist_server_args(object): """ - thrift_spec = None - def __init__( - self, - name=None, - ): + def __init__(self, name=None,): self.name = name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11375,11 +9351,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -11388,18 +9360,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("exist_server_args") + oprot.writeStructBegin('exist_server_args') if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 1) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11408,26 +9375,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(exist_server_args) exist_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 ) @@ -11438,20 +9398,12 @@ class exist_server_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11470,15 +9422,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("exist_server_result") + oprot.writeStructBegin('exist_server_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11488,25 +9437,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(exist_server_result) exist_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -11523,18 +9465,8 @@ class create_and_deploy_playbook_args(object): """ - thrift_spec = None - def __init__( - self, - public_key=None, - openstack_id=None, - conda_packages=None, - research_environment_template=None, - apt_packages=None, - create_only_backend=None, - base_url=None, - ): + def __init__(self, public_key=None, openstack_id=None, conda_packages=None, research_environment_template=None, apt_packages=None, create_only_backend=None, base_url=None,): self.public_key = public_key self.openstack_id = openstack_id self.conda_packages = conda_packages @@ -11544,11 +9476,7 @@ def __init__( self.base_url = base_url def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11558,20 +9486,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -11587,11 +9507,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.research_environment_template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.research_environment_template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: @@ -11599,11 +9515,7 @@ def read(self, iprot): 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() - ) + _elem240 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.apt_packages.append(_elem240) iprot.readListEnd() else: @@ -11615,11 +9527,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.base_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.base_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -11628,64 +9536,43 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_and_deploy_playbook_args") + oprot.writeStructBegin('create_and_deploy_playbook_args') if self.public_key is not None: - oprot.writeFieldBegin("public_key", TType.STRING, 1) - oprot.writeString( - self.public_key.encode("utf-8") - if sys.version_info[0] == 2 - else self.public_key - ) + oprot.writeFieldBegin('public_key', TType.STRING, 1) + oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 2) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 2) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.conda_packages is not None: - oprot.writeFieldBegin("conda_packages", TType.LIST, 3) + oprot.writeFieldBegin('conda_packages', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.conda_packages)) for iter241 in self.conda_packages: iter241.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 - ) + oprot.writeString(iter242.encode('utf-8') if sys.version_info[0] == 2 else iter242) 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() @@ -11694,68 +9581,25 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_and_deploy_playbook_args) create_and_deploy_playbook_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "public_key", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 2 - ( - 3, - TType.LIST, - "conda_packages", - (TType.STRUCT, [CondaPackage, None], False), - None, - ), # 3 - ( - 4, - TType.STRING, - "research_environment_template", - "UTF8", - None, - ), # 4 - ( - 5, - TType.LIST, - "apt_packages", - (TType.STRING, "UTF8", False), - None, - ), # 5 - ( - 6, - TType.BOOL, - "create_only_backend", - None, - None, - ), # 6 - ( - 7, - TType.STRING, - "base_url", - "UTF8", - None, - ), # 7 + (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 + (2, TType.STRING, 'openstack_id', 'UTF8', None, ), # 2 + (3, TType.LIST, 'conda_packages', (TType.STRUCT, [CondaPackage, None], False), None, ), # 3 + (4, TType.STRING, 'research_environment_template', 'UTF8', None, ), # 4 + (5, TType.LIST, 'apt_packages', (TType.STRING, 'UTF8', False), None, ), # 5 + (6, TType.BOOL, 'create_only_backend', None, None, ), # 6 + (7, TType.STRING, 'base_url', 'UTF8', None, ), # 7 ) @@ -11767,22 +9611,13 @@ class create_and_deploy_playbook_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - s=None, - ): + def __init__(self, success=None, s=None,): self.success = success self.s = s def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11806,19 +9641,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_and_deploy_playbook_result") + oprot.writeStructBegin('create_and_deploy_playbook_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.I32, 0) + oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 1) + oprot.writeFieldBegin('s', TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11828,32 +9660,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_and_deploy_playbook_result) create_and_deploy_playbook_result.thrift_spec = ( - ( - 0, - TType.I32, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "s", - [ServerNotFoundException, None], - None, - ), # 1 + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 ) @@ -11864,20 +9683,12 @@ class get_playbook_logs_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11887,11 +9698,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -11900,20 +9707,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_playbook_logs_args") + oprot.writeStructBegin('get_playbook_logs_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11922,26 +9722,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_playbook_logs_args) get_playbook_logs_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -11953,22 +9746,13 @@ class get_playbook_logs_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - p=None, - ): + def __init__(self, success=None, p=None,): self.success = success self.p = p def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11993,19 +9777,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_playbook_logs_result") + oprot.writeStructBegin('get_playbook_logs_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.p is not None: - oprot.writeFieldBegin("p", TType.STRUCT, 1) + oprot.writeFieldBegin('p', TType.STRUCT, 1) self.p.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12015,44 +9796,27 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_playbook_logs_result) get_playbook_logs_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [PlaybookResult, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "p", - [PlaybookNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [PlaybookResult, None], None, ), # 0 + (1, TType.STRUCT, 'p', [PlaybookNotFoundException, None], None, ), # 1 ) class has_forc_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12066,13 +9830,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("has_forc_args") + oprot.writeStructBegin('has_forc_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -12080,18 +9841,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): @@ -12101,20 +9862,12 @@ class has_forc_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12133,15 +9886,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("has_forc_result") + oprot.writeStructBegin('has_forc_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12151,37 +9901,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(has_forc_result) has_forc_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) class get_forc_url_args(object): - 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() @@ -12195,13 +9934,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_forc_url_args") + oprot.writeStructBegin('get_forc_url_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -12209,18 +9945,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): @@ -12230,20 +9966,12 @@ 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() @@ -12253,11 +9981,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12266,20 +9990,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_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() @@ -12288,25 +10005,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_forc_url_result) get_forc_url_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -12320,26 +10030,15 @@ class create_backend_args(object): """ - thrift_spec = None - def __init__( - self, - owner=None, - user_path=None, - template=None, - upstream_url=None, - ): + def __init__(self, owner=None, user_path=None, template=None, upstream_url=None,): self.owner = owner self.user_path = user_path self.template = template self.upstream_url = upstream_url def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12349,38 +10048,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_path = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_path = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.upstream_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.upstream_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12389,42 +10072,25 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_backend_args") + oprot.writeStructBegin('create_backend_args') if self.owner is not None: - oprot.writeFieldBegin("owner", TType.STRING, 1) - oprot.writeString( - self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner - ) + oprot.writeFieldBegin('owner', TType.STRING, 1) + oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) oprot.writeFieldEnd() if self.user_path is not None: - oprot.writeFieldBegin("user_path", TType.STRING, 2) - oprot.writeString( - self.user_path.encode("utf-8") - if sys.version_info[0] == 2 - else self.user_path - ) + oprot.writeFieldBegin('user_path', TType.STRING, 2) + oprot.writeString(self.user_path.encode('utf-8') if sys.version_info[0] == 2 else self.user_path) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin("template", TType.STRING, 3) - oprot.writeString( - self.template.encode("utf-8") - if sys.version_info[0] == 2 - else self.template - ) + oprot.writeFieldBegin('template', TType.STRING, 3) + oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) oprot.writeFieldEnd() if self.upstream_url is not None: - oprot.writeFieldBegin("upstream_url", TType.STRING, 4) - oprot.writeString( - self.upstream_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.upstream_url - ) + oprot.writeFieldBegin('upstream_url', TType.STRING, 4) + oprot.writeString(self.upstream_url.encode('utf-8') if sys.version_info[0] == 2 else self.upstream_url) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12433,47 +10099,22 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_backend_args) create_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "owner", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "user_path", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "template", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "upstream_url", - "UTF8", - None, - ), # 4 + (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 + (2, TType.STRING, 'user_path', 'UTF8', None, ), # 2 + (3, TType.STRING, 'template', 'UTF8', None, ), # 3 + (4, TType.STRING, 'upstream_url', 'UTF8', None, ), # 4 ) @@ -12486,24 +10127,14 @@ class create_backend_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - d=None, - ): + def __init__(self, success=None, e=None, d=None,): self.success = success self.e = e self.d = d def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12533,23 +10164,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_backend_result") + oprot.writeStructBegin('create_backend_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin("d", TType.STRUCT, 2) + oprot.writeFieldBegin('d', TType.STRUCT, 2) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12559,51 +10187,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_backend_result) create_backend_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Backend, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [TemplateNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 + (1, TType.STRUCT, 'e', [TemplateNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'd', [DefaultException, None], None, ), # 2 ) class get_backends_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12617,13 +10222,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_backends_args") + oprot.writeStructBegin('get_backends_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -12631,18 +10233,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): @@ -12653,22 +10255,13 @@ class get_backends_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - d=None, - ): + def __init__(self, success=None, d=None,): self.success = success self.d = d def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12698,22 +10291,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_backends_result") + oprot.writeStructBegin('get_backends_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter249 in self.success: iter249.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin("d", TType.STRUCT, 1) + oprot.writeFieldBegin('d', TType.STRUCT, 1) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12723,32 +10313,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_result) get_backends_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 ) @@ -12759,20 +10336,12 @@ class get_backends_by_owner_args(object): """ - thrift_spec = None - def __init__( - self, - owner=None, - ): + def __init__(self, owner=None,): self.owner = owner def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12782,11 +10351,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12795,18 +10360,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_backends_by_owner_args") + oprot.writeStructBegin('get_backends_by_owner_args') if self.owner is not None: - oprot.writeFieldBegin("owner", TType.STRING, 1) - oprot.writeString( - self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner - ) + oprot.writeFieldBegin('owner', TType.STRING, 1) + oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12815,26 +10375,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_owner_args) get_backends_by_owner_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "owner", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 ) @@ -12846,22 +10399,13 @@ class get_backends_by_owner_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - d=None, - ): + def __init__(self, success=None, d=None,): self.success = success self.d = d def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12891,22 +10435,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_backends_by_owner_result") + oprot.writeStructBegin('get_backends_by_owner_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for 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() @@ -12916,32 +10457,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_owner_result) get_backends_by_owner_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 ) @@ -12952,20 +10480,12 @@ class get_backends_by_template_args(object): """ - thrift_spec = None - def __init__( - self, - template=None, - ): + def __init__(self, template=None,): self.template = template def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12975,11 +10495,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12988,20 +10504,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_backends_by_template_args") + oprot.writeStructBegin('get_backends_by_template_args') if self.template is not None: - oprot.writeFieldBegin("template", TType.STRING, 1) - oprot.writeString( - self.template.encode("utf-8") - if sys.version_info[0] == 2 - else self.template - ) + oprot.writeFieldBegin('template', TType.STRING, 1) + oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13010,26 +10519,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_template_args) get_backends_by_template_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "template", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'template', 'UTF8', None, ), # 1 ) @@ -13041,22 +10543,13 @@ class get_backends_by_template_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - d=None, - ): + def __init__(self, success=None, d=None,): self.success = success self.d = d def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13086,22 +10579,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_backends_by_template_result") + oprot.writeStructBegin('get_backends_by_template_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for 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() @@ -13111,32 +10601,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_template_result) get_backends_by_template_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 ) @@ -13147,20 +10624,12 @@ class get_backend_by_id_args(object): """ - thrift_spec = None - def __init__( - self, - id=None, - ): + def __init__(self, id=None,): self.id = id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13179,15 +10648,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_backend_by_id_args") + oprot.writeStructBegin('get_backend_by_id_args') if self.id is not None: - oprot.writeFieldBegin("id", TType.I64, 1) + oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13197,26 +10663,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backend_by_id_args) get_backend_by_id_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 + (1, TType.I64, 'id', None, None, ), # 1 ) @@ -13229,24 +10688,14 @@ class get_backend_by_id_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - b=None, - d=None, - ): + def __init__(self, success=None, b=None, d=None,): self.success = success self.b = b self.d = d def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13276,23 +10725,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_backend_by_id_result") + oprot.writeStructBegin('get_backend_by_id_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin("b", TType.STRUCT, 1) + oprot.writeFieldBegin('b', TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin("d", TType.STRUCT, 2) + oprot.writeFieldBegin('d', TType.STRUCT, 2) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13302,39 +10748,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backend_by_id_result) get_backend_by_id_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Backend, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "d", - [DefaultException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'd', [DefaultException, None], None, ), # 2 ) @@ -13346,22 +10773,13 @@ class set_metadata_server_data_args(object): """ - thrift_spec = None - def __init__( - self, - ip=None, - metadata=None, - ): + def __init__(self, ip=None, metadata=None,): self.ip = ip self.metadata = metadata def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13371,11 +10789,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -13390,21 +10804,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_metadata_server_data_args") + oprot.writeStructBegin('set_metadata_server_data_args') if self.ip is not None: - oprot.writeFieldBegin("ip", TType.STRING, 1) - oprot.writeString( - self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip - ) + oprot.writeFieldBegin('ip', TType.STRING, 1) + oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin("metadata", TType.STRUCT, 3) + oprot.writeFieldBegin('metadata', TType.STRUCT, 3) self.metadata.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13414,34 +10823,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(set_metadata_server_data_args) set_metadata_server_data_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "ip", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 None, # 2 - ( - 3, - TType.STRUCT, - "metadata", - [VirtualMachineServerMetadata, None], - None, - ), # 3 + (3, TType.STRUCT, 'metadata', [VirtualMachineServerMetadata, None], None, ), # 3 ) @@ -13453,22 +10849,13 @@ class set_metadata_server_data_result(object): """ - thrift_spec = None - def __init__( - self, - m=None, - b=None, - ): + def __init__(self, m=None, b=None,): self.m = m self.b = b def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13492,19 +10879,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("set_metadata_server_data_result") + oprot.writeStructBegin('set_metadata_server_data_result') if self.m is not None: - oprot.writeFieldBegin("m", TType.STRUCT, 1) + oprot.writeFieldBegin('m', TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin("b", TType.STRUCT, 2) + oprot.writeFieldBegin('b', TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13514,33 +10898,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(set_metadata_server_data_result) set_metadata_server_data_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "m", - [MetadataServerNotAvailableException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "b", - [MetadataServerNotAllowedException, None], - None, - ), # 2 + (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 + (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 ) @@ -13551,20 +10922,12 @@ class remove_metadata_server_data_args(object): """ - thrift_spec = None - def __init__( - self, - ip=None, - ): + def __init__(self, ip=None,): self.ip = ip def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13574,11 +10937,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -13587,18 +10946,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("remove_metadata_server_data_args") + oprot.writeStructBegin('remove_metadata_server_data_args') if self.ip is not None: - oprot.writeFieldBegin("ip", TType.STRING, 1) - oprot.writeString( - self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip - ) + oprot.writeFieldBegin('ip', TType.STRING, 1) + oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13607,26 +10961,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(remove_metadata_server_data_args) remove_metadata_server_data_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "ip", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 ) @@ -13638,22 +10985,13 @@ class remove_metadata_server_data_result(object): """ - thrift_spec = None - def __init__( - self, - m=None, - b=None, - ): + def __init__(self, m=None, b=None,): self.m = m self.b = b def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13677,19 +11015,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("remove_metadata_server_data_result") + oprot.writeStructBegin('remove_metadata_server_data_result') if self.m is not None: - oprot.writeFieldBegin("m", TType.STRUCT, 1) + oprot.writeFieldBegin('m', TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin("b", TType.STRUCT, 2) + oprot.writeFieldBegin('b', TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13699,45 +11034,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(remove_metadata_server_data_result) remove_metadata_server_data_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "m", - [MetadataServerNotAvailableException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "b", - [MetadataServerNotAllowedException, None], - None, - ), # 2 + (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 + (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 ) class is_metadata_server_available_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13751,13 +11069,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("is_metadata_server_available_args") + oprot.writeStructBegin('is_metadata_server_available_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -13765,18 +11080,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): @@ -13787,22 +11102,13 @@ class is_metadata_server_available_result(object): """ - thrift_spec = None - def __init__( - self, - m=None, - b=None, - ): + def __init__(self, m=None, b=None,): self.m = m self.b = b def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13826,19 +11132,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("is_metadata_server_available_result") + oprot.writeStructBegin('is_metadata_server_available_result') if self.m is not None: - oprot.writeFieldBegin("m", TType.STRUCT, 1) + oprot.writeFieldBegin('m', TType.STRUCT, 1) self.m.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin("b", TType.STRUCT, 2) + oprot.writeFieldBegin('b', TType.STRUCT, 2) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13848,33 +11151,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(is_metadata_server_available_result) is_metadata_server_available_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "m", - [MetadataServerNotAvailableException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "b", - [MetadataServerNotAllowedException, None], - None, - ), # 2 + (1, TType.STRUCT, 'm', [MetadataServerNotAvailableException, None], None, ), # 1 + (2, TType.STRUCT, 'b', [MetadataServerNotAllowedException, None], None, ), # 2 ) @@ -13885,20 +11175,12 @@ class delete_backend_args(object): """ - thrift_spec = None - def __init__( - self, - id=None, - ): + def __init__(self, id=None,): self.id = id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13917,15 +11199,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_backend_args") + oprot.writeStructBegin('delete_backend_args') if self.id is not None: - oprot.writeFieldBegin("id", TType.I64, 1) + oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13935,26 +11214,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_backend_args) delete_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 + (1, TType.I64, 'id', None, None, ), # 1 ) @@ -13965,20 +11237,12 @@ class delete_backend_result(object): """ - thrift_spec = None - def __init__( - self, - b=None, - ): + def __init__(self, b=None,): self.b = b def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13997,15 +11261,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_backend_result") + oprot.writeStructBegin('delete_backend_result') if self.b is not None: - oprot.writeFieldBegin("b", TType.STRUCT, 1) + oprot.writeFieldBegin('b', TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14015,26 +11276,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(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 ) @@ -14046,22 +11300,13 @@ class add_user_to_backend_args(object): """ - thrift_spec = None - def __init__( - self, - backend_id=None, - user_id=None, - ): + def __init__(self, backend_id=None, user_id=None,): self.backend_id = backend_id self.user_id = user_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14076,11 +11321,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -14089,24 +11330,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_user_to_backend_args") + oprot.writeStructBegin('add_user_to_backend_args') if self.backend_id is not None: - oprot.writeFieldBegin("backend_id", TType.I64, 1) + oprot.writeFieldBegin('backend_id', TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin("user_id", TType.STRING, 2) - oprot.writeString( - self.user_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.user_id - ) + oprot.writeFieldBegin('user_id', TType.STRING, 2) + oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14115,33 +11349,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_user_to_backend_args) add_user_to_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "backend_id", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "user_id", - "UTF8", - None, - ), # 2 + (1, TType.I64, 'backend_id', None, None, ), # 1 + (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 ) @@ -14153,22 +11374,13 @@ class add_user_to_backend_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - b=None, - ): + def __init__(self, success=None, b=None,): self.success = success self.b = b def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14181,16 +11393,8 @@ def read(self, iprot): 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() - ) + _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 iprot.readMapEnd() else: @@ -14206,27 +11410,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_user_to_backend_result") + oprot.writeStructBegin('add_user_to_backend_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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 - ) + 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) 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() @@ -14236,32 +11433,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_user_to_backend_result) add_user_to_backend_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 ) @@ -14272,20 +11456,12 @@ class get_users_from_backend_args(object): """ - thrift_spec = None - def __init__( - self, - backend_id=None, - ): + def __init__(self, backend_id=None,): self.backend_id = backend_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14304,15 +11480,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_users_from_backend_args") + oprot.writeStructBegin('get_users_from_backend_args') if self.backend_id is not None: - oprot.writeFieldBegin("backend_id", TType.I64, 1) + oprot.writeFieldBegin('backend_id', TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14322,26 +11495,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_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 ) @@ -14353,22 +11519,13 @@ class get_users_from_backend_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - b=None, - ): + def __init__(self, success=None, b=None,): self.success = success self.b = b def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14381,11 +11538,7 @@ def read(self, iprot): 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() - ) + _elem278 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem278) iprot.readListEnd() else: @@ -14401,24 +11554,19 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_users_from_backend_result") + oprot.writeStructBegin('get_users_from_backend_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter279 in self.success: - oprot.writeString( - iter279.encode("utf-8") if sys.version_info[0] == 2 else iter279 - ) + oprot.writeString(iter279.encode('utf-8') if sys.version_info[0] == 2 else iter279) 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() @@ -14428,32 +11576,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_users_from_backend_result) get_users_from_backend_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 + (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 ) @@ -14465,22 +11600,13 @@ class delete_user_from_backend_args(object): """ - thrift_spec = None - def __init__( - self, - backend_id=None, - user_id=None, - ): + def __init__(self, backend_id=None, user_id=None,): self.backend_id = backend_id self.user_id = user_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14495,11 +11621,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -14508,24 +11630,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_user_from_backend_args") + oprot.writeStructBegin('delete_user_from_backend_args') if self.backend_id is not None: - oprot.writeFieldBegin("backend_id", TType.I64, 1) + oprot.writeFieldBegin('backend_id', TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin("user_id", TType.STRING, 2) - oprot.writeString( - self.user_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.user_id - ) + oprot.writeFieldBegin('user_id', TType.STRING, 2) + oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14534,33 +11649,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_user_from_backend_args) delete_user_from_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "backend_id", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "user_id", - "UTF8", - None, - ), # 2 + (1, TType.I64, 'backend_id', None, None, ), # 1 + (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 ) @@ -14572,22 +11674,13 @@ class delete_user_from_backend_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - b=None, - ): + def __init__(self, success=None, b=None,): self.success = success self.b = b def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14600,16 +11693,8 @@ def read(self, iprot): 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() - ) + _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 iprot.readMapEnd() else: @@ -14625,27 +11710,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_user_from_backend_result") + oprot.writeStructBegin('delete_user_from_backend_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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 - ) + 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) 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() @@ -14655,44 +11733,27 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_user_from_backend_result) delete_user_from_backend_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "b", - [BackendNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 ) class get_allowed_templates_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14706,13 +11767,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_allowed_templates_args") + oprot.writeStructBegin('get_allowed_templates_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -14720,18 +11778,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): @@ -14741,20 +11799,12 @@ class get_allowed_templates_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14779,15 +11829,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_allowed_templates_result") + oprot.writeStructBegin('get_allowed_templates_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter295 in self.success: iter295.write(oprot) @@ -14800,37 +11847,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_allowed_templates_result) get_allowed_templates_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [ResearchEnvironmentTemplate, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [ResearchEnvironmentTemplate, None], False), None, ), # 0 ) class get_servers_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14844,13 +11880,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_servers_args") + oprot.writeStructBegin('get_servers_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -14858,18 +11891,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): @@ -14879,20 +11912,12 @@ class get_servers_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14917,15 +11942,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_servers_result") + oprot.writeStructBegin('get_servers_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter302 in self.success: iter302.write(oprot) @@ -14938,25 +11960,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_result) get_servers_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -14967,20 +11982,12 @@ class get_servers_by_ids_args(object): """ - thrift_spec = None - def __init__( - self, - server_ids=None, - ): + def __init__(self, server_ids=None,): self.server_ids = server_ids def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14993,11 +12000,7 @@ def read(self, iprot): 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() - ) + _elem308 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.server_ids.append(_elem308) iprot.readListEnd() else: @@ -15008,20 +12011,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_servers_by_ids_args") + oprot.writeStructBegin('get_servers_by_ids_args') if self.server_ids is not None: - oprot.writeFieldBegin("server_ids", TType.LIST, 1) + oprot.writeFieldBegin('server_ids', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.server_ids)) for iter309 in self.server_ids: - oprot.writeString( - iter309.encode("utf-8") if sys.version_info[0] == 2 else iter309 - ) + oprot.writeString(iter309.encode('utf-8') if sys.version_info[0] == 2 else iter309) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15031,26 +12029,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_ids_args) get_servers_by_ids_args.thrift_spec = ( None, # 0 - ( - 1, - TType.LIST, - "server_ids", - (TType.STRING, "UTF8", False), - None, - ), # 1 + (1, TType.LIST, 'server_ids', (TType.STRING, 'UTF8', False), None, ), # 1 ) @@ -15061,20 +12052,12 @@ class get_servers_by_ids_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15099,15 +12082,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_servers_by_ids_result") + oprot.writeStructBegin('get_servers_by_ids_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter316 in self.success: iter316.write(oprot) @@ -15120,25 +12100,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_ids_result) get_servers_by_ids_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -15149,20 +12122,12 @@ class get_servers_by_bibigrid_id_args(object): """ - thrift_spec = None - def __init__( - self, - bibigrid_id=None, - ): + def __init__(self, bibigrid_id=None,): self.bibigrid_id = bibigrid_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15172,11 +12137,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.bibigrid_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.bibigrid_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15185,20 +12146,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_servers_by_bibigrid_id_args") + oprot.writeStructBegin('get_servers_by_bibigrid_id_args') if self.bibigrid_id is not None: - oprot.writeFieldBegin("bibigrid_id", TType.STRING, 1) - oprot.writeString( - self.bibigrid_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.bibigrid_id - ) + oprot.writeFieldBegin('bibigrid_id', TType.STRING, 1) + oprot.writeString(self.bibigrid_id.encode('utf-8') if sys.version_info[0] == 2 else self.bibigrid_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -15207,26 +12161,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_bibigrid_id_args) get_servers_by_bibigrid_id_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "bibigrid_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'bibigrid_id', 'UTF8', None, ), # 1 ) @@ -15237,20 +12184,12 @@ class get_servers_by_bibigrid_id_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15275,15 +12214,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_servers_by_bibigrid_id_result") + oprot.writeStructBegin('get_servers_by_bibigrid_id_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter323 in self.success: iter323.write(oprot) @@ -15296,25 +12232,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_bibigrid_id_result) get_servers_by_bibigrid_id_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -15325,20 +12254,12 @@ class get_security_group_id_by_name_args(object): """ - thrift_spec = None - def __init__( - self, - name=None, - ): + def __init__(self, name=None,): self.name = name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15348,11 +12269,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15361,18 +12278,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_security_group_id_by_name_args") + oprot.writeStructBegin('get_security_group_id_by_name_args') if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 1) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -15381,26 +12293,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_security_group_id_by_name_args) get_security_group_id_by_name_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 ) @@ -15412,22 +12317,13 @@ class get_security_group_id_by_name_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - s=None, - ): + def __init__(self, success=None, s=None,): self.success = success self.s = s def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15437,11 +12333,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -15455,23 +12347,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_security_group_id_by_name_result") + oprot.writeStructBegin('get_security_group_id_by_name_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 1) + oprot.writeFieldBegin('s', TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15481,32 +12366,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_security_group_id_by_name_result) get_security_group_id_by_name_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "s", - [SecurityGroupNotFoundException, None], - None, - ), # 1 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 's', [SecurityGroupNotFoundException, None], None, ), # 1 ) @@ -15523,18 +12395,8 @@ class scale_up_cluster_args(object): """ - thrift_spec = None - def __init__( - self, - cluster_id=None, - image_name=None, - flavor_name=None, - count=None, - names=None, - start_idx=None, - batch_idx=None, - ): + def __init__(self, cluster_id=None, image_name=None, flavor_name=None, count=None, names=None, start_idx=None, batch_idx=None,): self.cluster_id = cluster_id self.image_name = image_name self.flavor_name = flavor_name @@ -15544,11 +12406,7 @@ def __init__( self.batch_idx = batch_idx def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15558,29 +12416,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.flavor_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -15593,11 +12439,7 @@ def read(self, iprot): 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() - ) + _elem329 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.names.append(_elem329) iprot.readListEnd() else: @@ -15618,56 +12460,39 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("scale_up_cluster_args") + oprot.writeStructBegin('scale_up_cluster_args') if self.cluster_id is not None: - oprot.writeFieldBegin("cluster_id", TType.STRING, 1) - oprot.writeString( - self.cluster_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_id - ) + oprot.writeFieldBegin('cluster_id', TType.STRING, 1) + oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin("image_name", TType.STRING, 2) - oprot.writeString( - self.image_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.image_name - ) + oprot.writeFieldBegin('image_name', TType.STRING, 2) + oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) oprot.writeFieldEnd() if self.flavor_name is not None: - oprot.writeFieldBegin("flavor_name", TType.STRING, 3) - oprot.writeString( - self.flavor_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.flavor_name - ) + oprot.writeFieldBegin('flavor_name', TType.STRING, 3) + oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) oprot.writeFieldEnd() if self.count is not None: - oprot.writeFieldBegin("count", TType.I32, 4) + oprot.writeFieldBegin('count', TType.I32, 4) oprot.writeI32(self.count) oprot.writeFieldEnd() if self.names is not None: - oprot.writeFieldBegin("names", TType.LIST, 5) + oprot.writeFieldBegin('names', TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.names)) for iter330 in self.names: - oprot.writeString( - iter330.encode("utf-8") if sys.version_info[0] == 2 else iter330 - ) + oprot.writeString(iter330.encode('utf-8') if sys.version_info[0] == 2 else iter330) 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() @@ -15677,68 +12502,25 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(scale_up_cluster_args) scale_up_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image_name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "flavor_name", - "UTF8", - None, - ), # 3 - ( - 4, - TType.I32, - "count", - None, - None, - ), # 4 - ( - 5, - TType.LIST, - "names", - (TType.STRING, "UTF8", False), - None, - ), # 5 - ( - 6, - TType.I32, - "start_idx", - None, - None, - ), # 6 - ( - 7, - TType.I32, - "batch_idx", - None, - None, - ), # 7 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'flavor_name', 'UTF8', None, ), # 3 + (4, TType.I32, 'count', None, None, ), # 4 + (5, TType.LIST, 'names', (TType.STRING, 'UTF8', False), None, ), # 5 + (6, TType.I32, 'start_idx', None, None, ), # 6 + (7, TType.I32, 'batch_idx', None, None, ), # 7 ) @@ -15749,20 +12531,12 @@ class scale_up_cluster_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15775,19 +12549,11 @@ def read(self, iprot): 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() - ) + _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() - ) + _elem343 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _val337.append(_elem343) iprot.readListEnd() self.success[_key336] = _val337 @@ -15800,25 +12566,18 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("scale_up_cluster_result") + oprot.writeStructBegin('scale_up_cluster_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.success)) for kiter344, viter345 in self.success.items(): - oprot.writeString( - kiter344.encode("utf-8") if sys.version_info[0] == 2 else kiter344 - ) + 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 - ) + oprot.writeString(iter346.encode('utf-8') if sys.version_info[0] == 2 else iter346) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -15829,25 +12588,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(scale_up_cluster_result) scale_up_cluster_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.LIST, (TType.STRING, "UTF8", False), False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.LIST, (TType.STRING, 'UTF8', False), False), None, ), # 0 ) @@ -15866,20 +12618,8 @@ class add_cluster_machine_args(object): """ - thrift_spec = None - def __init__( - self, - cluster_id=None, - cluster_user=None, - cluster_group_id=None, - image_name=None, - flavor_name=None, - name=None, - key_name=None, - batch_idx=None, - worker_idx=None, - ): + def __init__(self, cluster_id=None, cluster_user=None, cluster_group_id=None, image_name=None, flavor_name=None, name=None, key_name=None, batch_idx=None, worker_idx=None,): self.cluster_id = cluster_id self.cluster_user = cluster_user self.cluster_group_id = cluster_group_id @@ -15891,11 +12631,7 @@ def __init__( self.worker_idx = worker_idx def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15905,65 +12641,37 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.cluster_user = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.cluster_group_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_group_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.image_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.flavor_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.key_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: @@ -15982,73 +12690,44 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_cluster_machine_args") + oprot.writeStructBegin('add_cluster_machine_args') if self.cluster_id is not None: - oprot.writeFieldBegin("cluster_id", TType.STRING, 1) - oprot.writeString( - self.cluster_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_id - ) + oprot.writeFieldBegin('cluster_id', TType.STRING, 1) + oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) oprot.writeFieldEnd() if self.cluster_user is not None: - oprot.writeFieldBegin("cluster_user", TType.STRING, 2) - oprot.writeString( - self.cluster_user.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_user - ) + oprot.writeFieldBegin('cluster_user', TType.STRING, 2) + oprot.writeString(self.cluster_user.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_user) oprot.writeFieldEnd() if self.cluster_group_id is not None: - oprot.writeFieldBegin("cluster_group_id", TType.STRING, 3) - oprot.writeString( - self.cluster_group_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_group_id - ) + oprot.writeFieldBegin('cluster_group_id', TType.STRING, 3) + oprot.writeString(self.cluster_group_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_group_id) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin("image_name", TType.STRING, 4) - oprot.writeString( - self.image_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.image_name - ) + oprot.writeFieldBegin('image_name', TType.STRING, 4) + oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) oprot.writeFieldEnd() if self.flavor_name is not None: - oprot.writeFieldBegin("flavor_name", TType.STRING, 5) - oprot.writeString( - self.flavor_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.flavor_name - ) + oprot.writeFieldBegin('flavor_name', TType.STRING, 5) + oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 6) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 6) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.key_name is not None: - oprot.writeFieldBegin("key_name", TType.STRING, 7) - oprot.writeString( - self.key_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.key_name - ) + oprot.writeFieldBegin('key_name', TType.STRING, 7) + oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) oprot.writeFieldEnd() if self.batch_idx is not None: - oprot.writeFieldBegin("batch_idx", TType.I32, 8) + oprot.writeFieldBegin('batch_idx', TType.I32, 8) oprot.writeI32(self.batch_idx) oprot.writeFieldEnd() if self.worker_idx is not None: - oprot.writeFieldBegin("worker_idx", TType.I32, 9) + oprot.writeFieldBegin('worker_idx', TType.I32, 9) oprot.writeI32(self.worker_idx) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -16058,82 +12737,27 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_cluster_machine_args) add_cluster_machine_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "cluster_user", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "cluster_group_id", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "image_name", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "flavor_name", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "name", - "UTF8", - None, - ), # 6 - ( - 7, - TType.STRING, - "key_name", - "UTF8", - None, - ), # 7 - ( - 8, - TType.I32, - "batch_idx", - None, - None, - ), # 8 - ( - 9, - TType.I32, - "worker_idx", - None, - None, - ), # 9 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'cluster_user', 'UTF8', None, ), # 2 + (3, TType.STRING, 'cluster_group_id', 'UTF8', None, ), # 3 + (4, TType.STRING, 'image_name', 'UTF8', None, ), # 4 + (5, TType.STRING, 'flavor_name', 'UTF8', None, ), # 5 + (6, TType.STRING, 'name', 'UTF8', None, ), # 6 + (7, TType.STRING, 'key_name', 'UTF8', None, ), # 7 + (8, TType.I32, 'batch_idx', None, None, ), # 8 + (9, TType.I32, 'worker_idx', None, None, ), # 9 ) @@ -16144,20 +12768,12 @@ class add_cluster_machine_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16167,11 +12783,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16180,20 +12792,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_cluster_machine_result") + oprot.writeStructBegin('add_cluster_machine_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -16202,25 +12807,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_cluster_machine_result) add_cluster_machine_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -16231,20 +12829,12 @@ class get_cluster_info_args(object): """ - thrift_spec = None - def __init__( - self, - cluster_id=None, - ): + def __init__(self, cluster_id=None,): self.cluster_id = cluster_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16254,11 +12844,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16267,20 +12853,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_cluster_info_args") + oprot.writeStructBegin('get_cluster_info_args') if self.cluster_id is not None: - oprot.writeFieldBegin("cluster_id", TType.STRING, 1) - oprot.writeString( - self.cluster_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_id - ) + oprot.writeFieldBegin('cluster_id', TType.STRING, 1) + oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -16289,26 +12868,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_info_args) get_cluster_info_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -16320,22 +12892,13 @@ class get_cluster_info_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - c=None, - ): + def __init__(self, success=None, c=None,): self.success = success self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16360,19 +12923,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_cluster_info_result") + oprot.writeStructBegin('get_cluster_info_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 1) + oprot.writeFieldBegin('c', TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -16382,32 +12942,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_info_result) get_cluster_info_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [ClusterInfo, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "c", - [ClusterNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [ClusterInfo, None], None, ), # 0 + (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 ) @@ -16418,20 +12965,12 @@ class get_cluster_status_args(object): """ - thrift_spec = None - def __init__( - self, - cluster_id=None, - ): + def __init__(self, cluster_id=None,): self.cluster_id = cluster_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16441,11 +12980,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16454,20 +12989,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_cluster_status_args") + oprot.writeStructBegin('get_cluster_status_args') if self.cluster_id is not None: - oprot.writeFieldBegin("cluster_id", TType.STRING, 1) - oprot.writeString( - self.cluster_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_id - ) + oprot.writeFieldBegin('cluster_id', TType.STRING, 1) + oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -16476,26 +13004,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_status_args) get_cluster_status_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -16507,22 +13028,13 @@ class get_cluster_status_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - c=None, - ): + def __init__(self, success=None, c=None,): self.success = success self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16535,16 +13047,8 @@ def read(self, iprot): 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() - ) + _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 iprot.readMapEnd() else: @@ -16560,27 +13064,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_cluster_status_result") + oprot.writeStructBegin('get_cluster_status_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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 - ) + 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) 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() @@ -16590,32 +13087,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_status_result) get_cluster_status_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "c", - [ClusterNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 ) @@ -16626,20 +13110,12 @@ class get_keypair_public_key_by_name_args(object): """ - thrift_spec = None - def __init__( - self, - key_name=None, - ): + def __init__(self, key_name=None,): self.key_name = key_name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16649,11 +13125,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.key_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16662,20 +13134,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_keypair_public_key_by_name_args") + oprot.writeStructBegin('get_keypair_public_key_by_name_args') if self.key_name is not None: - oprot.writeFieldBegin("key_name", TType.STRING, 1) - oprot.writeString( - self.key_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.key_name - ) + oprot.writeFieldBegin('key_name', TType.STRING, 1) + oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -16684,26 +13149,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_keypair_public_key_by_name_args) get_keypair_public_key_by_name_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "key_name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'key_name', 'UTF8', None, ), # 1 ) @@ -16714,20 +13172,12 @@ class get_keypair_public_key_by_name_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16737,11 +13187,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16750,20 +13196,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_keypair_public_key_by_name_result") + oprot.writeStructBegin('get_keypair_public_key_by_name_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -16772,25 +13211,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_keypair_public_key_by_name_result) get_keypair_public_key_by_name_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -16801,20 +13233,12 @@ class delete_keypair_args(object): """ - thrift_spec = None - def __init__( - self, - key_name=None, - ): + def __init__(self, key_name=None,): self.key_name = key_name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16824,11 +13248,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.key_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16837,20 +13257,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_keypair_args") + oprot.writeStructBegin('delete_keypair_args') if self.key_name is not None: - oprot.writeFieldBegin("key_name", TType.STRING, 1) - oprot.writeString( - self.key_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.key_name - ) + oprot.writeFieldBegin('key_name', TType.STRING, 1) + oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -16859,38 +13272,27 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_keypair_args) delete_keypair_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "key_name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'key_name', 'UTF8', None, ), # 1 ) class delete_keypair_result(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16904,13 +13306,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_keypair_result") + oprot.writeStructBegin('delete_keypair_result') oprot.writeFieldStop() oprot.writeStructEnd() @@ -16918,18 +13317,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): @@ -16939,20 +13338,12 @@ class add_default_security_groups_to_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16962,11 +13353,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16975,20 +13362,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_default_security_groups_to_server_args") + oprot.writeStructBegin('add_default_security_groups_to_server_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -16997,26 +13377,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_default_security_groups_to_server_args) add_default_security_groups_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -17027,20 +13400,12 @@ class add_default_security_groups_to_server_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - ): + def __init__(self, e=None,): self.e = e def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17059,15 +13424,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_default_security_groups_to_server_result") + oprot.writeStructBegin('add_default_security_groups_to_server_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -17077,26 +13439,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_default_security_groups_to_server_result) add_default_security_groups_to_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 ) @@ -17107,20 +13462,12 @@ 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() @@ -17130,11 +13477,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -17143,20 +13486,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_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() @@ -17165,26 +13501,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_args) get_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -17196,22 +13525,13 @@ class get_server_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - ): + def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17236,19 +13556,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_server_result") + oprot.writeStructBegin('get_server_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -17258,32 +13575,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_result) get_server_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [VM, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 ) @@ -17294,20 +13598,12 @@ 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() @@ -17317,11 +13613,7 @@ 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: @@ -17330,20 +13622,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_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() @@ -17352,26 +13637,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_by_unique_name_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 ) @@ -17383,22 +13661,13 @@ class get_server_by_unique_name_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - ): + def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17423,19 +13692,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_server_by_unique_name_result") + oprot.writeStructBegin('get_server_by_unique_name_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -17445,32 +13711,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_by_unique_name_result) get_server_by_unique_name_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [VM, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 ) @@ -17481,20 +13734,12 @@ class stop_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17504,11 +13749,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -17517,20 +13758,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("stop_server_args") + oprot.writeStructBegin('stop_server_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -17539,26 +13773,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(stop_server_args) stop_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -17570,22 +13797,13 @@ class stop_server_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - c=None, - ): + def __init__(self, e=None, c=None,): self.e = e self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17609,19 +13827,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("stop_server_result") + oprot.writeStructBegin('stop_server_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 2) + oprot.writeFieldBegin('c', TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -17631,33 +13846,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(stop_server_result) stop_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -17672,16 +13874,8 @@ class create_snapshot_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - name=None, - username=None, - base_tags=None, - description=None, - ): + def __init__(self, openstack_id=None, name=None, username=None, base_tags=None, description=None,): self.openstack_id = openstack_id self.name = name self.username = username @@ -17689,11 +13883,7 @@ def __init__( self.description = description def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17703,29 +13893,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.username = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -17733,22 +13911,14 @@ def read(self, iprot): 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() - ) + _elem361 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.base_tags.append(_elem361) 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: @@ -17757,51 +13927,32 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_snapshot_args") + oprot.writeStructBegin('create_snapshot_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 2) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.username is not None: - oprot.writeFieldBegin("username", TType.STRING, 3) - oprot.writeString( - self.username.encode("utf-8") - if sys.version_info[0] == 2 - else self.username - ) + oprot.writeFieldBegin('username', TType.STRING, 3) + oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) oprot.writeFieldEnd() if self.base_tags is not None: - oprot.writeFieldBegin("base_tags", TType.LIST, 4) + oprot.writeFieldBegin('base_tags', TType.LIST, 4) oprot.writeListBegin(TType.STRING, len(self.base_tags)) for iter362 in self.base_tags: - oprot.writeString( - iter362.encode("utf-8") if sys.version_info[0] == 2 else iter362 - ) + oprot.writeString(iter362.encode('utf-8') if sys.version_info[0] == 2 else iter362) 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() @@ -17810,54 +13961,23 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_snapshot_args) create_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "username", - "UTF8", - None, - ), # 3 - ( - 4, - TType.LIST, - "base_tags", - (TType.STRING, "UTF8", False), - None, - ), # 4 - ( - 5, - TType.STRING, - "description", - "UTF8", - None, - ), # 5 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'username', 'UTF8', None, ), # 3 + (4, TType.LIST, 'base_tags', (TType.STRING, 'UTF8', False), None, ), # 4 + (5, TType.STRING, 'description', 'UTF8', None, ), # 5 ) @@ -17870,24 +13990,14 @@ class create_snapshot_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - c=None, - ): + def __init__(self, success=None, e=None, c=None,): self.success = success self.e = e self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17897,11 +14007,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -17920,27 +14026,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_snapshot_result") + oprot.writeStructBegin('create_snapshot_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 2) + oprot.writeFieldBegin('c', TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -17950,51 +14049,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_snapshot_result) create_snapshot_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) class get_limits_args(object): - thrift_spec = None + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18008,13 +14084,10 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_limits_args") + oprot.writeStructBegin('get_limits_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -18022,18 +14095,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): @@ -18043,20 +14116,12 @@ class get_limits_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18069,16 +14134,8 @@ def read(self, iprot): 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() - ) + _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 iprot.readMapEnd() else: @@ -18089,23 +14146,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_limits_result") + oprot.writeStructBegin('get_limits_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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 - ) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -18115,25 +14165,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_limits_result) get_limits_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -18147,26 +14190,15 @@ class start_cluster_args(object): """ - thrift_spec = None - def __init__( - self, - public_keys=None, - master_instance=None, - worker_instances=None, - user=None, - ): + def __init__(self, public_keys=None, master_instance=None, worker_instances=None, user=None,): self.public_keys = public_keys self.master_instance = master_instance self.worker_instances = worker_instances self.user = user def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18179,11 +14211,7 @@ def read(self, iprot): 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() - ) + _elem377 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.public_keys.append(_elem377) iprot.readListEnd() else: @@ -18207,11 +14235,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.user = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18220,38 +14244,31 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("start_cluster_args") + oprot.writeStructBegin('start_cluster_args') if self.public_keys is not None: - oprot.writeFieldBegin("public_keys", TType.LIST, 1) + oprot.writeFieldBegin('public_keys', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.public_keys)) for iter384 in self.public_keys: - oprot.writeString( - iter384.encode("utf-8") if sys.version_info[0] == 2 else iter384 - ) + oprot.writeString(iter384.encode('utf-8') if sys.version_info[0] == 2 else iter384) 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) 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() @@ -18260,47 +14277,22 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_cluster_args) start_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.LIST, - "public_keys", - (TType.STRING, "UTF8", False), - None, - ), # 1 - ( - 2, - TType.STRUCT, - "master_instance", - [ClusterInstance, None], - None, - ), # 2 - ( - 3, - TType.LIST, - "worker_instances", - (TType.STRUCT, [ClusterInstance, None], False), - None, - ), # 3 - ( - 4, - TType.STRING, - "user", - "UTF8", - None, - ), # 4 + (1, TType.LIST, 'public_keys', (TType.STRING, 'UTF8', False), None, ), # 1 + (2, TType.STRUCT, 'master_instance', [ClusterInstance, None], None, ), # 2 + (3, TType.LIST, 'worker_instances', (TType.STRUCT, [ClusterInstance, None], False), None, ), # 3 + (4, TType.STRING, 'user', 'UTF8', None, ), # 4 ) @@ -18311,20 +14303,12 @@ class start_cluster_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - ): + def __init__(self, success=None,): self.success = success def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18337,16 +14321,8 @@ def read(self, iprot): 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() - ) + _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 iprot.readMapEnd() else: @@ -18357,23 +14333,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("start_cluster_result") + oprot.writeStructBegin('start_cluster_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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 - ) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -18383,25 +14352,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_cluster_result) start_cluster_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -18412,20 +14374,12 @@ class terminate_cluster_args(object): """ - thrift_spec = None - def __init__( - self, - cluster_id=None, - ): + def __init__(self, cluster_id=None,): self.cluster_id = cluster_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18435,11 +14389,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18448,20 +14398,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("terminate_cluster_args") + oprot.writeStructBegin('terminate_cluster_args') if self.cluster_id is not None: - oprot.writeFieldBegin("cluster_id", TType.STRING, 1) - oprot.writeString( - self.cluster_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_id - ) + oprot.writeFieldBegin('cluster_id', TType.STRING, 1) + oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -18470,26 +14413,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(terminate_cluster_args) terminate_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -18501,22 +14437,13 @@ class terminate_cluster_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - c=None, - ): + def __init__(self, success=None, c=None,): self.success = success self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18529,16 +14456,8 @@ def read(self, iprot): 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() - ) + _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 iprot.readMapEnd() else: @@ -18554,27 +14473,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("terminate_cluster_result") + oprot.writeStructBegin('terminate_cluster_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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 - ) + 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) 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() @@ -18584,32 +14496,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(terminate_cluster_result) terminate_cluster_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "c", - [ClusterNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 ) @@ -18620,20 +14519,12 @@ class delete_image_args(object): """ - thrift_spec = None - def __init__( - self, - image_id=None, - ): + def __init__(self, image_id=None,): self.image_id = image_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18643,11 +14534,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.image_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18656,20 +14543,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_image_args") + oprot.writeStructBegin('delete_image_args') if self.image_id is not None: - oprot.writeFieldBegin("image_id", TType.STRING, 1) - oprot.writeString( - self.image_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.image_id - ) + oprot.writeFieldBegin('image_id', TType.STRING, 1) + oprot.writeString(self.image_id.encode('utf-8') if sys.version_info[0] == 2 else self.image_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -18678,26 +14558,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_image_args) delete_image_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "image_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'image_id', 'UTF8', None, ), # 1 ) @@ -18708,20 +14581,12 @@ class delete_image_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - ): + def __init__(self, e=None,): self.e = e def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18740,15 +14605,12 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_image_result") + oprot.writeStructBegin('delete_image_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -18758,26 +14620,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_image_result) delete_image_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ImageNotFoundException, None], - None, - ), # 1 + (1, TType.STRUCT, 'e', [ImageNotFoundException, None], None, ), # 1 ) @@ -18789,22 +14644,13 @@ class detach_volume_args(object): """ - thrift_spec = None - def __init__( - self, - volume_id=None, - server_id=None, - ): + def __init__(self, volume_id=None, server_id=None,): self.volume_id = volume_id self.server_id = server_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18814,20 +14660,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18836,28 +14674,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("detach_volume_args") + oprot.writeStructBegin('detach_volume_args') if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 1) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 1) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() if self.server_id is not None: - oprot.writeFieldBegin("server_id", TType.STRING, 2) - oprot.writeString( - self.server_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.server_id - ) + oprot.writeFieldBegin('server_id', TType.STRING, 2) + oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -18866,33 +14693,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_volume_args) detach_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'server_id', 'UTF8', None, ), # 2 ) @@ -18905,24 +14719,14 @@ class detach_volume_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - c=None, - v=None, - ): + def __init__(self, e=None, c=None, v=None,): self.e = e self.c = c self.v = v def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -18951,23 +14755,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("detach_volume_result") + oprot.writeStructBegin('detach_volume_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 2) + oprot.writeFieldBegin('c', TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin("v", TType.STRUCT, 3) + oprot.writeFieldBegin('v', TType.STRUCT, 3) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -18977,40 +14778,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_volume_result) detach_volume_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "v", - [VolumeNotFoundException, None], - None, - ), # 3 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + (3, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 3 ) @@ -19021,20 +14803,12 @@ class delete_volume_args(object): """ - thrift_spec = None - def __init__( - self, - volume_id=None, - ): + def __init__(self, volume_id=None,): self.volume_id = volume_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19044,11 +14818,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19057,20 +14827,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_volume_args") + oprot.writeStructBegin('delete_volume_args') if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 1) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 1) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -19079,26 +14842,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_args) delete_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 ) @@ -19110,22 +14866,13 @@ class delete_volume_result(object): """ - thrift_spec = None - def __init__( - self, - c=None, - v=None, - ): + def __init__(self, c=None, v=None,): self.c = c self.v = v def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19149,19 +14896,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_volume_result") + oprot.writeStructBegin('delete_volume_result') if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 1) + oprot.writeFieldBegin('c', TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin("v", TType.STRUCT, 2) + oprot.writeFieldBegin('v', TType.STRUCT, 2) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -19171,33 +14915,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_result) delete_volume_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "v", - [VolumeNotFoundException, None], - None, - ), # 2 + (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 + (2, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 2 ) @@ -19209,22 +14940,13 @@ class attach_volume_to_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - volume_id=None, - ): + def __init__(self, openstack_id=None, volume_id=None,): self.openstack_id = openstack_id self.volume_id = volume_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19234,20 +14956,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19256,28 +14970,17 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("attach_volume_to_server_args") + oprot.writeStructBegin('attach_volume_to_server_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 2) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 2) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -19286,33 +14989,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(attach_volume_to_server_args) attach_volume_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'volume_id', 'UTF8', None, ), # 2 ) @@ -19325,24 +15015,14 @@ class attach_volume_to_server_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - c=None, - ): + def __init__(self, success=None, e=None, c=None,): self.success = success self.e = e self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19355,16 +15035,8 @@ def read(self, iprot): 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() - ) + _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 iprot.readMapEnd() else: @@ -19385,31 +15057,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("attach_volume_to_server_result") + oprot.writeStructBegin('attach_volume_to_server_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for 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 - ) + 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) 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() @@ -19419,39 +15084,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(attach_volume_to_server_result) attach_volume_to_server_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [VolumeNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -19462,20 +15108,12 @@ class resume_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19485,11 +15123,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19498,20 +15132,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("resume_server_args") + oprot.writeStructBegin('resume_server_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -19520,26 +15147,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resume_server_args) resume_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -19551,22 +15171,13 @@ class resume_server_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - c=None, - ): + def __init__(self, e=None, c=None,): self.e = e self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19590,19 +15201,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("resume_server_result") + oprot.writeStructBegin('resume_server_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 2) + oprot.writeFieldBegin('c', TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -19612,33 +15220,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resume_server_result) resume_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -19651,24 +15246,14 @@ class create_volume_args(object): """ - thrift_spec = None - def __init__( - self, - volume_name=None, - volume_storage=None, - metadata=None, - ): + def __init__(self, volume_name=None, volume_storage=None, metadata=None,): self.volume_name = volume_name self.volume_storage = volume_storage self.metadata = metadata def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19678,11 +15263,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -19695,16 +15276,8 @@ def read(self, iprot): 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() - ) + _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 iprot.readMapEnd() else: @@ -19715,35 +15288,24 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_volume_args") + oprot.writeStructBegin('create_volume_args') if self.volume_name is not None: - oprot.writeFieldBegin("volume_name", TType.STRING, 1) - oprot.writeString( - self.volume_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_name - ) + oprot.writeFieldBegin('volume_name', TType.STRING, 1) + oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) oprot.writeFieldEnd() if self.volume_storage is not None: - oprot.writeFieldBegin("volume_storage", TType.I32, 2) + oprot.writeFieldBegin('volume_storage', TType.I32, 2) oprot.writeI32(self.volume_storage) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin("metadata", TType.MAP, 3) + oprot.writeFieldBegin('metadata', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for 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 - ) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -19753,40 +15315,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_args) create_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.I32, - "volume_storage", - None, - None, - ), # 2 - ( - 3, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 3 + (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 + (2, TType.I32, 'volume_storage', None, None, ), # 2 + (3, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 ) @@ -19799,24 +15342,14 @@ class create_volume_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - r=None, - n=None, - ): + def __init__(self, success=None, r=None, n=None,): self.success = success self.r = r self.n = n def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19846,23 +15379,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_volume_result") + oprot.writeStructBegin('create_volume_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin("n", TType.STRUCT, 2) + oprot.writeFieldBegin('n', TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -19872,39 +15402,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_result) create_volume_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "n", - [ResourceNotAvailableException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 ) @@ -19917,24 +15428,14 @@ class create_volume_by_source_volume_args(object): """ - thrift_spec = None - def __init__( - self, - volume_name=None, - metadata=None, - source_volume_id=None, - ): + def __init__(self, volume_name=None, metadata=None, source_volume_id=None,): self.volume_name = volume_name self.metadata = metadata self.source_volume_id = source_volume_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19944,11 +15445,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -19956,27 +15453,15 @@ def read(self, iprot): 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() - ) + _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 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: @@ -19985,40 +15470,25 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_volume_by_source_volume_args") + oprot.writeStructBegin('create_volume_by_source_volume_args') if self.volume_name is not None: - oprot.writeFieldBegin("volume_name", TType.STRING, 1) - oprot.writeString( - self.volume_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_name - ) + oprot.writeFieldBegin('volume_name', TType.STRING, 1) + oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin("metadata", TType.MAP, 2) + oprot.writeFieldBegin('metadata', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for 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 - ) + 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) 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() @@ -20027,40 +15497,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_by_source_volume_args) create_volume_by_source_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 2 - ( - 3, - TType.STRING, - "source_volume_id", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 + (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 + (3, TType.STRING, 'source_volume_id', 'UTF8', None, ), # 3 ) @@ -20073,24 +15524,14 @@ class create_volume_by_source_volume_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - r=None, - n=None, - ): + def __init__(self, success=None, r=None, n=None,): self.success = success self.r = r self.n = n def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -20120,23 +15561,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_volume_by_source_volume_result") + oprot.writeStructBegin('create_volume_by_source_volume_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin("n", TType.STRUCT, 2) + oprot.writeFieldBegin('n', TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -20146,39 +15584,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_by_source_volume_result) create_volume_by_source_volume_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "n", - [ResourceNotAvailableException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 ) @@ -20191,24 +15610,14 @@ class create_volume_by_volume_snap_args(object): """ - thrift_spec = None - def __init__( - self, - volume_name=None, - metadata=None, - volume_snap_id=None, - ): + def __init__(self, volume_name=None, metadata=None, volume_snap_id=None,): self.volume_name = volume_name self.metadata = metadata self.volume_snap_id = volume_snap_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -20218,11 +15627,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -20230,27 +15635,15 @@ def read(self, iprot): 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() - ) + _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 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: @@ -20259,40 +15652,25 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_volume_by_volume_snap_args") + oprot.writeStructBegin('create_volume_by_volume_snap_args') if self.volume_name is not None: - oprot.writeFieldBegin("volume_name", TType.STRING, 1) - oprot.writeString( - self.volume_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_name - ) + oprot.writeFieldBegin('volume_name', TType.STRING, 1) + oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin("metadata", TType.MAP, 2) + oprot.writeFieldBegin('metadata', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for 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 - ) + 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) 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() @@ -20301,40 +15679,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_by_volume_snap_args) create_volume_by_volume_snap_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 2 - ( - 3, - TType.STRING, - "volume_snap_id", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 + (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 + (3, TType.STRING, 'volume_snap_id', 'UTF8', None, ), # 3 ) @@ -20347,24 +15706,14 @@ class create_volume_by_volume_snap_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - r=None, - n=None, - ): + def __init__(self, success=None, r=None, n=None,): self.success = success self.r = r self.n = n def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -20394,23 +15743,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_volume_by_volume_snap_result") + oprot.writeStructBegin('create_volume_by_volume_snap_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin("n", TType.STRUCT, 2) + oprot.writeFieldBegin('n', TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -20420,39 +15766,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_by_volume_snap_result) create_volume_by_volume_snap_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "n", - [ResourceNotAvailableException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 + (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 ) @@ -20465,24 +15792,14 @@ class create_volume_snapshot_args(object): """ - thrift_spec = None - def __init__( - self, - volume_id=None, - name=None, - description=None, - ): + def __init__(self, volume_id=None, name=None, description=None,): self.volume_id = volume_id self.name = name self.description = description def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -20492,29 +15809,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -20523,34 +15828,21 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_volume_snapshot_args") + oprot.writeStructBegin('create_volume_snapshot_args') if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 1) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 1) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 2) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin("description", TType.STRING, 3) - oprot.writeString( - self.description.encode("utf-8") - if sys.version_info[0] == 2 - else self.description - ) + oprot.writeFieldBegin('description', TType.STRING, 3) + oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -20559,40 +15851,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_snapshot_args) create_volume_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "description", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'description', 'UTF8', None, ), # 3 ) @@ -20605,24 +15878,14 @@ class create_volume_snapshot_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - e=None, - r=None, - ): + def __init__(self, success=None, e=None, r=None,): self.success = success self.e = e self.r = r def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -20632,11 +15895,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -20655,27 +15914,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("create_volume_snapshot_result") + oprot.writeStructBegin('create_volume_snapshot_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRING, 0) - oprot.writeString( - self.success.encode("utf-8") - if sys.version_info[0] == 2 - else self.success - ) + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 2) + oprot.writeFieldBegin('r', TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -20685,39 +15937,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_snapshot_result) create_volume_snapshot_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [VolumeNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [DefaultException, None], - None, - ), # 2 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [DefaultException, None], None, ), # 2 ) @@ -20728,20 +15961,12 @@ class get_volume_snapshot_args(object): """ - thrift_spec = None - def __init__( - self, - name_or_id=None, - ): + def __init__(self, name_or_id=None,): self.name_or_id = name_or_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -20751,11 +15976,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -20764,20 +15985,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_volume_snapshot_args") + oprot.writeStructBegin('get_volume_snapshot_args') if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 1) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 1) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -20786,26 +16000,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_snapshot_args) get_volume_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'name_or_id', 'UTF8', None, ), # 1 ) @@ -20817,22 +16024,13 @@ class get_volume_snapshot_result(object): """ - thrift_spec = None - def __init__( - self, - success=None, - r=None, - ): + def __init__(self, success=None, r=None,): self.success = success self.r = r def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -20857,19 +16055,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_volume_snapshot_result") + oprot.writeStructBegin('get_volume_snapshot_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.STRUCT, 0) + oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -20879,32 +16074,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_snapshot_result) get_volume_snapshot_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Snapshot, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [ResourceNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [Snapshot, None], None, ), # 0 + (1, TType.STRUCT, 'r', [ResourceNotFoundException, None], None, ), # 1 ) @@ -20915,20 +16097,12 @@ class delete_volume_snapshot_args(object): """ - thrift_spec = None - def __init__( - self, - snapshot_id=None, - ): + def __init__(self, snapshot_id=None,): self.snapshot_id = snapshot_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -20938,11 +16112,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.snapshot_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.snapshot_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -20951,20 +16121,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_volume_snapshot_args") + oprot.writeStructBegin('delete_volume_snapshot_args') if self.snapshot_id is not None: - oprot.writeFieldBegin("snapshot_id", TType.STRING, 1) - oprot.writeString( - self.snapshot_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.snapshot_id - ) + oprot.writeFieldBegin('snapshot_id', TType.STRING, 1) + oprot.writeString(self.snapshot_id.encode('utf-8') if sys.version_info[0] == 2 else self.snapshot_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -20973,26 +16136,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_snapshot_args) delete_volume_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "snapshot_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'snapshot_id', 'UTF8', None, ), # 1 ) @@ -21004,22 +16160,13 @@ class delete_volume_snapshot_result(object): """ - thrift_spec = None - def __init__( - self, - c=None, - e=None, - ): + def __init__(self, c=None, e=None,): self.c = c self.e = e def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -21043,19 +16190,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("delete_volume_snapshot_result") + oprot.writeStructBegin('delete_volume_snapshot_result') if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 1) + oprot.writeFieldBegin('c', TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 2) + oprot.writeFieldBegin('e', TType.STRUCT, 2) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -21065,33 +16209,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_snapshot_result) delete_volume_snapshot_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "e", - [DefaultException, None], - None, - ), # 2 + (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 + (2, TType.STRUCT, 'e', [DefaultException, None], None, ), # 2 ) @@ -21102,20 +16233,12 @@ class reboot_hard_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -21125,11 +16248,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -21138,20 +16257,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("reboot_hard_server_args") + oprot.writeStructBegin('reboot_hard_server_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -21160,26 +16272,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_hard_server_args) reboot_hard_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -21191,22 +16296,13 @@ class reboot_hard_server_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - c=None, - ): + def __init__(self, e=None, c=None,): self.e = e self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -21230,19 +16326,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("reboot_hard_server_result") + oprot.writeStructBegin('reboot_hard_server_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 2) + oprot.writeFieldBegin('c', TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -21252,33 +16345,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_hard_server_result) reboot_hard_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) @@ -21289,20 +16369,12 @@ class reboot_soft_server_args(object): """ - thrift_spec = None - def __init__( - self, - openstack_id=None, - ): + def __init__(self, openstack_id=None,): self.openstack_id = openstack_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -21312,11 +16384,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -21325,20 +16393,13 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("reboot_soft_server_args") + oprot.writeStructBegin('reboot_soft_server_args') if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 1) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 1) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -21347,26 +16408,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_soft_server_args) reboot_soft_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -21378,22 +16432,13 @@ class reboot_soft_server_result(object): """ - thrift_spec = None - def __init__( - self, - e=None, - c=None, - ): + def __init__(self, e=None, c=None,): self.e = e self.c = c def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -21417,19 +16462,16 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("reboot_soft_server_result") + oprot.writeStructBegin('reboot_soft_server_result') if self.e is not None: - oprot.writeFieldBegin("e", TType.STRUCT, 1) + oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin("c", TType.STRUCT, 2) + oprot.writeFieldBegin('c', TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -21439,33 +16481,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_soft_server_result) reboot_soft_server_result.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "e", - [ServerNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [OpenStackConflictException, None], - None, - ), # 2 + (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 ) fix_spec(all_structs) del all_structs diff --git a/simple_vm_client/constants.py b/simple_vm_client/constants.py index 9960013..04f3806 100644 --- a/simple_vm_client/constants.py +++ b/simple_vm_client/constants.py @@ -1,10 +1,15 @@ # -# Autogenerated by Thrift Compiler (0.22.0) +# Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec +import sys +from .ttypes import * VERSION = "1.0.0" diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index c7ca70b..bb6f893 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -1364,6 +1364,23 @@ 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: + logger.info(f"Rescue Server {openstack_id}") + try: + server: Server = self.get_server(openstack_id=openstack_id) + if not server: + logger.error(f"Instance {openstack_id} not found") + raise ServerNotFoundException( + message=f"Instance {openstack_id} not found", + name_or_id=openstack_id, + ) + 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) def _calculate_vm_ports(self, server: Server): fixed_ip = server.private_v4 diff --git a/simple_vm_client/ttypes.py b/simple_vm_client/ttypes.py index 621bcf5..f53c213 100644 --- a/simple_vm_client/ttypes.py +++ b/simple_vm_client/ttypes.py @@ -1,18 +1,18 @@ # -# Autogenerated by Thrift Compiler (0.22.0) +# Autogenerated by Thrift Compiler (0.20.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import sys - +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException -from thrift.Thrift import TException, TType -from thrift.transport import TTransport from thrift.TRecursive import fix_spec +import sys + +from thrift.transport import TTransport all_structs = [] @@ -25,24 +25,14 @@ class User(object): """ - thrift_spec = None - def __init__( - self, - username=None, - user_id=None, - public_keys=None, - ): + def __init__(self, username=None, user_id=None, public_keys=None,): self.username = username self.user_id = user_id self.public_keys = public_keys def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -52,20 +42,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.username = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -73,11 +55,7 @@ def read(self, iprot): self.public_keys = [] (_etype3, _size0) = iprot.readListBegin() for _i4 in range(_size0): - _elem5 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem5 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.public_keys.append(_elem5) iprot.readListEnd() else: @@ -88,36 +66,23 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("User") + oprot.writeStructBegin('User') if self.username is not None: - oprot.writeFieldBegin("username", TType.STRING, 1) - oprot.writeString( - self.username.encode("utf-8") - if sys.version_info[0] == 2 - else self.username - ) + oprot.writeFieldBegin('username', TType.STRING, 1) + oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin("user_id", TType.STRING, 2) - oprot.writeString( - self.user_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.user_id - ) + oprot.writeFieldBegin('user_id', TType.STRING, 2) + oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) oprot.writeFieldEnd() if self.public_keys is not None: - oprot.writeFieldBegin("public_keys", TType.LIST, 3) + oprot.writeFieldBegin('public_keys', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.public_keys)) for iter6 in self.public_keys: - oprot.writeString( - iter6.encode("utf-8") if sys.version_info[0] == 2 else iter6 - ) + oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -125,12 +90,13 @@ def write(self, oprot): def validate(self): if self.user_id is None: - raise TProtocolException(message="Required field user_id is unset!") + raise TProtocolException(message='Required field user_id is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -146,22 +112,16 @@ class UserData(object): """ - thrift_spec = None - def __init__( - self, - data={}, - ): + def __init__(self, data={ + },): if data is self.thrift_spec[2][4]: - data = {} + data = { + } self.data = data def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -174,11 +134,7 @@ def read(self, iprot): self.data = {} (_ktype8, _vtype9, _size7) = iprot.readMapBegin() for _i11 in range(_size7): - _key12 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() _val13 = User() _val13.read(iprot) self.data[_key12] = _val13 @@ -191,20 +147,15 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("UserData") + oprot.writeStructBegin('UserData') if self.data is not None: - oprot.writeFieldBegin("data", TType.MAP, 2) + oprot.writeFieldBegin('data', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.data)) for kiter14, viter15 in self.data.items(): - oprot.writeString( - kiter14.encode("utf-8") if sys.version_info[0] == 2 else kiter14 - ) + oprot.writeString(kiter14.encode('utf-8') if sys.version_info[0] == 2 else kiter14) viter15.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -213,12 +164,13 @@ def write(self, oprot): def validate(self): if self.data is None: - raise TProtocolException(message="Required field data is unset!") + raise TProtocolException(message='Required field data is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -236,24 +188,14 @@ class VirtualMachineServerMetadata(object): """ - thrift_spec = None - def __init__( - self, - ip=None, - hashed_auth_token=None, - userdata=None, - ): + def __init__(self, ip=None, hashed_auth_token=None, userdata=None,): self.ip = ip self.hashed_auth_token = hashed_auth_token self.userdata = userdata def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -263,20 +205,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.hashed_auth_token = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.hashed_auth_token = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -291,29 +225,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("VirtualMachineServerMetadata") + oprot.writeStructBegin('VirtualMachineServerMetadata') if self.ip is not None: - oprot.writeFieldBegin("ip", TType.STRING, 1) - oprot.writeString( - self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip - ) + oprot.writeFieldBegin('ip', TType.STRING, 1) + oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip) oprot.writeFieldEnd() if self.hashed_auth_token is not None: - oprot.writeFieldBegin("hashed_auth_token", TType.STRING, 2) - oprot.writeString( - self.hashed_auth_token.encode("utf-8") - if sys.version_info[0] == 2 - else self.hashed_auth_token - ) + oprot.writeFieldBegin('hashed_auth_token', TType.STRING, 2) + oprot.writeString(self.hashed_auth_token.encode('utf-8') if sys.version_info[0] == 2 else self.hashed_auth_token) oprot.writeFieldEnd() if self.userdata is not None: - oprot.writeFieldBegin("userdata", TType.STRUCT, 3) + oprot.writeFieldBegin('userdata', TType.STRUCT, 3) self.userdata.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -321,16 +246,15 @@ def write(self, oprot): def validate(self): if self.ip is None: - raise TProtocolException(message="Required field ip is unset!") + raise TProtocolException(message='Required field ip is unset!') if self.hashed_auth_token is None: - raise TProtocolException( - message="Required field hashed_auth_token is unset!" - ) + raise TProtocolException(message='Required field hashed_auth_token is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -350,16 +274,8 @@ class Backend(object): """ - thrift_spec = None - def __init__( - self, - id=None, - owner=None, - location_url=None, - template=None, - template_version=None, - ): + def __init__(self, id=None, owner=None, location_url=None, template=None, template_version=None,): self.id = id self.owner = owner self.location_url = location_url @@ -367,11 +283,7 @@ def __init__( self.template_version = template_version def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -386,38 +298,22 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.location_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.location_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.template_version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -426,46 +322,29 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("Backend") + oprot.writeStructBegin('Backend') if self.id is not None: - oprot.writeFieldBegin("id", TType.I64, 1) + oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() if self.owner is not None: - oprot.writeFieldBegin("owner", TType.STRING, 2) - oprot.writeString( - self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner - ) + oprot.writeFieldBegin('owner', TType.STRING, 2) + oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) oprot.writeFieldEnd() if self.location_url is not None: - oprot.writeFieldBegin("location_url", TType.STRING, 3) - oprot.writeString( - self.location_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.location_url - ) + oprot.writeFieldBegin('location_url', TType.STRING, 3) + oprot.writeString(self.location_url.encode('utf-8') if sys.version_info[0] == 2 else self.location_url) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin("template", TType.STRING, 4) - oprot.writeString( - self.template.encode("utf-8") - if sys.version_info[0] == 2 - else self.template - ) + oprot.writeFieldBegin('template', TType.STRING, 4) + oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) oprot.writeFieldEnd() if self.template_version is not None: - oprot.writeFieldBegin("template_version", TType.STRING, 5) - oprot.writeString( - self.template_version.encode("utf-8") - if sys.version_info[0] == 2 - else self.template_version - ) + oprot.writeFieldBegin('template_version', TType.STRING, 5) + oprot.writeString(self.template_version.encode('utf-8') if sys.version_info[0] == 2 else self.template_version) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -474,8 +353,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -502,23 +382,8 @@ class ResearchEnvironmentTemplate(object): """ - thrift_spec = None - - def __init__( - self, - template_name=None, - title=None, - description=None, - logo_url=None, - info_url=None, - port=None, - incompatible_versions=None, - is_maintained=None, - information_for_display=None, - min_ram=0, - min_cores=0, - securitygroup_name=None, - ): + + def __init__(self, template_name=None, title=None, description=None, logo_url=None, info_url=None, port=None, incompatible_versions=None, is_maintained=None, information_for_display=None, min_ram=0, min_cores=0, securitygroup_name=None,): self.template_name = template_name self.title = title self.description = description @@ -537,11 +402,7 @@ def __init__( self.securitygroup_name = securitygroup_name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -551,47 +412,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.title = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.title = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.logo_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.logo_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.info_url = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.info_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: @@ -604,11 +445,7 @@ def read(self, iprot): self.incompatible_versions = [] (_etype19, _size16) = iprot.readListBegin() for _i20 in range(_size16): - _elem21 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem21 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.incompatible_versions.append(_elem21) iprot.readListEnd() else: @@ -623,16 +460,8 @@ def read(self, iprot): self.information_for_display = {} (_ktype23, _vtype24, _size22) = iprot.readMapBegin() for _i26 in range(_size22): - _key27 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val28 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key27 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val28 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.information_for_display[_key27] = _val28 iprot.readMapEnd() else: @@ -649,11 +478,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: - self.securitygroup_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.securitygroup_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -662,97 +487,64 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ResearchEnvironmentTemplate") + oprot.writeStructBegin('ResearchEnvironmentTemplate') if self.template_name is not None: - oprot.writeFieldBegin("template_name", TType.STRING, 1) - oprot.writeString( - self.template_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.template_name - ) + oprot.writeFieldBegin('template_name', TType.STRING, 1) + oprot.writeString(self.template_name.encode('utf-8') if sys.version_info[0] == 2 else self.template_name) oprot.writeFieldEnd() if self.title is not None: - oprot.writeFieldBegin("title", TType.STRING, 2) - oprot.writeString( - self.title.encode("utf-8") if sys.version_info[0] == 2 else self.title - ) + oprot.writeFieldBegin('title', TType.STRING, 2) + oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin("description", TType.STRING, 3) - oprot.writeString( - self.description.encode("utf-8") - if sys.version_info[0] == 2 - else self.description - ) + oprot.writeFieldBegin('description', TType.STRING, 3) + oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) oprot.writeFieldEnd() if self.logo_url is not None: - oprot.writeFieldBegin("logo_url", TType.STRING, 4) - oprot.writeString( - self.logo_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.logo_url - ) + oprot.writeFieldBegin('logo_url', TType.STRING, 4) + oprot.writeString(self.logo_url.encode('utf-8') if sys.version_info[0] == 2 else self.logo_url) oprot.writeFieldEnd() if self.info_url is not None: - oprot.writeFieldBegin("info_url", TType.STRING, 5) - oprot.writeString( - self.info_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.info_url - ) + oprot.writeFieldBegin('info_url', TType.STRING, 5) + oprot.writeString(self.info_url.encode('utf-8') if sys.version_info[0] == 2 else self.info_url) oprot.writeFieldEnd() if self.port is not None: - oprot.writeFieldBegin("port", TType.I32, 6) + oprot.writeFieldBegin('port', TType.I32, 6) oprot.writeI32(self.port) oprot.writeFieldEnd() if self.incompatible_versions is not None: - oprot.writeFieldBegin("incompatible_versions", TType.LIST, 7) + oprot.writeFieldBegin('incompatible_versions', TType.LIST, 7) oprot.writeListBegin(TType.STRING, len(self.incompatible_versions)) for iter29 in self.incompatible_versions: - oprot.writeString( - iter29.encode("utf-8") if sys.version_info[0] == 2 else iter29 - ) + oprot.writeString(iter29.encode('utf-8') if sys.version_info[0] == 2 else iter29) oprot.writeListEnd() oprot.writeFieldEnd() if self.is_maintained is not None: - oprot.writeFieldBegin("is_maintained", TType.BOOL, 8) + oprot.writeFieldBegin('is_maintained', TType.BOOL, 8) oprot.writeBool(self.is_maintained) oprot.writeFieldEnd() if self.information_for_display is not None: - oprot.writeFieldBegin("information_for_display", TType.MAP, 9) - oprot.writeMapBegin( - TType.STRING, TType.STRING, len(self.information_for_display) - ) + oprot.writeFieldBegin('information_for_display', TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.information_for_display)) for kiter30, viter31 in self.information_for_display.items(): - oprot.writeString( - kiter30.encode("utf-8") if sys.version_info[0] == 2 else kiter30 - ) - oprot.writeString( - viter31.encode("utf-8") if sys.version_info[0] == 2 else viter31 - ) + oprot.writeString(kiter30.encode('utf-8') if sys.version_info[0] == 2 else kiter30) + oprot.writeString(viter31.encode('utf-8') if sys.version_info[0] == 2 else viter31) oprot.writeMapEnd() oprot.writeFieldEnd() if self.min_ram is not None: - oprot.writeFieldBegin("min_ram", TType.I32, 10) + oprot.writeFieldBegin('min_ram', TType.I32, 10) oprot.writeI32(self.min_ram) oprot.writeFieldEnd() if self.min_cores is not None: - oprot.writeFieldBegin("min_cores", TType.I32, 11) + oprot.writeFieldBegin('min_cores', TType.I32, 11) oprot.writeI32(self.min_cores) oprot.writeFieldEnd() if self.securitygroup_name is not None: - oprot.writeFieldBegin("securitygroup_name", TType.STRING, 12) - oprot.writeString( - self.securitygroup_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.securitygroup_name - ) + oprot.writeFieldBegin('securitygroup_name', TType.STRING, 12) + oprot.writeString(self.securitygroup_name.encode('utf-8') if sys.version_info[0] == 2 else self.securitygroup_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -761,8 +553,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -782,16 +575,8 @@ class CondaPackage(object): """ - thrift_spec = None - def __init__( - self, - build=None, - build_number=None, - name=None, - version=None, - home=None, - ): + def __init__(self, build=None, build_number=None, name=None, version=None, home=None,): self.build = build self.build_number = build_number self.name = name @@ -799,11 +584,7 @@ def __init__( self.home = home def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -813,47 +594,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.build = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.build = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.build_number = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.build_number = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.home = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.home = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -862,46 +623,29 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("CondaPackage") + oprot.writeStructBegin('CondaPackage') if self.build is not None: - oprot.writeFieldBegin("build", TType.STRING, 1) - oprot.writeString( - self.build.encode("utf-8") if sys.version_info[0] == 2 else self.build - ) + oprot.writeFieldBegin('build', TType.STRING, 1) + oprot.writeString(self.build.encode('utf-8') if sys.version_info[0] == 2 else self.build) oprot.writeFieldEnd() if self.build_number is not None: - oprot.writeFieldBegin("build_number", TType.STRING, 2) - oprot.writeString( - self.build_number.encode("utf-8") - if sys.version_info[0] == 2 - else self.build_number - ) + oprot.writeFieldBegin('build_number', TType.STRING, 2) + oprot.writeString(self.build_number.encode('utf-8') if sys.version_info[0] == 2 else self.build_number) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 3) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 3) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.version is not None: - oprot.writeFieldBegin("version", TType.STRING, 4) - oprot.writeString( - self.version.encode("utf-8") - if sys.version_info[0] == 2 - else self.version - ) + oprot.writeFieldBegin('version', TType.STRING, 4) + oprot.writeString(self.version.encode('utf-8') if sys.version_info[0] == 2 else self.version) oprot.writeFieldEnd() if self.home is not None: - oprot.writeFieldBegin("home", TType.STRING, 5) - oprot.writeString( - self.home.encode("utf-8") if sys.version_info[0] == 2 else self.home - ) + oprot.writeFieldBegin('home', TType.STRING, 5) + oprot.writeString(self.home.encode('utf-8') if sys.version_info[0] == 2 else self.home) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -910,8 +654,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -935,20 +680,8 @@ class ClusterInfo(object): """ - thrift_spec = None - - def __init__( - self, - launch_date=None, - group_id=None, - network_id=None, - public_ip=None, - subnet_id=None, - user=None, - inst_counter=None, - cluster_id=None, - key_name=None, - ): + + def __init__(self, launch_date=None, group_id=None, network_id=None, public_ip=None, subnet_id=None, user=None, inst_counter=None, cluster_id=None, key_name=None,): self.launch_date = launch_date self.group_id = group_id self.network_id = network_id @@ -960,11 +693,7 @@ def __init__( self.key_name = key_name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -974,56 +703,32 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.launch_date = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.launch_date = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.group_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.group_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.network_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.network_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.public_ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.subnet_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.subnet_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.user = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -1033,20 +738,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: - self.key_name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1055,78 +752,45 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ClusterInfo") + oprot.writeStructBegin('ClusterInfo') if self.launch_date is not None: - oprot.writeFieldBegin("launch_date", TType.STRING, 1) - oprot.writeString( - self.launch_date.encode("utf-8") - if sys.version_info[0] == 2 - else self.launch_date - ) + oprot.writeFieldBegin('launch_date', TType.STRING, 1) + oprot.writeString(self.launch_date.encode('utf-8') if sys.version_info[0] == 2 else self.launch_date) oprot.writeFieldEnd() if self.group_id is not None: - oprot.writeFieldBegin("group_id", TType.STRING, 2) - oprot.writeString( - self.group_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.group_id - ) + oprot.writeFieldBegin('group_id', TType.STRING, 2) + oprot.writeString(self.group_id.encode('utf-8') if sys.version_info[0] == 2 else self.group_id) oprot.writeFieldEnd() if self.network_id is not None: - oprot.writeFieldBegin("network_id", TType.STRING, 3) - oprot.writeString( - self.network_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.network_id - ) + oprot.writeFieldBegin('network_id', TType.STRING, 3) + oprot.writeString(self.network_id.encode('utf-8') if sys.version_info[0] == 2 else self.network_id) oprot.writeFieldEnd() if self.public_ip is not None: - oprot.writeFieldBegin("public_ip", TType.STRING, 4) - oprot.writeString( - self.public_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.public_ip - ) + oprot.writeFieldBegin('public_ip', TType.STRING, 4) + oprot.writeString(self.public_ip.encode('utf-8') if sys.version_info[0] == 2 else self.public_ip) oprot.writeFieldEnd() if self.subnet_id is not None: - oprot.writeFieldBegin("subnet_id", TType.STRING, 5) - oprot.writeString( - self.subnet_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.subnet_id - ) + oprot.writeFieldBegin('subnet_id', TType.STRING, 5) + oprot.writeString(self.subnet_id.encode('utf-8') if sys.version_info[0] == 2 else self.subnet_id) oprot.writeFieldEnd() if self.user is not None: - oprot.writeFieldBegin("user", TType.STRING, 6) - oprot.writeString( - self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user - ) + oprot.writeFieldBegin('user', TType.STRING, 6) + oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user) oprot.writeFieldEnd() if self.inst_counter is not None: - oprot.writeFieldBegin("inst_counter", TType.I32, 7) + oprot.writeFieldBegin('inst_counter', TType.I32, 7) oprot.writeI32(self.inst_counter) oprot.writeFieldEnd() if self.cluster_id is not None: - oprot.writeFieldBegin("cluster_id", TType.STRING, 8) - oprot.writeString( - self.cluster_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.cluster_id - ) + oprot.writeFieldBegin('cluster_id', TType.STRING, 8) + oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) oprot.writeFieldEnd() if self.key_name is not None: - oprot.writeFieldBegin("key_name", TType.STRING, 9) - oprot.writeString( - self.key_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.key_name - ) + oprot.writeFieldBegin('key_name', TType.STRING, 9) + oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1135,8 +799,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1159,19 +824,8 @@ class Volume(object): """ - thrift_spec = None - - def __init__( - self, - id=None, - name=None, - description=None, - status=None, - created_at=None, - device=None, - size=None, - server_id=None, - ): + + def __init__(self, id=None, name=None, description=None, status=None, created_at=None, device=None, size=None, server_id=None,): self.id = id self.name = name self.description = description @@ -1182,11 +836,7 @@ def __init__( self.server_id = server_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1196,56 +846,32 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.device = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.device = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -1255,11 +881,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1268,64 +890,41 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("Volume") + oprot.writeStructBegin('Volume') if self.id is not None: - oprot.writeFieldBegin("id", TType.STRING, 1) - oprot.writeString( - self.id.encode("utf-8") if sys.version_info[0] == 2 else self.id - ) + oprot.writeFieldBegin('id', TType.STRING, 1) + oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 2) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin("description", TType.STRING, 3) - oprot.writeString( - self.description.encode("utf-8") - if sys.version_info[0] == 2 - else self.description - ) + oprot.writeFieldBegin('description', TType.STRING, 3) + oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin("status", TType.STRING, 4) - oprot.writeString( - self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status - ) + oprot.writeFieldBegin('status', TType.STRING, 4) + oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin("created_at", TType.STRING, 5) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 5) + oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) oprot.writeFieldEnd() if self.device is not None: - oprot.writeFieldBegin("device", TType.STRING, 6) - oprot.writeString( - self.device.encode("utf-8") if sys.version_info[0] == 2 else self.device - ) + oprot.writeFieldBegin('device', TType.STRING, 6) + oprot.writeString(self.device.encode('utf-8') if sys.version_info[0] == 2 else self.device) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin("size", TType.I32, 7) + oprot.writeFieldBegin('size', TType.I32, 7) oprot.writeI32(self.size) oprot.writeFieldEnd() if self.server_id is not None: - oprot.writeFieldBegin("server_id", TType.STRING, 8) - oprot.writeString( - self.server_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.server_id - ) + oprot.writeFieldBegin('server_id', TType.STRING, 8) + oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1334,8 +933,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1359,18 +959,8 @@ class Snapshot(object): """ - thrift_spec = None - - def __init__( - self, - id=None, - name=None, - description=None, - status=None, - created_at=None, - size=None, - volume_id=None, - ): + + def __init__(self, id=None, name=None, description=None, status=None, created_at=None, size=None, volume_id=None,): self.id = id self.name = name self.description = description @@ -1380,11 +970,7 @@ def __init__( self.volume_id = volume_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1394,47 +980,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: @@ -1444,11 +1010,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1457,58 +1019,37 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("Snapshot") + oprot.writeStructBegin('Snapshot') if self.id is not None: - oprot.writeFieldBegin("id", TType.STRING, 1) - oprot.writeString( - self.id.encode("utf-8") if sys.version_info[0] == 2 else self.id - ) + oprot.writeFieldBegin('id', TType.STRING, 1) + oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 2) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin("description", TType.STRING, 3) - oprot.writeString( - self.description.encode("utf-8") - if sys.version_info[0] == 2 - else self.description - ) + oprot.writeFieldBegin('description', TType.STRING, 3) + oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin("status", TType.STRING, 4) - oprot.writeString( - self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status - ) + oprot.writeFieldBegin('status', TType.STRING, 4) + oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin("created_at", TType.STRING, 5) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 5) + oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin("size", TType.I32, 6) + oprot.writeFieldBegin('size', TType.I32, 6) oprot.writeI32(self.size) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 7) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 7) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1517,8 +1058,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1541,17 +1083,8 @@ class Flavor(object): """ - thrift_spec = None - - def __init__( - self, - vcpus=None, - ram=None, - disk=None, - name=None, - description=None, - ephemeral_disk=None, - ): + + def __init__(self, vcpus=None, ram=None, disk=None, name=None, description=None, ephemeral_disk=None,): self.vcpus = vcpus self.ram = ram self.disk = disk @@ -1560,11 +1093,7 @@ def __init__( self.ephemeral_disk = ephemeral_disk def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1589,20 +1118,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: @@ -1616,41 +1137,32 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("Flavor") + oprot.writeStructBegin('Flavor') if self.vcpus is not None: - oprot.writeFieldBegin("vcpus", TType.I32, 1) + oprot.writeFieldBegin('vcpus', TType.I32, 1) oprot.writeI32(self.vcpus) oprot.writeFieldEnd() if self.ram is not None: - oprot.writeFieldBegin("ram", TType.I32, 2) + oprot.writeFieldBegin('ram', TType.I32, 2) oprot.writeI32(self.ram) oprot.writeFieldEnd() if self.disk is not None: - oprot.writeFieldBegin("disk", TType.I32, 3) + oprot.writeFieldBegin('disk', TType.I32, 3) oprot.writeI32(self.disk) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 4) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 4) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin("description", TType.STRING, 5) - oprot.writeString( - self.description.encode("utf-8") - if sys.version_info[0] == 2 - else self.description - ) + oprot.writeFieldBegin('description', TType.STRING, 5) + oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) oprot.writeFieldEnd() if self.ephemeral_disk is not None: - oprot.writeFieldBegin("ephemeral_disk", TType.I32, 6) + oprot.writeFieldBegin('ephemeral_disk', TType.I32, 6) oprot.writeI32(self.ephemeral_disk) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1658,18 +1170,19 @@ def write(self, oprot): def validate(self): if self.vcpus is None: - raise TProtocolException(message="Required field vcpus is unset!") + raise TProtocolException(message='Required field vcpus is unset!') if self.ram is None: - raise TProtocolException(message="Required field ram is unset!") + raise TProtocolException(message='Required field ram is unset!') if self.disk is None: - raise TProtocolException(message="Required field disk is unset!") + raise TProtocolException(message='Required field disk is unset!') if self.name is None: - raise TProtocolException(message="Required field name is unset!") + raise TProtocolException(message='Required field name is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1699,24 +1212,8 @@ class Image(object): """ - thrift_spec = None - - def __init__( - self, - name=None, - min_disk=None, - min_ram=None, - status=None, - created_at=None, - updated_at=None, - openstack_id=None, - description=None, - tags=None, - is_snapshot=None, - os_version=None, - os_distro=None, - title=None, - ): + + def __init__(self, name=None, min_disk=None, min_ram=None, status=None, created_at=None, updated_at=None, openstack_id=None, description=None, tags=None, is_snapshot=None, os_version=None, os_distro=None, title=None,): self.name = name self.min_disk = min_disk self.min_ram = min_ram @@ -1732,11 +1229,7 @@ def __init__( self.title = title def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1746,11 +1239,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -1765,47 +1254,27 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.updated_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.updated_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: @@ -1813,11 +1282,7 @@ def read(self, iprot): self.tags = [] (_etype35, _size32) = iprot.readListBegin() for _i36 in range(_size32): - _elem37 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem37 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.tags.append(_elem37) iprot.readListEnd() else: @@ -1829,29 +1294,17 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: - self.os_version = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.os_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: - self.os_distro = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.os_distro = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.STRING: - self.title = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.title = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1860,121 +1313,87 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("Image") + oprot.writeStructBegin('Image') if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 1) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.min_disk is not None: - oprot.writeFieldBegin("min_disk", TType.I32, 2) + oprot.writeFieldBegin('min_disk', TType.I32, 2) oprot.writeI32(self.min_disk) oprot.writeFieldEnd() if self.min_ram is not None: - oprot.writeFieldBegin("min_ram", TType.I32, 3) + oprot.writeFieldBegin('min_ram', TType.I32, 3) oprot.writeI32(self.min_ram) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin("status", TType.STRING, 4) - oprot.writeString( - self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status - ) + oprot.writeFieldBegin('status', TType.STRING, 4) + oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin("created_at", TType.STRING, 5) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 5) + oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) oprot.writeFieldEnd() if self.updated_at is not None: - oprot.writeFieldBegin("updated_at", TType.STRING, 6) - oprot.writeString( - self.updated_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.updated_at - ) + oprot.writeFieldBegin('updated_at', TType.STRING, 6) + oprot.writeString(self.updated_at.encode('utf-8') if sys.version_info[0] == 2 else self.updated_at) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 7) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 7) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin("description", TType.STRING, 8) - oprot.writeString( - self.description.encode("utf-8") - if sys.version_info[0] == 2 - else self.description - ) + oprot.writeFieldBegin('description', TType.STRING, 8) + oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) oprot.writeFieldEnd() if self.tags is not None: - oprot.writeFieldBegin("tags", TType.LIST, 9) + oprot.writeFieldBegin('tags', TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.tags)) for iter38 in self.tags: - oprot.writeString( - iter38.encode("utf-8") if sys.version_info[0] == 2 else iter38 - ) + oprot.writeString(iter38.encode('utf-8') if sys.version_info[0] == 2 else iter38) oprot.writeListEnd() oprot.writeFieldEnd() if self.is_snapshot is not None: - oprot.writeFieldBegin("is_snapshot", TType.BOOL, 10) + oprot.writeFieldBegin('is_snapshot', TType.BOOL, 10) oprot.writeBool(self.is_snapshot) oprot.writeFieldEnd() if self.os_version is not None: - oprot.writeFieldBegin("os_version", TType.STRING, 11) - oprot.writeString( - self.os_version.encode("utf-8") - if sys.version_info[0] == 2 - else self.os_version - ) + oprot.writeFieldBegin('os_version', TType.STRING, 11) + oprot.writeString(self.os_version.encode('utf-8') if sys.version_info[0] == 2 else self.os_version) oprot.writeFieldEnd() if self.os_distro is not None: - oprot.writeFieldBegin("os_distro", TType.STRING, 12) - oprot.writeString( - self.os_distro.encode("utf-8") - if sys.version_info[0] == 2 - else self.os_distro - ) + oprot.writeFieldBegin('os_distro', TType.STRING, 12) + oprot.writeString(self.os_distro.encode('utf-8') if sys.version_info[0] == 2 else self.os_distro) oprot.writeFieldEnd() if self.title is not None: - oprot.writeFieldBegin("title", TType.STRING, 13) - oprot.writeString( - self.title.encode("utf-8") if sys.version_info[0] == 2 else self.title - ) + oprot.writeFieldBegin('title', TType.STRING, 13) + oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.name is None: - raise TProtocolException(message="Required field name is unset!") + raise TProtocolException(message='Required field name is unset!') if self.min_disk is None: - raise TProtocolException(message="Required field min_disk is unset!") + raise TProtocolException(message='Required field min_disk is unset!') if self.min_ram is None: - raise TProtocolException(message="Required field min_ram is unset!") + raise TProtocolException(message='Required field min_ram is unset!') if self.status is None: - raise TProtocolException(message="Required field status is unset!") + raise TProtocolException(message='Required field status is unset!') if self.openstack_id is None: - raise TProtocolException(message="Required field openstack_id is unset!") + raise TProtocolException(message='Required field openstack_id is unset!') if self.tags is None: - raise TProtocolException(message="Required field tags is unset!") + raise TProtocolException(message='Required field tags is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2003,23 +1422,8 @@ class VM(object): """ - thrift_spec = None - - def __init__( - self, - flavor=None, - image=None, - metadata=None, - project_id=None, - keyname=None, - openstack_id=None, - name=None, - created_at=None, - floating_ip=None, - fixed_ip=None, - task_state=None, - vm_state=None, - ): + + def __init__(self, flavor=None, image=None, metadata=None, project_id=None, keyname=None, openstack_id=None, name=None, created_at=None, floating_ip=None, fixed_ip=None, task_state=None, vm_state=None,): self.flavor = flavor self.image = image self.metadata = metadata @@ -2034,11 +1438,7 @@ def __init__( self.vm_state = vm_state def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -2063,99 +1463,55 @@ def read(self, iprot): self.metadata = {} (_ktype40, _vtype41, _size39) = iprot.readMapBegin() for _i43 in range(_size39): - _key44 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val45 = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key44 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val45 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key44] = _val45 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.project_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.project_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.keyname = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.keyname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: - self.floating_ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.floating_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: - self.fixed_ip = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.fixed_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: - self.task_state = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.task_state = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: - self.vm_state = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.vm_state = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2164,124 +1520,84 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("VM") + oprot.writeStructBegin('VM') if self.flavor is not None: - oprot.writeFieldBegin("flavor", TType.STRUCT, 1) + oprot.writeFieldBegin('flavor', TType.STRUCT, 1) self.flavor.write(oprot) oprot.writeFieldEnd() if self.image is not None: - oprot.writeFieldBegin("image", TType.STRUCT, 2) + oprot.writeFieldBegin('image', TType.STRUCT, 2) self.image.write(oprot) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin("metadata", TType.MAP, 3) + oprot.writeFieldBegin('metadata', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter46, viter47 in self.metadata.items(): - oprot.writeString( - kiter46.encode("utf-8") if sys.version_info[0] == 2 else kiter46 - ) - oprot.writeString( - viter47.encode("utf-8") if sys.version_info[0] == 2 else viter47 - ) + oprot.writeString(kiter46.encode('utf-8') if sys.version_info[0] == 2 else kiter46) + oprot.writeString(viter47.encode('utf-8') if sys.version_info[0] == 2 else viter47) oprot.writeMapEnd() oprot.writeFieldEnd() if self.project_id is not None: - oprot.writeFieldBegin("project_id", TType.STRING, 4) - oprot.writeString( - self.project_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.project_id - ) + oprot.writeFieldBegin('project_id', TType.STRING, 4) + oprot.writeString(self.project_id.encode('utf-8') if sys.version_info[0] == 2 else self.project_id) oprot.writeFieldEnd() if self.keyname is not None: - oprot.writeFieldBegin("keyname", TType.STRING, 5) - oprot.writeString( - self.keyname.encode("utf-8") - if sys.version_info[0] == 2 - else self.keyname - ) + oprot.writeFieldBegin('keyname', TType.STRING, 5) + oprot.writeString(self.keyname.encode('utf-8') if sys.version_info[0] == 2 else self.keyname) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 6) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 6) + oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 7) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 7) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin("created_at", TType.STRING, 8) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 8) + oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) oprot.writeFieldEnd() if self.floating_ip is not None: - oprot.writeFieldBegin("floating_ip", TType.STRING, 9) - oprot.writeString( - self.floating_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.floating_ip - ) + oprot.writeFieldBegin('floating_ip', TType.STRING, 9) + oprot.writeString(self.floating_ip.encode('utf-8') if sys.version_info[0] == 2 else self.floating_ip) oprot.writeFieldEnd() if self.fixed_ip is not None: - oprot.writeFieldBegin("fixed_ip", TType.STRING, 10) - oprot.writeString( - self.fixed_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.fixed_ip - ) + oprot.writeFieldBegin('fixed_ip', TType.STRING, 10) + oprot.writeString(self.fixed_ip.encode('utf-8') if sys.version_info[0] == 2 else self.fixed_ip) oprot.writeFieldEnd() if self.task_state is not None: - oprot.writeFieldBegin("task_state", TType.STRING, 11) - oprot.writeString( - self.task_state.encode("utf-8") - if sys.version_info[0] == 2 - else self.task_state - ) + oprot.writeFieldBegin('task_state', TType.STRING, 11) + oprot.writeString(self.task_state.encode('utf-8') if sys.version_info[0] == 2 else self.task_state) oprot.writeFieldEnd() if self.vm_state is not None: - oprot.writeFieldBegin("vm_state", TType.STRING, 12) - oprot.writeString( - self.vm_state.encode("utf-8") - if sys.version_info[0] == 2 - else self.vm_state - ) + oprot.writeFieldBegin('vm_state', TType.STRING, 12) + oprot.writeString(self.vm_state.encode('utf-8') if sys.version_info[0] == 2 else self.vm_state) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.keyname is None: - raise TProtocolException(message="Required field keyname is unset!") + raise TProtocolException(message='Required field keyname is unset!') if self.openstack_id is None: - raise TProtocolException(message="Required field openstack_id is unset!") + raise TProtocolException(message='Required field openstack_id is unset!') if self.name is None: - raise TProtocolException(message="Required field name is unset!") + raise TProtocolException(message='Required field name is unset!') if self.created_at is None: - raise TProtocolException(message="Required field created_at is unset!") + raise TProtocolException(message='Required field created_at is unset!') if self.fixed_ip is None: - raise TProtocolException(message="Required field fixed_ip is unset!") + raise TProtocolException(message='Required field fixed_ip is unset!') if self.vm_state is None: - raise TProtocolException(message="Required field vm_state is unset!") + raise TProtocolException(message='Required field vm_state is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2299,24 +1615,14 @@ class ClusterInstance(object): """ - thrift_spec = None - def __init__( - self, - type=None, - image=None, - count=None, - ): + def __init__(self, type=None, image=None, count=None,): self.type = type self.image = image self.count = count def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -2326,20 +1632,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.type = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -2353,27 +1651,20 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ClusterInstance") + oprot.writeStructBegin('ClusterInstance') if self.type is not None: - oprot.writeFieldBegin("type", TType.STRING, 1) - oprot.writeString( - self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type - ) + oprot.writeFieldBegin('type', TType.STRING, 1) + oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type) oprot.writeFieldEnd() if self.image is not None: - oprot.writeFieldBegin("image", TType.STRING, 2) - oprot.writeString( - self.image.encode("utf-8") if sys.version_info[0] == 2 else self.image - ) + oprot.writeFieldBegin('image', TType.STRING, 2) + oprot.writeString(self.image.encode('utf-8') if sys.version_info[0] == 2 else self.image) oprot.writeFieldEnd() if self.count is not None: - oprot.writeFieldBegin("count", TType.I32, 3) + oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2381,14 +1672,15 @@ def write(self, oprot): def validate(self): if self.type is None: - raise TProtocolException(message="Required field type is unset!") + raise TProtocolException(message='Required field type is unset!') if self.image is None: - raise TProtocolException(message="Required field image is unset!") + raise TProtocolException(message='Required field image is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2408,24 +1700,14 @@ class PlaybookResult(object): """ - thrift_spec = None - def __init__( - self, - status=None, - stdout=None, - stderr=None, - ): + def __init__(self, status=None, stdout=None, stderr=None,): self.status = status self.stdout = stdout self.stderr = stderr def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -2440,20 +1722,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.stdout = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.stdout = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.stderr = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.stderr = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2462,44 +1736,38 @@ def read(self, iprot): iprot.readStructEnd() def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("PlaybookResult") + oprot.writeStructBegin('PlaybookResult') if self.status is not None: - oprot.writeFieldBegin("status", TType.I32, 1) + oprot.writeFieldBegin('status', TType.I32, 1) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.stdout is not None: - oprot.writeFieldBegin("stdout", TType.STRING, 2) - oprot.writeString( - self.stdout.encode("utf-8") if sys.version_info[0] == 2 else self.stdout - ) + oprot.writeFieldBegin('stdout', TType.STRING, 2) + oprot.writeString(self.stdout.encode('utf-8') if sys.version_info[0] == 2 else self.stdout) oprot.writeFieldEnd() if self.stderr is not None: - oprot.writeFieldBegin("stderr", TType.STRING, 3) - oprot.writeString( - self.stderr.encode("utf-8") if sys.version_info[0] == 2 else self.stderr - ) + oprot.writeFieldBegin('stderr', TType.STRING, 3) + oprot.writeString(self.stderr.encode('utf-8') if sys.version_info[0] == 2 else self.stderr) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.status is None: - raise TProtocolException(message="Required field status is unset!") + raise TProtocolException(message='Required field status is unset!') if self.stdout is None: - raise TProtocolException(message="Required field stdout is unset!") + raise TProtocolException(message='Required field stdout is unset!') if self.stderr is None: - raise TProtocolException(message="Required field stderr is unset!") + raise TProtocolException(message='Required field stderr is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2515,13 +1783,9 @@ class MetadataServerNotAvailableException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - ): - super(MetadataServerNotAvailableException, self).__setattr__("message", message) + def __init__(self, message=None,): + super(MetadataServerNotAvailableException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2530,15 +1794,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2548,11 +1808,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2564,20 +1820,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("MetadataServerNotAvailableException") + oprot.writeStructBegin('MetadataServerNotAvailableException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2589,8 +1838,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2606,13 +1856,9 @@ class MetadataServerNotAllowedException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - ): - super(MetadataServerNotAllowedException, self).__setattr__("message", message) + def __init__(self, message=None,): + super(MetadataServerNotAllowedException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2621,15 +1867,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2639,11 +1881,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2655,20 +1893,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("MetadataServerNotAllowedException") + oprot.writeStructBegin('MetadataServerNotAllowedException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2680,8 +1911,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2699,19 +1931,11 @@ class ResourceNotFoundException(TException): """ - thrift_spec = None - - def __init__( - self, - message=None, - resource_type=None, - name_or_id=None, - ): - super(ResourceNotFoundException, self).__setattr__("message", message) - super(ResourceNotFoundException, self).__setattr__( - "resource_type", resource_type - ) - super(ResourceNotFoundException, self).__setattr__("name_or_id", name_or_id) + + def __init__(self, message=None, resource_type=None, name_or_id=None,): + super(ResourceNotFoundException, self).__setattr__('message', message) + super(ResourceNotFoundException, self).__setattr__('resource_type', resource_type) + super(ResourceNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2720,21 +1944,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.resource_type, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.resource_type, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2746,29 +1960,17 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - resource_type = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + resource_type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2782,36 +1984,21 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ResourceNotFoundException") + oprot.writeStructBegin('ResourceNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.resource_type is not None: - oprot.writeFieldBegin("resource_type", TType.STRING, 2) - oprot.writeString( - self.resource_type.encode("utf-8") - if sys.version_info[0] == 2 - else self.resource_type - ) + oprot.writeFieldBegin('resource_type', TType.STRING, 2) + oprot.writeString(self.resource_type.encode('utf-8') if sys.version_info[0] == 2 else self.resource_type) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 3) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 3) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2823,8 +2010,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2840,13 +2028,9 @@ class ResourceNotAvailableException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - ): - super(ResourceNotAvailableException, self).__setattr__("message", message) + def __init__(self, message=None,): + super(ResourceNotAvailableException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2855,15 +2039,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2873,11 +2053,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2889,20 +2065,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ResourceNotAvailableException") + oprot.writeStructBegin('ResourceNotAvailableException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2914,8 +2083,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2932,15 +2102,10 @@ class TemplateNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - template=None, - ): - super(TemplateNotFoundException, self).__setattr__("message", message) - super(TemplateNotFoundException, self).__setattr__("template", template) + def __init__(self, message=None, template=None,): + super(TemplateNotFoundException, self).__setattr__('message', message) + super(TemplateNotFoundException, self).__setattr__('template', template) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2949,20 +2114,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.template, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.template, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2973,20 +2129,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - template = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2999,28 +2147,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("TemplateNotFoundException") + oprot.writeStructBegin('TemplateNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin("template", TType.STRING, 2) - oprot.writeString( - self.template.encode("utf-8") - if sys.version_info[0] == 2 - else self.template - ) + oprot.writeFieldBegin('template', TType.STRING, 2) + oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3032,8 +2169,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3050,15 +2188,10 @@ class NameAlreadyUsedException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name=None, - ): - super(NameAlreadyUsedException, self).__setattr__("message", message) - super(NameAlreadyUsedException, self).__setattr__("name", name) + def __init__(self, message=None, name=None,): + super(NameAlreadyUsedException, self).__setattr__('message', message) + super(NameAlreadyUsedException, self).__setattr__('name', name) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3067,20 +2200,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3091,20 +2215,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3117,26 +2233,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("NameAlreadyUsedException") + oprot.writeStructBegin('NameAlreadyUsedException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 2) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3148,8 +2255,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3166,15 +2274,10 @@ class ServerNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(ServerNotFoundException, self).__setattr__("message", message) - super(ServerNotFoundException, self).__setattr__("name_or_id", name_or_id) + def __init__(self, message=None, name_or_id=None,): + super(ServerNotFoundException, self).__setattr__('message', message) + super(ServerNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3183,20 +2286,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3207,20 +2301,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3233,28 +2319,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ServerNotFoundException") + oprot.writeStructBegin('ServerNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3266,8 +2341,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3284,17 +2360,10 @@ class SecurityGroupNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(SecurityGroupNotFoundException, self).__setattr__("message", message) - super(SecurityGroupNotFoundException, self).__setattr__( - "name_or_id", name_or_id - ) + def __init__(self, message=None, name_or_id=None,): + super(SecurityGroupNotFoundException, self).__setattr__('message', message) + super(SecurityGroupNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3303,20 +2372,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3327,20 +2387,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3353,28 +2405,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("SecurityGroupNotFoundException") + oprot.writeStructBegin('SecurityGroupNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3386,8 +2427,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3404,17 +2446,10 @@ class SecurityGroupRuleNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(SecurityGroupRuleNotFoundException, self).__setattr__("message", message) - super(SecurityGroupRuleNotFoundException, self).__setattr__( - "name_or_id", name_or_id - ) + def __init__(self, message=None, name_or_id=None,): + super(SecurityGroupRuleNotFoundException, self).__setattr__('message', message) + super(SecurityGroupRuleNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3423,20 +2458,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3447,20 +2473,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3473,28 +2491,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("SecurityGroupRuleNotFoundException") + oprot.writeStructBegin('SecurityGroupRuleNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3506,8 +2513,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3524,15 +2532,10 @@ class FlavorNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(FlavorNotFoundException, self).__setattr__("message", message) - super(FlavorNotFoundException, self).__setattr__("name_or_id", name_or_id) + def __init__(self, message=None, name_or_id=None,): + super(FlavorNotFoundException, self).__setattr__('message', message) + super(FlavorNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3541,20 +2544,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3565,20 +2559,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3591,28 +2577,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("FlavorNotFoundException") + oprot.writeStructBegin('FlavorNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3624,8 +2599,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3642,15 +2618,10 @@ class VolumeNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(VolumeNotFoundException, self).__setattr__("message", message) - super(VolumeNotFoundException, self).__setattr__("name_or_id", name_or_id) + def __init__(self, message=None, name_or_id=None,): + super(VolumeNotFoundException, self).__setattr__('message', message) + super(VolumeNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3659,20 +2630,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3683,20 +2645,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3709,28 +2663,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("VolumeNotFoundException") + oprot.writeStructBegin('VolumeNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3742,8 +2685,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3760,15 +2704,10 @@ class SnapshotNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(SnapshotNotFoundException, self).__setattr__("message", message) - super(SnapshotNotFoundException, self).__setattr__("name_or_id", name_or_id) + def __init__(self, message=None, name_or_id=None,): + super(SnapshotNotFoundException, self).__setattr__('message', message) + super(SnapshotNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3777,20 +2716,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3801,20 +2731,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3827,28 +2749,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("SnapshotNotFoundException") + oprot.writeStructBegin('SnapshotNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3860,8 +2771,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3878,15 +2790,10 @@ class ImageNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(ImageNotFoundException, self).__setattr__("message", message) - super(ImageNotFoundException, self).__setattr__("name_or_id", name_or_id) + def __init__(self, message=None, name_or_id=None,): + super(ImageNotFoundException, self).__setattr__('message', message) + super(ImageNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -3895,20 +2802,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -3919,20 +2817,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -3945,28 +2835,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ImageNotFoundException") + oprot.writeStructBegin('ImageNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3978,8 +2857,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -3996,15 +2876,10 @@ class ClusterNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(ClusterNotFoundException, self).__setattr__("message", message) - super(ClusterNotFoundException, self).__setattr__("name_or_id", name_or_id) + def __init__(self, message=None, name_or_id=None,): + super(ClusterNotFoundException, self).__setattr__('message', message) + super(ClusterNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -4013,20 +2888,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4037,20 +2903,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4063,28 +2921,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ClusterNotFoundException") + oprot.writeStructBegin('ClusterNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4096,8 +2943,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4114,15 +2962,10 @@ class BackendNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(BackendNotFoundException, self).__setattr__("message", message) - super(BackendNotFoundException, self).__setattr__("name_or_id", name_or_id) + def __init__(self, message=None, name_or_id=None,): + super(BackendNotFoundException, self).__setattr__('message', message) + super(BackendNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -4131,20 +2974,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4155,20 +2989,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4181,28 +3007,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("BackendNotFoundException") + oprot.writeStructBegin('BackendNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4214,8 +3029,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4232,15 +3048,10 @@ class PlaybookNotFoundException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - name_or_id=None, - ): - super(PlaybookNotFoundException, self).__setattr__("message", message) - super(PlaybookNotFoundException, self).__setattr__("name_or_id", name_or_id) + def __init__(self, message=None, name_or_id=None,): + super(PlaybookNotFoundException, self).__setattr__('message', message) + super(PlaybookNotFoundException, self).__setattr__('name_or_id', name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -4249,20 +3060,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash( - ( - self.message, - self.name_or_id, - ) - ) + return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4273,20 +3075,12 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4299,28 +3093,17 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("PlaybookNotFoundException") + oprot.writeStructBegin('PlaybookNotFoundException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin("name_or_id", TType.STRING, 2) - oprot.writeString( - self.name_or_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.name_or_id - ) + oprot.writeFieldBegin('name_or_id', TType.STRING, 2) + oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4332,8 +3115,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4349,13 +3133,9 @@ class DefaultException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - ): - super(DefaultException, self).__setattr__("message", message) + def __init__(self, message=None,): + super(DefaultException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -4364,15 +3144,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4382,11 +3158,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4398,20 +3170,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("DefaultException") + oprot.writeStructBegin('DefaultException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4423,8 +3188,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -4442,13 +3208,9 @@ class OpenStackConflictException(TException): """ - thrift_spec = None - def __init__( - self, - message=None, - ): - super(OpenStackConflictException, self).__setattr__("message", message) + def __init__(self, message=None,): + super(OpenStackConflictException, self).__setattr__('message', message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -4457,15 +3219,11 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message,)) + return hash(self.__class__) ^ hash((self.message, )) @classmethod def read(cls, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and cls.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -4475,11 +3233,7 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = ( - iprot.readString().decode("utf-8", errors="replace") - if sys.version_info[0] == 2 - else iprot.readString() - ) + message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -4491,20 +3245,13 @@ def read(cls, iprot): ) def write(self, oprot): - self.validate() if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("OpenStackConflictException") + oprot.writeStructBegin('OpenStackConflictException') if self.message is not None: - oprot.writeFieldBegin("message", TType.STRING, 1) - oprot.writeString( - self.message.encode("utf-8") - if sys.version_info[0] == 2 - else self.message - ) + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4516,998 +3263,266 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(User) User.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "username", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "user_id", - "UTF8", - None, - ), # 2 - ( - 3, - TType.LIST, - "public_keys", - (TType.STRING, "UTF8", False), - None, - ), # 3 + (1, TType.STRING, 'username', 'UTF8', None, ), # 1 + (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 + (3, TType.LIST, 'public_keys', (TType.STRING, 'UTF8', False), None, ), # 3 ) all_structs.append(UserData) UserData.thrift_spec = ( None, # 0 None, # 1 - ( - 2, - TType.MAP, - "data", - (TType.STRING, "UTF8", TType.STRUCT, [User, None], False), - {}, - ), # 2 + (2, TType.MAP, 'data', (TType.STRING, 'UTF8', TType.STRUCT, [User, None], False), { + }, ), # 2 ) all_structs.append(VirtualMachineServerMetadata) VirtualMachineServerMetadata.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "ip", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "hashed_auth_token", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRUCT, - "userdata", - [UserData, None], - None, - ), # 3 + (1, TType.STRING, 'ip', 'UTF8', None, ), # 1 + (2, TType.STRING, 'hashed_auth_token', 'UTF8', None, ), # 2 + (3, TType.STRUCT, 'userdata', [UserData, None], None, ), # 3 ) all_structs.append(Backend) Backend.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "owner", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "location_url", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "template", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "template_version", - "UTF8", - None, - ), # 5 + (1, TType.I64, 'id', None, None, ), # 1 + (2, TType.STRING, 'owner', 'UTF8', None, ), # 2 + (3, TType.STRING, 'location_url', 'UTF8', None, ), # 3 + (4, TType.STRING, 'template', 'UTF8', None, ), # 4 + (5, TType.STRING, 'template_version', 'UTF8', None, ), # 5 ) all_structs.append(ResearchEnvironmentTemplate) ResearchEnvironmentTemplate.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "template_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "title", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "description", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "logo_url", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "info_url", - "UTF8", - None, - ), # 5 - ( - 6, - TType.I32, - "port", - None, - None, - ), # 6 - ( - 7, - TType.LIST, - "incompatible_versions", - (TType.STRING, "UTF8", False), - None, - ), # 7 - ( - 8, - TType.BOOL, - "is_maintained", - None, - None, - ), # 8 - ( - 9, - TType.MAP, - "information_for_display", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 9 - ( - 10, - TType.I32, - "min_ram", - None, - 0, - ), # 10 - ( - 11, - TType.I32, - "min_cores", - None, - 0, - ), # 11 - ( - 12, - TType.STRING, - "securitygroup_name", - "UTF8", - None, - ), # 12 + (1, TType.STRING, 'template_name', 'UTF8', None, ), # 1 + (2, TType.STRING, 'title', 'UTF8', None, ), # 2 + (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + (4, TType.STRING, 'logo_url', 'UTF8', None, ), # 4 + (5, TType.STRING, 'info_url', 'UTF8', None, ), # 5 + (6, TType.I32, 'port', None, None, ), # 6 + (7, TType.LIST, 'incompatible_versions', (TType.STRING, 'UTF8', False), None, ), # 7 + (8, TType.BOOL, 'is_maintained', None, None, ), # 8 + (9, TType.MAP, 'information_for_display', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 9 + (10, TType.I32, 'min_ram', None, 0, ), # 10 + (11, TType.I32, 'min_cores', None, 0, ), # 11 + (12, TType.STRING, 'securitygroup_name', 'UTF8', None, ), # 12 ) all_structs.append(CondaPackage) CondaPackage.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "build", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "build_number", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "name", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "version", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "home", - "UTF8", - None, - ), # 5 + (1, TType.STRING, 'build', 'UTF8', None, ), # 1 + (2, TType.STRING, 'build_number', 'UTF8', None, ), # 2 + (3, TType.STRING, 'name', 'UTF8', None, ), # 3 + (4, TType.STRING, 'version', 'UTF8', None, ), # 4 + (5, TType.STRING, 'home', 'UTF8', None, ), # 5 ) all_structs.append(ClusterInfo) ClusterInfo.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "launch_date", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "group_id", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "network_id", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "public_ip", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "subnet_id", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "user", - "UTF8", - None, - ), # 6 - ( - 7, - TType.I32, - "inst_counter", - None, - None, - ), # 7 - ( - 8, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 8 - ( - 9, - TType.STRING, - "key_name", - "UTF8", - None, - ), # 9 + (1, TType.STRING, 'launch_date', 'UTF8', None, ), # 1 + (2, TType.STRING, 'group_id', 'UTF8', None, ), # 2 + (3, TType.STRING, 'network_id', 'UTF8', None, ), # 3 + (4, TType.STRING, 'public_ip', 'UTF8', None, ), # 4 + (5, TType.STRING, 'subnet_id', 'UTF8', None, ), # 5 + (6, TType.STRING, 'user', 'UTF8', None, ), # 6 + (7, TType.I32, 'inst_counter', None, None, ), # 7 + (8, TType.STRING, 'cluster_id', 'UTF8', None, ), # 8 + (9, TType.STRING, 'key_name', 'UTF8', None, ), # 9 ) all_structs.append(Volume) Volume.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "description", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "status", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "device", - "UTF8", - None, - ), # 6 - ( - 7, - TType.I32, - "size", - None, - None, - ), # 7 - ( - 8, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 8 + (1, TType.STRING, 'id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + (4, TType.STRING, 'status', 'UTF8', None, ), # 4 + (5, TType.STRING, 'created_at', 'UTF8', None, ), # 5 + (6, TType.STRING, 'device', 'UTF8', None, ), # 6 + (7, TType.I32, 'size', None, None, ), # 7 + (8, TType.STRING, 'server_id', 'UTF8', None, ), # 8 ) all_structs.append(Snapshot) Snapshot.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "description", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "status", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 5 - ( - 6, - TType.I32, - "size", - None, - None, - ), # 6 - ( - 7, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 7 + (1, TType.STRING, 'id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + (4, TType.STRING, 'status', 'UTF8', None, ), # 4 + (5, TType.STRING, 'created_at', 'UTF8', None, ), # 5 + (6, TType.I32, 'size', None, None, ), # 6 + (7, TType.STRING, 'volume_id', 'UTF8', None, ), # 7 ) all_structs.append(Flavor) Flavor.thrift_spec = ( None, # 0 - ( - 1, - TType.I32, - "vcpus", - None, - None, - ), # 1 - ( - 2, - TType.I32, - "ram", - None, - None, - ), # 2 - ( - 3, - TType.I32, - "disk", - None, - None, - ), # 3 - ( - 4, - TType.STRING, - "name", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "description", - "UTF8", - None, - ), # 5 - ( - 6, - TType.I32, - "ephemeral_disk", - None, - None, - ), # 6 + (1, TType.I32, 'vcpus', None, None, ), # 1 + (2, TType.I32, 'ram', None, None, ), # 2 + (3, TType.I32, 'disk', None, None, ), # 3 + (4, TType.STRING, 'name', 'UTF8', None, ), # 4 + (5, TType.STRING, 'description', 'UTF8', None, ), # 5 + (6, TType.I32, 'ephemeral_disk', None, None, ), # 6 ) all_structs.append(Image) Image.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.I32, - "min_disk", - None, - None, - ), # 2 - ( - 3, - TType.I32, - "min_ram", - None, - None, - ), # 3 - ( - 4, - TType.STRING, - "status", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "updated_at", - "UTF8", - None, - ), # 6 - ( - 7, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 7 - ( - 8, - TType.STRING, - "description", - "UTF8", - None, - ), # 8 - ( - 9, - TType.LIST, - "tags", - (TType.STRING, "UTF8", False), - None, - ), # 9 - ( - 10, - TType.BOOL, - "is_snapshot", - None, - None, - ), # 10 - ( - 11, - TType.STRING, - "os_version", - "UTF8", - None, - ), # 11 - ( - 12, - TType.STRING, - "os_distro", - "UTF8", - None, - ), # 12 - ( - 13, - TType.STRING, - "title", - "UTF8", - None, - ), # 13 + (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 ) all_structs.append(VM) VM.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "flavor", - [Flavor, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "image", - [Image, None], - None, - ), # 2 - ( - 3, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 3 - ( - 4, - TType.STRING, - "project_id", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "keyname", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 6 - ( - 7, - TType.STRING, - "name", - "UTF8", - None, - ), # 7 - ( - 8, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 8 - ( - 9, - TType.STRING, - "floating_ip", - "UTF8", - None, - ), # 9 - ( - 10, - TType.STRING, - "fixed_ip", - "UTF8", - None, - ), # 10 - ( - 11, - TType.STRING, - "task_state", - "UTF8", - None, - ), # 11 - ( - 12, - TType.STRING, - "vm_state", - "UTF8", - None, - ), # 12 + (1, TType.STRUCT, 'flavor', [Flavor, None], None, ), # 1 + (2, TType.STRUCT, 'image', [Image, None], None, ), # 2 + (3, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 + (4, TType.STRING, 'project_id', 'UTF8', None, ), # 4 + (5, TType.STRING, 'keyname', 'UTF8', None, ), # 5 + (6, TType.STRING, 'openstack_id', 'UTF8', None, ), # 6 + (7, TType.STRING, 'name', 'UTF8', None, ), # 7 + (8, TType.STRING, 'created_at', 'UTF8', None, ), # 8 + (9, TType.STRING, 'floating_ip', 'UTF8', None, ), # 9 + (10, TType.STRING, 'fixed_ip', 'UTF8', None, ), # 10 + (11, TType.STRING, 'task_state', 'UTF8', None, ), # 11 + (12, TType.STRING, 'vm_state', 'UTF8', None, ), # 12 ) all_structs.append(ClusterInstance) ClusterInstance.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "type", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image", - "UTF8", - None, - ), # 2 - ( - 3, - TType.I32, - "count", - None, - None, - ), # 3 + (1, TType.STRING, 'type', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image', 'UTF8', None, ), # 2 + (3, TType.I32, 'count', None, None, ), # 3 ) all_structs.append(PlaybookResult) PlaybookResult.thrift_spec = ( None, # 0 - ( - 1, - TType.I32, - "status", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "stdout", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "stderr", - "UTF8", - None, - ), # 3 + (1, TType.I32, 'status', None, None, ), # 1 + (2, TType.STRING, 'stdout', 'UTF8', None, ), # 2 + (3, TType.STRING, 'stderr', 'UTF8', None, ), # 3 ) all_structs.append(MetadataServerNotAvailableException) MetadataServerNotAvailableException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) all_structs.append(MetadataServerNotAllowedException) MetadataServerNotAllowedException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) all_structs.append(ResourceNotFoundException) ResourceNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "resource_type", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'resource_type', 'UTF8', None, ), # 2 + (3, TType.STRING, 'name_or_id', 'UTF8', None, ), # 3 ) all_structs.append(ResourceNotAvailableException) ResourceNotAvailableException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) all_structs.append(TemplateNotFoundException) TemplateNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "template", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'template', 'UTF8', None, ), # 2 ) all_structs.append(NameAlreadyUsedException) NameAlreadyUsedException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name', 'UTF8', None, ), # 2 ) all_structs.append(ServerNotFoundException) ServerNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(SecurityGroupNotFoundException) SecurityGroupNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(SecurityGroupRuleNotFoundException) SecurityGroupRuleNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(FlavorNotFoundException) FlavorNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(VolumeNotFoundException) VolumeNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(SnapshotNotFoundException) SnapshotNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(ImageNotFoundException) ImageNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(ClusterNotFoundException) ClusterNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(BackendNotFoundException) BackendNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(PlaybookNotFoundException) PlaybookNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name_or_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 ) all_structs.append(DefaultException) DefaultException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) all_structs.append(OpenStackConflictException) OpenStackConflictException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "message", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 ) fix_spec(all_structs) del all_structs From c0a1cfe6d7ad7e6af9d912b3a9d1dc2754b1b195 Mon Sep 17 00:00:00 2001 From: qqmok <qiqi.mok@uni-bielefeld.de> Date: Tue, 22 Oct 2024 22:33:36 +0200 Subject: [PATCH 5/5] fix(rescue): added unrescue --- portal_client.thrift | 7 + simple_vm_client/VirtualMachineHandler.py | 5 +- simple_vm_client/VirtualMachineService-remote | 7 + simple_vm_client/VirtualMachineService.py | 208 ++++++++++++++++++ .../openstack_connector.py | 20 +- 5 files changed, 245 insertions(+), 2 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index 56b2206..a614ba6 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -468,6 +468,13 @@ service VirtualMachineService { throws (1:ServerNotFoundException e, 2: OpenStackConflictException c) + void unrescue_server( + + /** Id of the server. */ + 1:string openstack_id) + + throws (1:ServerNotFoundException e, 2: OpenStackConflictException c) + string start_server( /** Name of the Flavor to use.*/ diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index c874105..0985a31 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -145,7 +145,10 @@ def rescue_server(self, openstack_id: str, image_ref: str = None) -> None: return self.openstack_connector.rescue_server(openstack_id=openstack_id, admin_pass=admin_pass, - image_ref=image_ref) + image_ref=image_ref) + + def unrescue_server(self, openstack_id: str) -> None: + 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) diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index a70076e..14a9403 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -45,6 +45,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': 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)') @@ -303,6 +304,12 @@ elif cmd == 'rescue_server': sys.exit(1) pp.pprint(client.rescue_server(args[0], args[1], args[2],)) +elif cmd == 'unrescue_server': + if len(args) != 1: + print('unrescue_server requires 1 args') + sys.exit(1) + pp.pprint(client.unrescue_server(args[0],)) + elif cmd == 'start_server': if len(args) != 13: print('start_server requires 13 args') diff --git a/simple_vm_client/VirtualMachineService.py b/simple_vm_client/VirtualMachineService.py index 9cc78d9..ee1c0c9 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -216,6 +216,14 @@ def rescue_server(self, openstack_id, admin_pass, image_ref): """ pass + def unrescue_server(self, openstack_id): + """ + Parameters: + - 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): """ Parameters: @@ -1492,6 +1500,40 @@ def recv_rescue_server(self): raise result.c return + def unrescue_server(self, openstack_id): + """ + Parameters: + - openstack_id: Id of the server. + + """ + self.send_unrescue_server(openstack_id) + self.recv_unrescue_server() + + def send_unrescue_server(self, openstack_id): + self._oprot.writeMessageBegin('unrescue_server', TMessageType.CALL, self._seqid) + args = unrescue_server_args() + args.openstack_id = openstack_id + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_unrescue_server(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = unrescue_server_result() + result.read(iprot) + iprot.readMessageEnd() + if result.e is not None: + raise result.e + if result.c is not None: + 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): """ Parameters: @@ -3488,6 +3530,7 @@ def __init__(self, handler): 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 @@ -4103,6 +4146,35 @@ def process_rescue_server(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() + def process_unrescue_server(self, seqid, iprot, oprot): + args = unrescue_server_args() + args.read(iprot) + iprot.readMessageEnd() + result = unrescue_server_result() + try: + self._handler.unrescue_server(args.openstack_id) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except ServerNotFoundException as e: + msg_type = TMessageType.REPLY + result.e = e + except OpenStackConflictException as c: + msg_type = TMessageType.REPLY + result.c = c + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("unrescue_server", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_start_server(self, seqid, iprot, oprot): args = start_server_args() args.read(iprot) @@ -8351,6 +8423,142 @@ def __ne__(self, other): ) +class unrescue_server_args(object): + """ + Attributes: + - openstack_id: Id of the server. + + """ + + + def __init__(self, openstack_id=None,): + self.openstack_id = openstack_id + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('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.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(unrescue_server_args) +unrescue_server_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 +) + + +class unrescue_server_result(object): + """ + Attributes: + - e + - c + + """ + + + 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: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.e = ServerNotFoundException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.c = OpenStackConflictException.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('unrescue_server_result') + if self.e is not None: + oprot.writeFieldBegin('e', TType.STRUCT, 1) + self.e.write(oprot) + oprot.writeFieldEnd() + if self.c is not None: + oprot.writeFieldBegin('c', TType.STRUCT, 2) + self.c.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(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 +) + + class start_server_args(object): """ Attributes: diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index bb6f893..5b1a4c2 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -1380,7 +1380,25 @@ def rescue_server(self, openstack_id: str, admin_pass: str = None, image_ref: st 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}") + try: + server: Server = self.get_server(openstack_id=openstack_id) + if not server: + logger.error(f"Instance {openstack_id} not found") + raise ServerNotFoundException( + message=f"Instance {openstack_id} not found", + name_or_id=openstack_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) def _calculate_vm_ports(self, server: Server): fixed_ip = server.private_v4