From 13ff694fe7d71be4e05af522ecddbdd6684f460a Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 6 Aug 2024 13:05:13 +0200 Subject: [PATCH 01/15] feat(Metadata):set,remove,healthcheck for metadataserver --- portal_client.thrift | 12 ++ .../metadata_connector/metadata_connector.py | 114 ++++++++++++++++++ .../openstack_connector.py | 29 ++++- .../scripts/bash/save_metadata_auth_token.sh | 14 +++ 4 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 simple_vm_client/metadata_connector/metadata_connector.py create mode 100644 simple_vm_client/scripts/bash/save_metadata_auth_token.sh diff --git a/portal_client.thrift b/portal_client.thrift index c0e2ecf1..9dbac7d9 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -210,6 +210,10 @@ struct PlaybookResult { 3: required string stderr } +exception MetadataServerNotAvailableException { + 1: string message +} + exception ResourceNotFoundException { /** Name already used. */ 1: string message @@ -452,6 +456,7 @@ service VirtualMachineService { 10:optional string research_environment 11:optional list additional_security_group_ids, 12:optional string slurm_version, + 13:optional string auth_token, ) @@ -485,6 +490,8 @@ service VirtualMachineService { 7:list> volume_ids_path_new, 8:list> volume_ids_path_attach, 9:optional list additional_security_group_ids, + 10:optional string auth_token, + ) throws (1:NameAlreadyUsedException e,2:ResourceNotAvailableException r,3: ImageNotFoundException i,4: FlavorNotFoundException f,5:DefaultException d) /** Check if there is an instance with name */ @@ -825,4 +832,9 @@ service VirtualMachineService { throws (1:ServerNotFoundException e, 2: OpenStackConflictException c) + + void set_metadata_server_data(1:string ip,2:map metadata) throws (1:MetadataServerNotAvailableException), + void remove_metadata_server_data(1:string ip) throws (1:MetadataServerNotAvailableException), + void is_metadata_server_available() throws (1:MetadataServerNotAvailableException), + } diff --git a/simple_vm_client/metadata_connector/metadata_connector.py b/simple_vm_client/metadata_connector/metadata_connector.py new file mode 100644 index 00000000..777a2c77 --- /dev/null +++ b/simple_vm_client/metadata_connector/metadata_connector.py @@ -0,0 +1,114 @@ +import os +from urllib.parse import urljoin + +import requests +import yaml + +from simple_vm_client.util.logger import setup_custom_logger + +logger = setup_custom_logger(__name__) + + +class MetadataConnector: + def __init__(self, config_file: str): + logger.info("Initializing Metadata Connector") + self.load_config_yml(config_file) + + def load_config_yml(self, config_file: str) -> None: + logger.info(f"Load config file openstack config - {config_file}") + with open(config_file, "r") as ymlfile: + cfg = yaml.load(ymlfile, Loader=yaml.SafeLoader) + if "metadata_server" not in cfg: + logger.info("Metadata Server configuration not found. Skipping.") + self.ACTIVATED = False + return + if not cfg["metadata_server"].get("activated", False): + logger.info( + "Metadata Server Config available but deactivated. Skipping.." + ) + self.ACTIVATED = False + return + self.ACTIVATED = True + self.METADATA_SERVER_HOST = cfg["metadata_server"]["host"] + self.METADATA_SERVER_PORT = cfg["metadata_server"]["port"] + self.METADATA_BASE_URL = ( + f"{self.METADATA_SERVER_HOST}:{self.METADATA_SERVER_PORT}/" + ) + + self.load_env_config() + + def load_env_config(self): + required_keys = [ + "METADATA_SERVER_TOKEN", + ] + missing_keys = [key for key in required_keys if key not in os.environ] + if missing_keys: + missing_keys_str = ", ".join(missing_keys) + logger.error( + f"MetadataServer missing keys {missing_keys_str} not provided in env!" + ) + self.METADATA_SERVER_TOKEN = os.environ.get("METADATA_SERVER_TOKEN") + + def remove_metadata(self, ip: str): + if not self.ACTIVATED: + logger.info("Metadata Server not activated. Skipping.") + return + + logger.info(f"Removing Metadata for: {ip}") + remove_metadata_url = urljoin(self.METADATA_BASE_URL, f"metadata/{ip}") + + try: + response = requests.delete( + remove_metadata_url, + timeout=(30, 30), + headers={ + "x_auth_token": self.METADATA_SERVER_TOKEN, + }, + verify=False, + ) + response.raise_for_status() + logger.info(f"Metadata removed successfully for {ip}") + except requests.exceptions.RequestException as e: + logger.error(f"Failed to remove metadata for {ip}: {e}") + + def set_metadata(self, ip: str, metadata: dict): + if not self.ACTIVATED: + logger.info("Metadata Server not activated. Skipping.") + return + + logger.info(f"Setting Metadata for {ip}") + set_metadata_url = urljoin(self.METADATA_BASE_URL, f"metadata/{ip}") + + try: + response = requests.post( + set_metadata_url, + json=metadata, + timeout=(30, 30), + headers={ + "x_auth_token": self.METADATA_SERVER_TOKEN, + }, + verify=False, + ) + response.raise_for_status() + logger.info(f"Metadata set successfully for {ip}") + except requests.exceptions.RequestException as e: + logger.error(f"Failed to set metadata for {ip}: {e}") + + def health_check(self): + if not self.ACTIVATED: + logger.info("Metadata Server not activated. Skipping.") + return + + logger.info("Metadata Server checking health...") + health_url = urljoin(self.METADATA_BASE_URL, "health") + + try: + response = requests.get( + health_url, + timeout=(30, 30), + verify=False, + ) + response.raise_for_status() + logger.info(f"Metadata Health Check --- {response.json()}") + except requests.exceptions.RequestException as e: + logger.error(f"Health check failed: {e}") diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index 6b6895a6..3f01c2fa 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -481,6 +481,20 @@ def create_add_keys_script(self, keys: list[str]) -> str: key_script = text return key_script + def create_save_metadata_auth_token_script(self, token: str) -> str: + logger.info("create save metadata auth token script") + file_dir = os.path.dirname(os.path.abspath(__file__)) + metadata_token_script = os.path.join( + file_dir, "scripts/bash/save_metadata_auth_token.sh" + ) + + with open(metadata_token_script, "r") as file: + text = file.read() + text = text.replace("METADATA_AUTH_TOKEN", token) + text = encodeutils.safe_encode(text.encode("utf-8")) + metadata_token_script = text + return metadata_token_script + def netcat(self, host: str, port: int) -> bool: logger.info(f"Checking SSH Connection {host}:{port}") with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock: @@ -1290,13 +1304,22 @@ def create_userdata( volume_ids_path_new: list[dict[str, str]], volume_ids_path_attach: list[dict[str, str]], additional_keys: list[str], + auth_token=None, ) -> str: unlock_ubuntu_user_script = "#!/bin/bash\npasswd -u ubuntu\n" unlock_ubuntu_user_script_encoded = encodeutils.safe_encode( unlock_ubuntu_user_script.encode("utf-8") ) init_script = unlock_ubuntu_user_script_encoded - + if auth_token: + save_metadata_token_script = self.create_save_metadata_auth_token_script( + token=auth_token + ) + init_script = ( + init_script + + encodeutils.safe_encode("\n".encode("utf-8")) + + save_metadata_token_script + ) if additional_keys: add_key_script = self.create_add_keys_script(keys=additional_keys) init_script = ( @@ -1330,6 +1353,7 @@ def start_server( additional_keys: Union[list[str], None] = None, additional_security_group_ids: Union[list[str], None] = None, slurm_version: str = None, + auth_token: str = None, ) -> str: logger.info(f"Start Server {servername}") @@ -1372,6 +1396,7 @@ def start_server( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, additional_keys=additional_keys, + auth_token=auth_token, ) logger.info(f"Starting Server {servername}...") server = self.openstack_connection.create_server( @@ -1455,6 +1480,7 @@ def start_server_with_playbook( volume_ids_path_attach: list[dict[str, str]] = None, # type: ignore additional_keys: list[str] = None, # type: ignore additional_security_group_ids=None, # type: ignore + auth_token: str = None, ) -> tuple[str, str]: logger.info(f"Start Server {servername}") @@ -1488,6 +1514,7 @@ def start_server_with_playbook( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, additional_keys=additional_keys, + auth_token=auth_token, ) server = self.openstack_connection.create_server( name=servername, diff --git a/simple_vm_client/scripts/bash/save_metadata_auth_token.sh b/simple_vm_client/scripts/bash/save_metadata_auth_token.sh new file mode 100644 index 00000000..8d973632 --- /dev/null +++ b/simple_vm_client/scripts/bash/save_metadata_auth_token.sh @@ -0,0 +1,14 @@ +#!/bin/bash + + +# Create a configuration file with the token +echo "METADATA_ACCESS_TOKEN='$METADATA_AUTH_TOKEN'" > /etc/metadata_config.env + +# Secure the file permissions +chmod 600 /etc/metadata_config.env + +# Source the configuration file for immediate use in the current session +source /etc/metadata_config.env + +# Print a message to indicate completion +echo "Token has been set and configuration file created at /etc/metadata_config.env" From 1e64d39f38a07a857731f499a5e5fee2f2de4e7a Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 6 Aug 2024 13:15:54 +0200 Subject: [PATCH 02/15] feat(Metadata):updated thrift file --- portal_client.thrift | 7 ++++--- simple_vm_client/VirtualMachineHandler.py | 11 +++++++++++ .../metadata_connector/metadata_connector.py | 6 ++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index 9dbac7d9..3b68098b 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -549,6 +549,9 @@ service VirtualMachineService { ) throws (1:BackendNotFoundException b,2:DefaultException d) + void set_metadata_server_data(1:string ip,2:map metadata) throws (1:MetadataServerNotAvailableException m) + void remove_metadata_server_data(1:string ip) throws (1:MetadataServerNotAvailableException m) + void is_metadata_server_available() throws (1:MetadataServerNotAvailableException m) /** Delete a backend*/ void delete_backend( @@ -833,8 +836,6 @@ service VirtualMachineService { throws (1:ServerNotFoundException e, 2: OpenStackConflictException c) - void set_metadata_server_data(1:string ip,2:map metadata) throws (1:MetadataServerNotAvailableException), - void remove_metadata_server_data(1:string ip) throws (1:MetadataServerNotAvailableException), - void is_metadata_server_available() throws (1:MetadataServerNotAvailableException), + } diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 4ec5936b..4a7ddab4 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -12,6 +12,7 @@ from simple_vm_client.util import thrift_converter from simple_vm_client.util.logger import setup_custom_logger +from .metadata_connector.metadata_connector import MetadataConnector from .ttypes import ( VM, Backend, @@ -37,6 +38,7 @@ def __init__(self, config_file: str): self.openstack_connector = OpenStackConnector(config_file=config_file) self.bibigrid_connector = BibigridConnector(config_file=config_file) self.forc_connector = ForcConnector(config_file=config_file) + self.metadata_connetor = MetadataConnector(config_file=config_file) def keyboard_interrupt_handler_playbooks(self) -> None: for k, v in self.forc_connector._active_playbooks.items(): @@ -50,6 +52,15 @@ def keyboard_interrupt_handler_playbooks(self) -> None: self.openstack_connector.delete_server(openstack_id=k) raise SystemExit(0) + def is_metadata_server_available(self): + return self.metadata_connetor.is_metadata_server_available() + + def set_metadata_server_data(self, ip: str, metadata: dict[str, str]): + return self.metadata_connetor.set_metadata(ip=ip, metadata=metadata) + + def remove_metadata_server_data(self, ip: str): + return self.metadata_connetor.remove_metadata(ip=ip) + def get_images(self) -> list[Image]: images: list[Image] = thrift_converter.os_to_thrift_images( openstack_images=self.openstack_connector.get_images() diff --git a/simple_vm_client/metadata_connector/metadata_connector.py b/simple_vm_client/metadata_connector/metadata_connector.py index 777a2c77..7e208987 100644 --- a/simple_vm_client/metadata_connector/metadata_connector.py +++ b/simple_vm_client/metadata_connector/metadata_connector.py @@ -94,10 +94,10 @@ def set_metadata(self, ip: str, metadata: dict): except requests.exceptions.RequestException as e: logger.error(f"Failed to set metadata for {ip}: {e}") - def health_check(self): + def is_metadata_server_available(self): if not self.ACTIVATED: logger.info("Metadata Server not activated. Skipping.") - return + return False logger.info("Metadata Server checking health...") health_url = urljoin(self.METADATA_BASE_URL, "health") @@ -110,5 +110,7 @@ def health_check(self): ) response.raise_for_status() logger.info(f"Metadata Health Check --- {response.json()}") + return True except requests.exceptions.RequestException as e: logger.error(f"Health check failed: {e}") + return False From f83f579cb20ffed02175bc0ddc5d5a565e2fa899 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Wed, 7 Aug 2024 11:53:40 +0200 Subject: [PATCH 03/15] refacotr(Metadata):changed metadata values tp explicit set values --- portal_client.thrift | 15 +- simple_vm_client/VirtualMachineHandler.py | 3 +- simple_vm_client/VirtualMachineService-remote | 1002 +- simple_vm_client/VirtualMachineService.py | 10618 ++++++++++++---- simple_vm_client/config/config.yml | 7 + simple_vm_client/config/config_local.yml | 5 + simple_vm_client/constants.py | 7 +- .../metadata_connector/metadata_connector.py | 15 +- simple_vm_client/ttypes.py | 3443 ++++- 9 files changed, 11431 insertions(+), 3684 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index 3b68098b..e19310be 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -6,6 +6,12 @@ typedef i32 int /** The Version of the Portal-Client*/ const string VERSION= '1.0.0' + +struct VirtualMachineServerMetadata { + 1: list public_keys + 2: string hashed_auth_token + 3: string ip +} struct Backend { 1: i64 id, 2: string owner, @@ -213,6 +219,9 @@ struct PlaybookResult { exception MetadataServerNotAvailableException { 1: string message } +exception MetadataServerNotAllowedException{ + 1: string message +} exception ResourceNotFoundException { /** Name already used. */ @@ -549,9 +558,9 @@ service VirtualMachineService { ) throws (1:BackendNotFoundException b,2:DefaultException d) - void set_metadata_server_data(1:string ip,2:map metadata) throws (1:MetadataServerNotAvailableException m) - void remove_metadata_server_data(1:string ip) throws (1:MetadataServerNotAvailableException m) - void is_metadata_server_available() throws (1:MetadataServerNotAvailableException m) + void set_metadata_server_data(1:string ip,2:VirtualMachineServerMetadata metadata) throws (1:MetadataServerNotAvailableException m,2:MetadataServerNotAllowedException b) + void remove_metadata_server_data(1:string ip) throws (1:MetadataServerNotAvailableException m,2:MetadataServerNotAllowedException b) + void is_metadata_server_available() throws (1:MetadataServerNotAvailableException m,2:MetadataServerNotAllowedException b) /** Delete a backend*/ void delete_backend( diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 4a7ddab4..6d9bbdf9 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -24,6 +24,7 @@ PlaybookResult, ResearchEnvironmentTemplate, Snapshot, + VirtualMachineServerMetadata, Volume, ) from .VirtualMachineService import Iface @@ -55,7 +56,7 @@ def keyboard_interrupt_handler_playbooks(self) -> None: def is_metadata_server_available(self): return self.metadata_connetor.is_metadata_server_available() - def set_metadata_server_data(self, ip: str, metadata: dict[str, str]): + def set_metadata_server_data(self, ip: str, metadata: VirtualMachineServerMetadata): return self.metadata_connetor.set_metadata(ip=ip, metadata=metadata) def remove_metadata_server_data(self, ip: str): diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index 5fc6650c..56ad53ec 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -1,105 +1,140 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.20.0) +# Autogenerated by Thrift Compiler (0.19.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -import sys import pprint +import sys + if sys.version_info[0] > 2: from urllib.parse import urlparse else: from urlparse import urlparse -from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient -from thrift.protocol.TBinaryProtocol import TBinaryProtocol +from thrift.protocol.TBinaryProtocol import TBinaryProtocol +from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport from VirtualMachineService import VirtualMachineService -from VirtualMachineService.ttypes import * - -if len(sys.argv) <= 1 or sys.argv[1] == '--help': - print('') - print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]') - print('') - print('Functions:') - print(' bool is_version(double version)') - print(' string get_client_version()') - print(' get_gateway_ip()') - print(' get_calculation_values()') - print(' string import_keypair(string keyname, string public_key)') - print(' get_vm_ports(string openstack_id)') - print(' void add_udp_security_group(string server_id)') - print(' void add_research_environment_security_group(string server_id, string security_group_name)') - print(' void add_metadata_to_server(string openstack_id, metadata)') - print(' get_flavors()') - print(' get_images()') - print(' get_public_images()') - print(' get_private_images()') - print(' Image get_image(string openstack_id, bool ignore_not_active)') - print(' Volume get_volume(string volume_id)') - print(' get_volumes_by_ids( volume_ids)') - print(' void resize_volume(string volume_id, int size)') - print(' string open_port_range_for_vm_in_project(int range_start, int range_stop, string openstack_id, string ethertype, string protocol)') - print(' void delete_security_group_rule(string openstack_id)') - print(' void delete_server(string openstack_id)') - print(' 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)') - print(' bool is_bibigrid_available()') - print(' void detach_ip_from_server(string server_id, string floating_ip)') - print(' string start_server_with_custom_key(string flavor_name, string image_name, string servername, metadata, string research_environment, volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids)') - print(' bool exist_server(string name)') - print(' int create_and_deploy_playbook(string public_key, string openstack_id, conda_packages, string research_environment_template, apt_packages, bool create_only_backend, string base_url)') - print(' PlaybookResult get_playbook_logs(string openstack_id)') - print(' bool has_forc()') - print(' string get_forc_url()') - print(' Backend create_backend(string owner, string user_path, string template, string upstream_url)') - print(' get_backends()') - print(' get_backends_by_owner(string owner)') - print(' get_backends_by_template(string template)') - print(' Backend get_backend_by_id(i64 id)') - print(' void delete_backend(i64 id)') - print(' add_user_to_backend(i64 backend_id, string user_id)') - print(' get_users_from_backend(i64 backend_id)') - print(' delete_user_from_backend(i64 backend_id, string user_id)') - print(' get_allowed_templates()') - print(' get_servers()') - print(' get_servers_by_ids( server_ids)') - print(' get_servers_by_bibigrid_id(string bibigrid_id)') - print(' scale_up_cluster(string cluster_id, string image_name, string flavor_name, int count, names, int start_idx, int batch_idx)') - print(' string add_cluster_machine(string cluster_id, string cluster_user, string cluster_group_id, string image_name, string flavor_name, string name, string key_name, int batch_idx, int worker_idx)') - print(' ClusterInfo get_cluster_info(string cluster_id)') - print(' get_cluster_status(string cluster_id)') - print(' string get_keypair_public_key_by_name(string key_name)') - print(' void delete_keypair(string key_name)') - print(' void add_default_security_groups_to_server(string openstack_id)') - print(' VM get_server(string openstack_id)') - print(' VM get_server_by_unique_name(string unique_name)') - print(' void stop_server(string openstack_id)') - print(' string create_snapshot(string openstack_id, string name, string username, base_tags, string description)') - print(' get_limits()') - print(' start_cluster( public_keys, ClusterInstance master_instance, worker_instances, string user)') - print(' terminate_cluster(string cluster_id)') - print(' void delete_image(string image_id)') - print(' void detach_volume(string volume_id, string server_id)') - print(' void delete_volume(string volume_id)') - print(' attach_volume_to_server(string openstack_id, string volume_id)') - print(' void resume_server(string openstack_id)') - print(' Volume create_volume(string volume_name, int volume_storage, metadata)') - print(' Volume create_volume_by_source_volume(string volume_name, metadata, string source_volume_id)') - print(' Volume create_volume_by_volume_snap(string volume_name, metadata, string volume_snap_id)') - print(' string create_volume_snapshot(string volume_id, string name, string description)') - print(' Snapshot get_volume_snapshot(string name_or_id)') - print(' void delete_volume_snapshot(string snapshot_id)') - print(' void reboot_hard_server(string openstack_id)') - print(' void reboot_soft_server(string openstack_id)') - print('') + +if len(sys.argv) <= 1 or sys.argv[1] == "--help": + print("") + print( + "Usage: " + + sys.argv[0] + + " [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]" + ) + print("") + print("Functions:") + print(" bool is_version(double version)") + print(" string get_client_version()") + print(" get_gateway_ip()") + print(" get_calculation_values()") + print(" string import_keypair(string keyname, string public_key)") + print(" get_vm_ports(string openstack_id)") + print(" void add_udp_security_group(string server_id)") + print( + " void add_research_environment_security_group(string server_id, string security_group_name)" + ) + print(" void add_metadata_to_server(string openstack_id, metadata)") + print(" get_flavors()") + print(" get_images()") + print(" get_public_images()") + print(" get_private_images()") + print(" Image get_image(string openstack_id, bool ignore_not_active)") + print(" Volume get_volume(string volume_id)") + print(" get_volumes_by_ids( volume_ids)") + print(" void resize_volume(string volume_id, int size)") + print( + " string open_port_range_for_vm_in_project(int range_start, int range_stop, string openstack_id, string ethertype, string protocol)" + ) + print(" void delete_security_group_rule(string openstack_id)") + print(" void delete_server(string openstack_id)") + print( + " 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 auth_token)" + ) + 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 auth_token)" + ) + 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( + " 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 @@ -109,16 +144,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]) @@ -126,42 +161,49 @@ if sys.argv[argi] == '-u': port = 80 uri = url[2] if url[4]: - uri += '?%s' % url[4] + uri += "?%s" % url[4] http = True argi += 2 -if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': +if sys.argv[argi] == "-f" or sys.argv[argi] == "-framed": framed = True argi += 1 -if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': +if sys.argv[argi] == "-s" or sys.argv[argi] == "-ssl": ssl = True argi += 1 -if sys.argv[argi] == '-novalidate': +if sys.argv[argi] == "-novalidate": validate = False argi += 1 -if sys.argv[argi] == '-ca_certs': - ca_certs = sys.argv[argi+1] +if sys.argv[argi] == "-ca_certs": + ca_certs = sys.argv[argi + 1] argi += 2 -if sys.argv[argi] == '-keyfile': - keyfile = sys.argv[argi+1] +if sys.argv[argi] == "-keyfile": + keyfile = sys.argv[argi + 1] argi += 2 -if sys.argv[argi] == '-certfile': - certfile = sys.argv[argi+1] +if sys.argv[argi] == "-certfile": + certfile = sys.argv[argi + 1] argi += 2 cmd = sys.argv[argi] -args = sys.argv[argi + 1:] +args = sys.argv[argi + 1 :] if http: transport = THttpClient.THttpClient(host, port, uri) else: if ssl: - socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) + socket = TSSLSocket.TSSLSocket( + host, + port, + validate=validate, + ca_certs=ca_certs, + keyfile=keyfile, + certfile=certfile, + ) else: socket = TSocket.TSocket(host, port) if framed: @@ -172,422 +214,740 @@ 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') - sys.exit(1) - pp.pprint(client.open_port_range_for_vm_in_project(eval(args[0]), eval(args[1]), args[2], args[3], args[4],)) - -elif cmd == 'delete_security_group_rule': - if len(args) != 1: - print('delete_security_group_rule requires 1 args') - sys.exit(1) - pp.pprint(client.delete_security_group_rule(args[0],)) - -elif cmd == 'delete_server': - if len(args) != 1: - print('delete_server requires 1 args') - sys.exit(1) - pp.pprint(client.delete_server(args[0],)) - -elif cmd == 'start_server': - if len(args) != 11: - print('start_server requires 11 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],)) - -elif cmd == 'is_bibigrid_available': + print("open_port_range_for_vm_in_project requires 5 args") + sys.exit(1) + pp.pprint( + client.open_port_range_for_vm_in_project( + eval(args[0]), + eval(args[1]), + args[2], + args[3], + args[4], + ) + ) + +elif cmd == "delete_security_group_rule": + if len(args) != 1: + print("delete_security_group_rule requires 1 args") + sys.exit(1) + pp.pprint( + client.delete_security_group_rule( + args[0], + ) + ) + +elif cmd == "delete_server": + if len(args) != 1: + print("delete_server requires 1 args") + sys.exit(1) + pp.pprint( + client.delete_server( + args[0], + ) + ) + +elif cmd == "start_server": + if len(args) != 12: + print("start_server requires 12 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], + ) + ) + +elif cmd == "is_bibigrid_available": if len(args) != 0: - print('is_bibigrid_available requires 0 args') + print("is_bibigrid_available requires 0 args") sys.exit(1) pp.pprint(client.is_bibigrid_available()) -elif cmd == 'detach_ip_from_server': +elif cmd == "detach_ip_from_server": if len(args) != 2: - print('detach_ip_from_server requires 2 args') - sys.exit(1) - pp.pprint(client.detach_ip_from_server(args[0], args[1],)) - -elif cmd == 'start_server_with_custom_key': - if len(args) != 8: - print('start_server_with_custom_key requires 8 args') - sys.exit(1) - pp.pprint(client.start_server_with_custom_key(args[0], args[1], args[2], eval(args[3]), args[4], eval(args[5]), eval(args[6]), eval(args[7]),)) - -elif cmd == 'exist_server': - if len(args) != 1: - print('exist_server requires 1 args') + print("detach_ip_from_server requires 2 args") sys.exit(1) - pp.pprint(client.exist_server(args[0],)) + pp.pprint( + client.detach_ip_from_server( + args[0], + args[1], + ) + ) -elif cmd == 'create_and_deploy_playbook': +elif cmd == "start_server_with_custom_key": + if len(args) != 9: + print("start_server_with_custom_key requires 9 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], + ) + ) + +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]), + ) + ) + +elif cmd == "set_metadata_server_data": + if len(args) != 2: + print("set_metadata_server_data requires 2 args") sys.exit(1) - pp.pprint(client.get_backend_by_id(eval(args[0]),)) + pp.pprint( + client.set_metadata_server_data( + args[0], + eval(args[1]), + ) + ) -elif cmd == 'delete_backend': +elif cmd == "remove_metadata_server_data": if len(args) != 1: - print('delete_backend requires 1 args') + print("remove_metadata_server_data requires 1 args") sys.exit(1) - pp.pprint(client.delete_backend(eval(args[0]),)) + pp.pprint( + client.remove_metadata_server_data( + args[0], + ) + ) -elif cmd == 'add_user_to_backend': +elif cmd == "is_metadata_server_available": + if len(args) != 0: + print("is_metadata_server_available requires 0 args") + sys.exit(1) + pp.pprint(client.is_metadata_server_available()) + +elif cmd == "delete_backend": + if len(args) != 1: + print("delete_backend requires 1 args") + sys.exit(1) + pp.pprint( + client.delete_backend( + eval(args[0]), + ) + ) + +elif cmd == "add_user_to_backend": if len(args) != 2: - print('add_user_to_backend requires 2 args') + print("add_user_to_backend requires 2 args") sys.exit(1) - pp.pprint(client.add_user_to_backend(eval(args[0]), args[1],)) + pp.pprint( + client.add_user_to_backend( + eval(args[0]), + args[1], + ) + ) -elif cmd == 'get_users_from_backend': +elif cmd == "get_users_from_backend": if len(args) != 1: - print('get_users_from_backend requires 1 args') + print("get_users_from_backend requires 1 args") sys.exit(1) - pp.pprint(client.get_users_from_backend(eval(args[0]),)) + pp.pprint( + client.get_users_from_backend( + eval(args[0]), + ) + ) -elif cmd == 'delete_user_from_backend': +elif cmd == "delete_user_from_backend": if len(args) != 2: - print('delete_user_from_backend requires 2 args') + print("delete_user_from_backend requires 2 args") sys.exit(1) - pp.pprint(client.delete_user_from_backend(eval(args[0]), args[1],)) + pp.pprint( + client.delete_user_from_backend( + eval(args[0]), + args[1], + ) + ) -elif cmd == 'get_allowed_templates': +elif cmd == "get_allowed_templates": if len(args) != 0: - print('get_allowed_templates requires 0 args') + print("get_allowed_templates requires 0 args") sys.exit(1) pp.pprint(client.get_allowed_templates()) -elif cmd == 'get_servers': +elif cmd == "get_servers": if len(args) != 0: - print('get_servers requires 0 args') + print("get_servers requires 0 args") sys.exit(1) pp.pprint(client.get_servers()) -elif cmd == 'get_servers_by_ids': +elif cmd == "get_servers_by_ids": if len(args) != 1: - print('get_servers_by_ids requires 1 args') + print("get_servers_by_ids requires 1 args") sys.exit(1) - pp.pprint(client.get_servers_by_ids(eval(args[0]),)) + pp.pprint( + client.get_servers_by_ids( + eval(args[0]), + ) + ) -elif cmd == 'get_servers_by_bibigrid_id': +elif cmd == "get_servers_by_bibigrid_id": if len(args) != 1: - print('get_servers_by_bibigrid_id requires 1 args') + print("get_servers_by_bibigrid_id requires 1 args") sys.exit(1) - pp.pprint(client.get_servers_by_bibigrid_id(args[0],)) + pp.pprint( + client.get_servers_by_bibigrid_id( + args[0], + ) + ) -elif cmd == 'scale_up_cluster': +elif cmd == "scale_up_cluster": if len(args) != 7: - print('scale_up_cluster requires 7 args') - sys.exit(1) - pp.pprint(client.scale_up_cluster(args[0], args[1], args[2], eval(args[3]), eval(args[4]), eval(args[5]), eval(args[6]),)) - -elif cmd == 'add_cluster_machine': + print("scale_up_cluster requires 7 args") + sys.exit(1) + pp.pprint( + client.scale_up_cluster( + args[0], + args[1], + args[2], + eval(args[3]), + eval(args[4]), + eval(args[5]), + eval(args[6]), + ) + ) + +elif cmd == "add_cluster_machine": if len(args) != 9: - print('add_cluster_machine requires 9 args') + 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 80051f45..90195c8f 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -1,20 +1,20 @@ # -# Autogenerated by Thrift Compiler (0.20.0) +# Autogenerated by Thrift Compiler (0.19.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException +import logging +import sys + +from thrift.Thrift import TApplicationException, TMessageType, TProcessor, TType +from thrift.transport import TTransport from thrift.TRecursive import fix_spec -import sys -import logging from .ttypes import * -from thrift.Thrift import TProcessor -from thrift.transport import TTransport + all_structs = [] @@ -23,13 +23,13 @@ class Iface(object): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ + def is_version(self, version): """ Parameters: - version """ - pass def get_client_version(self): """ @@ -37,14 +37,12 @@ def get_client_version(self): Returns Version of the client """ - pass def get_gateway_ip(self): """ Gets the gateway ip. """ - pass def get_calculation_values(self): pass @@ -59,7 +57,6 @@ def import_keypair(self, keyname, public_key): - public_key: The public key """ - pass def get_vm_ports(self, openstack_id): """ @@ -70,7 +67,6 @@ def get_vm_ports(self, openstack_id): - openstack_id: Id of server """ - pass def add_udp_security_group(self, server_id): """ @@ -80,7 +76,6 @@ def add_udp_security_group(self, server_id): - server_id: OpenStack id of the server """ - pass def add_research_environment_security_group(self, server_id, security_group_name): """ @@ -91,7 +86,6 @@ def add_research_environment_security_group(self, server_id, security_group_name - security_group_name """ - pass def add_metadata_to_server(self, openstack_id, metadata): """ @@ -102,7 +96,6 @@ def add_metadata_to_server(self, openstack_id, metadata): - metadata """ - pass def get_flavors(self): """ @@ -110,7 +103,6 @@ def get_flavors(self): Returns: List of flavor instances. """ - pass def get_images(self): """ @@ -118,7 +110,6 @@ def get_images(self): Returns: List of Image instances. """ - pass def get_public_images(self): """ @@ -126,7 +117,6 @@ def get_public_images(self): Returns: List of public Image instances. """ - pass def get_private_images(self): """ @@ -134,7 +124,6 @@ def get_private_images(self): Returns: List of private Image instances. """ - pass def get_image(self, openstack_id, ignore_not_active): """ @@ -146,7 +135,6 @@ def get_image(self, openstack_id, ignore_not_active): - ignore_not_active """ - pass def get_volume(self, volume_id): """ @@ -154,7 +142,6 @@ def get_volume(self, volume_id): - volume_id """ - pass def get_volumes_by_ids(self, volume_ids): """ @@ -162,7 +149,6 @@ def get_volumes_by_ids(self, volume_ids): - volume_ids """ - pass def resize_volume(self, volume_id, size): """ @@ -171,9 +157,10 @@ def resize_volume(self, volume_id, size): - size """ - pass - def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): + def open_port_range_for_vm_in_project( + self, range_start, range_stop, openstack_id, ethertype, protocol + ): """ Creates/Updates a security group for a vm with a specific port range for a project @@ -185,7 +172,6 @@ def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_i - protocol """ - pass def delete_security_group_rule(self, openstack_id): """ @@ -193,7 +179,6 @@ def delete_security_group_rule(self, openstack_id): - openstack_id """ - pass def delete_server(self, openstack_id): """ @@ -204,9 +189,22 @@ def delete_server(self, openstack_id): - openstack_id: Id of the server. """ - pass - def start_server(self, flavor_name, image_name, public_key, servername, metadata, volume_ids_path_new, volume_ids_path_attach, additional_keys, research_environment, additional_security_group_ids, slurm_version): + 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, + auth_token, + ): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -220,9 +218,9 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - research_environment - additional_security_group_ids - slurm_version + - auth_token """ - pass def is_bibigrid_available(self): pass @@ -234,9 +232,19 @@ def detach_ip_from_server(self, server_id, floating_ip): - floating_ip """ - pass - def start_server_with_custom_key(self, flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids): + def start_server_with_custom_key( + self, + flavor_name, + image_name, + servername, + metadata, + research_environment, + volume_ids_path_new, + volume_ids_path_attach, + additional_security_group_ids, + auth_token, + ): """ Start a new server with custom key for ansible. @@ -249,9 +257,9 @@ def start_server_with_custom_key(self, flavor_name, image_name, servername, meta - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids + - auth_token """ - pass def exist_server(self, name): """ @@ -261,9 +269,17 @@ def exist_server(self, name): - name """ - pass - def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): + def create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): """ Create and deploy an ansible playbook @@ -277,7 +293,6 @@ def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, r - base_url """ - pass def get_playbook_logs(self, openstack_id): """ @@ -287,14 +302,12 @@ def get_playbook_logs(self, openstack_id): - openstack_id """ - pass def has_forc(self): """ Get boolean if client has backend url configured """ - pass def get_forc_url(self): pass @@ -310,14 +323,12 @@ def create_backend(self, owner, user_path, template, upstream_url): - upstream_url """ - pass def get_backends(self): """ Get all backends """ - pass def get_backends_by_owner(self, owner): """ @@ -327,7 +338,6 @@ def get_backends_by_owner(self, owner): - owner """ - pass def get_backends_by_template(self, template): """ @@ -337,7 +347,6 @@ def get_backends_by_template(self, template): - template """ - pass def get_backend_by_id(self, id): """ @@ -347,6 +356,23 @@ def get_backend_by_id(self, id): - id """ + + def set_metadata_server_data(self, ip, metadata): + """ + Parameters: + - ip + - metadata + + """ + + def remove_metadata_server_data(self, ip): + """ + Parameters: + - ip + + """ + + def is_metadata_server_available(self): pass def delete_backend(self, id): @@ -357,7 +383,6 @@ def delete_backend(self, id): - id """ - pass def add_user_to_backend(self, backend_id, user_id): """ @@ -368,7 +393,6 @@ def add_user_to_backend(self, backend_id, user_id): - user_id """ - pass def get_users_from_backend(self, backend_id): """ @@ -378,7 +402,6 @@ def get_users_from_backend(self, backend_id): - backend_id """ - pass def delete_user_from_backend(self, backend_id, user_id): """ @@ -389,7 +412,6 @@ def delete_user_from_backend(self, backend_id, user_id): - user_id """ - pass def get_allowed_templates(self): pass @@ -400,7 +422,6 @@ def get_servers(self): Returns: List of server instances. """ - pass def get_servers_by_ids(self, server_ids): """ @@ -411,7 +432,6 @@ def get_servers_by_ids(self, server_ids): - server_ids """ - pass def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -422,9 +442,10 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): - bibigrid_id """ - pass - def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): + def scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): """ Parameters: - cluster_id @@ -436,9 +457,19 @@ def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, st - batch_idx """ - pass - def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): + def add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): """ Parameters: - cluster_id @@ -452,7 +483,6 @@ def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_ - worker_idx """ - pass def get_cluster_info(self, cluster_id): """ @@ -460,7 +490,6 @@ def get_cluster_info(self, cluster_id): - cluster_id """ - pass def get_cluster_status(self, cluster_id): """ @@ -468,7 +497,6 @@ def get_cluster_status(self, cluster_id): - cluster_id """ - pass def get_keypair_public_key_by_name(self, key_name): """ @@ -476,7 +504,6 @@ def get_keypair_public_key_by_name(self, key_name): - key_name """ - pass def delete_keypair(self, key_name): """ @@ -484,7 +511,6 @@ def delete_keypair(self, key_name): - key_name """ - pass def add_default_security_groups_to_server(self, openstack_id): """ @@ -492,7 +518,6 @@ def add_default_security_groups_to_server(self, openstack_id): - openstack_id """ - pass def get_server(self, openstack_id): """ @@ -503,7 +528,6 @@ def get_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def get_server_by_unique_name(self, unique_name): """ @@ -511,7 +535,6 @@ def get_server_by_unique_name(self, unique_name): - unique_name: Id of the server. """ - pass def stop_server(self, openstack_id): """ @@ -522,7 +545,6 @@ def stop_server(self, openstack_id): - openstack_id: Id of the server. """ - pass def create_snapshot(self, openstack_id, name, username, base_tags, description): """ @@ -538,7 +560,6 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): - description: Description of the new snapshot """ - pass def get_limits(self): """ @@ -548,7 +569,6 @@ def get_limits(self): 'totalInstancesUsed': totalInstancesUsed} """ - pass def start_cluster(self, public_keys, master_instance, worker_instances, user): """ @@ -559,7 +579,6 @@ def start_cluster(self, public_keys, master_instance, worker_instances, user): - user """ - pass def terminate_cluster(self, cluster_id): """ @@ -567,7 +586,6 @@ def terminate_cluster(self, cluster_id): - cluster_id """ - pass def delete_image(self, image_id): """ @@ -578,7 +596,6 @@ def delete_image(self, image_id): - image_id: Id of image """ - pass def detach_volume(self, volume_id, server_id): """ @@ -589,7 +606,6 @@ def detach_volume(self, volume_id, server_id): - server_id: Id of the server where the volume is attached """ - pass def delete_volume(self, volume_id): """ @@ -599,7 +615,6 @@ def delete_volume(self, volume_id): - volume_id """ - pass def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -611,7 +626,6 @@ def attach_volume_to_server(self, openstack_id, volume_id): - volume_id: Id of volume """ - pass def resume_server(self, openstack_id): """ @@ -621,7 +635,6 @@ def resume_server(self, openstack_id): - openstack_id: Id of the server """ - pass def create_volume(self, volume_name, volume_storage, metadata): """ @@ -633,7 +646,6 @@ def create_volume(self, volume_name, volume_storage, metadata): - metadata: Metadata for the new volume """ - pass def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -645,7 +657,6 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ - pass def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -657,7 +668,6 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - volume_snap_id: ID of volume snapshot """ - pass def create_volume_snapshot(self, volume_id, name, description): """ @@ -670,7 +680,6 @@ def create_volume_snapshot(self, volume_id, name, description): - description: Description for the volume snapshot """ - pass def get_volume_snapshot(self, name_or_id): """ @@ -681,7 +690,6 @@ def get_volume_snapshot(self, name_or_id): - name_or_id: Name or ID of volume snapshot """ - pass def delete_volume_snapshot(self, snapshot_id): """ @@ -691,7 +699,6 @@ def delete_volume_snapshot(self, snapshot_id): - snapshot_id """ - pass def reboot_hard_server(self, openstack_id): """ @@ -701,7 +708,6 @@ def reboot_hard_server(self, openstack_id): - openstack_id: Id of the server """ - pass def reboot_soft_server(self, openstack_id): """ @@ -711,7 +717,6 @@ def reboot_soft_server(self, openstack_id): - openstack_id: Id of the server """ - pass class Client(Iface): @@ -719,6 +724,7 @@ class Client(Iface): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ + def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: @@ -735,7 +741,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) @@ -755,7 +761,9 @@ def recv_is_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "is_version failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "is_version failed: unknown result" + ) def get_client_version(self): """ @@ -767,7 +775,9 @@ def get_client_version(self): return self.recv_get_client_version() def send_get_client_version(self): - self._oprot.writeMessageBegin('get_client_version', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_client_version", TMessageType.CALL, self._seqid + ) args = get_client_version_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -786,7 +796,10 @@ def recv_get_client_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_client_version failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_client_version failed: unknown result", + ) def get_gateway_ip(self): """ @@ -797,7 +810,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() @@ -816,14 +829,19 @@ def recv_get_gateway_ip(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_gateway_ip failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_gateway_ip failed: unknown result", + ) def get_calculation_values(self): self.send_get_calculation_values() return self.recv_get_calculation_values() def send_get_calculation_values(self): - self._oprot.writeMessageBegin('get_calculation_values', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_calculation_values", TMessageType.CALL, self._seqid + ) args = get_calculation_values_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -842,7 +860,10 @@ def recv_get_calculation_values(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_calculation_values failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_calculation_values failed: unknown result", + ) def import_keypair(self, keyname, public_key): """ @@ -858,7 +879,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 @@ -879,7 +900,10 @@ def recv_import_keypair(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "import_keypair failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "import_keypair failed: unknown result", + ) def get_vm_ports(self, openstack_id): """ @@ -894,7 +918,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) @@ -916,7 +940,9 @@ def recv_get_vm_ports(self): return result.success if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result" + ) def add_udp_security_group(self, server_id): """ @@ -930,7 +956,9 @@ def add_udp_security_group(self, server_id): self.recv_add_udp_security_group() def send_add_udp_security_group(self, server_id): - self._oprot.writeMessageBegin('add_udp_security_group', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_udp_security_group", TMessageType.CALL, self._seqid + ) args = add_udp_security_group_args() args.server_id = server_id args.write(self._oprot) @@ -963,11 +991,17 @@ def add_research_environment_security_group(self, server_id, security_group_name - security_group_name """ - self.send_add_research_environment_security_group(server_id, security_group_name) + self.send_add_research_environment_security_group( + server_id, security_group_name + ) self.recv_add_research_environment_security_group() - def send_add_research_environment_security_group(self, server_id, security_group_name): - self._oprot.writeMessageBegin('add_research_environment_security_group', TMessageType.CALL, self._seqid) + def send_add_research_environment_security_group( + self, server_id, security_group_name + ): + self._oprot.writeMessageBegin( + "add_research_environment_security_group", TMessageType.CALL, self._seqid + ) args = add_research_environment_security_group_args() args.server_id = server_id args.security_group_name = security_group_name @@ -1005,7 +1039,9 @@ def add_metadata_to_server(self, openstack_id, metadata): self.recv_add_metadata_to_server() def send_add_metadata_to_server(self, openstack_id, metadata): - self._oprot.writeMessageBegin('add_metadata_to_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_metadata_to_server", TMessageType.CALL, self._seqid + ) args = add_metadata_to_server_args() args.openstack_id = openstack_id args.metadata = metadata @@ -1040,7 +1076,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() @@ -1059,7 +1095,9 @@ def recv_get_flavors(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_flavors failed: unknown result" + ) def get_images(self): """ @@ -1071,7 +1109,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() @@ -1090,7 +1128,9 @@ def recv_get_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_images failed: unknown result" + ) def get_public_images(self): """ @@ -1102,7 +1142,9 @@ def get_public_images(self): return self.recv_get_public_images() def send_get_public_images(self): - self._oprot.writeMessageBegin('get_public_images', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_public_images", TMessageType.CALL, self._seqid + ) args = get_public_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1121,7 +1163,10 @@ def recv_get_public_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_public_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_public_images failed: unknown result", + ) def get_private_images(self): """ @@ -1133,7 +1178,9 @@ def get_private_images(self): return self.recv_get_private_images() def send_get_private_images(self): - self._oprot.writeMessageBegin('get_private_images', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_private_images", TMessageType.CALL, self._seqid + ) args = get_private_images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1152,7 +1199,10 @@ def recv_get_private_images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_private_images failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_private_images failed: unknown result", + ) def get_image(self, openstack_id, ignore_not_active): """ @@ -1168,7 +1218,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 @@ -1191,7 +1241,9 @@ def recv_get_image(self): return result.success if result.i is not None: raise result.i - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_image failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_image failed: unknown result" + ) def get_volume(self, volume_id): """ @@ -1203,7 +1255,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) @@ -1225,7 +1277,9 @@ def recv_get_volume(self): return result.success if result.v is not None: raise result.v - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_volume failed: unknown result" + ) def get_volumes_by_ids(self, volume_ids): """ @@ -1237,7 +1291,9 @@ def get_volumes_by_ids(self, volume_ids): return self.recv_get_volumes_by_ids() def send_get_volumes_by_ids(self, volume_ids): - self._oprot.writeMessageBegin('get_volumes_by_ids', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_volumes_by_ids", TMessageType.CALL, self._seqid + ) args = get_volumes_by_ids_args() args.volume_ids = volume_ids args.write(self._oprot) @@ -1257,7 +1313,10 @@ def recv_get_volumes_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volumes_by_ids failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_volumes_by_ids failed: unknown result", + ) def resize_volume(self, volume_id, size): """ @@ -1270,7 +1329,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 @@ -1293,7 +1352,9 @@ def recv_resize_volume(self): raise result.v return - def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): + def open_port_range_for_vm_in_project( + self, range_start, range_stop, openstack_id, ethertype, protocol + ): """ Creates/Updates a security group for a vm with a specific port range for a project @@ -1305,11 +1366,17 @@ def open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_i - protocol """ - self.send_open_port_range_for_vm_in_project(range_start, range_stop, openstack_id, ethertype, protocol) + self.send_open_port_range_for_vm_in_project( + range_start, range_stop, openstack_id, ethertype, protocol + ) return self.recv_open_port_range_for_vm_in_project() - def send_open_port_range_for_vm_in_project(self, range_start, range_stop, openstack_id, ethertype, protocol): - self._oprot.writeMessageBegin('open_port_range_for_vm_in_project', TMessageType.CALL, self._seqid) + def send_open_port_range_for_vm_in_project( + self, range_start, range_stop, openstack_id, ethertype, protocol + ): + self._oprot.writeMessageBegin( + "open_port_range_for_vm_in_project", TMessageType.CALL, self._seqid + ) args = open_port_range_for_vm_in_project_args() args.range_start = range_start args.range_stop = range_stop @@ -1339,7 +1406,10 @@ def recv_open_port_range_for_vm_in_project(self): raise result.v if result.o is not None: raise result.o - raise TApplicationException(TApplicationException.MISSING_RESULT, "open_port_range_for_vm_in_project failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "open_port_range_for_vm_in_project failed: unknown result", + ) def delete_security_group_rule(self, openstack_id): """ @@ -1351,7 +1421,9 @@ def delete_security_group_rule(self, openstack_id): self.recv_delete_security_group_rule() def send_delete_security_group_rule(self, openstack_id): - self._oprot.writeMessageBegin('delete_security_group_rule', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_security_group_rule", TMessageType.CALL, self._seqid + ) args = delete_security_group_rule_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1388,7 +1460,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) @@ -1412,7 +1484,21 @@ 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): + 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, + auth_token, + ): """ Parameters: - flavor_name: Name of the Flavor to use. @@ -1426,13 +1512,41 @@ def start_server(self, flavor_name, image_name, public_key, servername, metadata - research_environment - additional_security_group_ids - slurm_version - - """ - 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) + - auth_token + + """ + 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, + auth_token, + ) 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): - 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, + auth_token, + ): + self._oprot.writeMessageBegin("start_server", TMessageType.CALL, self._seqid) args = start_server_args() args.flavor_name = flavor_name args.image_name = image_name @@ -1445,6 +1559,7 @@ def send_start_server(self, flavor_name, image_name, public_key, servername, met args.research_environment = research_environment args.additional_security_group_ids = additional_security_group_ids args.slurm_version = slurm_version + args.auth_token = auth_token args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -1472,14 +1587,18 @@ def recv_start_server(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "start_server failed: unknown result" + ) def is_bibigrid_available(self): self.send_is_bibigrid_available() return self.recv_is_bibigrid_available() def send_is_bibigrid_available(self): - self._oprot.writeMessageBegin('is_bibigrid_available', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "is_bibigrid_available", TMessageType.CALL, self._seqid + ) args = is_bibigrid_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1498,7 +1617,10 @@ def recv_is_bibigrid_available(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "is_bibigrid_available failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "is_bibigrid_available failed: unknown result", + ) def detach_ip_from_server(self, server_id, floating_ip): """ @@ -1511,7 +1633,9 @@ def detach_ip_from_server(self, server_id, floating_ip): self.recv_detach_ip_from_server() def send_detach_ip_from_server(self, server_id, floating_ip): - self._oprot.writeMessageBegin('detach_ip_from_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "detach_ip_from_server", TMessageType.CALL, self._seqid + ) args = detach_ip_from_server_args() args.server_id = server_id args.floating_ip = floating_ip @@ -1534,7 +1658,18 @@ def recv_detach_ip_from_server(self): raise result.s return - def start_server_with_custom_key(self, flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids): + def start_server_with_custom_key( + self, + flavor_name, + image_name, + servername, + metadata, + research_environment, + volume_ids_path_new, + volume_ids_path_attach, + additional_security_group_ids, + auth_token, + ): """ Start a new server with custom key for ansible. @@ -1547,13 +1682,37 @@ def start_server_with_custom_key(self, flavor_name, image_name, servername, meta - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids - - """ - 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) + - auth_token + + """ + 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, + auth_token, + ) return self.recv_start_server_with_custom_key() - def send_start_server_with_custom_key(self, flavor_name, image_name, servername, metadata, research_environment, volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids): - self._oprot.writeMessageBegin('start_server_with_custom_key', TMessageType.CALL, self._seqid) + def send_start_server_with_custom_key( + self, + flavor_name, + image_name, + servername, + metadata, + research_environment, + volume_ids_path_new, + volume_ids_path_attach, + additional_security_group_ids, + auth_token, + ): + 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 @@ -1563,6 +1722,7 @@ def send_start_server_with_custom_key(self, flavor_name, image_name, servername, args.volume_ids_path_new = volume_ids_path_new args.volume_ids_path_attach = volume_ids_path_attach args.additional_security_group_ids = additional_security_group_ids + args.auth_token = auth_token args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -1590,7 +1750,10 @@ def recv_start_server_with_custom_key(self): raise result.f if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_with_custom_key failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "start_server_with_custom_key failed: unknown result", + ) def exist_server(self, name): """ @@ -1604,7 +1767,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) @@ -1624,9 +1787,20 @@ def recv_exist_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "exist_server failed: unknown result") - - def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): + raise TApplicationException( + TApplicationException.MISSING_RESULT, "exist_server failed: unknown result" + ) + + def create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): """ Create and deploy an ansible playbook @@ -1640,11 +1814,30 @@ def create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, r - base_url """ - self.send_create_and_deploy_playbook(public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url) + self.send_create_and_deploy_playbook( + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ) return self.recv_create_and_deploy_playbook() - def send_create_and_deploy_playbook(self, public_key, openstack_id, conda_packages, research_environment_template, apt_packages, create_only_backend, base_url): - self._oprot.writeMessageBegin('create_and_deploy_playbook', TMessageType.CALL, self._seqid) + def send_create_and_deploy_playbook( + self, + public_key, + openstack_id, + conda_packages, + research_environment_template, + apt_packages, + create_only_backend, + base_url, + ): + self._oprot.writeMessageBegin( + "create_and_deploy_playbook", TMessageType.CALL, self._seqid + ) args = create_and_deploy_playbook_args() args.public_key = public_key args.openstack_id = openstack_id @@ -1672,7 +1865,10 @@ def recv_create_and_deploy_playbook(self): return result.success if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_and_deploy_playbook failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_and_deploy_playbook failed: unknown result", + ) def get_playbook_logs(self, openstack_id): """ @@ -1686,7 +1882,9 @@ def get_playbook_logs(self, openstack_id): return self.recv_get_playbook_logs() def send_get_playbook_logs(self, openstack_id): - self._oprot.writeMessageBegin('get_playbook_logs', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_playbook_logs", TMessageType.CALL, self._seqid + ) args = get_playbook_logs_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1708,7 +1906,10 @@ def recv_get_playbook_logs(self): return result.success if result.p is not None: raise result.p - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_playbook_logs failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_playbook_logs failed: unknown result", + ) def has_forc(self): """ @@ -1719,7 +1920,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() @@ -1738,14 +1939,16 @@ def recv_has_forc(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "has_forc failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "has_forc failed: unknown result" + ) def get_forc_url(self): self.send_get_forc_url() return self.recv_get_forc_url() def send_get_forc_url(self): - self._oprot.writeMessageBegin('get_forc_url', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_forc_url", TMessageType.CALL, self._seqid) args = get_forc_url_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1764,7 +1967,9 @@ def recv_get_forc_url(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result" + ) def create_backend(self, owner, user_path, template, upstream_url): """ @@ -1781,7 +1986,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 @@ -1808,7 +2013,10 @@ def recv_create_backend(self): raise result.e if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_backend failed: unknown result", + ) def get_backends(self): """ @@ -1819,7 +2027,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() @@ -1840,7 +2048,9 @@ def recv_get_backends(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_backends failed: unknown result" + ) def get_backends_by_owner(self, owner): """ @@ -1854,7 +2064,9 @@ def get_backends_by_owner(self, owner): return self.recv_get_backends_by_owner() def send_get_backends_by_owner(self, owner): - self._oprot.writeMessageBegin('get_backends_by_owner', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backends_by_owner", TMessageType.CALL, self._seqid + ) args = get_backends_by_owner_args() args.owner = owner args.write(self._oprot) @@ -1876,7 +2088,10 @@ def recv_get_backends_by_owner(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_owner failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backends_by_owner failed: unknown result", + ) def get_backends_by_template(self, template): """ @@ -1890,7 +2105,9 @@ def get_backends_by_template(self, template): return self.recv_get_backends_by_template() def send_get_backends_by_template(self, template): - self._oprot.writeMessageBegin('get_backends_by_template', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backends_by_template", TMessageType.CALL, self._seqid + ) args = get_backends_by_template_args() args.template = template args.write(self._oprot) @@ -1912,7 +2129,10 @@ def recv_get_backends_by_template(self): return result.success if result.d is not None: raise result.d - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backends_by_template failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backends_by_template failed: unknown result", + ) def get_backend_by_id(self, id): """ @@ -1926,7 +2146,9 @@ def get_backend_by_id(self, id): return self.recv_get_backend_by_id() def send_get_backend_by_id(self, id): - self._oprot.writeMessageBegin('get_backend_by_id', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_backend_by_id", TMessageType.CALL, self._seqid + ) args = get_backend_by_id_args() args.id = id args.write(self._oprot) @@ -1950,7 +2172,114 @@ 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): + """ + Parameters: + - ip + - metadata + + """ + self.send_set_metadata_server_data(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 + ) + args = set_metadata_server_data_args() + args.ip = ip + args.metadata = metadata + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_metadata_server_data(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_metadata_server_data_result() + result.read(iprot) + iprot.readMessageEnd() + if result.m is not None: + raise result.m + if result.b is not None: + raise result.b + return + + def remove_metadata_server_data(self, ip): + """ + Parameters: + - ip + + """ + self.send_remove_metadata_server_data(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 + ) + args = remove_metadata_server_data_args() + args.ip = ip + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_remove_metadata_server_data(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = remove_metadata_server_data_result() + result.read(iprot) + iprot.readMessageEnd() + if result.m is not None: + raise result.m + if result.b is not None: + raise result.b + return + + def is_metadata_server_available(self): + self.send_is_metadata_server_available() + self.recv_is_metadata_server_available() + + def send_is_metadata_server_available(self): + self._oprot.writeMessageBegin( + "is_metadata_server_available", TMessageType.CALL, self._seqid + ) + args = is_metadata_server_available_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_is_metadata_server_available(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = is_metadata_server_available_result() + result.read(iprot) + iprot.readMessageEnd() + if result.m is not None: + raise result.m + if result.b is not None: + raise result.b + return def delete_backend(self, id): """ @@ -1964,7 +2293,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) @@ -1999,7 +2328,9 @@ def add_user_to_backend(self, backend_id, user_id): return self.recv_add_user_to_backend() def send_add_user_to_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin('add_user_to_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_user_to_backend", TMessageType.CALL, self._seqid + ) args = add_user_to_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -2022,7 +2353,10 @@ def recv_add_user_to_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_user_to_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_user_to_backend failed: unknown result", + ) def get_users_from_backend(self, backend_id): """ @@ -2036,7 +2370,9 @@ def get_users_from_backend(self, backend_id): return self.recv_get_users_from_backend() def send_get_users_from_backend(self, backend_id): - self._oprot.writeMessageBegin('get_users_from_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_users_from_backend", TMessageType.CALL, self._seqid + ) args = get_users_from_backend_args() args.backend_id = backend_id args.write(self._oprot) @@ -2058,7 +2394,10 @@ def recv_get_users_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_users_from_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_users_from_backend failed: unknown result", + ) def delete_user_from_backend(self, backend_id, user_id): """ @@ -2073,7 +2412,9 @@ def delete_user_from_backend(self, backend_id, user_id): return self.recv_delete_user_from_backend() def send_delete_user_from_backend(self, backend_id, user_id): - self._oprot.writeMessageBegin('delete_user_from_backend', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_user_from_backend", TMessageType.CALL, self._seqid + ) args = delete_user_from_backend_args() args.backend_id = backend_id args.user_id = user_id @@ -2096,14 +2437,19 @@ def recv_delete_user_from_backend(self): return result.success if result.b is not None: raise result.b - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_user_from_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "delete_user_from_backend failed: unknown result", + ) def get_allowed_templates(self): self.send_get_allowed_templates() return self.recv_get_allowed_templates() def send_get_allowed_templates(self): - self._oprot.writeMessageBegin('get_allowed_templates', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_allowed_templates", TMessageType.CALL, self._seqid + ) args = get_allowed_templates_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2122,7 +2468,10 @@ def recv_get_allowed_templates(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_allowed_templates failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_allowed_templates failed: unknown result", + ) def get_servers(self): """ @@ -2134,7 +2483,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() @@ -2153,7 +2502,9 @@ def recv_get_servers(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_servers failed: unknown result" + ) def get_servers_by_ids(self, server_ids): """ @@ -2168,7 +2519,9 @@ def get_servers_by_ids(self, server_ids): return self.recv_get_servers_by_ids() def send_get_servers_by_ids(self, server_ids): - self._oprot.writeMessageBegin('get_servers_by_ids', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_servers_by_ids", TMessageType.CALL, self._seqid + ) args = get_servers_by_ids_args() args.server_ids = server_ids args.write(self._oprot) @@ -2188,7 +2541,10 @@ def recv_get_servers_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_ids failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_servers_by_ids failed: unknown result", + ) def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -2203,7 +2559,9 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): return self.recv_get_servers_by_bibigrid_id() def send_get_servers_by_bibigrid_id(self, bibigrid_id): - self._oprot.writeMessageBegin('get_servers_by_bibigrid_id', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_servers_by_bibigrid_id", TMessageType.CALL, self._seqid + ) args = get_servers_by_bibigrid_id_args() args.bibigrid_id = bibigrid_id args.write(self._oprot) @@ -2223,9 +2581,14 @@ def recv_get_servers_by_bibigrid_id(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_bibigrid_id failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_servers_by_bibigrid_id failed: unknown result", + ) - def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): + def scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): """ Parameters: - cluster_id @@ -2237,11 +2600,17 @@ def scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, st - batch_idx """ - self.send_scale_up_cluster(cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx) + self.send_scale_up_cluster( + cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ) return self.recv_scale_up_cluster() - def send_scale_up_cluster(self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx): - self._oprot.writeMessageBegin('scale_up_cluster', TMessageType.CALL, self._seqid) + def send_scale_up_cluster( + self, cluster_id, image_name, flavor_name, count, names, start_idx, batch_idx + ): + self._oprot.writeMessageBegin( + "scale_up_cluster", TMessageType.CALL, self._seqid + ) args = scale_up_cluster_args() args.cluster_id = cluster_id args.image_name = image_name @@ -2267,9 +2636,23 @@ def recv_scale_up_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "scale_up_cluster failed: unknown result") - - def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "scale_up_cluster failed: unknown result", + ) + + def add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): """ Parameters: - cluster_id @@ -2283,11 +2666,34 @@ def add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_ - worker_idx """ - self.send_add_cluster_machine(cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx) + self.send_add_cluster_machine( + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ) return self.recv_add_cluster_machine() - def send_add_cluster_machine(self, cluster_id, cluster_user, cluster_group_id, image_name, flavor_name, name, key_name, batch_idx, worker_idx): - self._oprot.writeMessageBegin('add_cluster_machine', TMessageType.CALL, self._seqid) + def send_add_cluster_machine( + self, + cluster_id, + cluster_user, + cluster_group_id, + image_name, + flavor_name, + name, + key_name, + batch_idx, + worker_idx, + ): + self._oprot.writeMessageBegin( + "add_cluster_machine", TMessageType.CALL, self._seqid + ) args = add_cluster_machine_args() args.cluster_id = cluster_id args.cluster_user = cluster_user @@ -2315,7 +2721,10 @@ def recv_add_cluster_machine(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_cluster_machine failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_cluster_machine failed: unknown result", + ) def get_cluster_info(self, cluster_id): """ @@ -2327,7 +2736,9 @@ def get_cluster_info(self, cluster_id): return self.recv_get_cluster_info() def send_get_cluster_info(self, cluster_id): - self._oprot.writeMessageBegin('get_cluster_info', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_cluster_info", TMessageType.CALL, self._seqid + ) args = get_cluster_info_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2349,7 +2760,10 @@ def recv_get_cluster_info(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_info failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_cluster_info failed: unknown result", + ) def get_cluster_status(self, cluster_id): """ @@ -2361,7 +2775,9 @@ def get_cluster_status(self, cluster_id): return self.recv_get_cluster_status() def send_get_cluster_status(self, cluster_id): - self._oprot.writeMessageBegin('get_cluster_status', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_cluster_status", TMessageType.CALL, self._seqid + ) args = get_cluster_status_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2383,7 +2799,10 @@ def recv_get_cluster_status(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_status failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_cluster_status failed: unknown result", + ) def get_keypair_public_key_by_name(self, key_name): """ @@ -2395,7 +2814,9 @@ def get_keypair_public_key_by_name(self, key_name): return self.recv_get_keypair_public_key_by_name() def send_get_keypair_public_key_by_name(self, key_name): - self._oprot.writeMessageBegin('get_keypair_public_key_by_name', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_keypair_public_key_by_name", TMessageType.CALL, self._seqid + ) args = get_keypair_public_key_by_name_args() args.key_name = key_name args.write(self._oprot) @@ -2415,7 +2836,10 @@ def recv_get_keypair_public_key_by_name(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_keypair_public_key_by_name failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_keypair_public_key_by_name failed: unknown result", + ) def delete_keypair(self, key_name): """ @@ -2427,7 +2851,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) @@ -2457,7 +2881,9 @@ def add_default_security_groups_to_server(self, openstack_id): self.recv_add_default_security_groups_to_server() def send_add_default_security_groups_to_server(self, openstack_id): - self._oprot.writeMessageBegin('add_default_security_groups_to_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_default_security_groups_to_server", TMessageType.CALL, self._seqid + ) args = add_default_security_groups_to_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2492,7 +2918,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) @@ -2514,7 +2940,9 @@ def recv_get_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_server failed: unknown result" + ) def get_server_by_unique_name(self, unique_name): """ @@ -2526,7 +2954,9 @@ def get_server_by_unique_name(self, unique_name): return self.recv_get_server_by_unique_name() def send_get_server_by_unique_name(self, unique_name): - self._oprot.writeMessageBegin('get_server_by_unique_name', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_server_by_unique_name", TMessageType.CALL, self._seqid + ) args = get_server_by_unique_name_args() args.unique_name = unique_name args.write(self._oprot) @@ -2548,7 +2978,10 @@ def recv_get_server_by_unique_name(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server_by_unique_name failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_server_by_unique_name failed: unknown result", + ) def stop_server(self, openstack_id): """ @@ -2563,7 +2996,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) @@ -2604,8 +3037,10 @@ def create_snapshot(self, openstack_id, name, username, base_tags, description): self.send_create_snapshot(openstack_id, name, username, base_tags, description) return self.recv_create_snapshot() - def send_create_snapshot(self, openstack_id, name, username, base_tags, description): - self._oprot.writeMessageBegin('create_snapshot', TMessageType.CALL, self._seqid) + def send_create_snapshot( + self, openstack_id, name, username, base_tags, description + ): + self._oprot.writeMessageBegin("create_snapshot", TMessageType.CALL, self._seqid) args = create_snapshot_args() args.openstack_id = openstack_id args.name = name @@ -2633,7 +3068,10 @@ def recv_create_snapshot(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_snapshot failed: unknown result", + ) def get_limits(self): """ @@ -2647,7 +3085,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() @@ -2666,7 +3104,9 @@ def recv_get_limits(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_limits failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_limits failed: unknown result" + ) def start_cluster(self, public_keys, master_instance, worker_instances, user): """ @@ -2681,7 +3121,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 @@ -2704,7 +3144,9 @@ def recv_start_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result" + ) def terminate_cluster(self, cluster_id): """ @@ -2716,7 +3158,9 @@ def terminate_cluster(self, cluster_id): return self.recv_terminate_cluster() def send_terminate_cluster(self, cluster_id): - self._oprot.writeMessageBegin('terminate_cluster', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "terminate_cluster", TMessageType.CALL, self._seqid + ) args = terminate_cluster_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2738,7 +3182,10 @@ def recv_terminate_cluster(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "terminate_cluster failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "terminate_cluster failed: unknown result", + ) def delete_image(self, image_id): """ @@ -2753,7 +3200,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) @@ -2788,7 +3235,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 @@ -2827,7 +3274,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) @@ -2865,7 +3312,9 @@ def attach_volume_to_server(self, openstack_id, volume_id): return self.recv_attach_volume_to_server() def send_attach_volume_to_server(self, openstack_id, volume_id): - self._oprot.writeMessageBegin('attach_volume_to_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "attach_volume_to_server", TMessageType.CALL, self._seqid + ) args = attach_volume_to_server_args() args.openstack_id = openstack_id args.volume_id = volume_id @@ -2890,7 +3339,10 @@ def recv_attach_volume_to_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "attach_volume_to_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "attach_volume_to_server failed: unknown result", + ) def resume_server(self, openstack_id): """ @@ -2904,7 +3356,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) @@ -2942,7 +3394,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 @@ -2968,7 +3420,9 @@ def recv_create_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "create_volume failed: unknown result" + ) def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): """ @@ -2980,11 +3434,17 @@ def create_volume_by_source_volume(self, volume_name, metadata, source_volume_id - source_volume_id: ID of source volume """ - self.send_create_volume_by_source_volume(volume_name, metadata, source_volume_id) + self.send_create_volume_by_source_volume( + volume_name, metadata, source_volume_id + ) return self.recv_create_volume_by_source_volume() - def send_create_volume_by_source_volume(self, volume_name, metadata, source_volume_id): - self._oprot.writeMessageBegin('create_volume_by_source_volume', TMessageType.CALL, self._seqid) + def send_create_volume_by_source_volume( + self, volume_name, metadata, source_volume_id + ): + self._oprot.writeMessageBegin( + "create_volume_by_source_volume", TMessageType.CALL, self._seqid + ) args = create_volume_by_source_volume_args() args.volume_name = volume_name args.metadata = metadata @@ -3010,7 +3470,10 @@ def recv_create_volume_by_source_volume(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_source_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_by_source_volume failed: unknown result", + ) def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): """ @@ -3026,7 +3489,9 @@ def create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): return self.recv_create_volume_by_volume_snap() def send_create_volume_by_volume_snap(self, volume_name, metadata, volume_snap_id): - self._oprot.writeMessageBegin('create_volume_by_volume_snap', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "create_volume_by_volume_snap", TMessageType.CALL, self._seqid + ) args = create_volume_by_volume_snap_args() args.volume_name = volume_name args.metadata = metadata @@ -3052,7 +3517,10 @@ def recv_create_volume_by_volume_snap(self): raise result.r if result.n is not None: raise result.n - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_by_volume_snap failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_by_volume_snap failed: unknown result", + ) def create_volume_snapshot(self, volume_id, name, description): """ @@ -3069,7 +3537,9 @@ def create_volume_snapshot(self, volume_id, name, description): return self.recv_create_volume_snapshot() def send_create_volume_snapshot(self, volume_id, name, description): - self._oprot.writeMessageBegin('create_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "create_volume_snapshot", TMessageType.CALL, self._seqid + ) args = create_volume_snapshot_args() args.volume_id = volume_id args.name = name @@ -3095,7 +3565,10 @@ def recv_create_volume_snapshot(self): raise result.e if result.r is not None: raise result.r - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_volume_snapshot failed: unknown result", + ) def get_volume_snapshot(self, name_or_id): """ @@ -3110,7 +3583,9 @@ def get_volume_snapshot(self, name_or_id): return self.recv_get_volume_snapshot() def send_get_volume_snapshot(self, name_or_id): - self._oprot.writeMessageBegin('get_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_volume_snapshot", TMessageType.CALL, self._seqid + ) args = get_volume_snapshot_args() args.name_or_id = name_or_id args.write(self._oprot) @@ -3132,7 +3607,10 @@ def recv_get_volume_snapshot(self): return result.success if result.r is not None: raise result.r - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volume_snapshot failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_volume_snapshot failed: unknown result", + ) def delete_volume_snapshot(self, snapshot_id): """ @@ -3146,7 +3624,9 @@ def delete_volume_snapshot(self, snapshot_id): self.recv_delete_volume_snapshot() def send_delete_volume_snapshot(self, snapshot_id): - self._oprot.writeMessageBegin('delete_volume_snapshot', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_volume_snapshot", TMessageType.CALL, self._seqid + ) args = delete_volume_snapshot_args() args.snapshot_id = snapshot_id args.write(self._oprot) @@ -3182,7 +3662,9 @@ def reboot_hard_server(self, openstack_id): self.recv_reboot_hard_server() def send_reboot_hard_server(self, openstack_id): - self._oprot.writeMessageBegin('reboot_hard_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "reboot_hard_server", TMessageType.CALL, self._seqid + ) args = reboot_hard_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3218,7 +3700,9 @@ def reboot_soft_server(self, openstack_id): self.recv_reboot_soft_server() def send_reboot_soft_server(self, openstack_id): - self._oprot.writeMessageBegin('reboot_soft_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "reboot_soft_server", TMessageType.CALL, self._seqid + ) args = reboot_soft_server_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3250,12 +3734,20 @@ def __init__(self, handler): self._processMap["is_version"] = Processor.process_is_version self._processMap["get_client_version"] = Processor.process_get_client_version self._processMap["get_gateway_ip"] = Processor.process_get_gateway_ip - self._processMap["get_calculation_values"] = Processor.process_get_calculation_values + self._processMap["get_calculation_values"] = ( + Processor.process_get_calculation_values + ) self._processMap["import_keypair"] = Processor.process_import_keypair self._processMap["get_vm_ports"] = Processor.process_get_vm_ports - self._processMap["add_udp_security_group"] = Processor.process_add_udp_security_group - self._processMap["add_research_environment_security_group"] = Processor.process_add_research_environment_security_group - self._processMap["add_metadata_to_server"] = Processor.process_add_metadata_to_server + self._processMap["add_udp_security_group"] = ( + Processor.process_add_udp_security_group + ) + self._processMap["add_research_environment_security_group"] = ( + Processor.process_add_research_environment_security_group + ) + self._processMap["add_metadata_to_server"] = ( + Processor.process_add_metadata_to_server + ) self._processMap["get_flavors"] = Processor.process_get_flavors self._processMap["get_images"] = Processor.process_get_images self._processMap["get_public_images"] = Processor.process_get_public_images @@ -3264,40 +3756,79 @@ def __init__(self, handler): self._processMap["get_volume"] = Processor.process_get_volume self._processMap["get_volumes_by_ids"] = Processor.process_get_volumes_by_ids self._processMap["resize_volume"] = Processor.process_resize_volume - self._processMap["open_port_range_for_vm_in_project"] = Processor.process_open_port_range_for_vm_in_project - self._processMap["delete_security_group_rule"] = Processor.process_delete_security_group_rule + self._processMap["open_port_range_for_vm_in_project"] = ( + Processor.process_open_port_range_for_vm_in_project + ) + self._processMap["delete_security_group_rule"] = ( + Processor.process_delete_security_group_rule + ) self._processMap["delete_server"] = Processor.process_delete_server self._processMap["start_server"] = Processor.process_start_server - self._processMap["is_bibigrid_available"] = Processor.process_is_bibigrid_available - self._processMap["detach_ip_from_server"] = Processor.process_detach_ip_from_server - self._processMap["start_server_with_custom_key"] = Processor.process_start_server_with_custom_key + self._processMap["is_bibigrid_available"] = ( + Processor.process_is_bibigrid_available + ) + self._processMap["detach_ip_from_server"] = ( + Processor.process_detach_ip_from_server + ) + self._processMap["start_server_with_custom_key"] = ( + Processor.process_start_server_with_custom_key + ) self._processMap["exist_server"] = Processor.process_exist_server - self._processMap["create_and_deploy_playbook"] = Processor.process_create_and_deploy_playbook + self._processMap["create_and_deploy_playbook"] = ( + Processor.process_create_and_deploy_playbook + ) self._processMap["get_playbook_logs"] = Processor.process_get_playbook_logs self._processMap["has_forc"] = Processor.process_has_forc self._processMap["get_forc_url"] = Processor.process_get_forc_url self._processMap["create_backend"] = Processor.process_create_backend self._processMap["get_backends"] = Processor.process_get_backends - self._processMap["get_backends_by_owner"] = Processor.process_get_backends_by_owner - self._processMap["get_backends_by_template"] = Processor.process_get_backends_by_template + self._processMap["get_backends_by_owner"] = ( + Processor.process_get_backends_by_owner + ) + self._processMap["get_backends_by_template"] = ( + Processor.process_get_backends_by_template + ) self._processMap["get_backend_by_id"] = Processor.process_get_backend_by_id + self._processMap["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_servers_by_bibigrid_id"] = ( + Processor.process_get_servers_by_bibigrid_id + ) self._processMap["scale_up_cluster"] = Processor.process_scale_up_cluster self._processMap["add_cluster_machine"] = Processor.process_add_cluster_machine self._processMap["get_cluster_info"] = Processor.process_get_cluster_info 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 @@ -3306,14 +3837,24 @@ def __init__(self, handler): self._processMap["delete_image"] = Processor.process_delete_image self._processMap["detach_volume"] = Processor.process_detach_volume self._processMap["delete_volume"] = Processor.process_delete_volume - self._processMap["attach_volume_to_server"] = Processor.process_attach_volume_to_server + self._processMap["attach_volume_to_server"] = ( + Processor.process_attach_volume_to_server + ) self._processMap["resume_server"] = Processor.process_resume_server self._processMap["create_volume"] = Processor.process_create_volume - self._processMap["create_volume_by_source_volume"] = Processor.process_create_volume_by_source_volume - self._processMap["create_volume_by_volume_snap"] = Processor.process_create_volume_by_volume_snap - self._processMap["create_volume_snapshot"] = Processor.process_create_volume_snapshot + self._processMap["create_volume_by_source_volume"] = ( + Processor.process_create_volume_by_source_volume + ) + self._processMap["create_volume_by_volume_snap"] = ( + Processor.process_create_volume_by_volume_snap + ) + self._processMap["create_volume_snapshot"] = ( + Processor.process_create_volume_snapshot + ) self._processMap["get_volume_snapshot"] = Processor.process_get_volume_snapshot - self._processMap["delete_volume_snapshot"] = Processor.process_delete_volume_snapshot + self._processMap["delete_volume_snapshot"] = ( + Processor.process_delete_volume_snapshot + ) self._processMap["reboot_hard_server"] = Processor.process_reboot_hard_server self._processMap["reboot_soft_server"] = Processor.process_reboot_soft_server self._on_message_begin = None @@ -3328,7 +3869,9 @@ def process(self, iprot, oprot): if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + x = TApplicationException( + TApplicationException.UNKNOWN_METHOD, "Unknown function %s" % (name) + ) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() @@ -3349,13 +3892,15 @@ def process_is_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("is_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3372,13 +3917,15 @@ def process_get_client_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_client_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3395,13 +3942,15 @@ def process_get_gateway_ip(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_gateway_ip", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3418,13 +3967,15 @@ def process_get_calculation_values(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_calculation_values", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3441,13 +3992,15 @@ def process_import_keypair(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("import_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3467,13 +4020,15 @@ def process_get_vm_ports(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_vm_ports", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3496,13 +4051,15 @@ def process_add_udp_security_group(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_udp_security_group", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3514,7 +4071,9 @@ def process_add_research_environment_security_group(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_research_environment_security_group_result() try: - self._handler.add_research_environment_security_group(args.server_id, args.security_group_name) + self._handler.add_research_environment_security_group( + args.server_id, args.security_group_name + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3525,14 +4084,18 @@ def process_add_research_environment_security_group(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_research_environment_security_group", msg_type, seqid) + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) + oprot.writeMessageBegin( + "add_research_environment_security_group", msg_type, seqid + ) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -3554,13 +4117,15 @@ def process_add_metadata_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_metadata_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3577,13 +4142,15 @@ def process_get_flavors(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_flavors", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3600,13 +4167,15 @@ def process_get_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3623,13 +4192,15 @@ def process_get_public_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_public_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3646,13 +4217,15 @@ def process_get_private_images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_private_images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3664,7 +4237,9 @@ def process_get_image(self, seqid, iprot, oprot): iprot.readMessageEnd() result = get_image_result() try: - result.success = self._handler.get_image(args.openstack_id, args.ignore_not_active) + result.success = self._handler.get_image( + args.openstack_id, args.ignore_not_active + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3672,13 +4247,15 @@ def process_get_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.i = i except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3698,13 +4275,15 @@ def process_get_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3721,13 +4300,15 @@ def process_get_volumes_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volumes_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3747,13 +4328,15 @@ def process_resize_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("resize_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3765,7 +4348,13 @@ def process_open_port_range_for_vm_in_project(self, seqid, iprot, oprot): iprot.readMessageEnd() result = open_port_range_for_vm_in_project_result() try: - result.success = self._handler.open_port_range_for_vm_in_project(args.range_start, args.range_stop, args.openstack_id, args.ethertype, args.protocol) + result.success = self._handler.open_port_range_for_vm_in_project( + args.range_start, + args.range_stop, + args.openstack_id, + args.ethertype, + args.protocol, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3779,13 +4368,15 @@ def process_open_port_range_for_vm_in_project(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("open_port_range_for_vm_in_project", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3808,13 +4399,15 @@ def process_delete_security_group_rule(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.f = f except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_security_group_rule", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3837,13 +4430,15 @@ def process_delete_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3855,7 +4450,20 @@ def process_start_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_result() try: - result.success = self._handler.start_server(args.flavor_name, args.image_name, args.public_key, args.servername, args.metadata, args.volume_ids_path_new, args.volume_ids_path_attach, args.additional_keys, args.research_environment, args.additional_security_group_ids, args.slurm_version) + 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.auth_token, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3875,13 +4483,15 @@ def process_start_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3898,13 +4508,15 @@ def process_is_bibigrid_available(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("is_bibigrid_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3924,13 +4536,15 @@ def process_detach_ip_from_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("detach_ip_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3942,7 +4556,17 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_with_custom_key_result() try: - result.success = self._handler.start_server_with_custom_key(args.flavor_name, args.image_name, args.servername, args.metadata, args.research_environment, args.volume_ids_path_new, args.volume_ids_path_attach, args.additional_security_group_ids) + result.success = self._handler.start_server_with_custom_key( + args.flavor_name, + args.image_name, + args.servername, + args.metadata, + args.research_environment, + args.volume_ids_path_new, + args.volume_ids_path_attach, + args.additional_security_group_ids, + args.auth_token, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3962,13 +4586,15 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_server_with_custom_key", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3985,13 +4611,15 @@ def process_exist_server(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("exist_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4003,7 +4631,15 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_and_deploy_playbook_result() try: - result.success = self._handler.create_and_deploy_playbook(args.public_key, args.openstack_id, args.conda_packages, args.research_environment_template, args.apt_packages, args.create_only_backend, args.base_url) + result.success = self._handler.create_and_deploy_playbook( + args.public_key, + args.openstack_id, + args.conda_packages, + args.research_environment_template, + args.apt_packages, + args.create_only_backend, + args.base_url, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4011,13 +4647,15 @@ def process_create_and_deploy_playbook(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_and_deploy_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4037,13 +4675,15 @@ def process_get_playbook_logs(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.p = p except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_playbook_logs", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4060,13 +4700,15 @@ def process_has_forc(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("has_forc", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4083,13 +4725,15 @@ def process_get_forc_url(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_forc_url", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4101,7 +4745,9 @@ def process_create_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_backend_result() try: - result.success = self._handler.create_backend(args.owner, args.user_path, args.template, args.upstream_url) + result.success = self._handler.create_backend( + args.owner, args.user_path, args.template, args.upstream_url + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4112,13 +4758,15 @@ def process_create_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4138,13 +4786,15 @@ def process_get_backends(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4164,13 +4814,15 @@ def process_get_backends_by_owner(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends_by_owner", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4190,13 +4842,15 @@ def process_get_backends_by_template(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.d = d except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_backends_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4219,18 +4873,113 @@ 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() oprot.trans.flush() + def process_set_metadata_server_data(self, seqid, iprot, oprot): + args = set_metadata_server_data_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_metadata_server_data_result() + try: + self._handler.set_metadata_server_data(args.ip, args.metadata) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetadataServerNotAvailableException as m: + msg_type = TMessageType.REPLY + result.m = m + except MetadataServerNotAllowedException as b: + msg_type = TMessageType.REPLY + result.b = b + 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("set_metadata_server_data", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_remove_metadata_server_data(self, seqid, iprot, oprot): + args = remove_metadata_server_data_args() + args.read(iprot) + iprot.readMessageEnd() + result = remove_metadata_server_data_result() + try: + self._handler.remove_metadata_server_data(args.ip) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetadataServerNotAvailableException as m: + msg_type = TMessageType.REPLY + result.m = m + except MetadataServerNotAllowedException as b: + msg_type = TMessageType.REPLY + result.b = b + 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("remove_metadata_server_data", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_is_metadata_server_available(self, seqid, iprot, oprot): + args = is_metadata_server_available_args() + args.read(iprot) + iprot.readMessageEnd() + result = is_metadata_server_available_result() + try: + self._handler.is_metadata_server_available() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except MetadataServerNotAvailableException as m: + msg_type = TMessageType.REPLY + result.m = m + except MetadataServerNotAllowedException as b: + msg_type = TMessageType.REPLY + result.b = b + 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("is_metadata_server_available", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_delete_backend(self, seqid, iprot, oprot): args = delete_backend_args() args.read(iprot) @@ -4245,13 +4994,15 @@ def process_delete_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4263,7 +5014,9 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_user_to_backend_result() try: - result.success = self._handler.add_user_to_backend(args.backend_id, args.user_id) + result.success = self._handler.add_user_to_backend( + args.backend_id, args.user_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4271,13 +5024,15 @@ def process_add_user_to_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_user_to_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4297,13 +5052,15 @@ def process_get_users_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_users_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4315,7 +5072,9 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_user_from_backend_result() try: - result.success = self._handler.delete_user_from_backend(args.backend_id, args.user_id) + result.success = self._handler.delete_user_from_backend( + args.backend_id, args.user_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4323,13 +5082,15 @@ def process_delete_user_from_backend(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.b = b except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_user_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4346,13 +5107,15 @@ def process_get_allowed_templates(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_allowed_templates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4369,13 +5132,15 @@ def process_get_servers(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4392,13 +5157,15 @@ def process_get_servers_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4415,13 +5182,15 @@ def process_get_servers_by_bibigrid_id(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_servers_by_bibigrid_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4433,18 +5202,28 @@ def process_scale_up_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = scale_up_cluster_result() try: - result.success = self._handler.scale_up_cluster(args.cluster_id, args.image_name, args.flavor_name, args.count, args.names, args.start_idx, args.batch_idx) + result.success = self._handler.scale_up_cluster( + args.cluster_id, + args.image_name, + args.flavor_name, + args.count, + args.names, + args.start_idx, + args.batch_idx, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("scale_up_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4456,18 +5235,30 @@ def process_add_cluster_machine(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_cluster_machine_result() try: - result.success = self._handler.add_cluster_machine(args.cluster_id, args.cluster_user, args.cluster_group_id, args.image_name, args.flavor_name, args.name, args.key_name, args.batch_idx, args.worker_idx) + result.success = self._handler.add_cluster_machine( + args.cluster_id, + args.cluster_user, + args.cluster_group_id, + args.image_name, + args.flavor_name, + args.name, + args.key_name, + args.batch_idx, + args.worker_idx, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_cluster_machine", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4487,13 +5278,15 @@ def process_get_cluster_info(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_cluster_info", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4513,13 +5306,15 @@ def process_get_cluster_status(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_cluster_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4536,13 +5331,15 @@ def process_get_keypair_public_key_by_name(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_keypair_public_key_by_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4559,13 +5356,15 @@ def process_delete_keypair(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4585,14 +5384,18 @@ def process_add_default_security_groups_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_default_security_groups_to_server", msg_type, seqid) + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) + oprot.writeMessageBegin( + "add_default_security_groups_to_server", msg_type, seqid + ) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -4611,13 +5414,15 @@ def process_get_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4637,13 +5442,15 @@ def process_get_server_by_unique_name(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_server_by_unique_name", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4666,13 +5473,15 @@ def process_stop_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("stop_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4684,7 +5493,13 @@ def process_create_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_snapshot_result() try: - result.success = self._handler.create_snapshot(args.openstack_id, args.name, args.username, args.base_tags, args.description) + result.success = self._handler.create_snapshot( + args.openstack_id, + args.name, + args.username, + args.base_tags, + args.description, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4695,13 +5510,15 @@ def process_create_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4718,13 +5535,15 @@ def process_get_limits(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_limits", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4736,18 +5555,22 @@ def process_start_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_cluster_result() try: - result.success = self._handler.start_cluster(args.public_keys, args.master_instance, args.worker_instances, args.user) + result.success = self._handler.start_cluster( + args.public_keys, args.master_instance, args.worker_instances, args.user + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("start_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4767,13 +5590,15 @@ def process_terminate_cluster(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("terminate_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4793,13 +5618,15 @@ def process_delete_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4825,13 +5652,15 @@ def process_detach_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("detach_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4854,13 +5683,15 @@ def process_delete_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.v = v except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4872,7 +5703,9 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = attach_volume_to_server_result() try: - result.success = self._handler.attach_volume_to_server(args.openstack_id, args.volume_id) + result.success = self._handler.attach_volume_to_server( + args.openstack_id, args.volume_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4883,13 +5716,15 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("attach_volume_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4912,13 +5747,15 @@ def process_resume_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("resume_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4930,7 +5767,9 @@ def process_create_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_result() try: - result.success = self._handler.create_volume(args.volume_name, args.volume_storage, args.metadata) + result.success = self._handler.create_volume( + args.volume_name, args.volume_storage, args.metadata + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4941,13 +5780,15 @@ def process_create_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4959,7 +5800,9 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_source_volume_result() try: - result.success = self._handler.create_volume_by_source_volume(args.volume_name, args.metadata, args.source_volume_id) + result.success = self._handler.create_volume_by_source_volume( + args.volume_name, args.metadata, args.source_volume_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4970,13 +5813,15 @@ def process_create_volume_by_source_volume(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_by_source_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4988,7 +5833,9 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_by_volume_snap_result() try: - result.success = self._handler.create_volume_by_volume_snap(args.volume_name, args.metadata, args.volume_snap_id) + result.success = self._handler.create_volume_by_volume_snap( + args.volume_name, args.metadata, args.volume_snap_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4999,13 +5846,15 @@ def process_create_volume_by_volume_snap(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.n = n except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_by_volume_snap", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5017,7 +5866,9 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_snapshot_result() try: - result.success = self._handler.create_volume_snapshot(args.volume_id, args.name, args.description) + result.success = self._handler.create_volume_snapshot( + args.volume_id, args.name, args.description + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5028,13 +5879,15 @@ def process_create_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("create_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5054,13 +5907,15 @@ def process_get_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.r = r except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("get_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5083,13 +5938,15 @@ def process_delete_volume_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("delete_volume_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5112,13 +5969,15 @@ def process_reboot_hard_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("reboot_hard_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5141,18 +6000,21 @@ def process_reboot_soft_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("reboot_soft_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() + # HELPER FUNCTIONS AND STRUCTURES @@ -5163,12 +6025,18 @@ class is_version_args(object): """ - - def __init__(self, version=None,): + def __init__( + self, + version=None, + ): self.version = version def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5188,11 +6056,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_version_args') + oprot.writeStructBegin("is_version_args") if self.version is not None: - oprot.writeFieldBegin('version', TType.DOUBLE, 1) + oprot.writeFieldBegin("version", TType.DOUBLE, 1) oprot.writeDouble(self.version) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5202,19 +6072,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(is_version_args) is_version_args.thrift_spec = ( None, # 0 - (1, TType.DOUBLE, 'version', None, None, ), # 1 + ( + 1, + TType.DOUBLE, + "version", + None, + None, + ), # 1 ) @@ -5225,12 +6102,18 @@ class is_version_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5250,11 +6133,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_version_result') + oprot.writeStructBegin("is_version_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5264,26 +6149,36 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(is_version_result) is_version_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) class get_client_version_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5298,9 +6193,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_client_version_args') + oprot.writeStructBegin("get_client_version_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5308,18 +6205,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): @@ -5329,12 +6226,18 @@ class get_client_version_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5344,7 +6247,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5354,12 +6261,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_client_version_result') + oprot.writeStructBegin("get_client_version_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5368,26 +6281,36 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_client_version_result) get_client_version_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) class get_gateway_ip_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5402,9 +6325,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_gateway_ip_args') + oprot.writeStructBegin("get_gateway_ip_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5412,18 +6337,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): @@ -5433,12 +6358,18 @@ class get_gateway_ip_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5449,11 +6380,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype33, _vtype34, _size32) = iprot.readMapBegin() - for _i36 in range(_size32): - _key37 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val38 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key37] = _val38 + (_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() + ) + self.success[_key44] = _val45 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5464,15 +6403,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_gateway_ip_result') + oprot.writeStructBegin("get_gateway_ip_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter39, viter40 in self.success.items(): - oprot.writeString(kiter39.encode('utf-8') if sys.version_info[0] == 2 else kiter39) - oprot.writeString(viter40.encode('utf-8') if sys.version_info[0] == 2 else viter40) + for kiter46, viter47 in self.success.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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5482,26 +6427,36 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_gateway_ip_result) get_gateway_ip_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) class get_calculation_values_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5516,9 +6471,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_calculation_values_args') + oprot.writeStructBegin("get_calculation_values_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5526,18 +6483,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): @@ -5547,12 +6504,18 @@ class get_calculation_values_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5563,11 +6526,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype42, _vtype43, _size41) = iprot.readMapBegin() - for _i45 in range(_size41): - _key46 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val47 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key46] = _val47 + (_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() + ) + self.success[_key53] = _val54 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5578,15 +6549,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_calculation_values_result') + oprot.writeStructBegin("get_calculation_values_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter48, viter49 in self.success.items(): - oprot.writeString(kiter48.encode('utf-8') if sys.version_info[0] == 2 else kiter48) - oprot.writeString(viter49.encode('utf-8') if sys.version_info[0] == 2 else viter49) + 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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5596,18 +6573,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_calculation_values_result) get_calculation_values_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -5619,13 +6603,20 @@ class import_keypair_args(object): """ - - def __init__(self, keyname=None, public_key=None,): + def __init__( + self, + keyname=None, + public_key=None, + ): self.keyname = keyname self.public_key = public_key def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5635,12 +6626,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.keyname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.keyname = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5650,16 +6649,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('import_keypair_args') + oprot.writeStructBegin("import_keypair_args") if self.keyname is not None: - oprot.writeFieldBegin('keyname', TType.STRING, 1) - oprot.writeString(self.keyname.encode('utf-8') if sys.version_info[0] == 2 else self.keyname) + oprot.writeFieldBegin("keyname", TType.STRING, 1) + oprot.writeString( + self.keyname.encode("utf-8") + if sys.version_info[0] == 2 + else self.keyname + ) oprot.writeFieldEnd() if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 2) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 2) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5668,20 +6677,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(import_keypair_args) import_keypair_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'keyname', 'UTF8', None, ), # 1 - (2, TType.STRING, 'public_key', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "keyname", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 2 ) @@ -5692,12 +6714,18 @@ class import_keypair_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5707,7 +6735,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5717,12 +6749,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('import_keypair_result') + oprot.writeStructBegin("import_keypair_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5731,18 +6769,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(import_keypair_result) import_keypair_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -5753,12 +6798,18 @@ class get_vm_ports_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5768,7 +6819,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5778,12 +6833,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_vm_ports_args') + oprot.writeStructBegin("get_vm_ports_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5792,19 +6853,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_vm_ports_args) get_vm_ports_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -5816,13 +6884,20 @@ class get_vm_ports_result(object): """ - - def __init__(self, success=None, s=None,): + def __init__( + self, + success=None, + s=None, + ): self.success = success self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5833,11 +6908,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype51, _vtype52, _size50) = iprot.readMapBegin() - for _i54 in range(_size50): - _key55 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val56 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key55] = _val56 + (_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() + ) + self.success[_key62] = _val63 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5853,19 +6936,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_vm_ports_result') + oprot.writeStructBegin("get_vm_ports_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter57, viter58 in self.success.items(): - oprot.writeString(kiter57.encode('utf-8') if sys.version_info[0] == 2 else kiter57) - oprot.writeString(viter58.encode('utf-8') if sys.version_info[0] == 2 else viter58) + 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.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() @@ -5875,19 +6964,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_vm_ports_result) get_vm_ports_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -5898,12 +7000,18 @@ class add_udp_security_group_args(object): """ - - def __init__(self, server_id=None,): + def __init__( + self, + server_id=None, + ): self.server_id = server_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5913,7 +7021,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5923,12 +7035,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_udp_security_group_args') + oprot.writeStructBegin("add_udp_security_group_args") if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 1) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 1) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5937,19 +7055,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_udp_security_group_args) add_udp_security_group_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 ) @@ -5961,13 +7086,20 @@ class add_udp_security_group_result(object): """ - - def __init__(self, r=None, s=None,): + def __init__( + self, + r=None, + s=None, + ): self.r = r self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -5992,15 +7124,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_udp_security_group_result') + oprot.writeStructBegin("add_udp_security_group_result") if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 2) + oprot.writeFieldBegin("s", TType.STRUCT, 2) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6010,20 +7144,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_udp_security_group_result) add_udp_security_group_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 2 ) @@ -6035,13 +7182,20 @@ class add_research_environment_security_group_args(object): """ - - 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() @@ -6051,12 +7205,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.security_group_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.security_group_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -6066,16 +7228,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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() @@ -6084,20 +7256,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_research_environment_security_group_args) add_research_environment_security_group_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'security_group_name', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "security_group_name", + "UTF8", + None, + ), # 2 ) @@ -6109,13 +7294,20 @@ class add_research_environment_security_group_result(object): """ - - def __init__(self, r=None, s=None,): + def __init__( + self, + r=None, + s=None, + ): self.r = r self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6140,15 +7332,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_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() @@ -6158,20 +7352,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_research_environment_security_group_result) add_research_environment_security_group_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 2 ) @@ -6183,13 +7390,20 @@ class add_metadata_to_server_args(object): """ - - def __init__(self, openstack_id=None, metadata=None,): + def __init__( + self, + openstack_id=None, + metadata=None, + ): self.openstack_id = openstack_id self.metadata = metadata def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6199,17 +7413,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.MAP: self.metadata = {} - (_ktype60, _vtype61, _size59) = iprot.readMapBegin() - for _i63 in range(_size59): - _key64 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val65 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key64] = _val65 + (_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() + ) + self.metadata[_key71] = _val72 iprot.readMapEnd() else: iprot.skip(ftype) @@ -6220,19 +7446,29 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_metadata_to_server_args') + oprot.writeStructBegin("add_metadata_to_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 2) + oprot.writeFieldBegin("metadata", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter66, viter67 in self.metadata.items(): - oprot.writeString(kiter66.encode('utf-8') if sys.version_info[0] == 2 else kiter66) - oprot.writeString(viter67.encode('utf-8') if sys.version_info[0] == 2 else viter67) + for kiter73, viter74 in self.metadata.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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6242,20 +7478,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_metadata_to_server_args) add_metadata_to_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 ) @@ -6267,13 +7516,20 @@ class add_metadata_to_server_result(object): """ - - def __init__(self, r=None, s=None,): + def __init__( + self, + r=None, + s=None, + ): self.r = r self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6298,15 +7554,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_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() @@ -6316,28 +7574,44 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(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): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6352,9 +7626,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_flavors_args') + oprot.writeStructBegin("get_flavors_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -6362,18 +7638,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): @@ -6383,12 +7659,18 @@ class get_flavors_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6399,11 +7681,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype71, _size68) = iprot.readListBegin() - for _i72 in range(_size68): - _elem73 = Flavor() - _elem73.read(iprot) - self.success.append(_elem73) + (_etype78, _size75) = iprot.readListBegin() + for _i79 in range(_size75): + _elem80 = Flavor() + _elem80.read(iprot) + self.success.append(_elem80) iprot.readListEnd() else: iprot.skip(ftype) @@ -6414,14 +7696,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter74 in self.success: - iter74.write(oprot) + for iter81 in self.success: + iter81.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6431,26 +7715,36 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_flavors_result) get_flavors_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Flavor, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Flavor, None], False), + None, + ), # 0 ) class get_images_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6465,9 +7759,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_images_args') + oprot.writeStructBegin("get_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -6475,18 +7771,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): @@ -6496,12 +7792,18 @@ class get_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6512,11 +7814,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype78, _size75) = iprot.readListBegin() - for _i79 in range(_size75): - _elem80 = Image() - _elem80.read(iprot) - self.success.append(_elem80) + (_etype85, _size82) = iprot.readListBegin() + for _i86 in range(_size82): + _elem87 = Image() + _elem87.read(iprot) + self.success.append(_elem87) iprot.readListEnd() else: iprot.skip(ftype) @@ -6527,14 +7829,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter81 in self.success: - iter81.write(oprot) + for iter88 in self.success: + iter88.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6544,26 +7848,36 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_images_result) get_images_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Image, None], False), + None, + ), # 0 ) class get_public_images_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6578,9 +7892,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_public_images_args') + oprot.writeStructBegin("get_public_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -6588,18 +7904,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): @@ -6609,12 +7925,18 @@ class get_public_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6625,11 +7947,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype85, _size82) = iprot.readListBegin() - for _i86 in range(_size82): - _elem87 = Image() - _elem87.read(iprot) - self.success.append(_elem87) + (_etype92, _size89) = iprot.readListBegin() + for _i93 in range(_size89): + _elem94 = Image() + _elem94.read(iprot) + self.success.append(_elem94) iprot.readListEnd() else: iprot.skip(ftype) @@ -6640,14 +7962,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter88 in self.success: - iter88.write(oprot) + for iter95 in self.success: + iter95.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6657,26 +7981,36 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_public_images_result) get_public_images_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Image, None], False), + None, + ), # 0 ) class get_private_images_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6691,9 +8025,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_private_images_args') + oprot.writeStructBegin("get_private_images_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -6701,18 +8037,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): @@ -6722,12 +8058,18 @@ class get_private_images_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6738,11 +8080,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype92, _size89) = iprot.readListBegin() - for _i93 in range(_size89): - _elem94 = Image() - _elem94.read(iprot) - self.success.append(_elem94) + (_etype99, _size96) = iprot.readListBegin() + for _i100 in range(_size96): + _elem101 = Image() + _elem101.read(iprot) + self.success.append(_elem101) iprot.readListEnd() else: iprot.skip(ftype) @@ -6753,14 +8095,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter95 in self.success: - iter95.write(oprot) + for iter102 in self.success: + iter102.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6770,18 +8114,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_private_images_result) get_private_images_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Image, None], False), + None, + ), # 0 ) @@ -6793,13 +8144,20 @@ class get_image_args(object): """ - - def __init__(self, openstack_id=None, ignore_not_active=None,): + def __init__( + self, + openstack_id=None, + ignore_not_active=None, + ): self.openstack_id = openstack_id self.ignore_not_active = ignore_not_active def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6809,7 +8167,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -6824,15 +8186,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_image_args') + oprot.writeStructBegin("get_image_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.ignore_not_active is not None: - oprot.writeFieldBegin('ignore_not_active', TType.BOOL, 2) + oprot.writeFieldBegin("ignore_not_active", TType.BOOL, 2) oprot.writeBool(self.ignore_not_active) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6842,20 +8210,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_image_args) get_image_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.BOOL, 'ignore_not_active', None, None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.BOOL, + "ignore_not_active", + None, + None, + ), # 2 ) @@ -6867,13 +8248,20 @@ class get_image_result(object): """ - - def __init__(self, success=None, i=None,): + def __init__( + self, + success=None, + i=None, + ): self.success = success self.i = i def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6899,15 +8287,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_image_result') + oprot.writeStructBegin("get_image_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 1) + oprot.writeFieldBegin("i", TType.STRUCT, 1) self.i.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6917,19 +8307,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_image_result) get_image_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Image, None], None, ), # 0 - (1, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Image, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "i", + [ImageNotFoundException, None], + None, + ), # 1 ) @@ -6940,12 +8343,18 @@ class get_volume_args(object): """ - - def __init__(self, volume_id=None,): + def __init__( + self, + volume_id=None, + ): self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6955,7 +8364,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -6965,12 +8378,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_args') + oprot.writeStructBegin("get_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6979,19 +8398,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volume_args) get_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 ) @@ -7003,13 +8429,20 @@ class get_volume_result(object): """ - - def __init__(self, success=None, v=None,): + def __init__( + self, + success=None, + v=None, + ): self.success = success self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7035,15 +8468,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_result') + oprot.writeStructBegin("get_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 1) + oprot.writeFieldBegin("v", TType.STRUCT, 1) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7053,19 +8488,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volume_result) get_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 1 ) @@ -7076,12 +8524,18 @@ class get_volumes_by_ids_args(object): """ - - def __init__(self, volume_ids=None,): + def __init__( + self, + volume_ids=None, + ): self.volume_ids = volume_ids def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7092,10 +8546,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.volume_ids = [] - (_etype99, _size96) = iprot.readListBegin() - for _i100 in range(_size96): - _elem101 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.volume_ids.append(_elem101) + (_etype106, _size103) = iprot.readListBegin() + for _i107 in range(_size103): + _elem108 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.volume_ids.append(_elem108) iprot.readListEnd() else: iprot.skip(ftype) @@ -7106,14 +8564,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volumes_by_ids_args') + oprot.writeStructBegin("get_volumes_by_ids_args") if self.volume_ids is not None: - oprot.writeFieldBegin('volume_ids', TType.LIST, 1) + oprot.writeFieldBegin("volume_ids", TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.volume_ids)) - for iter102 in self.volume_ids: - oprot.writeString(iter102.encode('utf-8') if sys.version_info[0] == 2 else iter102) + for iter109 in self.volume_ids: + oprot.writeString( + iter109.encode("utf-8") if sys.version_info[0] == 2 else iter109 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7123,19 +8585,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volumes_by_ids_args) get_volumes_by_ids_args.thrift_spec = ( None, # 0 - (1, TType.LIST, 'volume_ids', (TType.STRING, 'UTF8', False), None, ), # 1 + ( + 1, + TType.LIST, + "volume_ids", + (TType.STRING, "UTF8", False), + None, + ), # 1 ) @@ -7146,12 +8615,18 @@ class get_volumes_by_ids_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7162,11 +8637,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype106, _size103) = iprot.readListBegin() - for _i107 in range(_size103): - _elem108 = Volume() - _elem108.read(iprot) - self.success.append(_elem108) + (_etype113, _size110) = iprot.readListBegin() + for _i114 in range(_size110): + _elem115 = Volume() + _elem115.read(iprot) + self.success.append(_elem115) iprot.readListEnd() else: iprot.skip(ftype) @@ -7177,14 +8652,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter109 in self.success: - iter109.write(oprot) + for iter116 in self.success: + iter116.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7194,18 +8671,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volumes_by_ids_result) get_volumes_by_ids_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Volume, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Volume, None], False), + None, + ), # 0 ) @@ -7217,13 +8701,20 @@ class resize_volume_args(object): """ - - def __init__(self, volume_id=None, size=None,): + def __init__( + self, + volume_id=None, + size=None, + ): self.volume_id = volume_id self.size = size def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7233,7 +8724,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -7248,15 +8743,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resize_volume_args') + oprot.writeStructBegin("resize_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin('size', TType.I32, 2) + oprot.writeFieldBegin("size", TType.I32, 2) oprot.writeI32(self.size) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7266,20 +8767,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(resize_volume_args) resize_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.I32, 'size', None, None, ), # 2 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "size", + None, + None, + ), # 2 ) @@ -7290,12 +8804,18 @@ class resize_volume_result(object): """ - - def __init__(self, v=None,): + def __init__( + self, + v=None, + ): self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7315,11 +8835,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resize_volume_result') + oprot.writeStructBegin("resize_volume_result") if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 1) + oprot.writeFieldBegin("v", TType.STRUCT, 1) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7329,19 +8851,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(resize_volume_result) resize_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 1 ) @@ -7356,8 +8885,14 @@ class open_port_range_for_vm_in_project_args(object): """ - - def __init__(self, range_start=None, range_stop=None, openstack_id=None, ethertype="IPv4", protocol="TCP",): + def __init__( + self, + range_start=None, + range_stop=None, + openstack_id=None, + ethertype="IPv4", + protocol="TCP", + ): self.range_start = range_start self.range_stop = range_stop self.openstack_id = openstack_id @@ -7365,7 +8900,11 @@ def __init__(self, range_start=None, range_stop=None, openstack_id=None, etherty self.protocol = protocol def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7385,17 +8924,29 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.ethertype = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.ethertype = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.protocol = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.protocol = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7405,28 +8956,42 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('open_port_range_for_vm_in_project_args') + oprot.writeStructBegin("open_port_range_for_vm_in_project_args") if self.range_start is not None: - oprot.writeFieldBegin('range_start', TType.I32, 1) + oprot.writeFieldBegin("range_start", TType.I32, 1) oprot.writeI32(self.range_start) oprot.writeFieldEnd() if self.range_stop is not None: - oprot.writeFieldBegin('range_stop', TType.I32, 2) + oprot.writeFieldBegin("range_stop", TType.I32, 2) oprot.writeI32(self.range_stop) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 3) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 3) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.ethertype is not None: - oprot.writeFieldBegin('ethertype', TType.STRING, 4) - oprot.writeString(self.ethertype.encode('utf-8') if sys.version_info[0] == 2 else self.ethertype) + oprot.writeFieldBegin("ethertype", TType.STRING, 4) + oprot.writeString( + self.ethertype.encode("utf-8") + if sys.version_info[0] == 2 + else self.ethertype + ) oprot.writeFieldEnd() if self.protocol is not None: - oprot.writeFieldBegin('protocol', TType.STRING, 5) - oprot.writeString(self.protocol.encode('utf-8') if sys.version_info[0] == 2 else self.protocol) + oprot.writeFieldBegin("protocol", TType.STRING, 5) + oprot.writeString( + self.protocol.encode("utf-8") + if sys.version_info[0] == 2 + else self.protocol + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7435,23 +9000,54 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(open_port_range_for_vm_in_project_args) open_port_range_for_vm_in_project_args.thrift_spec = ( None, # 0 - (1, TType.I32, 'range_start', None, None, ), # 1 - (2, TType.I32, 'range_stop', None, None, ), # 2 - (3, TType.STRING, 'openstack_id', 'UTF8', None, ), # 3 - (4, TType.STRING, 'ethertype', 'UTF8', "IPv4", ), # 4 - (5, TType.STRING, 'protocol', 'UTF8', "TCP", ), # 5 + ( + 1, + TType.I32, + "range_start", + None, + None, + ), # 1 + ( + 2, + TType.I32, + "range_stop", + None, + None, + ), # 2 + ( + 3, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "ethertype", + "UTF8", + "IPv4", + ), # 4 + ( + 5, + TType.STRING, + "protocol", + "UTF8", + "TCP", + ), # 5 ) @@ -7465,15 +9061,24 @@ class open_port_range_for_vm_in_project_result(object): """ - - def __init__(self, success=None, e=None, v=None, o=None,): + def __init__( + self, + success=None, + e=None, + v=None, + o=None, + ): self.success = success self.e = e self.v = v self.o = o def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7483,7 +9088,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -7508,23 +9117,29 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('open_port_range_for_vm_in_project_result') + oprot.writeStructBegin("open_port_range_for_vm_in_project_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 2) + oprot.writeFieldBegin("v", TType.STRUCT, 2) self.v.write(oprot) oprot.writeFieldEnd() if self.o is not None: - oprot.writeFieldBegin('o', TType.STRUCT, 3) + oprot.writeFieldBegin("o", TType.STRUCT, 3) self.o.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7534,21 +9149,46 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(open_port_range_for_vm_in_project_result) open_port_range_for_vm_in_project_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'v', [DefaultException, None], None, ), # 2 - (3, TType.STRUCT, 'o', [OpenStackConflictException, None], None, ), # 3 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "v", + [DefaultException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "o", + [OpenStackConflictException, None], + None, + ), # 3 ) @@ -7559,12 +9199,18 @@ class delete_security_group_rule_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7574,7 +9220,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7584,12 +9234,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_security_group_rule_args') + oprot.writeStructBegin("delete_security_group_rule_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7598,19 +9254,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_security_group_rule_args) delete_security_group_rule_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -7622,13 +9285,20 @@ class delete_security_group_rule_result(object): """ - - 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() @@ -7653,15 +9323,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_security_group_rule_result') + oprot.writeStructBegin("delete_security_group_rule_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 2) + oprot.writeFieldBegin("f", TType.STRUCT, 2) self.f.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7671,20 +9343,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_security_group_rule_result) delete_security_group_rule_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [SecurityGroupRuleNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'f', [DefaultException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [SecurityGroupRuleNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "f", + [DefaultException, None], + None, + ), # 2 ) @@ -7695,12 +9380,18 @@ class delete_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7710,7 +9401,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7720,12 +9415,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_server_args') + oprot.writeStructBegin("delete_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7734,19 +9435,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_server_args) delete_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -7758,13 +9466,20 @@ class delete_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7789,15 +9504,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_server_result') + oprot.writeStructBegin("delete_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7807,20 +9524,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_server_result) delete_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -7838,11 +9568,25 @@ class start_server_args(object): - research_environment - additional_security_group_ids - slurm_version + - auth_token """ - - 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,): + 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, + auth_token=None, + ): self.flavor_name = flavor_name self.image_name = image_name self.public_key = public_key @@ -7854,9 +9598,14 @@ def __init__(self, flavor_name=None, image_name=None, public_key=None, servernam self.research_environment = research_environment self.additional_security_group_ids = additional_security_group_ids self.slurm_version = slurm_version + self.auth_token = auth_token def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7866,95 +9615,160 @@ 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: if ftype == TType.MAP: self.metadata = {} - (_ktype111, _vtype112, _size110) = iprot.readMapBegin() - for _i114 in range(_size110): - _key115 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val116 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key115] = _val116 + (_ktype118, _vtype119, _size117) = iprot.readMapBegin() + for _i121 in range(_size117): + _key122 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val123 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key122] = _val123 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.LIST: self.volume_ids_path_new = [] - (_etype120, _size117) = iprot.readListBegin() - for _i121 in range(_size117): - _elem122 = {} - (_ktype124, _vtype125, _size123) = iprot.readMapBegin() - for _i127 in range(_size123): - _key128 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val129 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _elem122[_key128] = _val129 + (_etype127, _size124) = iprot.readListBegin() + for _i128 in range(_size124): + _elem129 = {} + (_ktype131, _vtype132, _size130) = iprot.readMapBegin() + for _i134 in range(_size130): + _key135 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val136 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _elem129[_key135] = _val136 iprot.readMapEnd() - self.volume_ids_path_new.append(_elem122) + self.volume_ids_path_new.append(_elem129) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.LIST: self.volume_ids_path_attach = [] - (_etype133, _size130) = iprot.readListBegin() - for _i134 in range(_size130): - _elem135 = {} - (_ktype137, _vtype138, _size136) = iprot.readMapBegin() - for _i140 in range(_size136): - _key141 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val142 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _elem135[_key141] = _val142 + (_etype140, _size137) = iprot.readListBegin() + for _i141 in range(_size137): + _elem142 = {} + (_ktype144, _vtype145, _size143) = iprot.readMapBegin() + for _i147 in range(_size143): + _key148 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val149 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _elem142[_key148] = _val149 iprot.readMapEnd() - self.volume_ids_path_attach.append(_elem135) + self.volume_ids_path_attach.append(_elem142) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.additional_keys = [] - (_etype146, _size143) = iprot.readListBegin() - for _i147 in range(_size143): - _elem148 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.additional_keys.append(_elem148) + (_etype153, _size150) = iprot.readListBegin() + for _i154 in range(_size150): + _elem155 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.additional_keys.append(_elem155) 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: if ftype == TType.LIST: self.additional_security_group_ids = [] - (_etype152, _size149) = iprot.readListBegin() - for _i153 in range(_size149): - _elem154 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.additional_security_group_ids.append(_elem154) + (_etype159, _size156) = iprot.readListBegin() + for _i160 in range(_size156): + _elem161 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.additional_security_group_ids.append(_elem161) 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.auth_token = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7964,76 +9778,134 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter155, viter156 in self.metadata.items(): - oprot.writeString(kiter155.encode('utf-8') if sys.version_info[0] == 2 else kiter155) - oprot.writeString(viter156.encode('utf-8') if sys.version_info[0] == 2 else viter156) + for kiter162, viter163 in self.metadata.items(): + oprot.writeString( + kiter162.encode("utf-8") if sys.version_info[0] == 2 else kiter162 + ) + oprot.writeString( + viter163.encode("utf-8") if sys.version_info[0] == 2 else viter163 + ) 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 iter157 in self.volume_ids_path_new: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter157)) - for kiter158, viter159 in iter157.items(): - oprot.writeString(kiter158.encode('utf-8') if sys.version_info[0] == 2 else kiter158) - oprot.writeString(viter159.encode('utf-8') if sys.version_info[0] == 2 else viter159) + for iter164 in self.volume_ids_path_new: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter164)) + for kiter165, viter166 in iter164.items(): + oprot.writeString( + kiter165.encode("utf-8") + if sys.version_info[0] == 2 + else kiter165 + ) + oprot.writeString( + viter166.encode("utf-8") + if sys.version_info[0] == 2 + else viter166 + ) 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 iter160 in self.volume_ids_path_attach: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter160)) - for kiter161, viter162 in iter160.items(): - oprot.writeString(kiter161.encode('utf-8') if sys.version_info[0] == 2 else kiter161) - oprot.writeString(viter162.encode('utf-8') if sys.version_info[0] == 2 else viter162) + for iter167 in self.volume_ids_path_attach: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter167)) + for kiter168, viter169 in iter167.items(): + oprot.writeString( + kiter168.encode("utf-8") + if sys.version_info[0] == 2 + else kiter168 + ) + oprot.writeString( + viter169.encode("utf-8") + if sys.version_info[0] == 2 + else viter169 + ) 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 iter163 in self.additional_keys: - oprot.writeString(iter163.encode('utf-8') if sys.version_info[0] == 2 else iter163) + for iter170 in self.additional_keys: + oprot.writeString( + iter170.encode("utf-8") if sys.version_info[0] == 2 else iter170 + ) 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 iter164 in self.additional_security_group_ids: - oprot.writeString(iter164.encode('utf-8') if sys.version_info[0] == 2 else iter164) + for iter171 in self.additional_security_group_ids: + oprot.writeString( + iter171.encode("utf-8") if sys.version_info[0] == 2 else iter171 + ) 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.auth_token is not None: + oprot.writeFieldBegin("auth_token", TType.STRING, 13) + oprot.writeString( + self.auth_token.encode("utf-8") + if sys.version_info[0] == 2 + else self.auth_token + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8042,30 +9914,104 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_server_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 + ( + 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, + "auth_token", + "UTF8", + None, + ), # 13 ) @@ -8081,8 +10027,15 @@ class start_server_result(object): """ - - def __init__(self, success=None, e=None, r=None, i=None, f=None, o=None,): + def __init__( + self, + success=None, + e=None, + r=None, + i=None, + f=None, + o=None, + ): self.success = success self.e = e self.r = r @@ -8091,7 +10044,11 @@ def __init__(self, success=None, e=None, r=None, i=None, f=None, o=None,): self.o = o def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8101,7 +10058,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -8136,31 +10097,37 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_server_result') + oprot.writeStructBegin("start_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 5) + oprot.writeFieldBegin("i", TType.STRUCT, 5) self.i.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 6) + oprot.writeFieldBegin("f", TType.STRUCT, 6) self.f.write(oprot) oprot.writeFieldEnd() if self.o is not None: - oprot.writeFieldBegin('o', TType.STRUCT, 7) + oprot.writeFieldBegin("o", TType.STRUCT, 7) self.o.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8170,33 +10137,73 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_server_result) start_server_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [NameAlreadyUsedException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ResourceNotAvailableException, None], + None, + ), # 2 None, # 3 None, # 4 - (5, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 5 - (6, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 6 - (7, TType.STRUCT, 'o', [DefaultException, None], None, ), # 7 + ( + 5, + TType.STRUCT, + "i", + [ImageNotFoundException, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "f", + [FlavorNotFoundException, None], + None, + ), # 6 + ( + 7, + TType.STRUCT, + "o", + [DefaultException, None], + None, + ), # 7 ) class is_bibigrid_available_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8211,9 +10218,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_bibigrid_available_args') + oprot.writeStructBegin("is_bibigrid_available_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -8221,18 +10230,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): @@ -8242,12 +10251,18 @@ class is_bibigrid_available_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8267,11 +10282,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('is_bibigrid_available_result') + oprot.writeStructBegin("is_bibigrid_available_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8281,18 +10298,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(is_bibigrid_available_result) is_bibigrid_available_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) @@ -8304,13 +10328,20 @@ class detach_ip_from_server_args(object): """ - - def __init__(self, server_id=None, floating_ip=None,): + def __init__( + self, + server_id=None, + floating_ip=None, + ): self.server_id = server_id self.floating_ip = floating_ip def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8320,12 +10351,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.floating_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.floating_ip = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8335,16 +10374,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_ip_from_server_args') + oprot.writeStructBegin("detach_ip_from_server_args") if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 1) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 1) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() if self.floating_ip is not None: - oprot.writeFieldBegin('floating_ip', TType.STRING, 2) - oprot.writeString(self.floating_ip.encode('utf-8') if sys.version_info[0] == 2 else self.floating_ip) + oprot.writeFieldBegin("floating_ip", TType.STRING, 2) + oprot.writeString( + self.floating_ip.encode("utf-8") + if sys.version_info[0] == 2 + else self.floating_ip + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8353,20 +10402,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(detach_ip_from_server_args) detach_ip_from_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'floating_ip', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "floating_ip", + "UTF8", + None, + ), # 2 ) @@ -8377,12 +10439,18 @@ class detach_ip_from_server_result(object): """ - - def __init__(self, s=None,): + def __init__( + self, + s=None, + ): self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8402,11 +10470,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_ip_from_server_result') + oprot.writeStructBegin("detach_ip_from_server_result") if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8416,19 +10486,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(detach_ip_from_server_result) detach_ip_from_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -8443,11 +10520,22 @@ class start_server_with_custom_key_args(object): - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids + - auth_token """ - - def __init__(self, flavor_name=None, image_name=None, servername=None, metadata=None, research_environment=None, volume_ids_path_new=None, volume_ids_path_attach=None, additional_security_group_ids=None,): + def __init__( + self, + flavor_name=None, + image_name=None, + servername=None, + metadata=None, + research_environment=None, + volume_ids_path_new=None, + volume_ids_path_attach=None, + additional_security_group_ids=None, + auth_token=None, + ): self.flavor_name = flavor_name self.image_name = image_name self.servername = servername @@ -8456,9 +10544,14 @@ def __init__(self, flavor_name=None, image_name=None, servername=None, metadata= self.volume_ids_path_new = volume_ids_path_new self.volume_ids_path_attach = volume_ids_path_attach self.additional_security_group_ids = additional_security_group_ids + self.auth_token = auth_token def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8468,77 +10561,130 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.servername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.MAP: self.metadata = {} - (_ktype166, _vtype167, _size165) = iprot.readMapBegin() - for _i169 in range(_size165): - _key170 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val171 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key170] = _val171 + (_ktype173, _vtype174, _size172) = iprot.readMapBegin() + for _i176 in range(_size172): + _key177 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val178 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key177] = _val178 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.research_environment = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.research_environment = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.LIST: self.volume_ids_path_new = [] - (_etype175, _size172) = iprot.readListBegin() - for _i176 in range(_size172): - _elem177 = {} - (_ktype179, _vtype180, _size178) = iprot.readMapBegin() - for _i182 in range(_size178): - _key183 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val184 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _elem177[_key183] = _val184 + (_etype182, _size179) = iprot.readListBegin() + for _i183 in range(_size179): + _elem184 = {} + (_ktype186, _vtype187, _size185) = iprot.readMapBegin() + for _i189 in range(_size185): + _key190 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val191 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _elem184[_key190] = _val191 iprot.readMapEnd() - self.volume_ids_path_new.append(_elem177) + self.volume_ids_path_new.append(_elem184) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.LIST: self.volume_ids_path_attach = [] - (_etype188, _size185) = iprot.readListBegin() - for _i189 in range(_size185): - _elem190 = {} - (_ktype192, _vtype193, _size191) = iprot.readMapBegin() - for _i195 in range(_size191): - _key196 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val197 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _elem190[_key196] = _val197 + (_etype195, _size192) = iprot.readListBegin() + for _i196 in range(_size192): + _elem197 = {} + (_ktype199, _vtype200, _size198) = iprot.readMapBegin() + for _i202 in range(_size198): + _key203 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val204 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _elem197[_key203] = _val204 iprot.readMapEnd() - self.volume_ids_path_attach.append(_elem190) + self.volume_ids_path_attach.append(_elem197) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.additional_security_group_ids = [] - (_etype201, _size198) = iprot.readListBegin() - for _i202 in range(_size198): - _elem203 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.additional_security_group_ids.append(_elem203) + (_etype208, _size205) = iprot.readListBegin() + for _i209 in range(_size205): + _elem210 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.additional_security_group_ids.append(_elem210) iprot.readListEnd() else: iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.auth_token = ( + 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() @@ -8546,62 +10692,110 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 kiter204, viter205 in self.metadata.items(): - oprot.writeString(kiter204.encode('utf-8') if sys.version_info[0] == 2 else kiter204) - oprot.writeString(viter205.encode('utf-8') if sys.version_info[0] == 2 else viter205) + for kiter211, viter212 in self.metadata.items(): + oprot.writeString( + kiter211.encode("utf-8") if sys.version_info[0] == 2 else kiter211 + ) + oprot.writeString( + viter212.encode("utf-8") if sys.version_info[0] == 2 else viter212 + ) 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 iter206 in self.volume_ids_path_new: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter206)) - for kiter207, viter208 in iter206.items(): - oprot.writeString(kiter207.encode('utf-8') if sys.version_info[0] == 2 else kiter207) - oprot.writeString(viter208.encode('utf-8') if sys.version_info[0] == 2 else viter208) + for iter213 in self.volume_ids_path_new: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter213)) + for kiter214, viter215 in iter213.items(): + oprot.writeString( + kiter214.encode("utf-8") + if sys.version_info[0] == 2 + else kiter214 + ) + oprot.writeString( + viter215.encode("utf-8") + if sys.version_info[0] == 2 + else viter215 + ) 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 iter209 in self.volume_ids_path_attach: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter209)) - for kiter210, viter211 in iter209.items(): - oprot.writeString(kiter210.encode('utf-8') if sys.version_info[0] == 2 else kiter210) - oprot.writeString(viter211.encode('utf-8') if sys.version_info[0] == 2 else viter211) + for iter216 in self.volume_ids_path_attach: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter216)) + for kiter217, viter218 in iter216.items(): + oprot.writeString( + kiter217.encode("utf-8") + if sys.version_info[0] == 2 + else kiter217 + ) + oprot.writeString( + viter218.encode("utf-8") + if sys.version_info[0] == 2 + else viter218 + ) 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 iter212 in self.additional_security_group_ids: - oprot.writeString(iter212.encode('utf-8') if sys.version_info[0] == 2 else iter212) + for iter219 in self.additional_security_group_ids: + oprot.writeString( + iter219.encode("utf-8") if sys.version_info[0] == 2 else iter219 + ) oprot.writeListEnd() oprot.writeFieldEnd() + if self.auth_token is not None: + oprot.writeFieldBegin("auth_token", TType.STRING, 10) + oprot.writeString( + self.auth_token.encode("utf-8") + if sys.version_info[0] == 2 + else self.auth_token + ) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8609,27 +10803,83 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_server_with_custom_key_args) start_server_with_custom_key_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'flavor_name', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'servername', 'UTF8', None, ), # 3 - (4, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 - (5, TType.STRING, 'research_environment', 'UTF8', None, ), # 5 + ( + 1, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "servername", + "UTF8", + None, + ), # 3 + ( + 4, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "research_environment", + "UTF8", + None, + ), # 5 None, # 6 - (7, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 7 - (8, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 8 - (9, TType.LIST, 'additional_security_group_ids', (TType.STRING, 'UTF8', False), None, ), # 9 + ( + 7, + TType.LIST, + "volume_ids_path_new", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 7 + ( + 8, + TType.LIST, + "volume_ids_path_attach", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 8 + ( + 9, + TType.LIST, + "additional_security_group_ids", + (TType.STRING, "UTF8", False), + None, + ), # 9 + ( + 10, + TType.STRING, + "auth_token", + "UTF8", + None, + ), # 10 ) @@ -8645,8 +10895,15 @@ class start_server_with_custom_key_result(object): """ - - def __init__(self, success=None, e=None, r=None, i=None, f=None, d=None,): + def __init__( + self, + success=None, + e=None, + r=None, + i=None, + f=None, + d=None, + ): self.success = success self.e = e self.r = r @@ -8655,7 +10912,11 @@ def __init__(self, success=None, e=None, r=None, i=None, f=None, d=None,): self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8665,7 +10926,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -8700,31 +10965,37 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_server_with_custom_key_result') + oprot.writeStructBegin("start_server_with_custom_key_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.i is not None: - oprot.writeFieldBegin('i', TType.STRUCT, 3) + oprot.writeFieldBegin("i", TType.STRUCT, 3) self.i.write(oprot) oprot.writeFieldEnd() if self.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 4) + oprot.writeFieldBegin("f", TType.STRUCT, 4) self.f.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 5) + oprot.writeFieldBegin("d", TType.STRUCT, 5) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8734,23 +11005,60 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_server_with_custom_key_result) start_server_with_custom_key_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [NameAlreadyUsedException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ResourceNotAvailableException, None], None, ), # 2 - (3, TType.STRUCT, 'i', [ImageNotFoundException, None], None, ), # 3 - (4, TType.STRUCT, 'f', [FlavorNotFoundException, None], None, ), # 4 - (5, TType.STRUCT, 'd', [DefaultException, None], None, ), # 5 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [NameAlreadyUsedException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ResourceNotAvailableException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "i", + [ImageNotFoundException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "f", + [FlavorNotFoundException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 5 ) @@ -8761,12 +11069,18 @@ class exist_server_args(object): """ - - def __init__(self, name=None,): + def __init__( + self, + name=None, + ): self.name = name def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8776,7 +11090,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8786,12 +11104,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('exist_server_args') + oprot.writeStructBegin("exist_server_args") if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8800,19 +11122,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(exist_server_args) exist_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 ) @@ -8823,12 +11152,18 @@ class exist_server_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8848,11 +11183,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('exist_server_result') + oprot.writeStructBegin("exist_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8862,18 +11199,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(exist_server_result) exist_server_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) @@ -8890,8 +11234,16 @@ class create_and_deploy_playbook_args(object): """ - - def __init__(self, public_key=None, openstack_id=None, conda_packages=None, research_environment_template=None, apt_packages=None, create_only_backend=None, base_url=None,): + def __init__( + self, + public_key=None, + openstack_id=None, + conda_packages=None, + research_environment_template=None, + apt_packages=None, + create_only_backend=None, + base_url=None, + ): self.public_key = public_key self.openstack_id = openstack_id self.conda_packages = conda_packages @@ -8901,7 +11253,11 @@ def __init__(self, public_key=None, openstack_id=None, conda_packages=None, rese self.base_url = base_url def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8911,37 +11267,53 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.conda_packages = [] - (_etype216, _size213) = iprot.readListBegin() - for _i217 in range(_size213): - _elem218 = CondaPackage() - _elem218.read(iprot) - self.conda_packages.append(_elem218) + (_etype223, _size220) = iprot.readListBegin() + for _i224 in range(_size220): + _elem225 = CondaPackage() + _elem225.read(iprot) + self.conda_packages.append(_elem225) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.research_environment_template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.research_environment_template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.LIST: self.apt_packages = [] - (_etype222, _size219) = iprot.readListBegin() - for _i223 in range(_size219): - _elem224 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.apt_packages.append(_elem224) + (_etype229, _size226) = iprot.readListBegin() + for _i230 in range(_size226): + _elem231 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.apt_packages.append(_elem231) iprot.readListEnd() else: iprot.skip(ftype) @@ -8952,7 +11324,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.base_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.base_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8962,42 +11338,62 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_and_deploy_playbook_args') + oprot.writeStructBegin("create_and_deploy_playbook_args") if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 1) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 1) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 2) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 2) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.conda_packages is not None: - oprot.writeFieldBegin('conda_packages', TType.LIST, 3) + oprot.writeFieldBegin("conda_packages", TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.conda_packages)) - for iter225 in self.conda_packages: - iter225.write(oprot) + for iter232 in self.conda_packages: + iter232.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 iter226 in self.apt_packages: - oprot.writeString(iter226.encode('utf-8') if sys.version_info[0] == 2 else iter226) + for iter233 in self.apt_packages: + oprot.writeString( + iter233.encode("utf-8") if sys.version_info[0] == 2 else iter233 + ) 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() @@ -9006,25 +11402,68 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_and_deploy_playbook_args) create_and_deploy_playbook_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 - (2, TType.STRING, 'openstack_id', 'UTF8', None, ), # 2 - (3, TType.LIST, 'conda_packages', (TType.STRUCT, [CondaPackage, None], False), None, ), # 3 - (4, TType.STRING, 'research_environment_template', 'UTF8', None, ), # 4 - (5, TType.LIST, 'apt_packages', (TType.STRING, 'UTF8', False), None, ), # 5 - (6, TType.BOOL, 'create_only_backend', None, None, ), # 6 - (7, TType.STRING, 'base_url', 'UTF8', None, ), # 7 + ( + 1, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 2 + ( + 3, + TType.LIST, + "conda_packages", + (TType.STRUCT, [CondaPackage, None], False), + None, + ), # 3 + ( + 4, + TType.STRING, + "research_environment_template", + "UTF8", + None, + ), # 4 + ( + 5, + TType.LIST, + "apt_packages", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.BOOL, + "create_only_backend", + None, + None, + ), # 6 + ( + 7, + TType.STRING, + "base_url", + "UTF8", + None, + ), # 7 ) @@ -9036,13 +11475,20 @@ class create_and_deploy_playbook_result(object): """ - - def __init__(self, success=None, s=None,): + def __init__( + self, + success=None, + s=None, + ): self.success = success self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9067,15 +11513,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_and_deploy_playbook_result') + oprot.writeStructBegin("create_and_deploy_playbook_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeFieldBegin("success", TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 1) + oprot.writeFieldBegin("s", TType.STRUCT, 1) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9085,19 +11533,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_and_deploy_playbook_result) create_and_deploy_playbook_result.thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 's', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "s", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -9108,12 +11569,18 @@ class get_playbook_logs_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9123,7 +11590,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9133,12 +11604,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_playbook_logs_args') + oprot.writeStructBegin("get_playbook_logs_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9147,19 +11624,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_playbook_logs_args) get_playbook_logs_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -9171,13 +11655,20 @@ class get_playbook_logs_result(object): """ - - def __init__(self, success=None, p=None,): + def __init__( + self, + success=None, + p=None, + ): self.success = success self.p = p def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9203,15 +11694,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_playbook_logs_result') + oprot.writeStructBegin("get_playbook_logs_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.p is not None: - oprot.writeFieldBegin('p', TType.STRUCT, 1) + oprot.writeFieldBegin("p", TType.STRUCT, 1) self.p.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9221,27 +11714,43 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_playbook_logs_result) get_playbook_logs_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [PlaybookResult, None], None, ), # 0 - (1, TType.STRUCT, 'p', [PlaybookNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [PlaybookResult, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "p", + [PlaybookNotFoundException, None], + None, + ), # 1 ) class has_forc_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9256,9 +11765,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('has_forc_args') + oprot.writeStructBegin("has_forc_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -9266,18 +11777,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): @@ -9287,12 +11798,18 @@ class has_forc_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9312,11 +11829,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('has_forc_result') + oprot.writeStructBegin("has_forc_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9326,26 +11845,36 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(has_forc_result) has_forc_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) class get_forc_url_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9360,9 +11889,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_forc_url_args') + oprot.writeStructBegin("get_forc_url_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -9370,18 +11901,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): @@ -9391,12 +11922,18 @@ class get_forc_url_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9406,7 +11943,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9416,12 +11957,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_forc_url_result') + oprot.writeStructBegin("get_forc_url_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9430,18 +11977,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_forc_url_result) get_forc_url_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -9455,15 +12009,24 @@ class create_backend_args(object): """ - - def __init__(self, owner=None, user_path=None, template=None, upstream_url=None,): + def __init__( + self, + owner=None, + user_path=None, + template=None, + upstream_url=None, + ): self.owner = owner self.user_path = user_path self.template = template self.upstream_url = upstream_url def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9473,22 +12036,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.owner = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_path = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_path = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.upstream_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.upstream_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9498,24 +12077,40 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_backend_args') + oprot.writeStructBegin("create_backend_args") if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 1) - oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) + oprot.writeFieldBegin("owner", TType.STRING, 1) + oprot.writeString( + self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner + ) oprot.writeFieldEnd() if self.user_path is not None: - oprot.writeFieldBegin('user_path', TType.STRING, 2) - oprot.writeString(self.user_path.encode('utf-8') if sys.version_info[0] == 2 else self.user_path) + oprot.writeFieldBegin("user_path", TType.STRING, 2) + oprot.writeString( + self.user_path.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_path + ) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin('template', TType.STRING, 3) - oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) + oprot.writeFieldBegin("template", TType.STRING, 3) + oprot.writeString( + self.template.encode("utf-8") + if sys.version_info[0] == 2 + else self.template + ) oprot.writeFieldEnd() if self.upstream_url is not None: - oprot.writeFieldBegin('upstream_url', TType.STRING, 4) - oprot.writeString(self.upstream_url.encode('utf-8') if sys.version_info[0] == 2 else self.upstream_url) + oprot.writeFieldBegin("upstream_url", TType.STRING, 4) + oprot.writeString( + self.upstream_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.upstream_url + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9524,22 +12119,47 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_backend_args) create_backend_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 - (2, TType.STRING, 'user_path', 'UTF8', None, ), # 2 - (3, TType.STRING, 'template', 'UTF8', None, ), # 3 - (4, TType.STRING, 'upstream_url', 'UTF8', None, ), # 4 + ( + 1, + TType.STRING, + "owner", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "user_path", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "template", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "upstream_url", + "UTF8", + None, + ), # 4 ) @@ -9552,14 +12172,22 @@ class create_backend_result(object): """ - - def __init__(self, success=None, e=None, d=None,): + def __init__( + self, + success=None, + e=None, + d=None, + ): self.success = success self.e = e self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9590,19 +12218,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_backend_result') + oprot.writeStructBegin("create_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 2) + oprot.writeFieldBegin("d", TType.STRUCT, 2) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9612,28 +12242,50 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_backend_result) create_backend_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 - (1, TType.STRUCT, 'e', [TemplateNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'd', [DefaultException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Backend, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [TemplateNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 2 ) class get_backends_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9648,9 +12300,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_args') + oprot.writeStructBegin("get_backends_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -9658,18 +12312,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): @@ -9680,13 +12334,20 @@ class get_backends_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9697,11 +12358,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype230, _size227) = iprot.readListBegin() - for _i231 in range(_size227): - _elem232 = Backend() - _elem232.read(iprot) - self.success.append(_elem232) + (_etype237, _size234) = iprot.readListBegin() + for _i238 in range(_size234): + _elem239 = Backend() + _elem239.read(iprot) + self.success.append(_elem239) iprot.readListEnd() else: iprot.skip(ftype) @@ -9717,18 +12378,20 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_result') + oprot.writeStructBegin("get_backends_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter233 in self.success: - iter233.write(oprot) + for iter240 in self.success: + iter240.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() @@ -9738,19 +12401,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_result) get_backends_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -9761,12 +12437,18 @@ class get_backends_by_owner_args(object): """ - - def __init__(self, owner=None,): + def __init__( + self, + owner=None, + ): self.owner = owner def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9776,7 +12458,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.owner = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9786,12 +12472,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_owner_args') + oprot.writeStructBegin("get_backends_by_owner_args") if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 1) - oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) + oprot.writeFieldBegin("owner", TType.STRING, 1) + oprot.writeString( + self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9800,19 +12490,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_by_owner_args) get_backends_by_owner_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'owner', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "owner", + "UTF8", + None, + ), # 1 ) @@ -9824,13 +12521,20 @@ class get_backends_by_owner_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9841,11 +12545,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype237, _size234) = iprot.readListBegin() - for _i238 in range(_size234): - _elem239 = Backend() - _elem239.read(iprot) - self.success.append(_elem239) + (_etype244, _size241) = iprot.readListBegin() + for _i245 in range(_size241): + _elem246 = Backend() + _elem246.read(iprot) + self.success.append(_elem246) iprot.readListEnd() else: iprot.skip(ftype) @@ -9861,18 +12565,20 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_owner_result') + oprot.writeStructBegin("get_backends_by_owner_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter240 in self.success: - iter240.write(oprot) + for iter247 in self.success: + iter247.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() @@ -9882,19 +12588,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_by_owner_result) get_backends_by_owner_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -9905,12 +12624,18 @@ class get_backends_by_template_args(object): """ - - def __init__(self, template=None,): + def __init__( + self, + template=None, + ): self.template = template def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9920,7 +12645,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9930,12 +12659,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_template_args') + oprot.writeStructBegin("get_backends_by_template_args") if self.template is not None: - oprot.writeFieldBegin('template', TType.STRING, 1) - oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) + oprot.writeFieldBegin("template", TType.STRING, 1) + oprot.writeString( + self.template.encode("utf-8") + if sys.version_info[0] == 2 + else self.template + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9944,19 +12679,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_by_template_args) get_backends_by_template_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'template', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "template", + "UTF8", + None, + ), # 1 ) @@ -9968,13 +12710,20 @@ class get_backends_by_template_result(object): """ - - def __init__(self, success=None, d=None,): + def __init__( + self, + success=None, + d=None, + ): self.success = success self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9985,11 +12734,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype244, _size241) = iprot.readListBegin() - for _i245 in range(_size241): - _elem246 = Backend() - _elem246.read(iprot) - self.success.append(_elem246) + (_etype251, _size248) = iprot.readListBegin() + for _i252 in range(_size248): + _elem253 = Backend() + _elem253.read(iprot) + self.success.append(_elem253) iprot.readListEnd() else: iprot.skip(ftype) @@ -10005,18 +12754,20 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backends_by_template_result') + oprot.writeStructBegin("get_backends_by_template_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter247 in self.success: - iter247.write(oprot) + for iter254 in self.success: + iter254.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() @@ -10026,19 +12777,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backends_by_template_result) get_backends_by_template_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 - (1, TType.STRUCT, 'd', [DefaultException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "d", + [DefaultException, None], + None, + ), # 1 ) @@ -10049,12 +12813,18 @@ class get_backend_by_id_args(object): """ - - def __init__(self, id=None,): + def __init__( + self, + id=None, + ): self.id = id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10074,11 +12844,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backend_by_id_args') + oprot.writeStructBegin("get_backend_by_id_args") if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeFieldBegin("id", TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10088,19 +12860,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_backend_by_id_args) get_backend_by_id_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 ) @@ -10113,14 +12892,22 @@ class get_backend_by_id_result(object): """ - - def __init__(self, success=None, b=None, d=None,): + def __init__( + self, + success=None, + b=None, + d=None, + ): self.success = success self.b = b self.d = d def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10151,19 +12938,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_backend_by_id_result') + oprot.writeStructBegin("get_backend_by_id_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() if self.d is not None: - oprot.writeFieldBegin('d', TType.STRUCT, 2) + oprot.writeFieldBegin("d", TType.STRUCT, 2) self.d.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10173,20 +12962,561 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(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 +) + + +class set_metadata_server_data_args(object): + """ + Attributes: + - ip + - metadata + + """ + + 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 + ): + 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.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.STRUCT: + self.metadata = VirtualMachineServerMetadata() + self.metadata.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("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.writeFieldEnd() + if self.metadata is not None: + oprot.writeFieldBegin("metadata", TType.STRUCT, 2) + self.metadata.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(set_metadata_server_data_args) +set_metadata_server_data_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "ip", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRUCT, + "metadata", + [VirtualMachineServerMetadata, None], + None, + ), # 2 +) + + +class set_metadata_server_data_result(object): + """ + Attributes: + - m + - b + + """ + + 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 + ): + 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.m = MetadataServerNotAvailableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.b = MetadataServerNotAllowedException.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("set_metadata_server_data_result") + if self.m is not None: + oprot.writeFieldBegin("m", TType.STRUCT, 1) + self.m.write(oprot) + oprot.writeFieldEnd() + if self.b is not None: + oprot.writeFieldBegin("b", TType.STRUCT, 2) + self.b.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(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 +) + + +class remove_metadata_server_data_args(object): + """ + Attributes: + - ip + + """ + + 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 + ): + 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.ip = ( + 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("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.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(remove_metadata_server_data_args) +remove_metadata_server_data_args.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "ip", + "UTF8", + None, + ), # 1 +) + + +class remove_metadata_server_data_result(object): + """ + Attributes: + - m + - b + + """ + + 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 + ): + 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.m = MetadataServerNotAvailableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.b = MetadataServerNotAllowedException.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("remove_metadata_server_data_result") + if self.m is not None: + oprot.writeFieldBegin("m", TType.STRUCT, 1) + self.m.write(oprot) + oprot.writeFieldEnd() + if self.b is not None: + oprot.writeFieldBegin("b", TType.STRUCT, 2) + self.b.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(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 +) + + +class is_metadata_server_available_args(object): + + def read(self, iprot): + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): + 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 + 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("is_metadata_server_available_args") + 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(is_metadata_server_available_args) +is_metadata_server_available_args.thrift_spec = () + + +class is_metadata_server_available_result(object): + """ + Attributes: + - m + - b + + """ + + 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 + ): + 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.m = MetadataServerNotAvailableException.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.b = MetadataServerNotAllowedException.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("is_metadata_server_available_result") + if self.m is not None: + oprot.writeFieldBegin("m", TType.STRUCT, 1) + self.m.write(oprot) + oprot.writeFieldEnd() + if self.b is not None: + oprot.writeFieldBegin("b", TType.STRUCT, 2) + self.b.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(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 ) @@ -10197,12 +13527,18 @@ class delete_backend_args(object): """ - - def __init__(self, id=None,): + def __init__( + self, + id=None, + ): self.id = id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10222,11 +13558,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_backend_args') + oprot.writeStructBegin("delete_backend_args") if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeFieldBegin("id", TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10236,19 +13574,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_backend_args) delete_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 ) @@ -10259,12 +13604,18 @@ class delete_backend_result(object): """ - - def __init__(self, b=None,): + def __init__( + self, + b=None, + ): self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10284,11 +13635,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_backend_result') + oprot.writeStructBegin("delete_backend_result") if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10298,19 +13651,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_backend_result) delete_backend_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -10322,13 +13682,20 @@ class add_user_to_backend_args(object): """ - - def __init__(self, backend_id=None, user_id=None,): + def __init__( + self, + backend_id=None, + user_id=None, + ): self.backend_id = backend_id self.user_id = user_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10343,7 +13710,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10353,16 +13724,22 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_user_to_backend_args') + oprot.writeStructBegin("add_user_to_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin('user_id', TType.STRING, 2) - oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) + oprot.writeFieldBegin("user_id", TType.STRING, 2) + oprot.writeString( + self.user_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10371,20 +13748,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_user_to_backend_args) add_user_to_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 - (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 2 ) @@ -10396,13 +13786,20 @@ class add_user_to_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10413,11 +13810,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype249, _vtype250, _size248) = iprot.readMapBegin() - for _i252 in range(_size248): - _key253 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val254 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key253] = _val254 + (_ktype256, _vtype257, _size255) = iprot.readMapBegin() + for _i259 in range(_size255): + _key260 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val261 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key260] = _val261 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10433,19 +13838,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_user_to_backend_result') + oprot.writeStructBegin("add_user_to_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter255, viter256 in self.success.items(): - oprot.writeString(kiter255.encode('utf-8') if sys.version_info[0] == 2 else kiter255) - oprot.writeString(viter256.encode('utf-8') if sys.version_info[0] == 2 else viter256) + for kiter262, viter263 in self.success.items(): + oprot.writeString( + kiter262.encode("utf-8") if sys.version_info[0] == 2 else kiter262 + ) + oprot.writeString( + viter263.encode("utf-8") if sys.version_info[0] == 2 else viter263 + ) 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() @@ -10455,19 +13866,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_user_to_backend_result) add_user_to_backend_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -10478,12 +13902,18 @@ class get_users_from_backend_args(object): """ - - def __init__(self, backend_id=None,): + def __init__( + self, + backend_id=None, + ): self.backend_id = backend_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10503,11 +13933,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_users_from_backend_args') + oprot.writeStructBegin("get_users_from_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10517,19 +13949,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_users_from_backend_args) get_users_from_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 ) @@ -10541,13 +13980,20 @@ class get_users_from_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10558,10 +14004,14 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype260, _size257) = iprot.readListBegin() - for _i261 in range(_size257): - _elem262 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success.append(_elem262) + (_etype267, _size264) = iprot.readListBegin() + for _i268 in range(_size264): + _elem269 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success.append(_elem269) iprot.readListEnd() else: iprot.skip(ftype) @@ -10577,18 +14027,22 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_users_from_backend_result') + oprot.writeStructBegin("get_users_from_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter263 in self.success: - oprot.writeString(iter263.encode('utf-8') if sys.version_info[0] == 2 else iter263) + for iter270 in self.success: + oprot.writeString( + iter270.encode("utf-8") if sys.version_info[0] == 2 else iter270 + ) 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() @@ -10598,19 +14052,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_users_from_backend_result) get_users_from_backend_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) @@ -10622,13 +14089,20 @@ class delete_user_from_backend_args(object): """ - - def __init__(self, backend_id=None, user_id=None,): + def __init__( + self, + backend_id=None, + user_id=None, + ): self.backend_id = backend_id self.user_id = user_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10643,7 +14117,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10653,16 +14131,22 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_user_from_backend_args') + oprot.writeStructBegin("delete_user_from_backend_args") if self.backend_id is not None: - oprot.writeFieldBegin('backend_id', TType.I64, 1) + oprot.writeFieldBegin("backend_id", TType.I64, 1) oprot.writeI64(self.backend_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin('user_id', TType.STRING, 2) - oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) + oprot.writeFieldBegin("user_id", TType.STRING, 2) + oprot.writeString( + self.user_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10671,20 +14155,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_user_from_backend_args) delete_user_from_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 - (2, TType.STRING, 'user_id', 'UTF8', None, ), # 2 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 2 ) @@ -10696,13 +14193,20 @@ class delete_user_from_backend_result(object): """ - - def __init__(self, success=None, b=None,): + def __init__( + self, + success=None, + b=None, + ): self.success = success self.b = b def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10713,11 +14217,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype265, _vtype266, _size264) = iprot.readMapBegin() - for _i268 in range(_size264): - _key269 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val270 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key269] = _val270 + (_ktype272, _vtype273, _size271) = iprot.readMapBegin() + for _i275 in range(_size271): + _key276 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val277 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key276] = _val277 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10733,19 +14245,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_user_from_backend_result') + oprot.writeStructBegin("delete_user_from_backend_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter271, viter272 in self.success.items(): - oprot.writeString(kiter271.encode('utf-8') if sys.version_info[0] == 2 else kiter271) - oprot.writeString(viter272.encode('utf-8') if sys.version_info[0] == 2 else viter272) + for kiter278, viter279 in self.success.items(): + oprot.writeString( + kiter278.encode("utf-8") if sys.version_info[0] == 2 else kiter278 + ) + oprot.writeString( + viter279.encode("utf-8") if sys.version_info[0] == 2 else viter279 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.b is not None: - oprot.writeFieldBegin('b', TType.STRUCT, 1) + oprot.writeFieldBegin("b", TType.STRUCT, 1) self.b.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10755,27 +14273,43 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_user_from_backend_result) delete_user_from_backend_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'b', [BackendNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "b", + [BackendNotFoundException, None], + None, + ), # 1 ) class get_allowed_templates_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10790,9 +14324,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_allowed_templates_args') + oprot.writeStructBegin("get_allowed_templates_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -10800,18 +14336,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): @@ -10821,12 +14357,18 @@ class get_allowed_templates_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10837,11 +14379,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype276, _size273) = iprot.readListBegin() - for _i277 in range(_size273): - _elem278 = ResearchEnvironmentTemplate() - _elem278.read(iprot) - self.success.append(_elem278) + (_etype283, _size280) = iprot.readListBegin() + for _i284 in range(_size280): + _elem285 = ResearchEnvironmentTemplate() + _elem285.read(iprot) + self.success.append(_elem285) iprot.readListEnd() else: iprot.skip(ftype) @@ -10852,14 +14394,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter279 in self.success: - iter279.write(oprot) + for iter286 in self.success: + iter286.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10869,26 +14413,36 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_allowed_templates_result) get_allowed_templates_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [ResearchEnvironmentTemplate, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [ResearchEnvironmentTemplate, None], False), + None, + ), # 0 ) class get_servers_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10903,9 +14457,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_args') + oprot.writeStructBegin("get_servers_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -10913,18 +14469,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): @@ -10934,12 +14490,18 @@ class get_servers_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10950,11 +14512,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype283, _size280) = iprot.readListBegin() - for _i284 in range(_size280): - _elem285 = VM() - _elem285.read(iprot) - self.success.append(_elem285) + (_etype290, _size287) = iprot.readListBegin() + for _i291 in range(_size287): + _elem292 = VM() + _elem292.read(iprot) + self.success.append(_elem292) iprot.readListEnd() else: iprot.skip(ftype) @@ -10965,14 +14527,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter286 in self.success: - iter286.write(oprot) + for iter293 in self.success: + iter293.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10982,18 +14546,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_result) get_servers_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -11004,12 +14575,18 @@ class get_servers_by_ids_args(object): """ - - def __init__(self, server_ids=None,): + def __init__( + self, + server_ids=None, + ): self.server_ids = server_ids def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11020,10 +14597,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.server_ids = [] - (_etype290, _size287) = iprot.readListBegin() - for _i291 in range(_size287): - _elem292 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.server_ids.append(_elem292) + (_etype297, _size294) = iprot.readListBegin() + for _i298 in range(_size294): + _elem299 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.server_ids.append(_elem299) iprot.readListEnd() else: iprot.skip(ftype) @@ -11034,14 +14615,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_ids_args') + oprot.writeStructBegin("get_servers_by_ids_args") if self.server_ids is not None: - oprot.writeFieldBegin('server_ids', TType.LIST, 1) + oprot.writeFieldBegin("server_ids", TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.server_ids)) - for iter293 in self.server_ids: - oprot.writeString(iter293.encode('utf-8') if sys.version_info[0] == 2 else iter293) + for iter300 in self.server_ids: + oprot.writeString( + iter300.encode("utf-8") if sys.version_info[0] == 2 else iter300 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11051,19 +14636,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_by_ids_args) get_servers_by_ids_args.thrift_spec = ( None, # 0 - (1, TType.LIST, 'server_ids', (TType.STRING, 'UTF8', False), None, ), # 1 + ( + 1, + TType.LIST, + "server_ids", + (TType.STRING, "UTF8", False), + None, + ), # 1 ) @@ -11074,12 +14666,18 @@ class get_servers_by_ids_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11090,11 +14688,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype297, _size294) = iprot.readListBegin() - for _i298 in range(_size294): - _elem299 = VM() - _elem299.read(iprot) - self.success.append(_elem299) + (_etype304, _size301) = iprot.readListBegin() + for _i305 in range(_size301): + _elem306 = VM() + _elem306.read(iprot) + self.success.append(_elem306) iprot.readListEnd() else: iprot.skip(ftype) @@ -11105,14 +14703,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter300 in self.success: - iter300.write(oprot) + for iter307 in self.success: + iter307.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11122,18 +14722,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_by_ids_result) get_servers_by_ids_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -11144,12 +14751,18 @@ class get_servers_by_bibigrid_id_args(object): """ - - def __init__(self, bibigrid_id=None,): + def __init__( + self, + bibigrid_id=None, + ): self.bibigrid_id = bibigrid_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11159,7 +14772,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.bibigrid_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.bibigrid_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11169,12 +14786,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_bibigrid_id_args') + oprot.writeStructBegin("get_servers_by_bibigrid_id_args") if self.bibigrid_id is not None: - oprot.writeFieldBegin('bibigrid_id', TType.STRING, 1) - oprot.writeString(self.bibigrid_id.encode('utf-8') if sys.version_info[0] == 2 else self.bibigrid_id) + oprot.writeFieldBegin("bibigrid_id", TType.STRING, 1) + oprot.writeString( + self.bibigrid_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.bibigrid_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11183,19 +14806,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_by_bibigrid_id_args) get_servers_by_bibigrid_id_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'bibigrid_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "bibigrid_id", + "UTF8", + None, + ), # 1 ) @@ -11206,12 +14836,18 @@ class get_servers_by_bibigrid_id_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11222,11 +14858,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype304, _size301) = iprot.readListBegin() - for _i305 in range(_size301): - _elem306 = VM() - _elem306.read(iprot) - self.success.append(_elem306) + (_etype311, _size308) = iprot.readListBegin() + for _i312 in range(_size308): + _elem313 = VM() + _elem313.read(iprot) + self.success.append(_elem313) iprot.readListEnd() else: iprot.skip(ftype) @@ -11237,14 +14873,16 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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 iter307 in self.success: - iter307.write(oprot) + for iter314 in self.success: + iter314.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11254,18 +14892,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_servers_by_bibigrid_id_result) get_servers_by_bibigrid_id_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [VM, None], False), + None, + ), # 0 ) @@ -11282,8 +14927,16 @@ class scale_up_cluster_args(object): """ - - def __init__(self, cluster_id=None, image_name=None, flavor_name=None, count=None, names=None, start_idx=None, batch_idx=None,): + def __init__( + self, + cluster_id=None, + image_name=None, + flavor_name=None, + count=None, + names=None, + start_idx=None, + batch_idx=None, + ): self.cluster_id = cluster_id self.image_name = image_name self.flavor_name = flavor_name @@ -11293,7 +14946,11 @@ def __init__(self, cluster_id=None, image_name=None, flavor_name=None, count=Non self.batch_idx = batch_idx def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11303,17 +14960,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -11324,10 +14993,14 @@ def read(self, iprot): elif fid == 5: if ftype == TType.LIST: self.names = [] - (_etype311, _size308) = iprot.readListBegin() - for _i312 in range(_size308): - _elem313 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.names.append(_elem313) + (_etype318, _size315) = iprot.readListBegin() + for _i319 in range(_size315): + _elem320 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.names.append(_elem320) iprot.readListEnd() else: iprot.skip(ftype) @@ -11348,38 +15021,54 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('scale_up_cluster_args') + oprot.writeStructBegin("scale_up_cluster_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin('image_name', TType.STRING, 2) - oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) + oprot.writeFieldBegin("image_name", TType.STRING, 2) + oprot.writeString( + self.image_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_name + ) oprot.writeFieldEnd() if self.flavor_name is not None: - oprot.writeFieldBegin('flavor_name', TType.STRING, 3) - oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) + oprot.writeFieldBegin("flavor_name", TType.STRING, 3) + oprot.writeString( + self.flavor_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.flavor_name + ) oprot.writeFieldEnd() if self.count is not None: - oprot.writeFieldBegin('count', TType.I32, 4) + oprot.writeFieldBegin("count", TType.I32, 4) oprot.writeI32(self.count) oprot.writeFieldEnd() if self.names is not None: - oprot.writeFieldBegin('names', TType.LIST, 5) + oprot.writeFieldBegin("names", TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.names)) - for iter314 in self.names: - oprot.writeString(iter314.encode('utf-8') if sys.version_info[0] == 2 else iter314) + for iter321 in self.names: + oprot.writeString( + iter321.encode("utf-8") if sys.version_info[0] == 2 else iter321 + ) 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() @@ -11389,25 +15078,68 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(scale_up_cluster_args) scale_up_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image_name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'flavor_name', 'UTF8', None, ), # 3 - (4, TType.I32, 'count', None, None, ), # 4 - (5, TType.LIST, 'names', (TType.STRING, 'UTF8', False), None, ), # 5 - (6, TType.I32, 'start_idx', None, None, ), # 6 - (7, TType.I32, 'batch_idx', None, None, ), # 7 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 3 + ( + 4, + TType.I32, + "count", + None, + None, + ), # 4 + ( + 5, + TType.LIST, + "names", + (TType.STRING, "UTF8", False), + None, + ), # 5 + ( + 6, + TType.I32, + "start_idx", + None, + None, + ), # 6 + ( + 7, + TType.I32, + "batch_idx", + None, + None, + ), # 7 ) @@ -11418,12 +15150,18 @@ class scale_up_cluster_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11434,16 +15172,24 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype316, _vtype317, _size315) = iprot.readMapBegin() - for _i319 in range(_size315): - _key320 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val321 = [] - (_etype325, _size322) = iprot.readListBegin() - for _i326 in range(_size322): - _elem327 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val321.append(_elem327) + (_ktype323, _vtype324, _size322) = iprot.readMapBegin() + for _i326 in range(_size322): + _key327 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val328 = [] + (_etype332, _size329) = iprot.readListBegin() + for _i333 in range(_size329): + _elem334 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val328.append(_elem334) iprot.readListEnd() - self.success[_key320] = _val321 + self.success[_key327] = _val328 iprot.readMapEnd() else: iprot.skip(ftype) @@ -11454,17 +15200,23 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('scale_up_cluster_result') + oprot.writeStructBegin("scale_up_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.success)) - for kiter328, viter329 in self.success.items(): - oprot.writeString(kiter328.encode('utf-8') if sys.version_info[0] == 2 else kiter328) - oprot.writeListBegin(TType.STRING, len(viter329)) - for iter330 in viter329: - oprot.writeString(iter330.encode('utf-8') if sys.version_info[0] == 2 else iter330) + for kiter335, viter336 in self.success.items(): + oprot.writeString( + kiter335.encode("utf-8") if sys.version_info[0] == 2 else kiter335 + ) + oprot.writeListBegin(TType.STRING, len(viter336)) + for iter337 in viter336: + oprot.writeString( + iter337.encode("utf-8") if sys.version_info[0] == 2 else iter337 + ) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -11475,18 +15227,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(scale_up_cluster_result) scale_up_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.LIST, (TType.STRING, 'UTF8', False), False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.LIST, (TType.STRING, "UTF8", False), False), + None, + ), # 0 ) @@ -11505,8 +15264,18 @@ class add_cluster_machine_args(object): """ - - def __init__(self, cluster_id=None, cluster_user=None, cluster_group_id=None, image_name=None, flavor_name=None, name=None, key_name=None, batch_idx=None, worker_idx=None,): + def __init__( + self, + cluster_id=None, + cluster_user=None, + cluster_group_id=None, + image_name=None, + flavor_name=None, + name=None, + key_name=None, + batch_idx=None, + worker_idx=None, + ): self.cluster_id = cluster_id self.cluster_user = cluster_user self.cluster_group_id = cluster_group_id @@ -11518,7 +15287,11 @@ def __init__(self, cluster_id=None, cluster_user=None, cluster_group_id=None, im self.worker_idx = worker_idx def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11528,37 +15301,65 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.cluster_user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_user = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.cluster_group_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_group_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.image_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.flavor_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.flavor_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.key_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 8: @@ -11578,43 +15379,71 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_cluster_machine_args') + oprot.writeStructBegin("add_cluster_machine_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() if self.cluster_user is not None: - oprot.writeFieldBegin('cluster_user', TType.STRING, 2) - oprot.writeString(self.cluster_user.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_user) + oprot.writeFieldBegin("cluster_user", TType.STRING, 2) + oprot.writeString( + self.cluster_user.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_user + ) oprot.writeFieldEnd() if self.cluster_group_id is not None: - oprot.writeFieldBegin('cluster_group_id', TType.STRING, 3) - oprot.writeString(self.cluster_group_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_group_id) + oprot.writeFieldBegin("cluster_group_id", TType.STRING, 3) + oprot.writeString( + self.cluster_group_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_group_id + ) oprot.writeFieldEnd() if self.image_name is not None: - oprot.writeFieldBegin('image_name', TType.STRING, 4) - oprot.writeString(self.image_name.encode('utf-8') if sys.version_info[0] == 2 else self.image_name) + oprot.writeFieldBegin("image_name", TType.STRING, 4) + oprot.writeString( + self.image_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_name + ) oprot.writeFieldEnd() if self.flavor_name is not None: - oprot.writeFieldBegin('flavor_name', TType.STRING, 5) - oprot.writeString(self.flavor_name.encode('utf-8') if sys.version_info[0] == 2 else self.flavor_name) + oprot.writeFieldBegin("flavor_name", TType.STRING, 5) + oprot.writeString( + self.flavor_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.flavor_name + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 6) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 6) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.key_name is not None: - oprot.writeFieldBegin('key_name', TType.STRING, 7) - oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) + oprot.writeFieldBegin("key_name", TType.STRING, 7) + oprot.writeString( + self.key_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.key_name + ) oprot.writeFieldEnd() if self.batch_idx is not None: - oprot.writeFieldBegin('batch_idx', TType.I32, 8) + oprot.writeFieldBegin("batch_idx", TType.I32, 8) oprot.writeI32(self.batch_idx) oprot.writeFieldEnd() if self.worker_idx is not None: - oprot.writeFieldBegin('worker_idx', TType.I32, 9) + oprot.writeFieldBegin("worker_idx", TType.I32, 9) oprot.writeI32(self.worker_idx) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11624,27 +15453,82 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_cluster_machine_args) add_cluster_machine_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'cluster_user', 'UTF8', None, ), # 2 - (3, TType.STRING, 'cluster_group_id', 'UTF8', None, ), # 3 - (4, TType.STRING, 'image_name', 'UTF8', None, ), # 4 - (5, TType.STRING, 'flavor_name', 'UTF8', None, ), # 5 - (6, TType.STRING, 'name', 'UTF8', None, ), # 6 - (7, TType.STRING, 'key_name', 'UTF8', None, ), # 7 - (8, TType.I32, 'batch_idx', None, None, ), # 8 - (9, TType.I32, 'worker_idx', None, None, ), # 9 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "cluster_user", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "cluster_group_id", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "image_name", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "flavor_name", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "name", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "key_name", + "UTF8", + None, + ), # 7 + ( + 8, + TType.I32, + "batch_idx", + None, + None, + ), # 8 + ( + 9, + TType.I32, + "worker_idx", + None, + None, + ), # 9 ) @@ -11655,12 +15539,18 @@ class add_cluster_machine_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11670,7 +15560,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11680,12 +15574,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_cluster_machine_result') + oprot.writeStructBegin("add_cluster_machine_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11694,18 +15594,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_cluster_machine_result) add_cluster_machine_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -11716,12 +15623,18 @@ class get_cluster_info_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11731,7 +15644,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11741,12 +15658,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_info_args') + oprot.writeStructBegin("get_cluster_info_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11755,19 +15678,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_cluster_info_args) get_cluster_info_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -11779,13 +15709,20 @@ class get_cluster_info_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11811,15 +15748,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_info_result') + oprot.writeStructBegin("get_cluster_info_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11829,19 +15768,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_cluster_info_result) get_cluster_info_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [ClusterInfo, None], None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [ClusterInfo, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -11852,12 +15804,18 @@ class get_cluster_status_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11867,7 +15825,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11877,12 +15839,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_status_args') + oprot.writeStructBegin("get_cluster_status_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11891,19 +15859,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_cluster_status_args) get_cluster_status_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -11915,13 +15890,20 @@ class get_cluster_status_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11932,11 +15914,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype332, _vtype333, _size331) = iprot.readMapBegin() - for _i335 in range(_size331): - _key336 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val337 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key336] = _val337 + (_ktype339, _vtype340, _size338) = iprot.readMapBegin() + for _i342 in range(_size338): + _key343 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val344 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key343] = _val344 iprot.readMapEnd() else: iprot.skip(ftype) @@ -11952,19 +15942,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_cluster_status_result') + oprot.writeStructBegin("get_cluster_status_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter338, viter339 in self.success.items(): - oprot.writeString(kiter338.encode('utf-8') if sys.version_info[0] == 2 else kiter338) - oprot.writeString(viter339.encode('utf-8') if sys.version_info[0] == 2 else viter339) + for kiter345, viter346 in self.success.items(): + oprot.writeString( + kiter345.encode("utf-8") if sys.version_info[0] == 2 else kiter345 + ) + oprot.writeString( + viter346.encode("utf-8") if sys.version_info[0] == 2 else viter346 + ) 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() @@ -11974,19 +15970,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_cluster_status_result) get_cluster_status_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -11997,12 +16006,18 @@ class get_keypair_public_key_by_name_args(object): """ - - 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() @@ -12012,7 +16027,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.key_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12022,12 +16041,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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() @@ -12036,19 +16061,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_keypair_public_key_by_name_args) get_keypair_public_key_by_name_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'key_name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "key_name", + "UTF8", + None, + ), # 1 ) @@ -12059,12 +16091,18 @@ class get_keypair_public_key_by_name_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12074,7 +16112,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12084,12 +16126,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_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() @@ -12098,18 +16146,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_keypair_public_key_by_name_result) get_keypair_public_key_by_name_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -12120,12 +16175,18 @@ class delete_keypair_args(object): """ - - 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() @@ -12135,7 +16196,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.key_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12145,12 +16210,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_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() @@ -12159,27 +16230,37 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(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): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12194,9 +16275,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_keypair_result') + oprot.writeStructBegin("delete_keypair_result") oprot.writeFieldStop() oprot.writeStructEnd() @@ -12204,18 +16287,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): @@ -12225,12 +16308,18 @@ class add_default_security_groups_to_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12240,7 +16329,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12250,12 +16343,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('add_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() @@ -12264,19 +16363,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_default_security_groups_to_server_args) add_default_security_groups_to_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -12287,12 +16393,18 @@ class add_default_security_groups_to_server_result(object): """ - - def __init__(self, e=None,): + def __init__( + self, + e=None, + ): self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12312,11 +16424,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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() @@ -12326,19 +16440,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_default_security_groups_to_server_result) add_default_security_groups_to_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -12349,12 +16470,18 @@ class get_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12364,7 +16491,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12374,12 +16505,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_server_args') + oprot.writeStructBegin("get_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12388,19 +16525,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_server_args) get_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -12412,13 +16556,20 @@ class get_server_result(object): """ - - def __init__(self, success=None, e=None,): + def __init__( + self, + success=None, + e=None, + ): self.success = success self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12444,15 +16595,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_server_result') + oprot.writeStructBegin("get_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12462,19 +16615,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_server_result) get_server_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [VM, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -12485,12 +16651,18 @@ class get_server_by_unique_name_args(object): """ - - 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() @@ -12500,7 +16672,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.unique_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.unique_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12510,12 +16686,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_server_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() @@ -12524,19 +16706,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_server_by_unique_name_args) get_server_by_unique_name_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'unique_name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "unique_name", + "UTF8", + None, + ), # 1 ) @@ -12548,13 +16737,20 @@ class get_server_by_unique_name_result(object): """ - - def __init__(self, success=None, e=None,): + def __init__( + self, + success=None, + e=None, + ): self.success = success self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12580,15 +16776,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_server_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() @@ -12598,19 +16796,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_server_by_unique_name_result) get_server_by_unique_name_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [VM, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 ) @@ -12621,12 +16832,18 @@ class stop_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12636,7 +16853,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12646,12 +16867,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('stop_server_args') + oprot.writeStructBegin("stop_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12660,19 +16887,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(stop_server_args) stop_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -12684,13 +16918,20 @@ class stop_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12715,15 +16956,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('stop_server_result') + oprot.writeStructBegin("stop_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12733,20 +16976,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(stop_server_result) stop_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -12761,8 +17017,14 @@ class create_snapshot_args(object): """ - - def __init__(self, openstack_id=None, name=None, username=None, base_tags=None, description=None,): + def __init__( + self, + openstack_id=None, + name=None, + username=None, + base_tags=None, + description=None, + ): self.openstack_id = openstack_id self.name = name self.username = username @@ -12770,7 +17032,11 @@ def __init__(self, openstack_id=None, name=None, username=None, base_tags=None, self.description = description def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12780,32 +17046,52 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.username = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.base_tags = [] - (_etype343, _size340) = iprot.readListBegin() - for _i344 in range(_size340): - _elem345 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.base_tags.append(_elem345) + (_etype350, _size347) = iprot.readListBegin() + for _i351 in range(_size347): + _elem352 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.base_tags.append(_elem352) 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: @@ -12815,31 +17101,49 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_snapshot_args') + oprot.writeStructBegin("create_snapshot_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 3) - oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) + oprot.writeFieldBegin("username", TType.STRING, 3) + oprot.writeString( + self.username.encode("utf-8") + if sys.version_info[0] == 2 + else self.username + ) oprot.writeFieldEnd() if self.base_tags is not None: - oprot.writeFieldBegin('base_tags', TType.LIST, 4) + oprot.writeFieldBegin("base_tags", TType.LIST, 4) oprot.writeListBegin(TType.STRING, len(self.base_tags)) - for iter346 in self.base_tags: - oprot.writeString(iter346.encode('utf-8') if sys.version_info[0] == 2 else iter346) + for iter353 in self.base_tags: + oprot.writeString( + iter353.encode("utf-8") if sys.version_info[0] == 2 else iter353 + ) 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() @@ -12848,23 +17152,54 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_snapshot_args) create_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'username', 'UTF8', None, ), # 3 - (4, TType.LIST, 'base_tags', (TType.STRING, 'UTF8', False), None, ), # 4 - (5, TType.STRING, 'description', 'UTF8', None, ), # 5 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "username", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "base_tags", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "description", + "UTF8", + None, + ), # 5 ) @@ -12877,14 +17212,22 @@ class create_snapshot_result(object): """ - - def __init__(self, success=None, e=None, c=None,): + def __init__( + self, + success=None, + e=None, + c=None, + ): self.success = success self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12894,7 +17237,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -12914,19 +17261,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_snapshot_result') + oprot.writeStructBegin("create_snapshot_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12936,28 +17289,50 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_snapshot_result) create_snapshot_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) class get_limits_args(object): - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12972,9 +17347,11 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_limits_args') + oprot.writeStructBegin("get_limits_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -12982,18 +17359,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): @@ -13003,12 +17380,18 @@ class get_limits_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13019,11 +17402,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype348, _vtype349, _size347) = iprot.readMapBegin() - for _i351 in range(_size347): - _key352 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val353 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key352] = _val353 + (_ktype355, _vtype356, _size354) = iprot.readMapBegin() + for _i358 in range(_size354): + _key359 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val360 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key359] = _val360 iprot.readMapEnd() else: iprot.skip(ftype) @@ -13034,15 +17425,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_limits_result') + oprot.writeStructBegin("get_limits_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter354, viter355 in self.success.items(): - oprot.writeString(kiter354.encode('utf-8') if sys.version_info[0] == 2 else kiter354) - oprot.writeString(viter355.encode('utf-8') if sys.version_info[0] == 2 else viter355) + for kiter361, viter362 in self.success.items(): + oprot.writeString( + kiter361.encode("utf-8") if sys.version_info[0] == 2 else kiter361 + ) + oprot.writeString( + viter362.encode("utf-8") if sys.version_info[0] == 2 else viter362 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13052,18 +17449,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_limits_result) get_limits_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -13077,15 +17481,24 @@ class start_cluster_args(object): """ - - 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() @@ -13096,10 +17509,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.public_keys = [] - (_etype359, _size356) = iprot.readListBegin() - for _i360 in range(_size356): - _elem361 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.public_keys.append(_elem361) + (_etype366, _size363) = iprot.readListBegin() + for _i367 in range(_size363): + _elem368 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.public_keys.append(_elem368) iprot.readListEnd() else: iprot.skip(ftype) @@ -13112,17 +17529,21 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.worker_instances = [] - (_etype365, _size362) = iprot.readListBegin() - for _i366 in range(_size362): - _elem367 = ClusterInstance() - _elem367.read(iprot) - self.worker_instances.append(_elem367) + (_etype372, _size369) = iprot.readListBegin() + for _i373 in range(_size369): + _elem374 = ClusterInstance() + _elem374.read(iprot) + self.worker_instances.append(_elem374) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13132,30 +17553,36 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('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 iter368 in self.public_keys: - oprot.writeString(iter368.encode('utf-8') if sys.version_info[0] == 2 else iter368) + for iter375 in self.public_keys: + oprot.writeString( + iter375.encode("utf-8") if sys.version_info[0] == 2 else iter375 + ) 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 iter369 in self.worker_instances: - iter369.write(oprot) + for iter376 in self.worker_instances: + iter376.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() @@ -13164,22 +17591,47 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_cluster_args) start_cluster_args.thrift_spec = ( None, # 0 - (1, TType.LIST, 'public_keys', (TType.STRING, 'UTF8', False), None, ), # 1 - (2, TType.STRUCT, 'master_instance', [ClusterInstance, None], None, ), # 2 - (3, TType.LIST, 'worker_instances', (TType.STRUCT, [ClusterInstance, None], False), None, ), # 3 - (4, TType.STRING, 'user', 'UTF8', None, ), # 4 + ( + 1, + TType.LIST, + "public_keys", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.STRUCT, + "master_instance", + [ClusterInstance, None], + None, + ), # 2 + ( + 3, + TType.LIST, + "worker_instances", + (TType.STRUCT, [ClusterInstance, None], False), + None, + ), # 3 + ( + 4, + TType.STRING, + "user", + "UTF8", + None, + ), # 4 ) @@ -13190,12 +17642,18 @@ class start_cluster_result(object): """ - - def __init__(self, success=None,): + def __init__( + self, + success=None, + ): self.success = success def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13206,11 +17664,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype371, _vtype372, _size370) = iprot.readMapBegin() - for _i374 in range(_size370): - _key375 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val376 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key375] = _val376 + (_ktype378, _vtype379, _size377) = iprot.readMapBegin() + for _i381 in range(_size377): + _key382 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val383 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key382] = _val383 iprot.readMapEnd() else: iprot.skip(ftype) @@ -13221,15 +17687,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_cluster_result') + oprot.writeStructBegin("start_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter377, viter378 in self.success.items(): - oprot.writeString(kiter377.encode('utf-8') if sys.version_info[0] == 2 else kiter377) - oprot.writeString(viter378.encode('utf-8') if sys.version_info[0] == 2 else viter378) + for kiter384, viter385 in self.success.items(): + oprot.writeString( + kiter384.encode("utf-8") if sys.version_info[0] == 2 else kiter384 + ) + oprot.writeString( + viter385.encode("utf-8") if sys.version_info[0] == 2 else viter385 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13239,18 +17711,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_cluster_result) start_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -13261,12 +17740,18 @@ class terminate_cluster_args(object): """ - - def __init__(self, cluster_id=None,): + def __init__( + self, + cluster_id=None, + ): self.cluster_id = cluster_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13276,7 +17761,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13286,12 +17775,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('terminate_cluster_args') + oprot.writeStructBegin("terminate_cluster_args") if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 1) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 1) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13300,19 +17795,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(terminate_cluster_args) terminate_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "cluster_id", + "UTF8", + None, + ), # 1 ) @@ -13324,13 +17826,20 @@ class terminate_cluster_result(object): """ - - def __init__(self, success=None, c=None,): + def __init__( + self, + success=None, + c=None, + ): self.success = success self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13341,11 +17850,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype380, _vtype381, _size379) = iprot.readMapBegin() - for _i383 in range(_size379): - _key384 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val385 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key384] = _val385 + (_ktype387, _vtype388, _size386) = iprot.readMapBegin() + for _i390 in range(_size386): + _key391 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val392 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key391] = _val392 iprot.readMapEnd() else: iprot.skip(ftype) @@ -13361,19 +17878,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('terminate_cluster_result') + oprot.writeStructBegin("terminate_cluster_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter386, viter387 in self.success.items(): - oprot.writeString(kiter386.encode('utf-8') if sys.version_info[0] == 2 else kiter386) - oprot.writeString(viter387.encode('utf-8') if sys.version_info[0] == 2 else viter387) + 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.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() @@ -13383,19 +17906,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(terminate_cluster_result) terminate_cluster_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'c', [ClusterNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [ClusterNotFoundException, None], + None, + ), # 1 ) @@ -13406,12 +17942,18 @@ class delete_image_args(object): """ - - def __init__(self, image_id=None,): + def __init__( + self, + image_id=None, + ): self.image_id = image_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13421,7 +17963,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.image_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13431,12 +17977,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_image_args') + oprot.writeStructBegin("delete_image_args") if self.image_id is not None: - oprot.writeFieldBegin('image_id', TType.STRING, 1) - oprot.writeString(self.image_id.encode('utf-8') if sys.version_info[0] == 2 else self.image_id) + oprot.writeFieldBegin("image_id", TType.STRING, 1) + oprot.writeString( + self.image_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.image_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13445,19 +17997,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_image_args) delete_image_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'image_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "image_id", + "UTF8", + None, + ), # 1 ) @@ -13468,12 +18027,18 @@ class delete_image_result(object): """ - - def __init__(self, e=None,): + def __init__( + self, + e=None, + ): self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13493,11 +18058,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_image_result') + oprot.writeStructBegin("delete_image_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13507,19 +18074,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_image_result) delete_image_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ImageNotFoundException, None], None, ), # 1 + ( + 1, + TType.STRUCT, + "e", + [ImageNotFoundException, None], + None, + ), # 1 ) @@ -13531,13 +18105,20 @@ class detach_volume_args(object): """ - - def __init__(self, volume_id=None, server_id=None,): + def __init__( + self, + volume_id=None, + server_id=None, + ): self.volume_id = volume_id self.server_id = server_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13547,12 +18128,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13562,16 +18151,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_volume_args') + oprot.writeStructBegin("detach_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 2) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 2) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13580,20 +18179,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(detach_volume_args) detach_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'server_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 2 ) @@ -13606,14 +18218,22 @@ class detach_volume_result(object): """ - - def __init__(self, e=None, c=None, v=None,): + def __init__( + self, + e=None, + c=None, + v=None, + ): self.e = e self.c = c self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13643,19 +18263,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('detach_volume_result') + oprot.writeStructBegin("detach_volume_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 3) + oprot.writeFieldBegin("v", TType.STRUCT, 3) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13665,21 +18287,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(detach_volume_result) detach_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 - (3, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 3 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 3 ) @@ -13690,12 +18331,18 @@ class delete_volume_args(object): """ - - def __init__(self, volume_id=None,): + def __init__( + self, + volume_id=None, + ): self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13705,7 +18352,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13715,12 +18366,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_args') + oprot.writeStructBegin("delete_volume_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13729,19 +18386,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_volume_args) delete_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 ) @@ -13753,13 +18417,20 @@ class delete_volume_result(object): """ - - def __init__(self, c=None, v=None,): + def __init__( + self, + c=None, + v=None, + ): self.c = c self.v = v def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13784,15 +18455,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_result') + oprot.writeStructBegin("delete_volume_result") if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() if self.v is not None: - oprot.writeFieldBegin('v', TType.STRUCT, 2) + oprot.writeFieldBegin("v", TType.STRUCT, 2) self.v.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13802,20 +18475,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_volume_result) delete_volume_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 - (2, TType.STRUCT, 'v', [VolumeNotFoundException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "v", + [VolumeNotFoundException, None], + None, + ), # 2 ) @@ -13827,13 +18513,20 @@ class attach_volume_to_server_args(object): """ - - def __init__(self, openstack_id=None, volume_id=None,): + def __init__( + self, + openstack_id=None, + volume_id=None, + ): self.openstack_id = openstack_id self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13843,12 +18536,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13858,16 +18559,26 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('attach_volume_to_server_args') + oprot.writeStructBegin("attach_volume_to_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 2) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 2) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13876,20 +18587,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(attach_volume_to_server_args) attach_volume_to_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'volume_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 2 ) @@ -13902,14 +18626,22 @@ class attach_volume_to_server_result(object): """ - - def __init__(self, success=None, e=None, c=None,): + def __init__( + self, + success=None, + e=None, + c=None, + ): self.success = success self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -13920,11 +18652,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype389, _vtype390, _size388) = iprot.readMapBegin() - for _i392 in range(_size388): - _key393 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val394 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key393] = _val394 + (_ktype396, _vtype397, _size395) = iprot.readMapBegin() + for _i399 in range(_size395): + _key400 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val401 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.success[_key400] = _val401 iprot.readMapEnd() else: iprot.skip(ftype) @@ -13945,23 +18685,29 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('attach_volume_to_server_result') + oprot.writeStructBegin("attach_volume_to_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter395, viter396 in self.success.items(): - oprot.writeString(kiter395.encode('utf-8') if sys.version_info[0] == 2 else kiter395) - oprot.writeString(viter396.encode('utf-8') if sys.version_info[0] == 2 else viter396) + 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.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() @@ -13971,20 +18717,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(attach_volume_to_server_result) attach_volume_to_server_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [VolumeNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -13995,12 +18760,18 @@ class resume_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14010,7 +18781,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14020,12 +18795,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resume_server_args') + oprot.writeStructBegin("resume_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14034,19 +18815,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(resume_server_args) resume_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -14058,13 +18846,20 @@ class resume_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14089,15 +18884,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('resume_server_result') + oprot.writeStructBegin("resume_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14107,20 +18904,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(resume_server_result) resume_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -14133,14 +18943,22 @@ class create_volume_args(object): """ - - def __init__(self, volume_name=None, volume_storage=None, metadata=None,): + def __init__( + self, + volume_name=None, + volume_storage=None, + metadata=None, + ): self.volume_name = volume_name self.volume_storage = volume_storage self.metadata = metadata def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14150,7 +18968,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -14161,11 +18983,19 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.metadata = {} - (_ktype398, _vtype399, _size397) = iprot.readMapBegin() - for _i401 in range(_size397): - _key402 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val403 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key402] = _val403 + (_ktype405, _vtype406, _size404) = iprot.readMapBegin() + for _i408 in range(_size404): + _key409 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val410 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key409] = _val410 iprot.readMapEnd() else: iprot.skip(ftype) @@ -14176,23 +19006,33 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_args') + oprot.writeStructBegin("create_volume_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.volume_storage is not None: - oprot.writeFieldBegin('volume_storage', TType.I32, 2) + oprot.writeFieldBegin("volume_storage", TType.I32, 2) oprot.writeI32(self.volume_storage) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 3) + oprot.writeFieldBegin("metadata", TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter404, viter405 in self.metadata.items(): - oprot.writeString(kiter404.encode('utf-8') if sys.version_info[0] == 2 else kiter404) - oprot.writeString(viter405.encode('utf-8') if sys.version_info[0] == 2 else viter405) + for kiter411, viter412 in self.metadata.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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14202,21 +19042,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_args) create_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.I32, 'volume_storage', None, None, ), # 2 - (3, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.I32, + "volume_storage", + None, + None, + ), # 2 + ( + 3, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 3 ) @@ -14229,14 +19088,22 @@ class create_volume_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14267,19 +19134,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_result') + oprot.writeStructBegin("create_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14289,20 +19158,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_result) create_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -14315,14 +19203,22 @@ class create_volume_by_source_volume_args(object): """ - - def __init__(self, volume_name=None, metadata=None, source_volume_id=None,): + def __init__( + self, + volume_name=None, + metadata=None, + source_volume_id=None, + ): self.volume_name = volume_name self.metadata = metadata self.source_volume_id = source_volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14332,23 +19228,39 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.MAP: self.metadata = {} - (_ktype407, _vtype408, _size406) = iprot.readMapBegin() - for _i410 in range(_size406): - _key411 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val412 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key411] = _val412 + (_ktype414, _vtype415, _size413) = iprot.readMapBegin() + for _i417 in range(_size413): + _key418 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val419 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key418] = _val419 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: @@ -14358,24 +19270,38 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_source_volume_args') + oprot.writeStructBegin("create_volume_by_source_volume_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 2) + oprot.writeFieldBegin("metadata", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter413, viter414 in self.metadata.items(): - oprot.writeString(kiter413.encode('utf-8') if sys.version_info[0] == 2 else kiter413) - oprot.writeString(viter414.encode('utf-8') if sys.version_info[0] == 2 else viter414) + 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.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() @@ -14384,21 +19310,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_by_source_volume_args) create_volume_by_source_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 - (3, TType.STRING, 'source_volume_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 + ( + 3, + TType.STRING, + "source_volume_id", + "UTF8", + None, + ), # 3 ) @@ -14411,14 +19356,22 @@ class create_volume_by_source_volume_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14449,19 +19402,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_source_volume_result') + oprot.writeStructBegin("create_volume_by_source_volume_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14471,20 +19426,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_by_source_volume_result) create_volume_by_source_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -14497,14 +19471,22 @@ class create_volume_by_volume_snap_args(object): """ - - def __init__(self, volume_name=None, metadata=None, volume_snap_id=None,): + def __init__( + self, + volume_name=None, + metadata=None, + volume_snap_id=None, + ): self.volume_name = volume_name self.metadata = metadata self.volume_snap_id = volume_snap_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14514,23 +19496,39 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.MAP: self.metadata = {} - (_ktype416, _vtype417, _size415) = iprot.readMapBegin() - for _i419 in range(_size415): - _key420 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val421 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key420] = _val421 + (_ktype423, _vtype424, _size422) = iprot.readMapBegin() + for _i426 in range(_size422): + _key427 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val428 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key427] = _val428 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: @@ -14540,24 +19538,38 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_volume_snap_args') + oprot.writeStructBegin("create_volume_by_volume_snap_args") if self.volume_name is not None: - oprot.writeFieldBegin('volume_name', TType.STRING, 1) - oprot.writeString(self.volume_name.encode('utf-8') if sys.version_info[0] == 2 else self.volume_name) + oprot.writeFieldBegin("volume_name", TType.STRING, 1) + oprot.writeString( + self.volume_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_name + ) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 2) + oprot.writeFieldBegin("metadata", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter422, viter423 in self.metadata.items(): - oprot.writeString(kiter422.encode('utf-8') if sys.version_info[0] == 2 else kiter422) - oprot.writeString(viter423.encode('utf-8') if sys.version_info[0] == 2 else viter423) + 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.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() @@ -14566,21 +19578,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_by_volume_snap_args) create_volume_by_volume_snap_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 - (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 - (3, TType.STRING, 'volume_snap_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 + ( + 3, + TType.STRING, + "volume_snap_id", + "UTF8", + None, + ), # 3 ) @@ -14593,14 +19624,22 @@ class create_volume_by_volume_snap_result(object): """ - - def __init__(self, success=None, r=None, n=None,): + def __init__( + self, + success=None, + r=None, + n=None, + ): self.success = success self.r = r self.n = n def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14631,19 +19670,21 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_by_volume_snap_result') + oprot.writeStructBegin("create_volume_by_volume_snap_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 2) + oprot.writeFieldBegin("n", TType.STRUCT, 2) self.n.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14653,20 +19694,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_by_volume_snap_result) create_volume_by_volume_snap_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 - (1, TType.STRUCT, 'r', [DefaultException, None], None, ), # 1 - (2, TType.STRUCT, 'n', [ResourceNotAvailableException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "n", + [ResourceNotAvailableException, None], + None, + ), # 2 ) @@ -14679,14 +19739,22 @@ class create_volume_snapshot_args(object): """ - - def __init__(self, volume_id=None, name=None, description=None,): + def __init__( + self, + volume_id=None, + name=None, + description=None, + ): self.volume_id = volume_id self.name = name self.description = description def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14696,17 +19764,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14716,20 +19796,32 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_snapshot_args') + oprot.writeStructBegin("create_volume_snapshot_args") if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 1) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 1) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 3) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 3) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14738,21 +19830,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_snapshot_args) create_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'description', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "description", + "UTF8", + None, + ), # 3 ) @@ -14765,14 +19876,22 @@ class create_volume_snapshot_result(object): """ - - def __init__(self, success=None, e=None, r=None,): + def __init__( + self, + success=None, + e=None, + r=None, + ): self.success = success self.e = e self.r = r def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14782,7 +19901,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -14802,19 +19925,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('create_volume_snapshot_result') + oprot.writeStructBegin("create_volume_snapshot_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin("success", TType.STRING, 0) + oprot.writeString( + self.success.encode("utf-8") + if sys.version_info[0] == 2 + else self.success + ) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14824,20 +19953,39 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_volume_snapshot_result) create_volume_snapshot_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [VolumeNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [DefaultException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [VolumeNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [DefaultException, None], + None, + ), # 2 ) @@ -14848,12 +19996,18 @@ class get_volume_snapshot_args(object): """ - - def __init__(self, name_or_id=None,): + def __init__( + self, + name_or_id=None, + ): self.name_or_id = name_or_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14863,7 +20017,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14873,12 +20031,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_snapshot_args') + oprot.writeStructBegin("get_volume_snapshot_args") if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 1) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 1) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14887,19 +20051,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volume_snapshot_args) get_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'name_or_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 1 ) @@ -14911,13 +20082,20 @@ class get_volume_snapshot_result(object): """ - - def __init__(self, success=None, r=None,): + def __init__( + self, + success=None, + r=None, + ): self.success = success self.r = r def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14943,15 +20121,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volume_snapshot_result') + oprot.writeStructBegin("get_volume_snapshot_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) + oprot.writeFieldBegin("success", TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14961,19 +20141,32 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_volume_snapshot_result) get_volume_snapshot_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Snapshot, None], None, ), # 0 - (1, TType.STRUCT, 'r', [ResourceNotFoundException, None], None, ), # 1 + ( + 0, + TType.STRUCT, + "success", + [Snapshot, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [ResourceNotFoundException, None], + None, + ), # 1 ) @@ -14984,12 +20177,18 @@ class delete_volume_snapshot_args(object): """ - - def __init__(self, snapshot_id=None,): + def __init__( + self, + snapshot_id=None, + ): self.snapshot_id = snapshot_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14999,7 +20198,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.snapshot_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.snapshot_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -15009,12 +20212,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_snapshot_args') + oprot.writeStructBegin("delete_volume_snapshot_args") if self.snapshot_id is not None: - oprot.writeFieldBegin('snapshot_id', TType.STRING, 1) - oprot.writeString(self.snapshot_id.encode('utf-8') if sys.version_info[0] == 2 else self.snapshot_id) + oprot.writeFieldBegin("snapshot_id", TType.STRING, 1) + oprot.writeString( + self.snapshot_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.snapshot_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -15023,19 +20232,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_volume_snapshot_args) delete_volume_snapshot_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'snapshot_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "snapshot_id", + "UTF8", + None, + ), # 1 ) @@ -15047,13 +20263,20 @@ class delete_volume_snapshot_result(object): """ - - def __init__(self, c=None, e=None,): + def __init__( + self, + c=None, + e=None, + ): self.c = c self.e = e def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15078,15 +20301,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('delete_volume_snapshot_result') + oprot.writeStructBegin("delete_volume_snapshot_result") if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 1) + oprot.writeFieldBegin("c", TType.STRUCT, 1) self.c.write(oprot) oprot.writeFieldEnd() if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 2) + oprot.writeFieldBegin("e", TType.STRUCT, 2) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15096,20 +20321,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(delete_volume_snapshot_result) delete_volume_snapshot_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 1 - (2, TType.STRUCT, 'e', [DefaultException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "e", + [DefaultException, None], + None, + ), # 2 ) @@ -15120,12 +20358,18 @@ class reboot_hard_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15135,7 +20379,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -15145,12 +20393,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_hard_server_args') + oprot.writeStructBegin("reboot_hard_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -15159,19 +20413,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(reboot_hard_server_args) reboot_hard_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -15183,13 +20444,20 @@ class reboot_hard_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15214,15 +20482,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_hard_server_result') + oprot.writeStructBegin("reboot_hard_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15232,20 +20502,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(reboot_hard_server_result) reboot_hard_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) @@ -15256,12 +20539,18 @@ class reboot_soft_server_args(object): """ - - def __init__(self, openstack_id=None,): + def __init__( + self, + openstack_id=None, + ): self.openstack_id = openstack_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15271,7 +20560,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -15281,12 +20574,18 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_soft_server_args') + oprot.writeStructBegin("reboot_soft_server_args") if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 1) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 1) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -15295,19 +20594,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(reboot_soft_server_args) reboot_soft_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -15319,13 +20625,20 @@ class reboot_soft_server_result(object): """ - - def __init__(self, e=None, c=None,): + def __init__( + self, + e=None, + c=None, + ): self.e = e self.c = c def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15350,15 +20663,17 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('reboot_soft_server_result') + oprot.writeStructBegin("reboot_soft_server_result") if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) + oprot.writeFieldBegin("e", TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() if self.c is not None: - oprot.writeFieldBegin('c', TType.STRUCT, 2) + oprot.writeFieldBegin("c", TType.STRUCT, 2) self.c.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15368,20 +20683,33 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(reboot_soft_server_result) reboot_soft_server_result.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'e', [ServerNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [OpenStackConflictException, None], None, ), # 2 + ( + 1, + TType.STRUCT, + "e", + [ServerNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [OpenStackConflictException, None], + None, + ), # 2 ) fix_spec(all_structs) del all_structs diff --git a/simple_vm_client/config/config.yml b/simple_vm_client/config/config.yml index 549c315e..a72d81b5 100644 --- a/simple_vm_client/config/config.yml +++ b/simple_vm_client/config/config.yml @@ -80,3 +80,10 @@ forc: # Access URL for FORC - optional - default is forc_url without port. github_playbooks_repo: https://github.com/deNBI/resenvs/archive/refs/heads/staging.zip # GitHub repository URL for FORC playbooks. + + +metadata_server: + activated: False + use_https: False + host: simplevm_metadata_server + port: 8008 diff --git a/simple_vm_client/config/config_local.yml b/simple_vm_client/config/config_local.yml index ced3189b..35216423 100644 --- a/simple_vm_client/config/config_local.yml +++ b/simple_vm_client/config/config_local.yml @@ -80,3 +80,8 @@ forc: # Access URL for FORC - optional - default is forc_url without port. github_playbooks_repo: https://github.com/deNBI/resenvs/archive/refs/heads/staging.zip # GitHub repository URL for FORC playbooks. +metadata_server: + activated: True + use_https: False + host: simplevm_metadata_server + port: 8008 diff --git a/simple_vm_client/constants.py b/simple_vm_client/constants.py index 04f3806d..ea0204b1 100644 --- a/simple_vm_client/constants.py +++ b/simple_vm_client/constants.py @@ -1,15 +1,10 @@ # -# Autogenerated by Thrift Compiler (0.20.0) +# Autogenerated by Thrift Compiler (0.19.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/metadata_connector/metadata_connector.py b/simple_vm_client/metadata_connector/metadata_connector.py index 7e208987..654636a3 100644 --- a/simple_vm_client/metadata_connector/metadata_connector.py +++ b/simple_vm_client/metadata_connector/metadata_connector.py @@ -4,6 +4,7 @@ import requests import yaml +from simple_vm_client.ttypes import VirtualMachineServerMetadata from simple_vm_client.util.logger import setup_custom_logger logger = setup_custom_logger(__name__) @@ -29,11 +30,17 @@ def load_config_yml(self, config_file: str) -> None: self.ACTIVATED = False return self.ACTIVATED = True + self.METADATA_USE_HTTPS = cfg["metadata_server"].get("use_https", False) self.METADATA_SERVER_HOST = cfg["metadata_server"]["host"] self.METADATA_SERVER_PORT = cfg["metadata_server"]["port"] - self.METADATA_BASE_URL = ( - f"{self.METADATA_SERVER_HOST}:{self.METADATA_SERVER_PORT}/" - ) + if self.METADATA_USE_HTTPS: + self.METADATA_BASE_URL = ( + f"https://{self.METADATA_SERVER_HOST}:{self.METADATA_SERVER_PORT}/" + ) + else: + self.METADATA_BASE_URL = ( + f"http://{self.METADATA_SERVER_HOST}:{self.METADATA_SERVER_PORT}/" + ) self.load_env_config() @@ -71,7 +78,7 @@ def remove_metadata(self, ip: str): except requests.exceptions.RequestException as e: logger.error(f"Failed to remove metadata for {ip}: {e}") - def set_metadata(self, ip: str, metadata: dict): + def set_metadata(self, ip: str, metadata: VirtualMachineServerMetadata): if not self.ACTIVATED: logger.info("Metadata Server not activated. Skipping.") return diff --git a/simple_vm_client/ttypes.py b/simple_vm_client/ttypes.py index a672f695..d06cc6d7 100644 --- a/simple_vm_client/ttypes.py +++ b/simple_vm_client/ttypes.py @@ -1,21 +1,137 @@ # -# Autogenerated by Thrift Compiler (0.20.0) +# Autogenerated by Thrift Compiler (0.19.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -from thrift.TRecursive import fix_spec - import sys +from thrift.protocol.TProtocol import TProtocolException +from thrift.Thrift import TException, TType from thrift.transport import TTransport +from thrift.TRecursive import fix_spec + all_structs = [] +class VirtualMachineServerMetadata(object): + """ + Attributes: + - public_keys + - hashed_auth_token + - ip + + """ + + def __init__( + self, + public_keys=None, + hashed_auth_token=None, + ip=None, + ): + self.public_keys = public_keys + self.hashed_auth_token = hashed_auth_token + 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 + ): + 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.LIST: + 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() + ) + self.public_keys.append(_elem5) + iprot.readListEnd() + 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() + ) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ip = ( + 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("VirtualMachineServerMetadata") + if self.public_keys is not None: + oprot.writeFieldBegin("public_keys", TType.LIST, 1) + 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.writeListEnd() + 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.writeFieldEnd() + if self.ip is not None: + oprot.writeFieldBegin("ip", TType.STRING, 3) + oprot.writeString( + self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip + ) + 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) + + class Backend(object): """ Attributes: @@ -27,8 +143,14 @@ class Backend(object): """ - - def __init__(self, id=None, owner=None, location_url=None, template=None, template_version=None,): + def __init__( + self, + id=None, + owner=None, + location_url=None, + template=None, + template_version=None, + ): self.id = id self.owner = owner self.location_url = location_url @@ -36,7 +158,11 @@ def __init__(self, id=None, owner=None, location_url=None, template=None, templa self.template_version = template_version def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -51,22 +177,38 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.owner = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.location_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.location_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.template_version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template_version = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -76,28 +218,44 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('Backend') + oprot.writeStructBegin("Backend") if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeFieldBegin("id", TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 2) - oprot.writeString(self.owner.encode('utf-8') if sys.version_info[0] == 2 else self.owner) + oprot.writeFieldBegin("owner", TType.STRING, 2) + oprot.writeString( + self.owner.encode("utf-8") if sys.version_info[0] == 2 else self.owner + ) oprot.writeFieldEnd() if self.location_url is not None: - oprot.writeFieldBegin('location_url', TType.STRING, 3) - oprot.writeString(self.location_url.encode('utf-8') if sys.version_info[0] == 2 else self.location_url) + oprot.writeFieldBegin("location_url", TType.STRING, 3) + oprot.writeString( + self.location_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.location_url + ) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin('template', TType.STRING, 4) - oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) + oprot.writeFieldBegin("template", TType.STRING, 4) + oprot.writeString( + self.template.encode("utf-8") + if sys.version_info[0] == 2 + else self.template + ) oprot.writeFieldEnd() if self.template_version is not None: - oprot.writeFieldBegin('template_version', TType.STRING, 5) - oprot.writeString(self.template_version.encode('utf-8') if sys.version_info[0] == 2 else self.template_version) + oprot.writeFieldBegin("template_version", TType.STRING, 5) + oprot.writeString( + self.template_version.encode("utf-8") + if sys.version_info[0] == 2 + else self.template_version + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -106,9 +264,8 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -135,8 +292,21 @@ class ResearchEnvironmentTemplate(object): """ - - def __init__(self, template_name=None, title=None, description=None, logo_url=None, info_url=None, port=None, incompatible_versions=None, is_maintained=None, information_for_display=None, min_ram=0, min_cores=0, securitygroup_name=None,): + 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 @@ -155,7 +325,11 @@ def __init__(self, template_name=None, title=None, description=None, logo_url=No self.securitygroup_name = securitygroup_name def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -165,27 +339,47 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.template_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.title = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.title = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.logo_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.logo_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.info_url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.info_url = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: @@ -196,10 +390,14 @@ def read(self, iprot): elif fid == 7: if ftype == TType.LIST: self.incompatible_versions = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in range(_size0): - _elem5 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.incompatible_versions.append(_elem5) + (_etype10, _size7) = iprot.readListBegin() + for _i11 in range(_size7): + _elem12 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.incompatible_versions.append(_elem12) iprot.readListEnd() else: iprot.skip(ftype) @@ -211,11 +409,19 @@ def read(self, iprot): elif fid == 9: if ftype == TType.MAP: self.information_for_display = {} - (_ktype7, _vtype8, _size6) = iprot.readMapBegin() - for _i10 in range(_size6): - _key11 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.information_for_display[_key11] = _val12 + (_ktype14, _vtype15, _size13) = iprot.readMapBegin() + for _i17 in range(_size13): + _key18 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val19 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.information_for_display[_key18] = _val19 iprot.readMapEnd() else: iprot.skip(ftype) @@ -231,7 +437,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: - self.securitygroup_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.securitygroup_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -241,63 +451,95 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('ResearchEnvironmentTemplate') + oprot.writeStructBegin("ResearchEnvironmentTemplate") if self.template_name is not None: - oprot.writeFieldBegin('template_name', TType.STRING, 1) - oprot.writeString(self.template_name.encode('utf-8') if sys.version_info[0] == 2 else self.template_name) + oprot.writeFieldBegin("template_name", TType.STRING, 1) + oprot.writeString( + self.template_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.template_name + ) oprot.writeFieldEnd() if self.title is not None: - oprot.writeFieldBegin('title', TType.STRING, 2) - oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) + oprot.writeFieldBegin("title", TType.STRING, 2) + oprot.writeString( + self.title.encode("utf-8") if sys.version_info[0] == 2 else self.title + ) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 3) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 3) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() if self.logo_url is not None: - oprot.writeFieldBegin('logo_url', TType.STRING, 4) - oprot.writeString(self.logo_url.encode('utf-8') if sys.version_info[0] == 2 else self.logo_url) + oprot.writeFieldBegin("logo_url", TType.STRING, 4) + oprot.writeString( + self.logo_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.logo_url + ) oprot.writeFieldEnd() if self.info_url is not None: - oprot.writeFieldBegin('info_url', TType.STRING, 5) - oprot.writeString(self.info_url.encode('utf-8') if sys.version_info[0] == 2 else self.info_url) + oprot.writeFieldBegin("info_url", TType.STRING, 5) + oprot.writeString( + self.info_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.info_url + ) oprot.writeFieldEnd() if self.port is not None: - oprot.writeFieldBegin('port', TType.I32, 6) + oprot.writeFieldBegin("port", TType.I32, 6) oprot.writeI32(self.port) oprot.writeFieldEnd() if self.incompatible_versions is not None: - oprot.writeFieldBegin('incompatible_versions', TType.LIST, 7) + oprot.writeFieldBegin("incompatible_versions", TType.LIST, 7) oprot.writeListBegin(TType.STRING, len(self.incompatible_versions)) - for iter13 in self.incompatible_versions: - oprot.writeString(iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13) + for iter20 in self.incompatible_versions: + oprot.writeString( + iter20.encode("utf-8") if sys.version_info[0] == 2 else iter20 + ) 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)) - for kiter14, viter15 in self.information_for_display.items(): - oprot.writeString(kiter14.encode('utf-8') if sys.version_info[0] == 2 else kiter14) - oprot.writeString(viter15.encode('utf-8') if sys.version_info[0] == 2 else viter15) + oprot.writeFieldBegin("information_for_display", TType.MAP, 9) + oprot.writeMapBegin( + TType.STRING, TType.STRING, len(self.information_for_display) + ) + for kiter21, viter22 in self.information_for_display.items(): + oprot.writeString( + kiter21.encode("utf-8") if sys.version_info[0] == 2 else kiter21 + ) + oprot.writeString( + viter22.encode("utf-8") if sys.version_info[0] == 2 else viter22 + ) 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() @@ -306,9 +548,8 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -328,8 +569,14 @@ class CondaPackage(object): """ - - def __init__(self, build=None, build_number=None, name=None, version=None, home=None,): + def __init__( + self, + build=None, + build_number=None, + name=None, + version=None, + home=None, + ): self.build = build self.build_number = build_number self.name = name @@ -337,7 +584,11 @@ def __init__(self, build=None, build_number=None, name=None, version=None, home= self.home = home def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -347,27 +598,47 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.build = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.build = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.build_number = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.build_number = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.version = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.version = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.home = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.home = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -377,28 +648,44 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('CondaPackage') + oprot.writeStructBegin("CondaPackage") if self.build is not None: - oprot.writeFieldBegin('build', TType.STRING, 1) - oprot.writeString(self.build.encode('utf-8') if sys.version_info[0] == 2 else self.build) + oprot.writeFieldBegin("build", TType.STRING, 1) + oprot.writeString( + self.build.encode("utf-8") if sys.version_info[0] == 2 else self.build + ) oprot.writeFieldEnd() if self.build_number is not None: - oprot.writeFieldBegin('build_number', TType.STRING, 2) - oprot.writeString(self.build_number.encode('utf-8') if sys.version_info[0] == 2 else self.build_number) + oprot.writeFieldBegin("build_number", TType.STRING, 2) + oprot.writeString( + self.build_number.encode("utf-8") + if sys.version_info[0] == 2 + else self.build_number + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 3) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 3) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.version is not None: - oprot.writeFieldBegin('version', TType.STRING, 4) - oprot.writeString(self.version.encode('utf-8') if sys.version_info[0] == 2 else self.version) + oprot.writeFieldBegin("version", TType.STRING, 4) + oprot.writeString( + self.version.encode("utf-8") + if sys.version_info[0] == 2 + else self.version + ) oprot.writeFieldEnd() if self.home is not None: - oprot.writeFieldBegin('home', TType.STRING, 5) - oprot.writeString(self.home.encode('utf-8') if sys.version_info[0] == 2 else self.home) + oprot.writeFieldBegin("home", TType.STRING, 5) + oprot.writeString( + self.home.encode("utf-8") if sys.version_info[0] == 2 else self.home + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -407,9 +694,8 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -433,8 +719,18 @@ class ClusterInfo(object): """ - - def __init__(self, launch_date=None, group_id=None, network_id=None, public_ip=None, subnet_id=None, user=None, inst_counter=None, cluster_id=None, key_name=None,): + def __init__( + self, + launch_date=None, + group_id=None, + network_id=None, + public_ip=None, + subnet_id=None, + user=None, + inst_counter=None, + cluster_id=None, + key_name=None, + ): self.launch_date = launch_date self.group_id = group_id self.network_id = network_id @@ -446,7 +742,11 @@ def __init__(self, launch_date=None, group_id=None, network_id=None, public_ip=N self.key_name = key_name def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -456,32 +756,56 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.launch_date = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.launch_date = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.group_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.group_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.network_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.network_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.public_ip = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.public_ip = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.subnet_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.subnet_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.user = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.user = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: @@ -491,12 +815,20 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: - self.key_name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.key_name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -506,44 +838,76 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('ClusterInfo') + oprot.writeStructBegin("ClusterInfo") if self.launch_date is not None: - oprot.writeFieldBegin('launch_date', TType.STRING, 1) - oprot.writeString(self.launch_date.encode('utf-8') if sys.version_info[0] == 2 else self.launch_date) + oprot.writeFieldBegin("launch_date", TType.STRING, 1) + oprot.writeString( + self.launch_date.encode("utf-8") + if sys.version_info[0] == 2 + else self.launch_date + ) oprot.writeFieldEnd() if self.group_id is not None: - oprot.writeFieldBegin('group_id', TType.STRING, 2) - oprot.writeString(self.group_id.encode('utf-8') if sys.version_info[0] == 2 else self.group_id) + oprot.writeFieldBegin("group_id", TType.STRING, 2) + oprot.writeString( + self.group_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.group_id + ) oprot.writeFieldEnd() if self.network_id is not None: - oprot.writeFieldBegin('network_id', TType.STRING, 3) - oprot.writeString(self.network_id.encode('utf-8') if sys.version_info[0] == 2 else self.network_id) + oprot.writeFieldBegin("network_id", TType.STRING, 3) + oprot.writeString( + self.network_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.network_id + ) oprot.writeFieldEnd() if self.public_ip is not None: - oprot.writeFieldBegin('public_ip', TType.STRING, 4) - oprot.writeString(self.public_ip.encode('utf-8') if sys.version_info[0] == 2 else self.public_ip) + oprot.writeFieldBegin("public_ip", TType.STRING, 4) + oprot.writeString( + self.public_ip.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_ip + ) oprot.writeFieldEnd() if self.subnet_id is not None: - oprot.writeFieldBegin('subnet_id', TType.STRING, 5) - oprot.writeString(self.subnet_id.encode('utf-8') if sys.version_info[0] == 2 else self.subnet_id) + oprot.writeFieldBegin("subnet_id", TType.STRING, 5) + oprot.writeString( + self.subnet_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.subnet_id + ) oprot.writeFieldEnd() if self.user is not None: - oprot.writeFieldBegin('user', TType.STRING, 6) - oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user) + oprot.writeFieldBegin("user", TType.STRING, 6) + oprot.writeString( + self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user + ) oprot.writeFieldEnd() if self.inst_counter is not None: - oprot.writeFieldBegin('inst_counter', TType.I32, 7) + oprot.writeFieldBegin("inst_counter", TType.I32, 7) oprot.writeI32(self.inst_counter) oprot.writeFieldEnd() if self.cluster_id is not None: - oprot.writeFieldBegin('cluster_id', TType.STRING, 8) - oprot.writeString(self.cluster_id.encode('utf-8') if sys.version_info[0] == 2 else self.cluster_id) + oprot.writeFieldBegin("cluster_id", TType.STRING, 8) + oprot.writeString( + self.cluster_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.cluster_id + ) oprot.writeFieldEnd() if self.key_name is not None: - oprot.writeFieldBegin('key_name', TType.STRING, 9) - oprot.writeString(self.key_name.encode('utf-8') if sys.version_info[0] == 2 else self.key_name) + oprot.writeFieldBegin("key_name", TType.STRING, 9) + oprot.writeString( + self.key_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.key_name + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -552,9 +916,8 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -577,8 +940,17 @@ class Volume(object): """ - - def __init__(self, id=None, name=None, description=None, status=None, created_at=None, device=None, size=None, server_id=None,): + def __init__( + self, + id=None, + name=None, + description=None, + status=None, + created_at=None, + device=None, + size=None, + server_id=None, + ): self.id = id self.name = name self.description = description @@ -589,7 +961,11 @@ def __init__(self, id=None, name=None, description=None, status=None, created_at self.server_id = server_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -599,32 +975,56 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.status = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.created_at = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.device = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.device = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: @@ -634,7 +1034,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -644,40 +1048,62 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('Volume') + oprot.writeStructBegin("Volume") if self.id is not None: - oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) + oprot.writeFieldBegin("id", TType.STRING, 1) + oprot.writeString( + self.id.encode("utf-8") if sys.version_info[0] == 2 else self.id + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 3) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 3) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin('status', TType.STRING, 4) - oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) + oprot.writeFieldBegin("status", TType.STRING, 4) + oprot.writeString( + self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status + ) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin('created_at', TType.STRING, 5) - oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) + oprot.writeFieldBegin("created_at", TType.STRING, 5) + oprot.writeString( + self.created_at.encode("utf-8") + if sys.version_info[0] == 2 + else self.created_at + ) oprot.writeFieldEnd() if self.device is not None: - oprot.writeFieldBegin('device', TType.STRING, 6) - oprot.writeString(self.device.encode('utf-8') if sys.version_info[0] == 2 else self.device) + oprot.writeFieldBegin("device", TType.STRING, 6) + oprot.writeString( + self.device.encode("utf-8") if sys.version_info[0] == 2 else self.device + ) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin('size', TType.I32, 7) + oprot.writeFieldBegin("size", TType.I32, 7) oprot.writeI32(self.size) oprot.writeFieldEnd() if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 8) - oprot.writeString(self.server_id.encode('utf-8') if sys.version_info[0] == 2 else self.server_id) + oprot.writeFieldBegin("server_id", TType.STRING, 8) + oprot.writeString( + self.server_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.server_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -686,9 +1112,8 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -712,8 +1137,16 @@ class Snapshot(object): """ - - def __init__(self, id=None, name=None, description=None, status=None, created_at=None, size=None, volume_id=None,): + def __init__( + self, + id=None, + name=None, + description=None, + status=None, + created_at=None, + size=None, + volume_id=None, + ): self.id = id self.name = name self.description = description @@ -723,7 +1156,11 @@ def __init__(self, id=None, name=None, description=None, status=None, created_at self.volume_id = volume_id def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -733,27 +1170,47 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.status = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.created_at = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.created_at = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: @@ -763,7 +1220,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -773,36 +1234,56 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('Snapshot') + oprot.writeStructBegin("Snapshot") if self.id is not None: - oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) + oprot.writeFieldBegin("id", TType.STRING, 1) + oprot.writeString( + self.id.encode("utf-8") if sys.version_info[0] == 2 else self.id + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 3) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 3) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin('status', TType.STRING, 4) - oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) + oprot.writeFieldBegin("status", TType.STRING, 4) + oprot.writeString( + self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status + ) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin('created_at', TType.STRING, 5) - oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) + oprot.writeFieldBegin("created_at", TType.STRING, 5) + oprot.writeString( + self.created_at.encode("utf-8") + if sys.version_info[0] == 2 + else self.created_at + ) oprot.writeFieldEnd() if self.size is not None: - oprot.writeFieldBegin('size', TType.I32, 6) + oprot.writeFieldBegin("size", TType.I32, 6) oprot.writeI32(self.size) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 7) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 7) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -811,9 +1292,8 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -836,8 +1316,15 @@ class Flavor(object): """ - - def __init__(self, vcpus=None, ram=None, disk=None, name=None, description=None, ephemeral_disk=None,): + def __init__( + self, + vcpus=None, + ram=None, + disk=None, + name=None, + description=None, + ephemeral_disk=None, + ): self.vcpus = vcpus self.ram = ram self.disk = disk @@ -846,7 +1333,11 @@ def __init__(self, vcpus=None, ram=None, disk=None, name=None, description=None, self.ephemeral_disk = ephemeral_disk def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -871,12 +1362,20 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: @@ -891,31 +1390,39 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('Flavor') + oprot.writeStructBegin("Flavor") if self.vcpus is not None: - oprot.writeFieldBegin('vcpus', TType.I32, 1) + oprot.writeFieldBegin("vcpus", TType.I32, 1) oprot.writeI32(self.vcpus) oprot.writeFieldEnd() if self.ram is not None: - oprot.writeFieldBegin('ram', TType.I32, 2) + oprot.writeFieldBegin("ram", TType.I32, 2) oprot.writeI32(self.ram) oprot.writeFieldEnd() if self.disk is not None: - oprot.writeFieldBegin('disk', TType.I32, 3) + oprot.writeFieldBegin("disk", TType.I32, 3) oprot.writeI32(self.disk) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 4) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 4) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 5) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 5) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() if self.ephemeral_disk is not None: - oprot.writeFieldBegin('ephemeral_disk', TType.I32, 6) + oprot.writeFieldBegin("ephemeral_disk", TType.I32, 6) oprot.writeI32(self.ephemeral_disk) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -923,19 +1430,18 @@ def write(self, oprot): def validate(self): if self.vcpus is None: - raise TProtocolException(message='Required field vcpus is unset!') + raise TProtocolException(message="Required field vcpus is unset!") if self.ram is None: - raise TProtocolException(message='Required field ram is unset!') + raise TProtocolException(message="Required field ram is unset!") if self.disk is None: - raise TProtocolException(message='Required field disk is unset!') + raise TProtocolException(message="Required field disk is unset!") if self.name is None: - raise TProtocolException(message='Required field name is unset!') + raise TProtocolException(message="Required field name is unset!") return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -965,8 +1471,22 @@ class Image(object): """ - - def __init__(self, name=None, min_disk=None, min_ram=None, status=None, created_at=None, updated_at=None, openstack_id=None, description=None, tags=None, is_snapshot=None, os_version=None, os_distro=None, title=None,): + 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 @@ -982,7 +1502,11 @@ def __init__(self, name=None, min_disk=None, min_ram=None, status=None, created_ 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() @@ -992,7 +1516,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -1007,36 +1535,60 @@ 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: if ftype == TType.LIST: self.tags = [] - (_etype19, _size16) = iprot.readListBegin() - for _i20 in range(_size16): - _elem21 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.tags.append(_elem21) + (_etype26, _size23) = iprot.readListBegin() + for _i27 in range(_size23): + _elem28 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.tags.append(_elem28) iprot.readListEnd() else: iprot.skip(ftype) @@ -1047,17 +1599,29 @@ 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: @@ -1067,86 +1631,119 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('Image') + oprot.writeStructBegin("Image") if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 1) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() if self.min_disk is not None: - oprot.writeFieldBegin('min_disk', TType.I32, 2) + oprot.writeFieldBegin("min_disk", TType.I32, 2) oprot.writeI32(self.min_disk) oprot.writeFieldEnd() if self.min_ram is not None: - oprot.writeFieldBegin('min_ram', TType.I32, 3) + oprot.writeFieldBegin("min_ram", TType.I32, 3) oprot.writeI32(self.min_ram) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin('status', TType.STRING, 4) - oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) + oprot.writeFieldBegin("status", TType.STRING, 4) + oprot.writeString( + self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status + ) oprot.writeFieldEnd() if self.created_at is not None: - oprot.writeFieldBegin('created_at', TType.STRING, 5) - oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) + oprot.writeFieldBegin("created_at", TType.STRING, 5) + oprot.writeString( + self.created_at.encode("utf-8") + if sys.version_info[0] == 2 + else self.created_at + ) oprot.writeFieldEnd() if self.updated_at is not None: - oprot.writeFieldBegin('updated_at', TType.STRING, 6) - oprot.writeString(self.updated_at.encode('utf-8') if sys.version_info[0] == 2 else self.updated_at) + oprot.writeFieldBegin("updated_at", TType.STRING, 6) + oprot.writeString( + self.updated_at.encode("utf-8") + if sys.version_info[0] == 2 + else self.updated_at + ) oprot.writeFieldEnd() if self.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 7) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 7) + oprot.writeString( + self.openstack_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.openstack_id + ) oprot.writeFieldEnd() if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 8) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 8) + oprot.writeString( + self.description.encode("utf-8") + if sys.version_info[0] == 2 + else self.description + ) oprot.writeFieldEnd() if self.tags is not None: - oprot.writeFieldBegin('tags', TType.LIST, 9) + oprot.writeFieldBegin("tags", TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.tags)) - for iter22 in self.tags: - oprot.writeString(iter22.encode('utf-8') if sys.version_info[0] == 2 else iter22) + for iter29 in self.tags: + oprot.writeString( + iter29.encode("utf-8") if sys.version_info[0] == 2 else iter29 + ) 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__ @@ -1175,8 +1772,21 @@ class VM(object): """ - - def __init__(self, flavor=None, image=None, metadata=None, project_id=None, keyname=None, openstack_id=None, name=None, created_at=None, floating_ip=None, fixed_ip=None, task_state=None, vm_state=None,): + def __init__( + self, + flavor=None, + image=None, + metadata=None, + project_id=None, + keyname=None, + openstack_id=None, + name=None, + created_at=None, + floating_ip=None, + fixed_ip=None, + task_state=None, + vm_state=None, + ): self.flavor = flavor self.image = image self.metadata = metadata @@ -1191,7 +1801,11 @@ def __init__(self, flavor=None, image=None, metadata=None, project_id=None, keyn self.vm_state = vm_state def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1214,57 +1828,101 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.metadata = {} - (_ktype24, _vtype25, _size23) = iprot.readMapBegin() - for _i27 in range(_size23): - _key28 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - _val29 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key28] = _val29 + (_ktype31, _vtype32, _size30) = iprot.readMapBegin() + for _i34 in range(_size30): + _key35 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val36 = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.metadata[_key35] = _val36 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: @@ -1274,83 +1932,122 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('VM') + oprot.writeStructBegin("VM") if self.flavor is not None: - oprot.writeFieldBegin('flavor', TType.STRUCT, 1) + oprot.writeFieldBegin("flavor", TType.STRUCT, 1) self.flavor.write(oprot) oprot.writeFieldEnd() if self.image is not None: - oprot.writeFieldBegin('image', TType.STRUCT, 2) + oprot.writeFieldBegin("image", TType.STRUCT, 2) self.image.write(oprot) oprot.writeFieldEnd() if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 3) + oprot.writeFieldBegin("metadata", TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter30, viter31 in self.metadata.items(): - oprot.writeString(kiter30.encode('utf-8') if sys.version_info[0] == 2 else kiter30) - oprot.writeString(viter31.encode('utf-8') if sys.version_info[0] == 2 else viter31) + for kiter37, viter38 in self.metadata.items(): + oprot.writeString( + kiter37.encode("utf-8") if sys.version_info[0] == 2 else kiter37 + ) + oprot.writeString( + viter38.encode("utf-8") if sys.version_info[0] == 2 else viter38 + ) 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__ @@ -1368,14 +2065,22 @@ class ClusterInstance(object): """ - - def __init__(self, type=None, image=None, count=None,): + def __init__( + self, + type=None, + image=None, + count=None, + ): self.type = type self.image = image self.count = count def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1385,12 +2090,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.type = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.image = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.image = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: @@ -1405,19 +2118,25 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('ClusterInstance') + oprot.writeStructBegin("ClusterInstance") if self.type is not None: - oprot.writeFieldBegin('type', TType.STRING, 1) - oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type) + oprot.writeFieldBegin("type", TType.STRING, 1) + oprot.writeString( + self.type.encode("utf-8") if sys.version_info[0] == 2 else self.type + ) oprot.writeFieldEnd() if self.image is not None: - oprot.writeFieldBegin('image', TType.STRING, 2) - oprot.writeString(self.image.encode('utf-8') if sys.version_info[0] == 2 else self.image) + oprot.writeFieldBegin("image", TType.STRING, 2) + oprot.writeString( + self.image.encode("utf-8") if sys.version_info[0] == 2 else self.image + ) oprot.writeFieldEnd() if self.count is not None: - oprot.writeFieldBegin('count', TType.I32, 3) + oprot.writeFieldBegin("count", TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1425,15 +2144,14 @@ def write(self, oprot): def validate(self): if self.type is None: - raise TProtocolException(message='Required field type is unset!') + raise TProtocolException(message="Required field type is unset!") if self.image is None: - raise TProtocolException(message='Required field image is unset!') + raise TProtocolException(message="Required field image is unset!") return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1453,14 +2171,22 @@ class PlaybookResult(object): """ - - def __init__(self, status=None, stdout=None, stderr=None,): + def __init__( + self, + status=None, + stdout=None, + stderr=None, + ): self.status = status self.stdout = stdout self.stderr = stderr def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1475,12 +2201,20 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.stdout = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.stdout = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.stderr = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.stderr = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1490,37 +2224,218 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class MetadataServerNotAvailableException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super(MetadataServerNotAvailableException, self).__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + 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 + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + 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() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._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("MetadataServerNotAvailableException") + if self.message is not None: + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + 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)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class MetadataServerNotAllowedException(TException): + """ + Attributes: + - message + + """ + + def __init__( + self, + message=None, + ): + super(MetadataServerNotAllowedException, self).__setattr__("message", message) + + def __setattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __delattr__(self, *args): + raise TypeError("can't modify immutable instance") + + def __hash__(self): + 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 + ): + return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) + iprot.readStructBegin() + message = None + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + 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() + ) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + return cls( + message=message, + ) + + def write(self, oprot): + if oprot._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("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.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): return + 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__ @@ -1538,11 +2453,17 @@ class ResourceNotFoundException(TException): """ - - def __init__(self, message=None, resource_type=None, name_or_id=None,): - super(ResourceNotFoundException, self).__setattr__('message', message) - super(ResourceNotFoundException, self).__setattr__('resource_type', resource_type) - super(ResourceNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + resource_type=None, + name_or_id=None, + ): + super(ResourceNotFoundException, self).__setattr__("message", message) + super(ResourceNotFoundException, self).__setattr__( + "resource_type", resource_type + ) + super(ResourceNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -1551,11 +2472,21 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.resource_type, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.resource_type, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -1567,17 +2498,29 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - resource_type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + resource_type = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1592,20 +2535,34 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('ResourceNotFoundException') + oprot.writeStructBegin("ResourceNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.resource_type is not None: - oprot.writeFieldBegin('resource_type', TType.STRING, 2) - oprot.writeString(self.resource_type.encode('utf-8') if sys.version_info[0] == 2 else self.resource_type) + oprot.writeFieldBegin("resource_type", TType.STRING, 2) + oprot.writeString( + self.resource_type.encode("utf-8") + if sys.version_info[0] == 2 + else self.resource_type + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 3) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 3) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1617,9 +2574,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1635,9 +2591,11 @@ class ResourceNotAvailableException(TException): """ - - def __init__(self, message=None,): - super(ResourceNotAvailableException, self).__setattr__('message', message) + def __init__( + self, + message=None, + ): + super(ResourceNotAvailableException, self).__setattr__("message", message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -1646,11 +2604,15 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, )) + return hash(self.__class__) ^ hash((self.message,)) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -1660,7 +2622,11 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1673,12 +2639,18 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('ResourceNotAvailableException') + oprot.writeStructBegin("ResourceNotAvailableException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1690,9 +2662,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1709,10 +2680,13 @@ class TemplateNotFoundException(TException): """ - - def __init__(self, message=None, template=None,): - super(TemplateNotFoundException, self).__setattr__('message', message) - super(TemplateNotFoundException, self).__setattr__('template', template) + def __init__( + self, + message=None, + template=None, + ): + super(TemplateNotFoundException, self).__setattr__("message", message) + super(TemplateNotFoundException, self).__setattr__("template", template) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -1721,11 +2695,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.template, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.template, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -1736,12 +2719,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - template = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + template = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1755,16 +2746,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('TemplateNotFoundException') + oprot.writeStructBegin("TemplateNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.template is not None: - oprot.writeFieldBegin('template', TType.STRING, 2) - oprot.writeString(self.template.encode('utf-8') if sys.version_info[0] == 2 else self.template) + oprot.writeFieldBegin("template", TType.STRING, 2) + oprot.writeString( + self.template.encode("utf-8") + if sys.version_info[0] == 2 + else self.template + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1776,9 +2777,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1795,10 +2795,13 @@ class NameAlreadyUsedException(TException): """ - - def __init__(self, message=None, name=None,): - super(NameAlreadyUsedException, self).__setattr__('message', message) - super(NameAlreadyUsedException, self).__setattr__('name', name) + def __init__( + self, + message=None, + name=None, + ): + super(NameAlreadyUsedException, self).__setattr__("message", message) + super(NameAlreadyUsedException, self).__setattr__("name", name) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -1807,11 +2810,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -1822,12 +2834,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1841,16 +2861,24 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('NameAlreadyUsedException') + oprot.writeStructBegin("NameAlreadyUsedException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 2) + oprot.writeString( + self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1862,9 +2890,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1881,10 +2908,13 @@ class ServerNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(ServerNotFoundException, self).__setattr__('message', message) - super(ServerNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(ServerNotFoundException, self).__setattr__("message", message) + super(ServerNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -1893,11 +2923,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -1908,12 +2947,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1927,16 +2974,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('ServerNotFoundException') + oprot.writeStructBegin("ServerNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1948,9 +3005,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1967,10 +3023,15 @@ class SecurityGroupRuleNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(SecurityGroupRuleNotFoundException, self).__setattr__('message', message) - super(SecurityGroupRuleNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(SecurityGroupRuleNotFoundException, self).__setattr__("message", message) + super(SecurityGroupRuleNotFoundException, self).__setattr__( + "name_or_id", name_or_id + ) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -1979,11 +3040,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -1994,12 +3064,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2013,16 +3091,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('SecurityGroupRuleNotFoundException') + oprot.writeStructBegin("SecurityGroupRuleNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2034,9 +3122,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2053,10 +3140,13 @@ class FlavorNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(FlavorNotFoundException, self).__setattr__('message', message) - super(FlavorNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(FlavorNotFoundException, self).__setattr__("message", message) + super(FlavorNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2065,11 +3155,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2080,12 +3179,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2099,16 +3206,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('FlavorNotFoundException') + oprot.writeStructBegin("FlavorNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2120,9 +3237,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2139,10 +3255,13 @@ class VolumeNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(VolumeNotFoundException, self).__setattr__('message', message) - super(VolumeNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(VolumeNotFoundException, self).__setattr__("message", message) + super(VolumeNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2151,11 +3270,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2166,12 +3294,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2185,16 +3321,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('VolumeNotFoundException') + oprot.writeStructBegin("VolumeNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2206,9 +3352,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2225,10 +3370,13 @@ class SnapshotNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(SnapshotNotFoundException, self).__setattr__('message', message) - super(SnapshotNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(SnapshotNotFoundException, self).__setattr__("message", message) + super(SnapshotNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2237,11 +3385,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2252,12 +3409,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2271,16 +3436,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('SnapshotNotFoundException') + oprot.writeStructBegin("SnapshotNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2292,9 +3467,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2311,10 +3485,13 @@ class ImageNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(ImageNotFoundException, self).__setattr__('message', message) - super(ImageNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(ImageNotFoundException, self).__setattr__("message", message) + super(ImageNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2323,11 +3500,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2338,12 +3524,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2357,16 +3551,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('ImageNotFoundException') + oprot.writeStructBegin("ImageNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2378,9 +3582,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2397,10 +3600,13 @@ class ClusterNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(ClusterNotFoundException, self).__setattr__('message', message) - super(ClusterNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(ClusterNotFoundException, self).__setattr__("message", message) + super(ClusterNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2409,11 +3615,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2424,12 +3639,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2443,16 +3666,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('ClusterNotFoundException') + oprot.writeStructBegin("ClusterNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2464,9 +3697,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2483,10 +3715,13 @@ class BackendNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(BackendNotFoundException, self).__setattr__('message', message) - super(BackendNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(BackendNotFoundException, self).__setattr__("message", message) + super(BackendNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2495,11 +3730,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2510,12 +3754,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2529,16 +3781,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('BackendNotFoundException') + oprot.writeStructBegin("BackendNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2550,9 +3812,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2569,10 +3830,13 @@ class PlaybookNotFoundException(TException): """ - - def __init__(self, message=None, name_or_id=None,): - super(PlaybookNotFoundException, self).__setattr__('message', message) - super(PlaybookNotFoundException, self).__setattr__('name_or_id', name_or_id) + def __init__( + self, + message=None, + name_or_id=None, + ): + super(PlaybookNotFoundException, self).__setattr__("message", message) + super(PlaybookNotFoundException, self).__setattr__("name_or_id", name_or_id) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2581,11 +3845,20 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, self.name_or_id, )) + return hash(self.__class__) ^ hash( + ( + self.message, + self.name_or_id, + ) + ) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2596,12 +3869,20 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - name_or_id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + name_or_id = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2615,16 +3896,26 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('PlaybookNotFoundException') + oprot.writeStructBegin("PlaybookNotFoundException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() if self.name_or_id is not None: - oprot.writeFieldBegin('name_or_id', TType.STRING, 2) - oprot.writeString(self.name_or_id.encode('utf-8') if sys.version_info[0] == 2 else self.name_or_id) + oprot.writeFieldBegin("name_or_id", TType.STRING, 2) + oprot.writeString( + self.name_or_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.name_or_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2636,9 +3927,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2654,9 +3944,11 @@ class DefaultException(TException): """ - - def __init__(self, message=None,): - super(DefaultException, self).__setattr__('message', message) + def __init__( + self, + message=None, + ): + super(DefaultException, self).__setattr__("message", message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2665,11 +3957,15 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, )) + return hash(self.__class__) ^ hash((self.message,)) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2679,7 +3975,11 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2692,12 +3992,18 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('DefaultException') + oprot.writeStructBegin("DefaultException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2709,9 +4015,8 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2729,9 +4034,11 @@ class OpenStackConflictException(TException): """ - - def __init__(self, message=None,): - super(OpenStackConflictException, self).__setattr__('message', message) + def __init__( + self, + message=None, + ): + super(OpenStackConflictException, self).__setattr__("message", message) def __setattr__(self, *args): raise TypeError("can't modify immutable instance") @@ -2740,11 +4047,15 @@ def __delattr__(self, *args): raise TypeError("can't modify immutable instance") def __hash__(self): - return hash(self.__class__) ^ hash((self.message, )) + return hash(self.__class__) ^ hash((self.message,)) @classmethod def read(cls, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and cls.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and cls.thrift_spec is not None + ): return iprot._fast_decode(None, iprot, [cls, cls.thrift_spec]) iprot.readStructBegin() message = None @@ -2754,7 +4065,11 @@ def read(cls, iprot): break if fid == 1: if ftype == TType.STRING: - message = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + message = ( + iprot.readString().decode("utf-8", errors="replace") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -2767,12 +4082,18 @@ def read(cls, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('OpenStackConflictException') + oprot.writeStructBegin("OpenStackConflictException") if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldBegin("message", TType.STRING, 1) + oprot.writeString( + self.message.encode("utf-8") + if sys.version_info[0] == 2 + else self.message + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2784,229 +4105,943 @@ 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(VirtualMachineServerMetadata) +VirtualMachineServerMetadata.thrift_spec = ( + None, # 0 + ( + 1, + TType.LIST, + "public_keys", + (TType.STRING, "UTF8", False), + None, + ), # 1 + ( + 2, + TType.STRING, + "hashed_auth_token", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "ip", + "UTF8", + 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 +) +all_structs.append(MetadataServerNotAllowedException) +MetadataServerNotAllowedException.thrift_spec = ( + None, # 0 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 ) all_structs.append(ResourceNotFoundException) ResourceNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'resource_type', 'UTF8', None, ), # 2 - (3, TType.STRING, 'name_or_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "resource_type", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 3 ) all_structs.append(ResourceNotAvailableException) ResourceNotAvailableException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 ) all_structs.append(TemplateNotFoundException) TemplateNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'template', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "template", + "UTF8", + None, + ), # 2 ) all_structs.append(NameAlreadyUsedException) NameAlreadyUsedException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name", + "UTF8", + None, + ), # 2 ) all_structs.append(ServerNotFoundException) ServerNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(SecurityGroupRuleNotFoundException) SecurityGroupRuleNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(FlavorNotFoundException) FlavorNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(VolumeNotFoundException) VolumeNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(SnapshotNotFoundException) SnapshotNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(ImageNotFoundException) ImageNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(ClusterNotFoundException) ClusterNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(BackendNotFoundException) BackendNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(PlaybookNotFoundException) PlaybookNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - (2, TType.STRING, 'name_or_id', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "name_or_id", + "UTF8", + None, + ), # 2 ) all_structs.append(DefaultException) DefaultException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 ) all_structs.append(OpenStackConflictException) OpenStackConflictException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "message", + "UTF8", + None, + ), # 1 ) fix_spec(all_structs) del all_structs From 755aa2a4484140347d96c032d4b52d56c1993d08 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Wed, 7 Aug 2024 15:21:32 +0200 Subject: [PATCH 04/15] updated thrift file --- portal_client.thrift | 4 +- simple_vm_client/VirtualMachineHandler.py | 4 ++ simple_vm_client/VirtualMachineService-remote | 4 +- simple_vm_client/VirtualMachineService.py | 68 +++++++++---------- .../openstack_connector.py | 14 ++-- 5 files changed, 49 insertions(+), 45 deletions(-) diff --git a/portal_client.thrift b/portal_client.thrift index e19310be..cbdea1ee 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -465,7 +465,7 @@ service VirtualMachineService { 10:optional string research_environment 11:optional list additional_security_group_ids, 12:optional string slurm_version, - 13:optional string auth_token, + 13:optional string metadata_token, ) @@ -499,7 +499,7 @@ service VirtualMachineService { 7:list> volume_ids_path_new, 8:list> volume_ids_path_attach, 9:optional list additional_security_group_ids, - 10:optional string auth_token, + 10:optional string metadata_token, ) throws (1:NameAlreadyUsedException e,2:ResourceNotAvailableException r,3: ImageNotFoundException i,4: FlavorNotFoundException f,5:DefaultException d) diff --git a/simple_vm_client/VirtualMachineHandler.py b/simple_vm_client/VirtualMachineHandler.py index 6d9bbdf9..77601f4d 100644 --- a/simple_vm_client/VirtualMachineHandler.py +++ b/simple_vm_client/VirtualMachineHandler.py @@ -382,6 +382,7 @@ def start_server( research_environment: str, additional_security_group_ids: list[str], slurm_version: str = None, + metadata_token: str = None, ) -> str: if research_environment: research_environment_metadata = ( @@ -403,6 +404,7 @@ def start_server( research_environment_metadata=research_environment_metadata, additional_security_group_ids=additional_security_group_ids, slurm_version=slurm_version, + metadata_token=metadata_token, ) def start_server_with_custom_key( @@ -415,6 +417,7 @@ def start_server_with_custom_key( volume_ids_path_new: list[dict[str, str]], volume_ids_path_attach: list[dict[str, str]], additional_security_group_ids: list[str], + metadata_token: str = None, ) -> str: if research_environment: research_environment_metadata = ( @@ -433,6 +436,7 @@ def start_server_with_custom_key( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, additional_security_group_ids=additional_security_group_ids, + metadata_token=metadata_token, ) self.forc_connector.set_vm_wait_for_playbook( openstack_id=openstack_id, private_key=private_key, name=servername diff --git a/simple_vm_client/VirtualMachineService-remote b/simple_vm_client/VirtualMachineService-remote index 56ad53ec..f4c80edb 100755 --- a/simple_vm_client/VirtualMachineService-remote +++ b/simple_vm_client/VirtualMachineService-remote @@ -53,12 +53,12 @@ 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( - " 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 auth_token)" + " 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)" ) 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 auth_token)" + " 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)" ) print(" bool exist_server(string name)") print( diff --git a/simple_vm_client/VirtualMachineService.py b/simple_vm_client/VirtualMachineService.py index 90195c8f..3b088fe7 100644 --- a/simple_vm_client/VirtualMachineService.py +++ b/simple_vm_client/VirtualMachineService.py @@ -203,7 +203,7 @@ def start_server( research_environment, additional_security_group_ids, slurm_version, - auth_token, + metadata_token, ): """ Parameters: @@ -218,7 +218,7 @@ def start_server( - research_environment - additional_security_group_ids - slurm_version - - auth_token + - metadata_token """ @@ -243,7 +243,7 @@ def start_server_with_custom_key( volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids, - auth_token, + metadata_token, ): """ Start a new server with custom key for ansible. @@ -257,7 +257,7 @@ def start_server_with_custom_key( - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids - - auth_token + - metadata_token """ @@ -1497,7 +1497,7 @@ def start_server( research_environment, additional_security_group_ids, slurm_version, - auth_token, + metadata_token, ): """ Parameters: @@ -1512,7 +1512,7 @@ def start_server( - research_environment - additional_security_group_ids - slurm_version - - auth_token + - metadata_token """ self.send_start_server( @@ -1527,7 +1527,7 @@ def start_server( research_environment, additional_security_group_ids, slurm_version, - auth_token, + metadata_token, ) return self.recv_start_server() @@ -1544,7 +1544,7 @@ def send_start_server( research_environment, additional_security_group_ids, slurm_version, - auth_token, + metadata_token, ): self._oprot.writeMessageBegin("start_server", TMessageType.CALL, self._seqid) args = start_server_args() @@ -1559,7 +1559,7 @@ def send_start_server( args.research_environment = research_environment args.additional_security_group_ids = additional_security_group_ids args.slurm_version = slurm_version - args.auth_token = auth_token + args.metadata_token = metadata_token args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -1668,7 +1668,7 @@ def start_server_with_custom_key( volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids, - auth_token, + metadata_token, ): """ Start a new server with custom key for ansible. @@ -1682,7 +1682,7 @@ def start_server_with_custom_key( - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids - - auth_token + - metadata_token """ self.send_start_server_with_custom_key( @@ -1694,7 +1694,7 @@ def start_server_with_custom_key( volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids, - auth_token, + metadata_token, ) return self.recv_start_server_with_custom_key() @@ -1708,7 +1708,7 @@ def send_start_server_with_custom_key( volume_ids_path_new, volume_ids_path_attach, additional_security_group_ids, - auth_token, + metadata_token, ): self._oprot.writeMessageBegin( "start_server_with_custom_key", TMessageType.CALL, self._seqid @@ -1722,7 +1722,7 @@ def send_start_server_with_custom_key( args.volume_ids_path_new = volume_ids_path_new args.volume_ids_path_attach = volume_ids_path_attach args.additional_security_group_ids = additional_security_group_ids - args.auth_token = auth_token + args.metadata_token = metadata_token args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -4462,7 +4462,7 @@ def process_start_server(self, seqid, iprot, oprot): args.research_environment, args.additional_security_group_ids, args.slurm_version, - args.auth_token, + args.metadata_token, ) msg_type = TMessageType.REPLY except TTransport.TTransportException: @@ -4565,7 +4565,7 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): args.volume_ids_path_new, args.volume_ids_path_attach, args.additional_security_group_ids, - args.auth_token, + args.metadata_token, ) msg_type = TMessageType.REPLY except TTransport.TTransportException: @@ -9568,7 +9568,7 @@ class start_server_args(object): - research_environment - additional_security_group_ids - slurm_version - - auth_token + - metadata_token """ @@ -9585,7 +9585,7 @@ def __init__( research_environment=None, additional_security_group_ids=None, slurm_version=None, - auth_token=None, + metadata_token=None, ): self.flavor_name = flavor_name self.image_name = image_name @@ -9598,7 +9598,7 @@ def __init__( self.research_environment = research_environment self.additional_security_group_ids = additional_security_group_ids self.slurm_version = slurm_version - self.auth_token = auth_token + self.metadata_token = metadata_token def read(self, iprot): if ( @@ -9764,7 +9764,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 13: if ftype == TType.STRING: - self.auth_token = ( + self.metadata_token = ( iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() @@ -9899,12 +9899,12 @@ def write(self, oprot): else self.slurm_version ) oprot.writeFieldEnd() - if self.auth_token is not None: - oprot.writeFieldBegin("auth_token", TType.STRING, 13) + if self.metadata_token is not None: + oprot.writeFieldBegin("metadata_token", TType.STRING, 13) oprot.writeString( - self.auth_token.encode("utf-8") + self.metadata_token.encode("utf-8") if sys.version_info[0] == 2 - else self.auth_token + else self.metadata_token ) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10008,7 +10008,7 @@ def __ne__(self, other): ( 13, TType.STRING, - "auth_token", + "metadata_token", "UTF8", None, ), # 13 @@ -10520,7 +10520,7 @@ class start_server_with_custom_key_args(object): - volume_ids_path_new - volume_ids_path_attach - additional_security_group_ids - - auth_token + - metadata_token """ @@ -10534,7 +10534,7 @@ def __init__( volume_ids_path_new=None, volume_ids_path_attach=None, additional_security_group_ids=None, - auth_token=None, + metadata_token=None, ): self.flavor_name = flavor_name self.image_name = image_name @@ -10544,7 +10544,7 @@ def __init__( self.volume_ids_path_new = volume_ids_path_new self.volume_ids_path_attach = volume_ids_path_attach self.additional_security_group_ids = additional_security_group_ids - self.auth_token = auth_token + self.metadata_token = metadata_token def read(self, iprot): if ( @@ -10678,7 +10678,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: - self.auth_token = ( + self.metadata_token = ( iprot.readString().decode("utf-8", errors="replace") if sys.version_info[0] == 2 else iprot.readString() @@ -10788,12 +10788,12 @@ def write(self, oprot): ) oprot.writeListEnd() oprot.writeFieldEnd() - if self.auth_token is not None: - oprot.writeFieldBegin("auth_token", TType.STRING, 10) + if self.metadata_token is not None: + oprot.writeFieldBegin("metadata_token", TType.STRING, 10) oprot.writeString( - self.auth_token.encode("utf-8") + self.metadata_token.encode("utf-8") if sys.version_info[0] == 2 - else self.auth_token + else self.metadata_token ) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10876,7 +10876,7 @@ def __ne__(self, other): ( 10, TType.STRING, - "auth_token", + "metadata_token", "UTF8", None, ), # 10 diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index 3f01c2fa..bcf4cf7b 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -1304,16 +1304,16 @@ def create_userdata( volume_ids_path_new: list[dict[str, str]], volume_ids_path_attach: list[dict[str, str]], additional_keys: list[str], - auth_token=None, + metadata_token=None, ) -> str: unlock_ubuntu_user_script = "#!/bin/bash\npasswd -u ubuntu\n" unlock_ubuntu_user_script_encoded = encodeutils.safe_encode( unlock_ubuntu_user_script.encode("utf-8") ) init_script = unlock_ubuntu_user_script_encoded - if auth_token: + if metadata_token: save_metadata_token_script = self.create_save_metadata_auth_token_script( - token=auth_token + token=metadata_token ) init_script = ( init_script @@ -1353,7 +1353,7 @@ def start_server( additional_keys: Union[list[str], None] = None, additional_security_group_ids: Union[list[str], None] = None, slurm_version: str = None, - auth_token: str = None, + metadata_token: str = None, ) -> str: logger.info(f"Start Server {servername}") @@ -1396,7 +1396,7 @@ def start_server( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, additional_keys=additional_keys, - auth_token=auth_token, + metadata_token=metadata_token, ) logger.info(f"Starting Server {servername}...") server = self.openstack_connection.create_server( @@ -1480,7 +1480,7 @@ def start_server_with_playbook( volume_ids_path_attach: list[dict[str, str]] = None, # type: ignore additional_keys: list[str] = None, # type: ignore additional_security_group_ids=None, # type: ignore - auth_token: str = None, + metadata_token: str = None, ) -> tuple[str, str]: logger.info(f"Start Server {servername}") @@ -1514,7 +1514,7 @@ def start_server_with_playbook( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, additional_keys=additional_keys, - auth_token=auth_token, + metadata_token=metadata_token, ) server = self.openstack_connection.create_server( name=servername, From c51007d6096dfb293473a3467398d00b365f67db Mon Sep 17 00:00:00 2001 From: dweinholz Date: Wed, 7 Aug 2024 15:26:30 +0200 Subject: [PATCH 05/15] updated thrift file --- .../scripts/bash/save_metadata_auth_token.sh | 0 simple_vm_client/scripts/__init__.py | 0 .../scripts/bash/add_keys_to_authorized.sh | 8 --- .../scripts/bash/deactive_auto_update.sh | 5 -- simple_vm_client/scripts/bash/mount.sh | 67 ------------------- 5 files changed, 80 deletions(-) rename simple_vm_client/{ => openstack_connector}/scripts/bash/save_metadata_auth_token.sh (100%) delete mode 100644 simple_vm_client/scripts/__init__.py delete mode 100644 simple_vm_client/scripts/bash/add_keys_to_authorized.sh delete mode 100644 simple_vm_client/scripts/bash/deactive_auto_update.sh delete mode 100644 simple_vm_client/scripts/bash/mount.sh diff --git a/simple_vm_client/scripts/bash/save_metadata_auth_token.sh b/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh similarity index 100% rename from simple_vm_client/scripts/bash/save_metadata_auth_token.sh rename to simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh diff --git a/simple_vm_client/scripts/__init__.py b/simple_vm_client/scripts/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/simple_vm_client/scripts/bash/add_keys_to_authorized.sh b/simple_vm_client/scripts/bash/add_keys_to_authorized.sh deleted file mode 100644 index 254b0f62..00000000 --- a/simple_vm_client/scripts/bash/add_keys_to_authorized.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -declare -a keys_to_add=KEYS_TO_ADD -echo "Found keys: ${#keys_to_add[*]}" -for ix in ${!keys_to_add[*]} -do - printf "\n%s" "${keys_to_add[$ix]}" >> /home/ubuntu/.ssh/authorized_keys - -done \ No newline at end of file diff --git a/simple_vm_client/scripts/bash/deactive_auto_update.sh b/simple_vm_client/scripts/bash/deactive_auto_update.sh deleted file mode 100644 index b6faefd2..00000000 --- a/simple_vm_client/scripts/bash/deactive_auto_update.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -echo > /etc/apt/apt.conf.d/20auto-upgrades << "END" -APT::Periodic::Update-Package-Lists "0" -APT::Periodic::Unattended-Upgrade "0" -END diff --git a/simple_vm_client/scripts/bash/mount.sh b/simple_vm_client/scripts/bash/mount.sh deleted file mode 100644 index dc23ac0f..00000000 --- a/simple_vm_client/scripts/bash/mount.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -declare -a volumes_new=VOLUME_IDS_NEW -declare -a paths_new=VOLUME_PATHS_NEW -declare -a volumes_attach=VOLUME_IDS_ATTACH -declare -a paths_attach=VOLUME_PATHS_ATTACH - -ITER=0 -ABORT_COUNTER=0 -for id in "${volumes_new[@]}"; do - while :; do - if [ -e /dev/disk/by-id/"$id" ]; then - echo "volume ""$id"" found" - ABORT_COUNTER=0 - break - else - echo "no volume ""$id"" found" - if [ $ABORT_COUNTER -gt 12 ]; then - break - fi - ((ABORT_COUNTER++)) - - sleep 10 - fi - done - if [ $ABORT_COUNTER -gt 12 ]; then - echo "Waited 120 seconds for ""$id"" " - ABORT_COUNTER=0 - - continue - fi - cd /dev/disk/by-id || exit - sudo mkfs.ext4 "$id" - sudo mkdir -p /vol//${paths_new[ITER]} - sudo chmod 777 /vol//${paths_new[ITER]}/ - sudo mount "$id" /vol//${paths_new[ITER]} - ((ITER++)) -done -ITER=0 -ABORT_COUNTER=0 -for id in "${volumes_attach[@]}"; do - while :; do - if [ -e /dev/disk/by-id/"$id" ]; then - echo "volume ""$id"" found" - ABORT_COUNTER=0 - break - else - echo "no volume ""$id"" found" - if [ $ABORT_COUNTER -gt 12 ]; then - break - fi - ((ABORT_COUNTER++)) - - sleep 10 - fi - done - if [ $ABORT_COUNTER -gt 12 ]; then - echo "Waited 120 seconds for ""$id"" " - ABORT_COUNTER=0 - - continue - fi - cd /dev/disk/by-id || exit - sudo mkdir -p /vol//${paths_attach[ITER]} - sudo chmod 777 /vol//${paths_attach[ITER]}/ - sudo mount "$id" /vol//${paths_attach[ITER]} - ((ITER++)) -done From a9174495e8a4082a56d175c87ee437cd76bd99e7 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Wed, 7 Aug 2024 15:53:06 +0200 Subject: [PATCH 06/15] updated metadata script --- .../scripts/bash/save_metadata_auth_token.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh b/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh index 8d973632..c76a0398 100644 --- a/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh +++ b/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh @@ -1,8 +1,10 @@ #!/bin/bash +# Ensure that METADATA_AUTH_TOKEN is properly escaped +TOKEN_ESCAPED=$(printf '%q' "$METADATA_AUTH_TOKEN") # Create a configuration file with the token -echo "METADATA_ACCESS_TOKEN='$METADATA_AUTH_TOKEN'" > /etc/metadata_config.env +echo "METADATA_ACCESS_TOKEN='$TOKEN_ESCAPED'" > /etc/metadata_config.env # Secure the file permissions chmod 600 /etc/metadata_config.env From 4a81f41d9c0f406975d14911908f27e208be4550 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Fri, 9 Aug 2024 08:44:19 +0200 Subject: [PATCH 07/15] added more logging --- simple_vm_client/config/config_local.yml | 2 +- simple_vm_client/metadata_connector/metadata_connector.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/simple_vm_client/config/config_local.yml b/simple_vm_client/config/config_local.yml index 35216423..fa8950dd 100644 --- a/simple_vm_client/config/config_local.yml +++ b/simple_vm_client/config/config_local.yml @@ -84,4 +84,4 @@ metadata_server: activated: True use_https: False host: simplevm_metadata_server - port: 8008 + port: 8000 diff --git a/simple_vm_client/metadata_connector/metadata_connector.py b/simple_vm_client/metadata_connector/metadata_connector.py index 654636a3..d60c3016 100644 --- a/simple_vm_client/metadata_connector/metadata_connector.py +++ b/simple_vm_client/metadata_connector/metadata_connector.py @@ -14,11 +14,13 @@ class MetadataConnector: def __init__(self, config_file: str): logger.info("Initializing Metadata Connector") self.load_config_yml(config_file) + self.is_metadata_server_available() def load_config_yml(self, config_file: str) -> None: logger.info(f"Load config file openstack config - {config_file}") with open(config_file, "r") as ymlfile: cfg = yaml.load(ymlfile, Loader=yaml.SafeLoader) + logger.info("Config file loaded") if "metadata_server" not in cfg: logger.info("Metadata Server configuration not found. Skipping.") self.ACTIVATED = False @@ -41,7 +43,7 @@ def load_config_yml(self, config_file: str) -> None: self.METADATA_BASE_URL = ( f"http://{self.METADATA_SERVER_HOST}:{self.METADATA_SERVER_PORT}/" ) - + logger.info("Metadata Config Loaded") self.load_env_config() def load_env_config(self): @@ -55,6 +57,7 @@ def load_env_config(self): f"MetadataServer missing keys {missing_keys_str} not provided in env!" ) self.METADATA_SERVER_TOKEN = os.environ.get("METADATA_SERVER_TOKEN") + logger.info("Metadata Environment loaded") def remove_metadata(self, ip: str): if not self.ACTIVATED: @@ -102,11 +105,12 @@ def set_metadata(self, ip: str, metadata: VirtualMachineServerMetadata): logger.error(f"Failed to set metadata for {ip}: {e}") def is_metadata_server_available(self): + logger.info("Metadata Server checking health...") + if not self.ACTIVATED: logger.info("Metadata Server not activated. Skipping.") return False - logger.info("Metadata Server checking health...") health_url = urljoin(self.METADATA_BASE_URL, "health") try: From 067f9c96dfe30e9b6b634dcc9db3f9a0b8c401b9 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Mon, 12 Aug 2024 07:42:33 +0200 Subject: [PATCH 08/15] fixed structure metadata for post request --- .../metadata_connector/metadata_connector.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/simple_vm_client/metadata_connector/metadata_connector.py b/simple_vm_client/metadata_connector/metadata_connector.py index d60c3016..f028e89d 100644 --- a/simple_vm_client/metadata_connector/metadata_connector.py +++ b/simple_vm_client/metadata_connector/metadata_connector.py @@ -81,6 +81,13 @@ def remove_metadata(self, ip: str): except requests.exceptions.RequestException as e: logger.error(f"Failed to remove metadata for {ip}: {e}") + def _serialize_metadata(self, metadata: VirtualMachineServerMetadata): + return { + "public_keys": metadata.public_keys, + "hashed_auth_token": metadata.hashed_auth_token, + "ip": metadata.ip, + } + def set_metadata(self, ip: str, metadata: VirtualMachineServerMetadata): if not self.ACTIVATED: logger.info("Metadata Server not activated. Skipping.") @@ -88,14 +95,13 @@ def set_metadata(self, ip: str, metadata: VirtualMachineServerMetadata): logger.info(f"Setting Metadata for {ip}") set_metadata_url = urljoin(self.METADATA_BASE_URL, f"metadata/{ip}") - try: response = requests.post( set_metadata_url, - json=metadata, + json=self._serialize_metadata(metadata=metadata), timeout=(30, 30), headers={ - "x_auth_token": self.METADATA_SERVER_TOKEN, + "X-Auth-Token": self.METADATA_SERVER_TOKEN, }, verify=False, ) From fc15d9f86afda88d462e6e35370dd26343ac3baf Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 13 Aug 2024 08:54:21 +0200 Subject: [PATCH 09/15] upated script --- .../metadata_connector/metadata_connector.py | 2 ++ .../openstack_connector.py | 19 +++++++++++++------ .../scripts/bash/save_metadata_auth_token.sh | 4 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/simple_vm_client/metadata_connector/metadata_connector.py b/simple_vm_client/metadata_connector/metadata_connector.py index f028e89d..74e5e438 100644 --- a/simple_vm_client/metadata_connector/metadata_connector.py +++ b/simple_vm_client/metadata_connector/metadata_connector.py @@ -89,6 +89,8 @@ def _serialize_metadata(self, metadata: VirtualMachineServerMetadata): } def set_metadata(self, ip: str, metadata: VirtualMachineServerMetadata): + if not ip: + return if not self.ACTIVATED: logger.info("Metadata Server not activated. Skipping.") return diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index bcf4cf7b..d0efdac4 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -484,16 +484,23 @@ def create_add_keys_script(self, keys: list[str]) -> str: def create_save_metadata_auth_token_script(self, token: str) -> str: logger.info("create save metadata auth token script") file_dir = os.path.dirname(os.path.abspath(__file__)) - metadata_token_script = os.path.join( + metadata_token_script_path = os.path.join( file_dir, "scripts/bash/save_metadata_auth_token.sh" ) - with open(metadata_token_script, "r") as file: + with open(metadata_token_script_path, "r") as file: text = file.read() - text = text.replace("METADATA_AUTH_TOKEN", token) - text = encodeutils.safe_encode(text.encode("utf-8")) - metadata_token_script = text - return metadata_token_script + + # Use a unique placeholder in the script for replacement + placeholder = "REPLACE_WITH_ACTUAL_TOKEN" + + # Replace the placeholder with the actual token + text = text.replace(placeholder, token) + + # Encode the text safely, if necessary, and ensure it's a string + text = encodeutils.safe_encode(text.encode("utf-8")).decode("utf-8") + + return text def netcat(self, host: str, port: int) -> bool: logger.info(f"Checking SSH Connection {host}:{port}") diff --git a/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh b/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh index c76a0398..50c12979 100644 --- a/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh +++ b/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Ensure that METADATA_AUTH_TOKEN is properly escaped -TOKEN_ESCAPED=$(printf '%q' "$METADATA_AUTH_TOKEN") +# Use a clear placeholder that will be replaced in the Python script +TOKEN_ESCAPED='REPLACE_WITH_ACTUAL_TOKEN' # Create a configuration file with the token echo "METADATA_ACCESS_TOKEN='$TOKEN_ESCAPED'" > /etc/metadata_config.env From 1384f17309615feca4a2e1d8eb827430e6e16614 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 13 Aug 2024 09:08:41 +0200 Subject: [PATCH 10/15] fixed scripts --- simple_vm_client/openstack_connector/openstack_connector.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index d0efdac4..358c5ee8 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -497,8 +497,7 @@ def create_save_metadata_auth_token_script(self, token: str) -> str: # Replace the placeholder with the actual token text = text.replace(placeholder, token) - # Encode the text safely, if necessary, and ensure it's a string - text = encodeutils.safe_encode(text.encode("utf-8")).decode("utf-8") + text = encodeutils.safe_encode(text.encode("utf-8")) return text @@ -1344,7 +1343,6 @@ def create_userdata( + encodeutils.safe_encode("\n".encode("utf-8")) + mount_script ) - return init_script def start_server( From d715dd955b6468c9650a8d5d0f3465476362b1bc Mon Sep 17 00:00:00 2001 From: dweinholz Date: Thu, 15 Aug 2024 15:06:17 +0200 Subject: [PATCH 11/15] updatedmetadata --- simple_vm_client/metadata_connector/metadata_connector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple_vm_client/metadata_connector/metadata_connector.py b/simple_vm_client/metadata_connector/metadata_connector.py index 74e5e438..1b84e71e 100644 --- a/simple_vm_client/metadata_connector/metadata_connector.py +++ b/simple_vm_client/metadata_connector/metadata_connector.py @@ -72,7 +72,7 @@ def remove_metadata(self, ip: str): remove_metadata_url, timeout=(30, 30), headers={ - "x_auth_token": self.METADATA_SERVER_TOKEN, + "X-Auth-Token": self.METADATA_SERVER_TOKEN, }, verify=False, ) From 6d700f8e228e8c48d40fdcd135f0e804b4207b89 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Thu, 22 Aug 2024 15:10:47 +0200 Subject: [PATCH 12/15] refactor(Metadata):token saved to ubuntu user home --- .../scripts/bash/save_metadata_auth_token.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh b/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh index 50c12979..68dee29a 100644 --- a/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh +++ b/simple_vm_client/openstack_connector/scripts/bash/save_metadata_auth_token.sh @@ -3,14 +3,15 @@ # Use a clear placeholder that will be replaced in the Python script TOKEN_ESCAPED='REPLACE_WITH_ACTUAL_TOKEN' -# Create a configuration file with the token -echo "METADATA_ACCESS_TOKEN='$TOKEN_ESCAPED'" > /etc/metadata_config.env +# Create a configuration file with the token in the ubuntu user's home directory +UBUNTU_HOME_DIR="/home/ubuntu" +CONFIG_FILE_PATH="$UBUNTU_HOME_DIR/.metadata_config.env" -# Secure the file permissions -chmod 600 /etc/metadata_config.env +echo "METADATA_ACCESS_TOKEN='$TOKEN_ESCAPED'" > "$CONFIG_FILE_PATH" -# Source the configuration file for immediate use in the current session -source /etc/metadata_config.env +# Secure the file permissions so only the ubuntu user can read it +chmod 600 "$CONFIG_FILE_PATH" +chown ubuntu:ubuntu "$CONFIG_FILE_PATH" # Print a message to indicate completion -echo "Token has been set and configuration file created at /etc/metadata_config.env" +echo "Token has been set and configuration file created at $CONFIG_FILE_PATH with restricted access." From 8d36d9d10423d0d95a01aba86a5dc5a44c9522c1 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Thu, 5 Sep 2024 09:25:28 +0200 Subject: [PATCH 13/15] fixed unit tests --- simple_vm_client/test_openstack_connector.py | 4 ++++ simple_vm_client/test_virtualmachinehandler.py | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/simple_vm_client/test_openstack_connector.py b/simple_vm_client/test_openstack_connector.py index 8e9dbe51..9bdd3ec3 100644 --- a/simple_vm_client/test_openstack_connector.py +++ b/simple_vm_client/test_openstack_connector.py @@ -1550,6 +1550,7 @@ def test_start_server_with_playbook( volume_ids_path_attach, additional_keys, additional_security_group_ids, + metadata_token="test", ) # Assertions @@ -1569,6 +1570,7 @@ def test_start_server_with_playbook( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, additional_keys=additional_keys, + metadata_token="test", ) mock_get_security_groups_starting_machine.assert_called_once_with( @@ -1837,6 +1839,7 @@ def test_start_server( additional_keys=additional_keys, additional_security_group_ids=additional_security_group_ids, public_key=public_key, + metadata_token="test", ) # Assertions @@ -1856,6 +1859,7 @@ def test_start_server( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, additional_keys=additional_keys, + metadata_token="test", ) mock_get_security_groups_starting_machine.assert_called_once_with( diff --git a/simple_vm_client/test_virtualmachinehandler.py b/simple_vm_client/test_virtualmachinehandler.py index dc10ddf3..61f7b2ff 100644 --- a/simple_vm_client/test_virtualmachinehandler.py +++ b/simple_vm_client/test_virtualmachinehandler.py @@ -31,7 +31,8 @@ class TestVirtualMachineHandler(unittest.TestCase): @patch("simple_vm_client.VirtualMachineHandler.OpenStackConnector") @patch("simple_vm_client.VirtualMachineHandler.BibigridConnector") @patch("simple_vm_client.VirtualMachineHandler.ForcConnector") - def setUp(self, mock_template, mock_redis, mock_connection_pool): + @patch("simple_vm_client.VirtualMachineHandler.MetadataConnector") + def setUp(self, mock_template, mock_redis, mock_connection_pool, mock_meta): self.handler = VirtualMachineHandler(config_file="config_path") @patch("simple_vm_client.VirtualMachineHandler.thrift_converter") @@ -440,6 +441,7 @@ def test_start_server_with_res(self): additional_keys=[], research_environment="de", additional_security_group_ids=[], + metadata_token="test", ) self.handler.openstack_connector.start_server.assert_called_once_with( flavor_name=FLAVOR.name, @@ -453,6 +455,7 @@ def test_start_server_with_res(self): research_environment_metadata="res_metadata", additional_security_group_ids=[], slurm_version=None, + metadata_token="test", ) def test_start_server(self): @@ -467,6 +470,7 @@ def test_start_server(self): additional_keys=[], research_environment="", additional_security_group_ids=[], + metadata_token="test", ) self.handler.openstack_connector.start_server.assert_called_once_with( flavor_name=FLAVOR.name, @@ -480,6 +484,7 @@ def test_start_server(self): research_environment_metadata=None, additional_security_group_ids=[], slurm_version=None, + metadata_token="test", ) def test_start_server_with_custom_key(self): @@ -496,6 +501,7 @@ def test_start_server_with_custom_key(self): volume_ids_path_attach=[], research_environment="", additional_security_group_ids=[], + metadata_token="test", ) self.handler.openstack_connector.start_server_with_playbook.assert_called_once_with( flavor_name=FLAVOR.name, @@ -506,6 +512,7 @@ def test_start_server_with_custom_key(self): volume_ids_path_attach=[], additional_security_group_ids=[], research_environment_metadata=None, + metadata_token="test", ) self.handler.forc_connector.set_vm_wait_for_playbook.assert_called_once_with( openstack_id=SERVER.id, private_key="priv", name=SERVER.name @@ -528,6 +535,7 @@ def test_start_server_with_custom_key_and_res(self): volume_ids_path_attach=[], research_environment="de", additional_security_group_ids=[], + metadata_token="test", ) self.handler.openstack_connector.start_server_with_playbook.assert_called_once_with( flavor_name=FLAVOR.name, @@ -538,6 +546,7 @@ def test_start_server_with_custom_key_and_res(self): volume_ids_path_attach=[], additional_security_group_ids=[], research_environment_metadata="res_metadata", + metadata_token="test", ) self.handler.forc_connector.set_vm_wait_for_playbook.assert_called_once_with( openstack_id=SERVER.id, private_key="priv", name=SERVER.name From c0de0e7ca6cfe9c8bbf15b89eda6658102602089 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Wed, 11 Sep 2024 10:39:28 +0200 Subject: [PATCH 14/15] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index b8163eb1..98b4c725 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,3 +18,4 @@ colorama==0.4.6 gevent==24.2.1 pytest==8.3.3 types-redis==4.6.0.20240903 +oslo.utils==7.3.0 From db39074c69178fcd1b2c2ba34ee585f8614381a6 Mon Sep 17 00:00:00 2001 From: vktrrdk Date: Wed, 11 Sep 2024 09:31:52 +0000 Subject: [PATCH 15/15] added template script file to get keys (url is hardcoded) --- scripts/get_keys_from_metadata_server.sh | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 scripts/get_keys_from_metadata_server.sh diff --git a/scripts/get_keys_from_metadata_server.sh b/scripts/get_keys_from_metadata_server.sh new file mode 100644 index 00000000..3b7218f3 --- /dev/null +++ b/scripts/get_keys_from_metadata_server.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# Load the auth token from .metadata_config.env +source ~/.metadata_config.env + +# Define the URL and machine IP +URL="http://192.168.2.122:8000/metadata/192.168.2.74" +AUTH_HEADER="auth_token: ${METADATA_ACCESS_TOKEN}" + +# Fetch the JSON response from the URL +response=$(curl -s -X GET "$URL" -H "$AUTH_HEADER") + +# Extract the public_keys array from the JSON response +public_keys=$(echo "$response" | jq -r '.public_keys[]') + +# Check if public_keys is empty +if [ -z "$public_keys" ]; then + echo "No public keys found. authorized_keys file not updated." + exit 0 +fi + +# Ensure the .ssh directory and authorized_keys file exist +mkdir -p ~/.ssh +touch ~/.ssh/authorized_keys + +# Function to check if a key already exists in the authorized_keys file +key_exists() { + grep -Fqx "$1" ~/.ssh/authorized_keys +} + +# Add keys to authorized_keys if they don't already exist +added_keys=0 + +while IFS= read -r key; do + if ! key_exists "$key"; then + echo "$key" >> ~/.ssh/authorized_keys + ((added_keys++)) + fi +done <<< "$public_keys" + +if [ $added_keys -gt 0 ]; then + echo "$added_keys new public key(s) have been added to the authorized_keys file." +else + echo "All public keys were already present. No changes made to authorized_keys file." +fi \ No newline at end of file