From ef5651de707953440ba6645ef9e1712a0710d9d0 Mon Sep 17 00:00:00 2001 From: Timo Date: Fri, 20 Nov 2020 03:05:48 +0100 Subject: [PATCH 01/14] add playbooks now loading from seperate github repo, rm playbooks --- .env | 2 + .env.in | 2 + .../VirtualMachineHandler.py | 22 +++++ .../ancon/playbooks/bioconda.yml | 80 ------------------- .../ancon/playbooks/bioconda_vars_file.yml | 12 --- .../ancon/playbooks/change_key.yml | 6 -- .../ancon/playbooks/change_key_vars_file.yml | 2 - .../ancon/playbooks/cwlab.yml | 40 ---------- .../ancon/playbooks/cwlab_vars_file.yml | 5 -- .../ancon/playbooks/generic_playbook.yml | 10 --- .../ancon/playbooks/guacamole.yml | 43 ---------- .../ancon/playbooks/guacamole_vars_file.yml | 5 -- .../ancon/playbooks/optional.yml | 11 --- .../ancon/playbooks/optional_vars_file.yml | 2 - .../ancon/playbooks/rstudio.yml | 37 --------- .../ancon/playbooks/rstudio_vars_file.yml | 6 -- .../ancon/playbooks/theiaide.yml | 15 ---- .../ancon/playbooks/theiaide_vars_file.yml | 3 - 18 files changed, 26 insertions(+), 277 deletions(-) delete mode 100644 VirtualMachineService/ancon/playbooks/bioconda.yml delete mode 100644 VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml delete mode 100644 VirtualMachineService/ancon/playbooks/change_key.yml delete mode 100644 VirtualMachineService/ancon/playbooks/change_key_vars_file.yml delete mode 100644 VirtualMachineService/ancon/playbooks/cwlab.yml delete mode 100644 VirtualMachineService/ancon/playbooks/cwlab_vars_file.yml delete mode 100644 VirtualMachineService/ancon/playbooks/generic_playbook.yml delete mode 100644 VirtualMachineService/ancon/playbooks/guacamole.yml delete mode 100644 VirtualMachineService/ancon/playbooks/guacamole_vars_file.yml delete mode 100644 VirtualMachineService/ancon/playbooks/optional.yml delete mode 100644 VirtualMachineService/ancon/playbooks/optional_vars_file.yml delete mode 100644 VirtualMachineService/ancon/playbooks/rstudio.yml delete mode 100644 VirtualMachineService/ancon/playbooks/rstudio_vars_file.yml delete mode 100644 VirtualMachineService/ancon/playbooks/theiaide.yml delete mode 100644 VirtualMachineService/ancon/playbooks/theiaide_vars_file.yml diff --git a/.env b/.env index 5d2c0f90..c1e558a7 100644 --- a/.env +++ b/.env @@ -12,3 +12,5 @@ OS_PROJECT_NAME=portal-pool-dev OS_USERNAME=portal-user-dev OS_USER_DOMAIN_NAME=Default OS_PROJECT_DOMAIN_ID=default + + diff --git a/.env.in b/.env.in index 5408b097..b37f4afd 100644 --- a/.env.in +++ b/.env.in @@ -13,3 +13,5 @@ OS_USERNAME= OS_USER_DOMAIN_NAME= OS_PROJECT_DOMAIN_ID= OS_PROJECT_DOMAIN_NAME= + +GITHUB_PLAYBOOKS_REPO=https://api.github.com/repos/deNBI/resenvs/contents/ diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 8a2967a1..f0b443b3 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -67,6 +67,9 @@ from openstack import connection from openstack.exceptions import ConflictException from oslo_utils import encodeutils + +import os +import json from requests.exceptions import Timeout active_playbooks = dict() @@ -84,6 +87,8 @@ ch.setFormatter(formatter) LOG.addHandler(fh) LOG.addHandler(ch) +GITHUB_PLAYBOOKS_REPO = os.environ["GITHUB_PLAYBOOKS_REPO"] + class VirtualMachineHandler(Iface): @@ -148,6 +153,8 @@ def __init__(self, config): self.pool = redis.ConnectionPool(host="redis", port=6379) self.redis = redis.Redis(connection_pool=self.pool, charset="utf-8") + self.update_playbooks() + self.USERNAME = os.environ["OS_USERNAME"] self.PASSWORD = os.environ["OS_PASSWORD"] self.PROJECT_NAME = os.environ["OS_PROJECT_NAME"] @@ -2672,3 +2679,18 @@ def get_limits(self): "totalRamUsed": totalRamUsed, "totalInstancesUsed": totalInstancesUsed, } + + + def update_playbooks(self): + LOG.info("STARTED update") + r = req.get(GITHUB_PLAYBOOKS_REPO) + contents = json.loads(r.content) + for f in contents: + if f['name'] != "LICENSE": + LOG.info("started download of" + f["name"]) + download_link = f["download_url"] + file_request = req.get(download_link) + filename = "/code/VirtualMachineService/ancon/playbooks/" + f["name"] + playbook_file = open(filename, 'w') + playbook_file.write(file_request.content.decode("utf-8")) + playbook_file.close() \ No newline at end of file diff --git a/VirtualMachineService/ancon/playbooks/bioconda.yml b/VirtualMachineService/ancon/playbooks/bioconda.yml deleted file mode 100644 index e9523550..00000000 --- a/VirtualMachineService/ancon/playbooks/bioconda.yml +++ /dev/null @@ -1,80 +0,0 @@ -- name: Download miniconda install script - become_user: "{{ bioconda_user.name }}" - get_url: - args: - url: "{{ bioconda_folders.conda_installer_url }}" - dest: "{{ bioconda_folders.install_script }}" - mode: 0755 - timeout: 180 - force: no - -- name: Install miniconda - become_user: "{{ bioconda_user.name }}" - shell: "timeout 3m {{ bioconda_folders.install_script }} -b" - args: - executable: /bin/bash - creates: "{{ bioconda_folders.conda_dir }}" - -- name: Check for channels - become_user: "{{ bioconda_user.name }}" - shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --get channels'" - register: added_channels - -- name: Add default channel - become_user: "{{ bioconda_user.name }}" - shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels default'" - args: - executable: /bin/bash - when: added_channels.stdout.find('default') == -1 - -- name: Add bioconda channel - become_user: "{{ bioconda_user.name }}" - shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels bioconda'" - args: - executable: /bin/bash - when: added_channels.stdout.find('bioconda') == -1 - -- name: Add conda-forge channel - become_user: "{{ bioconda_user.name }}" - shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels conda-forge'" - args: - executable: /bin/bash - when: added_channels.stdout.find('conda-forge') == -1 - -- name: Init .bashrc for conda - become_user: "{{ bioconda_user.name }}" - shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda init'" - args: - executable: /bin/bash - -- name: Check for environment - become_user: "{{ bioconda_user.name }}" - shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda info -e'" - register: added_envs - -- name: Create alias for environment - become_user: "{{ bioconda_user.name }}" - shell: "echo $ALIAS_VARIABLE > ~/.bash_aliases" - environment: - ALIAS_VARIABLE: 'alias {{ bioconda_tools.env | quote }}="conda activate {{ bioconda_tools.env | quote }}"' - when: added_envs.stdout.find(bioconda_tools.env) == -1 - -- name: Create environment - become_user: "{{ bioconda_user.name }}" - shell: "timeout 2m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda create --yes -n {{ bioconda_tools.env | quote}}'" - args: - executable: /bin/bash - when: added_envs.stdout.find(bioconda_tools.env) == -1 - -- name: Check for installed packages - become_user: "{{ bioconda_user.name }}" - shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda activate {{ bioconda_tools.env | quote}} && conda list'" - register: added_packages - -- name: Install chosen packages - become_user: "{{ bioconda_user.name }}" - shell: "timeout {{ bioconda_tools.timeout_length }} bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda activate {{ bioconda_tools.env | quote}} && conda install --yes {{ item.key }}={{ item.value.version }}={{ item.value.build }}'" - args: - executable: /bin/bash - loop: "{{ q('dict', bioconda_tools.packages) }}" - when: added_packages.stdout.find(item.key) == -1 diff --git a/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml b/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml deleted file mode 100644 index d759e859..00000000 --- a/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml +++ /dev/null @@ -1,12 +0,0 @@ -bioconda_tools: - packages: - env: "denbi" - timeout_length: "5m" - -bioconda_folders: - install_script: "/home/{{ bioconda_user.name }}/install_miniconda3.sh" - conda_dir: "/home/{{ bioconda_user.name }}/miniconda3" - conda_installer_url: "https://repo.anaconda.com/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh" - -bioconda_user: - name: "ubuntu" diff --git a/VirtualMachineService/ancon/playbooks/change_key.yml b/VirtualMachineService/ancon/playbooks/change_key.yml deleted file mode 100644 index bafbd0a9..00000000 --- a/VirtualMachineService/ancon/playbooks/change_key.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: Set user public Key and remove created public Key - authorized_key: - user: ubuntu - key: "{{ change_key_vars.key }}" - state: present - exclusive: True diff --git a/VirtualMachineService/ancon/playbooks/change_key_vars_file.yml b/VirtualMachineService/ancon/playbooks/change_key_vars_file.yml deleted file mode 100644 index 68e0b3cd..00000000 --- a/VirtualMachineService/ancon/playbooks/change_key_vars_file.yml +++ /dev/null @@ -1,2 +0,0 @@ -change_key_vars: - key: diff --git a/VirtualMachineService/ancon/playbooks/cwlab.yml b/VirtualMachineService/ancon/playbooks/cwlab.yml deleted file mode 100644 index bd1623ec..00000000 --- a/VirtualMachineService/ancon/playbooks/cwlab.yml +++ /dev/null @@ -1,40 +0,0 @@ -- name: Wait for automatic system updates 1 - shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; - -- name: Wait for automatic system updates 2 - shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; - -- name: Update apt cache - apt: - update_cache: true - become: yes - -- name: Install docker.io package - apt: - name: docker.io - become: yes - -- name: Add ubuntu user to docker group - user: - name: ubuntu - groups: docker - append: yes - become: yes - -- name: Install docker python dev package - apt: - name: python3-docker - become: yes - -- name: Launch cwlab container - community.general.docker_container: - name: cwlab - image: compepigen/cwlab:dev - ports: - - "{{ cwlab_vars.exposed_port }}:5000" - volumes: - - "{{ cwlab_vars.data_volume_path }}:/data" - restart_policy: always - user: 1000:1000 - recreate: yes - container_default_behavior: no_defaults diff --git a/VirtualMachineService/ancon/playbooks/cwlab_vars_file.yml b/VirtualMachineService/ancon/playbooks/cwlab_vars_file.yml deleted file mode 100644 index 93ad4374..00000000 --- a/VirtualMachineService/ancon/playbooks/cwlab_vars_file.yml +++ /dev/null @@ -1,5 +0,0 @@ -cwlab_vars: - exposed_port: 80 - data_volume_path: /home/ubuntu/cwlab-data/ - template_version: - create_only_backend: diff --git a/VirtualMachineService/ancon/playbooks/generic_playbook.yml b/VirtualMachineService/ancon/playbooks/generic_playbook.yml deleted file mode 100644 index fb9ba6cf..00000000 --- a/VirtualMachineService/ancon/playbooks/generic_playbook.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: Setting up your virtual machine - hosts: all - become: yes - connection: paramiko_ssh - gather_facts: yes - vars_files: - tasks: - - name: Setting up your virtual machine - block: - always: diff --git a/VirtualMachineService/ancon/playbooks/guacamole.yml b/VirtualMachineService/ancon/playbooks/guacamole.yml deleted file mode 100644 index 06a7bf70..00000000 --- a/VirtualMachineService/ancon/playbooks/guacamole.yml +++ /dev/null @@ -1,43 +0,0 @@ -- name: Wait for automatic system updates 1 - shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; - -- name: Wait for automatic system updates 2 - shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; - -- name: Install guacamole role - include_role: - name: guacamole - when: guacamole_vars.create_only_backend == "false" - -- name: Flush guacamole handlers - meta: flush_handlers - when: guacamole_vars.create_only_backend == "false" - -- name: Setup password for default user - user: - name: "{{ guacamole_vars.DEFAULT_USER }}" - password: "{{ guacamole_vars.DEFAULT_PASSWORD_HASHED }}" - when: guacamole_vars.create_only_backend == "true" - -- name: Restart xrdp - systemd: - name: xrdp - state: restarted - when: guacamole_vars.create_only_backend == "true" - -- name: Restart guacd - systemd: - name: guacd - state: restarted - when: guacamole_vars.create_only_backend == "true" - -- name: Restart Tomcat - systemd: - name: tomcat8 - state: restarted - when: guacamole_vars.create_only_backend == "true" - -- name: Reload systemd - systemd: - daemon_reload: yes - when: guacamole_vars.create_only_backend == "true" diff --git a/VirtualMachineService/ancon/playbooks/guacamole_vars_file.yml b/VirtualMachineService/ancon/playbooks/guacamole_vars_file.yml deleted file mode 100644 index 296e5f5c..00000000 --- a/VirtualMachineService/ancon/playbooks/guacamole_vars_file.yml +++ /dev/null @@ -1,5 +0,0 @@ -guacamole_vars: - template_version: - create_only_backend: - DEFAULT_USER: ubuntu - DEFAULT_PASSWORD_HASHED: $6$iRrIJogrR0N2ZVdb$oL5XzFqcTC.O3g4DS945a5K7nRvO0LqY.ugyjDINUA347qRYXe1YXag8cRlLf9PVwmNrRYU3LTNGyCIPbFvz4/ diff --git a/VirtualMachineService/ancon/playbooks/optional.yml b/VirtualMachineService/ancon/playbooks/optional.yml deleted file mode 100644 index 1bb48f79..00000000 --- a/VirtualMachineService/ancon/playbooks/optional.yml +++ /dev/null @@ -1,11 +0,0 @@ -- name: Wait for automatic system updates 1 - shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; - -- name: Wait for automatic system updates 2 - shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; - -- name: Installing MOSH - apt: - name: mosh - state: present - when: optional_defined.mosh is defined diff --git a/VirtualMachineService/ancon/playbooks/optional_vars_file.yml b/VirtualMachineService/ancon/playbooks/optional_vars_file.yml deleted file mode 100644 index c396a34e..00000000 --- a/VirtualMachineService/ancon/playbooks/optional_vars_file.yml +++ /dev/null @@ -1,2 +0,0 @@ -optional_defined: - mosh: diff --git a/VirtualMachineService/ancon/playbooks/rstudio.yml b/VirtualMachineService/ancon/playbooks/rstudio.yml deleted file mode 100644 index 4c8cc855..00000000 --- a/VirtualMachineService/ancon/playbooks/rstudio.yml +++ /dev/null @@ -1,37 +0,0 @@ -- name: Wait for automatic system updates 1 - shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; - when: rstudio_vars.create_only_backend == "false" - -- name: Wait for automatic system updates 2 - shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; - when: rstudio_vars.create_only_backend == "false" - -- name: Setup password for default user - user: - name: "{{ rstudio_vars.DEFAULT_USER }}" - password: "{{ rstudio_vars.DEFAULT_PASSWORD_HASHED }}" - -- name: Install R role - include_role: - name: oefenweb.r - when: rstudio_vars.create_only_backend == "false" - -- name: Install rstudio-server role - include_role: - name: oefenweb.rstudio_server - vars: - rstudio_install: [r-base] - when: rstudio_vars.create_only_backend == "false" - -- name: Copy session file if also installing rstudio - copy: - content: "session-timeout-minutes=180" - dest: "{{ rstudio_vars.RSESSION_FILE_PATH }}" - mode: "0644" - owner: "root" - group: "root" - when: rstudio_vars.create_only_backend == "false" - -- name: Flush rstudio handlers - meta: flush_handlers - when: rstudio_vars.create_only_backend == "false" diff --git a/VirtualMachineService/ancon/playbooks/rstudio_vars_file.yml b/VirtualMachineService/ancon/playbooks/rstudio_vars_file.yml deleted file mode 100644 index aff9ba8d..00000000 --- a/VirtualMachineService/ancon/playbooks/rstudio_vars_file.yml +++ /dev/null @@ -1,6 +0,0 @@ -rstudio_vars: - template_version: - create_only_backend: - DEFAULT_USER: ubuntu - DEFAULT_PASSWORD_HASHED: $6$rounds=656000$kDXfaoylNAAH4hiN$Se1C7um7OW7ETs.L19uy1xn9SJjtjHylbF.Xv/YhRWilSyzDcX7nSajMth8LgZNiRJmO3.wBxcYeJnsgW4CLL1 - RSESSION_FILE_PATH: /etc/rstudio/rsession.conf diff --git a/VirtualMachineService/ancon/playbooks/theiaide.yml b/VirtualMachineService/ancon/playbooks/theiaide.yml deleted file mode 100644 index 420a5f69..00000000 --- a/VirtualMachineService/ancon/playbooks/theiaide.yml +++ /dev/null @@ -1,15 +0,0 @@ -- name: Wait for automatic system updates 1 - shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; - when: theiaide_vars.create_only_backend == "false" - -- name: Wait for automatic system updates 2 - shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; - when: theiaide_vars.create_only_backend == "false" - -- name: Install theia_ide role - include_role: - name: jkrue.theia_ide - vars: - theia_ide_bind_address: 0.0.0.0 - theia_ide_bind_port: 8080 - when: theiaide_vars.create_only_backend == "false" diff --git a/VirtualMachineService/ancon/playbooks/theiaide_vars_file.yml b/VirtualMachineService/ancon/playbooks/theiaide_vars_file.yml deleted file mode 100644 index e9935c05..00000000 --- a/VirtualMachineService/ancon/playbooks/theiaide_vars_file.yml +++ /dev/null @@ -1,3 +0,0 @@ -theiaide_vars: - template_version: - create_only_backend: From 4337815cfbbd7d326c036a8691bb5ac7e084c74c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2020 02:09:28 +0000 Subject: [PATCH 02/14] fix(Linting):blacked code --- VirtualMachineService/VirtualMachineHandler.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index f0b443b3..8e39adab 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -90,7 +90,6 @@ GITHUB_PLAYBOOKS_REPO = os.environ["GITHUB_PLAYBOOKS_REPO"] - class VirtualMachineHandler(Iface): """Handler which the PortalClient uses.""" @@ -2680,17 +2679,16 @@ def get_limits(self): "totalInstancesUsed": totalInstancesUsed, } - def update_playbooks(self): LOG.info("STARTED update") r = req.get(GITHUB_PLAYBOOKS_REPO) contents = json.loads(r.content) for f in contents: - if f['name'] != "LICENSE": + if f["name"] != "LICENSE": LOG.info("started download of" + f["name"]) download_link = f["download_url"] file_request = req.get(download_link) filename = "/code/VirtualMachineService/ancon/playbooks/" + f["name"] - playbook_file = open(filename, 'w') + playbook_file = open(filename, "w") playbook_file.write(file_request.content.decode("utf-8")) - playbook_file.close() \ No newline at end of file + playbook_file.close() From 1be5569c6c73e8d9fbe24876466d295dc2a14f6b Mon Sep 17 00:00:00 2001 From: Timo Date: Wed, 2 Dec 2020 17:07:35 +0100 Subject: [PATCH 03/14] readd internal plays --- .../ancon/playbooks/bioconda.yml | 80 +++++++++++++++++++ .../ancon/playbooks/bioconda_vars_file.yml | 12 +++ .../ancon/playbooks/change_key.yml | 6 ++ .../ancon/playbooks/change_key_vars_file.yml | 2 + .../ancon/playbooks/generic_playbook.yml | 10 +++ .../ancon/playbooks/optional.yml | 11 +++ .../ancon/playbooks/optional_vars_file.yml | 2 + 7 files changed, 123 insertions(+) create mode 100644 VirtualMachineService/ancon/playbooks/bioconda.yml create mode 100644 VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml create mode 100644 VirtualMachineService/ancon/playbooks/change_key.yml create mode 100644 VirtualMachineService/ancon/playbooks/change_key_vars_file.yml create mode 100644 VirtualMachineService/ancon/playbooks/generic_playbook.yml create mode 100644 VirtualMachineService/ancon/playbooks/optional.yml create mode 100644 VirtualMachineService/ancon/playbooks/optional_vars_file.yml diff --git a/VirtualMachineService/ancon/playbooks/bioconda.yml b/VirtualMachineService/ancon/playbooks/bioconda.yml new file mode 100644 index 00000000..e9523550 --- /dev/null +++ b/VirtualMachineService/ancon/playbooks/bioconda.yml @@ -0,0 +1,80 @@ +- name: Download miniconda install script + become_user: "{{ bioconda_user.name }}" + get_url: + args: + url: "{{ bioconda_folders.conda_installer_url }}" + dest: "{{ bioconda_folders.install_script }}" + mode: 0755 + timeout: 180 + force: no + +- name: Install miniconda + become_user: "{{ bioconda_user.name }}" + shell: "timeout 3m {{ bioconda_folders.install_script }} -b" + args: + executable: /bin/bash + creates: "{{ bioconda_folders.conda_dir }}" + +- name: Check for channels + become_user: "{{ bioconda_user.name }}" + shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --get channels'" + register: added_channels + +- name: Add default channel + become_user: "{{ bioconda_user.name }}" + shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels default'" + args: + executable: /bin/bash + when: added_channels.stdout.find('default') == -1 + +- name: Add bioconda channel + become_user: "{{ bioconda_user.name }}" + shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels bioconda'" + args: + executable: /bin/bash + when: added_channels.stdout.find('bioconda') == -1 + +- name: Add conda-forge channel + become_user: "{{ bioconda_user.name }}" + shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels conda-forge'" + args: + executable: /bin/bash + when: added_channels.stdout.find('conda-forge') == -1 + +- name: Init .bashrc for conda + become_user: "{{ bioconda_user.name }}" + shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda init'" + args: + executable: /bin/bash + +- name: Check for environment + become_user: "{{ bioconda_user.name }}" + shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda info -e'" + register: added_envs + +- name: Create alias for environment + become_user: "{{ bioconda_user.name }}" + shell: "echo $ALIAS_VARIABLE > ~/.bash_aliases" + environment: + ALIAS_VARIABLE: 'alias {{ bioconda_tools.env | quote }}="conda activate {{ bioconda_tools.env | quote }}"' + when: added_envs.stdout.find(bioconda_tools.env) == -1 + +- name: Create environment + become_user: "{{ bioconda_user.name }}" + shell: "timeout 2m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda create --yes -n {{ bioconda_tools.env | quote}}'" + args: + executable: /bin/bash + when: added_envs.stdout.find(bioconda_tools.env) == -1 + +- name: Check for installed packages + become_user: "{{ bioconda_user.name }}" + shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda activate {{ bioconda_tools.env | quote}} && conda list'" + register: added_packages + +- name: Install chosen packages + become_user: "{{ bioconda_user.name }}" + shell: "timeout {{ bioconda_tools.timeout_length }} bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda activate {{ bioconda_tools.env | quote}} && conda install --yes {{ item.key }}={{ item.value.version }}={{ item.value.build }}'" + args: + executable: /bin/bash + loop: "{{ q('dict', bioconda_tools.packages) }}" + when: added_packages.stdout.find(item.key) == -1 diff --git a/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml b/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml new file mode 100644 index 00000000..d759e859 --- /dev/null +++ b/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml @@ -0,0 +1,12 @@ +bioconda_tools: + packages: + env: "denbi" + timeout_length: "5m" + +bioconda_folders: + install_script: "/home/{{ bioconda_user.name }}/install_miniconda3.sh" + conda_dir: "/home/{{ bioconda_user.name }}/miniconda3" + conda_installer_url: "https://repo.anaconda.com/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh" + +bioconda_user: + name: "ubuntu" diff --git a/VirtualMachineService/ancon/playbooks/change_key.yml b/VirtualMachineService/ancon/playbooks/change_key.yml new file mode 100644 index 00000000..bafbd0a9 --- /dev/null +++ b/VirtualMachineService/ancon/playbooks/change_key.yml @@ -0,0 +1,6 @@ +- name: Set user public Key and remove created public Key + authorized_key: + user: ubuntu + key: "{{ change_key_vars.key }}" + state: present + exclusive: True diff --git a/VirtualMachineService/ancon/playbooks/change_key_vars_file.yml b/VirtualMachineService/ancon/playbooks/change_key_vars_file.yml new file mode 100644 index 00000000..68e0b3cd --- /dev/null +++ b/VirtualMachineService/ancon/playbooks/change_key_vars_file.yml @@ -0,0 +1,2 @@ +change_key_vars: + key: diff --git a/VirtualMachineService/ancon/playbooks/generic_playbook.yml b/VirtualMachineService/ancon/playbooks/generic_playbook.yml new file mode 100644 index 00000000..fb9ba6cf --- /dev/null +++ b/VirtualMachineService/ancon/playbooks/generic_playbook.yml @@ -0,0 +1,10 @@ +- name: Setting up your virtual machine + hosts: all + become: yes + connection: paramiko_ssh + gather_facts: yes + vars_files: + tasks: + - name: Setting up your virtual machine + block: + always: diff --git a/VirtualMachineService/ancon/playbooks/optional.yml b/VirtualMachineService/ancon/playbooks/optional.yml new file mode 100644 index 00000000..1bb48f79 --- /dev/null +++ b/VirtualMachineService/ancon/playbooks/optional.yml @@ -0,0 +1,11 @@ +- name: Wait for automatic system updates 1 + shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; + +- name: Wait for automatic system updates 2 + shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; + +- name: Installing MOSH + apt: + name: mosh + state: present + when: optional_defined.mosh is defined diff --git a/VirtualMachineService/ancon/playbooks/optional_vars_file.yml b/VirtualMachineService/ancon/playbooks/optional_vars_file.yml new file mode 100644 index 00000000..c396a34e --- /dev/null +++ b/VirtualMachineService/ancon/playbooks/optional_vars_file.yml @@ -0,0 +1,2 @@ +optional_defined: + mosh: From 44f6538823816dd398630100812a0fdd61f59ee1 Mon Sep 17 00:00:00 2001 From: Timo Date: Mon, 7 Dec 2020 18:42:00 +0100 Subject: [PATCH 04/14] save update --- .env | 2 +- .../VirtualMachineHandler.py | 21 ++++++++++++++++--- VirtualMachineService/ancon/Playbook.py | 4 ++++ requirements.txt | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.env b/.env index c1e558a7..dd3f9f2b 100644 --- a/.env +++ b/.env @@ -13,4 +13,4 @@ OS_USERNAME=portal-user-dev OS_USER_DOMAIN_NAME=Default OS_PROJECT_DOMAIN_ID=default - +GITHUB_PLAYBOOKS_REPO=https://api.github.com/repos/deNBI/resenvs/contents/ \ No newline at end of file diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 8e39adab..18110913 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -56,6 +56,7 @@ import time import urllib from contextlib import closing +import yml import redis import requests as req @@ -88,6 +89,7 @@ LOG.addHandler(fh) LOG.addHandler(ch) GITHUB_PLAYBOOKS_REPO = os.environ["GITHUB_PLAYBOOKS_REPO"] +PLAYBOOKS_DIR = "/code/VirtualMachineService/ancon/playbooks/" class VirtualMachineHandler(Iface): @@ -932,6 +934,8 @@ def prepare_security_groups_new_server(self, resenv, servername, http, https): ).name ) + #Todo change those information to parsing from metadata file + if http or https: custom_security_groups.append( self.create_security_group( @@ -1530,12 +1534,22 @@ def get_template_version_for(self, template): def cross_check_templates(self, templates): return_templates = set() + templates_metada = [] for template_dict in templates: if template_dict["name"] in self.FORC_ALLOWED: if template_dict["version"] in self.FORC_ALLOWED[template_dict["name"]]: return_templates.add(template_dict["name"]) - return return_templates - + #Todo load Metadata from multiple folders + for template in return_templates: + with open(PLAYBOOKS_DIR + template + "_metadata.yml") as template_metadata: + try: + loaded_metadata = yaml.load(template_metadata, Loader=yaml.FullLoader) + except Exception as e: + LOG.exception("Failed to parse Metadata yml: " + template + "_metadata.yml \n" + str(e)) + templates_metada.append(loaded_metadata) + return templates_metada + + #TODO credits adjust response from forc should be generic def get_templates(self): get_url = "{0}templates/".format(self.RE_BACKEND_URL) try: @@ -1545,6 +1559,7 @@ def get_templates(self): headers={"X-API-KEY": self.FORC_API_KEY}, verify=self.PRODUCTION, ) + print(response.json()) if response.status_code == 401: return [response.json()] else: @@ -2596,7 +2611,7 @@ def create_security_group( port_range_min=22, security_group_id=new_security_group["id"], ) - + #Todo change those information to parsing from metadata file if THEIA in resenv: LOG.info("Add theia rule to security group {}".format(name)) diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index 34f6fdc5..fad0742e 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -7,6 +7,7 @@ import redis import ruamel.yaml +#Todo Needs to go BIOCONDA = "bioconda" THEIA = "theiaide" RSTUDIO = "rstudio" @@ -126,6 +127,7 @@ def copy_playbooks_and_init(self, playbooks_information, public_key): def copy_and_init(self, playbook_name, playbook_vars): def load_vars(): + #Todo Needs to go, maybe save key in playbook with has packages? if playbook_name == BIOCONDA: for k, v in playbook_vars.items(): if k == "packages": @@ -136,6 +138,7 @@ def load_vars(): for p in p_array: p_dict.update({p[0]: {"version": p[1], "build": p[2]}}) data[playbook_name + "_tools"][k] = p_dict + #Todo Add key: is research env. if ( playbook_name == THEIA or playbook_name == RSTUDIO @@ -165,6 +168,7 @@ def load_vars(): # data[playbook_name + "_vars"][k] = v # if k == "create_only_backend": # data[playbook_name + "_vars"][k] = v + #Todo: add Key is Optional if playbook_name == OPTIONAL: for k, v in playbook_vars.items(): if k == MOSH: diff --git a/requirements.txt b/requirements.txt index eae07aa9..3ce06768 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,3 +11,4 @@ paramiko==2.7.2 pyvim==3.0.2 redis==3.5.3 requests==2.25.0 +pyyaml==5.3.1 \ No newline at end of file From 38d7d68067d7ec9daa9b8c851a9bc552efea14bb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Dec 2020 17:44:09 +0000 Subject: [PATCH 05/14] fix(Linting):blacked code --- .../VirtualMachineHandler.py | 19 +++++++++++++------ VirtualMachineService/ancon/Playbook.py | 8 ++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 18110913..7a6ca31b 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -934,7 +934,7 @@ def prepare_security_groups_new_server(self, resenv, servername, http, https): ).name ) - #Todo change those information to parsing from metadata file + # Todo change those information to parsing from metadata file if http or https: custom_security_groups.append( @@ -1539,17 +1539,24 @@ def cross_check_templates(self, templates): if template_dict["name"] in self.FORC_ALLOWED: if template_dict["version"] in self.FORC_ALLOWED[template_dict["name"]]: return_templates.add(template_dict["name"]) - #Todo load Metadata from multiple folders + # Todo load Metadata from multiple folders for template in return_templates: with open(PLAYBOOKS_DIR + template + "_metadata.yml") as template_metadata: try: - loaded_metadata = yaml.load(template_metadata, Loader=yaml.FullLoader) + loaded_metadata = yaml.load( + template_metadata, Loader=yaml.FullLoader + ) except Exception as e: - LOG.exception("Failed to parse Metadata yml: " + template + "_metadata.yml \n" + str(e)) + LOG.exception( + "Failed to parse Metadata yml: " + + template + + "_metadata.yml \n" + + str(e) + ) templates_metada.append(loaded_metadata) return templates_metada - #TODO credits adjust response from forc should be generic + # TODO credits adjust response from forc should be generic def get_templates(self): get_url = "{0}templates/".format(self.RE_BACKEND_URL) try: @@ -2611,7 +2618,7 @@ def create_security_group( port_range_min=22, security_group_id=new_security_group["id"], ) - #Todo change those information to parsing from metadata file + # Todo change those information to parsing from metadata file if THEIA in resenv: LOG.info("Add theia rule to security group {}".format(name)) diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index fad0742e..6bf4fbde 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -7,7 +7,7 @@ import redis import ruamel.yaml -#Todo Needs to go +# Todo Needs to go BIOCONDA = "bioconda" THEIA = "theiaide" RSTUDIO = "rstudio" @@ -127,7 +127,7 @@ def copy_playbooks_and_init(self, playbooks_information, public_key): def copy_and_init(self, playbook_name, playbook_vars): def load_vars(): - #Todo Needs to go, maybe save key in playbook with has packages? + # Todo Needs to go, maybe save key in playbook with has packages? if playbook_name == BIOCONDA: for k, v in playbook_vars.items(): if k == "packages": @@ -138,7 +138,7 @@ def load_vars(): for p in p_array: p_dict.update({p[0]: {"version": p[1], "build": p[2]}}) data[playbook_name + "_tools"][k] = p_dict - #Todo Add key: is research env. + # Todo Add key: is research env. if ( playbook_name == THEIA or playbook_name == RSTUDIO @@ -168,7 +168,7 @@ def load_vars(): # data[playbook_name + "_vars"][k] = v # if k == "create_only_backend": # data[playbook_name + "_vars"][k] = v - #Todo: add Key is Optional + # Todo: add Key is Optional if playbook_name == OPTIONAL: for k, v in playbook_vars.items(): if k == MOSH: From 082b027c0c38f9ef627f01a5c6e582bab41f57da Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 17 Dec 2020 13:55:31 +0100 Subject: [PATCH 06/14] remove hardcoded resenvs --- VirtualMachineService/ResenvMetadata.py | 4 ++ .../VirtualMachineHandler.py | 66 +++++++++++-------- VirtualMachineService/ancon/Playbook.py | 41 ++---------- 3 files changed, 48 insertions(+), 63 deletions(-) create mode 100644 VirtualMachineService/ResenvMetadata.py diff --git a/VirtualMachineService/ResenvMetadata.py b/VirtualMachineService/ResenvMetadata.py new file mode 100644 index 00000000..24e85181 --- /dev/null +++ b/VirtualMachineService/ResenvMetadata.py @@ -0,0 +1,4 @@ +class ResenvMetadata: + def __init__(self, name, age): + self.name = name + self.age = age \ No newline at end of file diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 7a6ca31b..f4f1a7e8 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -18,12 +18,8 @@ from constants import VERSION from ancon.Playbook import ( Playbook, - THEIA, - GUACAMOLE, ALL_TEMPLATES, - RSTUDIO, JUPYTERNOTEBOOK, - CWLAB, ) except Exception: @@ -40,12 +36,8 @@ from .constants import VERSION from .ancon.Playbook import ( Playbook, - THEIA, - GUACAMOLE, ALL_TEMPLATES, - RSTUDIO, JUPYTERNOTEBOOK, - CWLAB, ) import datetime @@ -107,6 +99,8 @@ class VirtualMachineHandler(Iface): PLAYBOOK_FAILED = "PLAYBOOK_FAILED" DEFAULT_SECURITY_GROUP = "defaultSimpleVM" DEFAULT_SECURITY_GROUPS = [DEFAULT_SECURITY_GROUP] + ALL_TEMPLATES = ALL_TEMPLATES + def keyboard_interrupt_handler_playbooks(self): global active_playbooks @@ -339,9 +333,9 @@ def get_Images(self): metadata = img["metadata"] description = metadata.get("description") tags = img.get("tags") - LOG.info(set(ALL_TEMPLATES).intersection(tags)) + LOG.info(set(self.ALL_TEMPLATES).intersection(tags)) if len( - set(ALL_TEMPLATES).intersection(tags) + set(self.ALL_TEMPLATES).intersection(tags) ) > 0 and not self.cross_check_forc_image(tags): LOG.info("Resenv check: Skipping {0}.".format(img["name"])) continue @@ -375,9 +369,9 @@ def prepare_image(self, img): metadata = img["metadata"] description = metadata.get("description") tags = img.get("tags") - LOG.info(set(ALL_TEMPLATES).intersection(tags)) + LOG.info(set(self.ALL_TEMPLATES).intersection(tags)) if len( - set(ALL_TEMPLATES).intersection(tags) + set(self.ALL_TEMPLATES).intersection(tags) ) > 0 and not self.cross_check_forc_image(tags): LOG.info("Resenv check: Skipping {0}.".format(img["name"])) return None @@ -946,6 +940,9 @@ def prepare_security_groups_new_server(self, resenv, servername, http, https): ).name ) + for researech_enviroment in resenv: + + if THEIA in resenv: custom_security_groups.append( self.create_security_group( @@ -1264,7 +1261,7 @@ def cross_check_forc_image(self, tags): templates = response.json() except Exception as e: LOG.error("Could not get templates from FORC.\n {0}".format(e)) - cross_tags = list(set(ALL_TEMPLATES).intersection(tags)) + cross_tags = list(set(self.ALL_TEMPLATES).intersection(tags)) for template_dict in templates: if ( template_dict["name"] in self.FORC_ALLOWED @@ -1540,20 +1537,33 @@ def cross_check_templates(self, templates): if template_dict["version"] in self.FORC_ALLOWED[template_dict["name"]]: return_templates.add(template_dict["name"]) # Todo load Metadata from multiple folders - for template in return_templates: - with open(PLAYBOOKS_DIR + template + "_metadata.yml") as template_metadata: - try: - loaded_metadata = yaml.load( - template_metadata, Loader=yaml.FullLoader - ) - except Exception as e: - LOG.exception( - "Failed to parse Metadata yml: " - + template - + "_metadata.yml \n" - + str(e) - ) - templates_metada.append(loaded_metadata) + # Todo Check here + for file in os.listdir(PLAYBOOKS_DIR): + if "_metadata.yml" in file: + with open(PLAYBOOKS_DIR + file) as template_metadata: + try: + loaded_metadata = yaml.load( + template_metadata, Loader=yaml.FullLoader + ) + template_name = loaded_metadata["template_name"] + if loaded_metadata["needs_forc_support"]: + if template_name in template_dict: + templates_metada.append(loaded_metadata) + if template_name not in self.ALL_TEMPLATES: + ALL_TEMPLATES.append() + else: + LOG.info("Failed to find supporting FORC file for " + template_name) + else: + templates_metada.append(loaded_metadata) + if template_name not in self.ALL_TEMPLATES: + ALL_TEMPLATES.append() + + except Exception as e: + LOG.exception( + "Failed to parse Metadata yml: " + + file + "\n" + + str(e) + ) return templates_metada # TODO credits adjust response from forc should be generic @@ -1574,6 +1584,7 @@ def get_templates(self): except Timeout as e: LOG.info(msg="get_templates timed out. {0}".format(e)) + #Todo test this method def get_allowed_templates(self): get_url = "{0}templates/".format(self.RE_BACKEND_URL) try: @@ -2714,3 +2725,4 @@ def update_playbooks(self): playbook_file = open(filename, "w") playbook_file.write(file_request.content.decode("utf-8")) playbook_file.close() + diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index 6bf4fbde..f06a8151 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -7,17 +7,12 @@ import redis import ruamel.yaml -# Todo Needs to go BIOCONDA = "bioconda" -THEIA = "theiaide" -RSTUDIO = "rstudio" -GUACAMOLE = "guacamole" JUPYTERNOTEBOOK = "jupyternotebook" -CWLAB = "cwlab" OPTIONAL = "optional" MOSH = "mosh" -ALL_TEMPLATES = [BIOCONDA, THEIA, RSTUDIO, GUACAMOLE, JUPYTERNOTEBOOK, CWLAB] +ALL_TEMPLATES = [BIOCONDA, JUPYTERNOTEBOOK] LOG = logging.getLogger(__name__) LOG.setLevel(logging.DEBUG) @@ -90,8 +85,8 @@ def __init__( def copy_playbooks_and_init(self, playbooks_information, public_key): # go through every wanted playbook - for k, v in playbooks_information.items(): - self.copy_and_init(k, v) + for k, v, i in playbooks_information.items(): + self.copy_and_init(k, v, i) # init yml to change public keys as last task shutil.copy(self.playbooks_dir + "/change_key.yml", self.directory.name) @@ -125,9 +120,8 @@ def copy_playbooks_and_init(self, playbooks_information, public_key): ) as generic_playbook: self.yaml_exec.dump(data_gp, generic_playbook) - def copy_and_init(self, playbook_name, playbook_vars): + def copy_and_init(self, playbook_name, playbook_vars, is_resenv): def load_vars(): - # Todo Needs to go, maybe save key in playbook with has packages? if playbook_name == BIOCONDA: for k, v in playbook_vars.items(): if k == "packages": @@ -138,37 +132,12 @@ def load_vars(): for p in p_array: p_dict.update({p[0]: {"version": p[1], "build": p[2]}}) data[playbook_name + "_tools"][k] = p_dict - # Todo Add key: is research env. - if ( - playbook_name == THEIA - or playbook_name == RSTUDIO - or playbook_name == GUACAMOLE - or playbook_name == CWLAB - ): + if is_resenv: for k, v in playbook_vars.items(): if k == "template_version": data[playbook_name + "_vars"][k] = v if k == "create_only_backend": data[playbook_name + "_vars"][k] = v - # if playbook_name == RSTUDIO: - # for k, v in playbook_vars.items(): - # if k == "template_version": - # data[playbook_name + "_vars"][k] = v - # if k == "create_only_backend": - # data[playbook_name + "_vars"][k] = v - # if playbook_name == GUACAMOLE: - # for k, v in playbook_vars.items(): - # if k == "template_version": - # data[playbook_name + "_vars"][k] = v - # if k == "create_only_backend": - # data[playbook_name + "_vars"][k] = v - # if playbook_name == CWLAB: - # for k, v in playbook_vars.items(): - # if k == "template_version": - # data[playbook_name + "_vars"][k] = v - # if k == "create_only_backend": - # data[playbook_name + "_vars"][k] = v - # Todo: add Key is Optional if playbook_name == OPTIONAL: for k, v in playbook_vars.items(): if k == MOSH: From dbdf5dda654d4d50c449aaa5215bca2dd05c5dff Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 17 Dec 2020 16:11:01 +0100 Subject: [PATCH 07/14] add resenv metadata class --- VirtualMachineService/ResenvMetadata.py | 10 +++- .../VirtualMachineHandler.py | 56 ++++++++++++++++++- 2 files changed, 63 insertions(+), 3 deletions(-) diff --git a/VirtualMachineService/ResenvMetadata.py b/VirtualMachineService/ResenvMetadata.py index 24e85181..78227d3e 100644 --- a/VirtualMachineService/ResenvMetadata.py +++ b/VirtualMachineService/ResenvMetadata.py @@ -1,4 +1,10 @@ class ResenvMetadata: - def __init__(self, name, age): + def __init__(self, name, port_range_max, port_range_min, security_group_name, security_group_description, security_group_ssh, direction, protocol): self.name = name - self.age = age \ No newline at end of file + self.port_range_max = port_range_max + self.port_range_min = port_range_min + self.security_group_name = security_group_name + self.security_group_description = security_group_description + self.security_group_ssh = security_group_ssh + self.direction = direction + self.protocol = protocol \ No newline at end of file diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index f4f1a7e8..8b0f72a9 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -3,6 +3,7 @@ Which can be used for the PortalClient. """ +from VirtualMachineService.ResenvMetadata import ResenvMetadata try: from VirtualMachineService import Iface @@ -83,6 +84,15 @@ GITHUB_PLAYBOOKS_REPO = os.environ["GITHUB_PLAYBOOKS_REPO"] PLAYBOOKS_DIR = "/code/VirtualMachineService/ancon/playbooks/" +PORT_RANGE_MAX = "port_range_max" +PORT_RANGE_MIN = "port_range_min" +SECURITYGROUP_NAME = "securitygroup_name" +SECURITYGROUP_DESCRIPTION = "securitygroup_description" +SECURITYGROUP_SSH = "securitygroup_ssh" +DIRECTION = "direction" +PROTOCOL = "protocol" +TEMPLATE_NAME = "template_name" + class VirtualMachineHandler(Iface): """Handler which the PortalClient uses.""" @@ -100,6 +110,7 @@ class VirtualMachineHandler(Iface): DEFAULT_SECURITY_GROUP = "defaultSimpleVM" DEFAULT_SECURITY_GROUPS = [DEFAULT_SECURITY_GROUP] ALL_TEMPLATES = ALL_TEMPLATES + loaded_resenv_metadata = {} def keyboard_interrupt_handler_playbooks(self): @@ -1545,7 +1556,7 @@ def cross_check_templates(self, templates): loaded_metadata = yaml.load( template_metadata, Loader=yaml.FullLoader ) - template_name = loaded_metadata["template_name"] + template_name = loaded_metadata[TEMPLATE_NAME] if loaded_metadata["needs_forc_support"]: if template_name in template_dict: templates_metada.append(loaded_metadata) @@ -2725,4 +2736,47 @@ def update_playbooks(self): playbook_file = open(filename, "w") playbook_file.write(file_request.content.decode("utf-8")) playbook_file.close() + templates_metadata = self.load_resenv_metadata() + for template_metadata in templates_metadata: + try: + metadata = ResenvMetadata(template_metadata[TEMPLATE_NAME], + template_metadata[PORT_RANGE_MAX], + template_metadata[PORT_RANGE_MIN], + template_metadata[SECURITYGROUP_NAME], + template_metadata[SECURITYGROUP_DESCRIPTION], + template_metadata[SECURITYGROUP_SSH], + template_metadata[DIRECTION], + template_metadata[PROTOCOL]) + if metadata not in self.loaded_resenv_metadata(): + self.loaded_resenv_metadata[metadata.name] = metadata + else: + + + except Exception as e: + LOG.exception( + "Failed to parse Metadata yml: " + + str(template_metadata) + "\n" + + str(e) + ) + + def load_resenv_metadata(self): + for file in os.listdir(PLAYBOOKS_DIR): + templates_metada= [] + if "_metadata.yml" in file: + with open(PLAYBOOKS_DIR + file) as template_metadata: + try: + loaded_metadata = yaml.load( + template_metadata, Loader=yaml.FullLoader + ) + template_name = loaded_metadata[TEMPLATE_NAME] + templates_metada.append(loaded_metadata) + if template_name not in self.ALL_TEMPLATES: + ALL_TEMPLATES.append() + except Exception as e: + LOG.exception( + "Failed to parse Metadata yml: " + + file + "\n" + + str(e) + ) + return templates_metada \ No newline at end of file From 12f50d6e3cebf381c5ce7dacfd1aff18e54262ae Mon Sep 17 00:00:00 2001 From: Timo Date: Tue, 5 Jan 2021 16:26:45 +0100 Subject: [PATCH 08/14] update autogenerated files --- .../VirtualMachineHandler.py | 135 +- .../VirtualMachineService-remote | 2 +- .../VirtualMachineService.py | 9441 +++++------------ VirtualMachineService/__init__.py | 2 +- VirtualMachineService/ancon/Playbook.py | 12 +- VirtualMachineService/constants.py | 11 +- VirtualMachineService/ttypes.py | 1754 +-- 7 files changed, 2822 insertions(+), 8535 deletions(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 8b0f72a9..86fef3e9 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -3,7 +3,6 @@ Which can be used for the PortalClient. """ -from VirtualMachineService.ResenvMetadata import ResenvMetadata try: from VirtualMachineService import Iface @@ -49,7 +48,6 @@ import time import urllib from contextlib import closing -import yml import redis import requests as req @@ -61,6 +59,7 @@ from openstack import connection from openstack.exceptions import ConflictException from oslo_utils import encodeutils +import ResenvMetadata import os import json @@ -939,8 +938,6 @@ def prepare_security_groups_new_server(self, resenv, servername, http, https): ).name ) - # Todo change those information to parsing from metadata file - if http or https: custom_security_groups.append( self.create_security_group( @@ -951,45 +948,21 @@ def prepare_security_groups_new_server(self, resenv, servername, http, https): ).name ) - for researech_enviroment in resenv: - + for research_enviroment in resenv: + if research_enviroment in self.loaded_resenv_metadata: + resenv_metadata = self.loaded_resenv_metadata[research_enviroment] + custom_security_groups.append( + self.create_security_group( + name=servername + resenv_metadata.security_group_name, + resenv=resenv, + description=resenv_metadata.security_group_description, + ssh=resenv.security_group_ssh, + ).name + ) + else: + LOG.info("Failure to load metadata of reasearch enviroment: " + research_enviroment) - if THEIA in resenv: - custom_security_groups.append( - self.create_security_group( - name=servername + "_theiaide", - resenv=resenv, - description="Theiaide", - ssh=False, - ).name - ) - if GUACAMOLE in resenv: - custom_security_groups.append( - self.create_security_group( - name=servername + "_guacamole", - resenv=resenv, - description="Guacamole", - ssh=False, - ).name - ) - if RSTUDIO in resenv: - custom_security_groups.append( - self.create_security_group( - name=servername + "_rstudio", - resenv=resenv, - description="Rstudio", - ssh=False, - ).name - ) - if CWLAB in resenv: - custom_security_groups.append( - self.create_security_group( - name=servername + "_cwlab", - resenv=resenv, - description="CWLab", - ssh=False, - ).name - ) + #TODO: remove if JUPYTERNOTEBOOK is no longer used, as it appears if JUPYTERNOTEBOOK in resenv: custom_security_groups.append( self.create_security_group( @@ -1241,6 +1214,7 @@ def create_and_deploy_playbook( osi_private_key=key, public_key=public_key, pool=self.pool, + loaded_metadata=self.loaded_resenv_metadata ) self.redis.hset(openstack_id, "status", self.BUILD_PLAYBOOK) playbook.run_it() @@ -1558,16 +1532,16 @@ def cross_check_templates(self, templates): ) template_name = loaded_metadata[TEMPLATE_NAME] if loaded_metadata["needs_forc_support"]: - if template_name in template_dict: - templates_metada.append(loaded_metadata) + if template_name in return_templates: + templates_metada.append(str(loaded_metadata)) if template_name not in self.ALL_TEMPLATES: - ALL_TEMPLATES.append() + ALL_TEMPLATES.append(template_name) else: - LOG.info("Failed to find supporting FORC file for " + template_name) + LOG.info("Failed to find supporting FORC file for " + str(template_name)) else: - templates_metada.append(loaded_metadata) + templates_metada.append(str(loaded_metadata)) if template_name not in self.ALL_TEMPLATES: - ALL_TEMPLATES.append() + ALL_TEMPLATES.append(template_name) except Exception as e: LOG.exception( @@ -1575,9 +1549,9 @@ def cross_check_templates(self, templates): + file + "\n" + str(e) ) + LOG.info("Plays DEBUG: Values of metadata: " + str(templates_metada)) return templates_metada - # TODO credits adjust response from forc should be generic def get_templates(self): get_url = "{0}templates/".format(self.RE_BACKEND_URL) try: @@ -2640,47 +2614,22 @@ def create_security_group( port_range_min=22, security_group_id=new_security_group["id"], ) - # Todo change those information to parsing from metadata file - if THEIA in resenv: - LOG.info("Add theia rule to security group {}".format(name)) - - self.conn.network.create_security_group_rule( - direction="ingress", - protocol="tcp", - port_range_max=8080, - port_range_min=8080, - security_group_id=new_security_group["id"], - ) - if GUACAMOLE in resenv: - LOG.info("Add guacamole rule to security group {}".format(name)) - - self.conn.network.create_security_group_rule( - direction="ingress", - protocol="tcp", - port_range_max=8080, - port_range_min=8080, - security_group_id=new_security_group["id"], - ) - if RSTUDIO in resenv: - LOG.info("Add rstudio rule to security group {}".format(name)) - - self.conn.network.create_security_group_rule( - direction="ingress", - protocol="tcp", - port_range_max=8787, - port_range_min=8787, - security_group_id=new_security_group["id"], - ) - if CWLAB in resenv: - LOG.info("Add cwlab rule to security group {}".format(name)) + for research_enviroment in resenv: + if research_enviroment in self.loaded_resenv_metadata: + LOG.info("Add " + research_enviroment + " rule to security group {}".format(name)) + resenv_metadata = self.loaded_resenv_metadata[research_enviroment] + self.conn.network.create_security_group_rule( + direction=resenv_metadata.direction, + protocol=resenv_metadata.protocol, + port_range_max=resenv_metadata.port_range_max, + port_range_min=resenv_metadata.port_range_min, + security_group_id=new_security_group["id"], + ) + else: + #Todo add mail for this logging as this should not happen + LOG.info("Warning: Could not find metadata for research enviroment: " + research_enviroment) - self.conn.network.create_security_group_rule( - direction="ingress", - protocol="tcp", - port_range_max=80, - port_range_min=80, - security_group_id=new_security_group["id"], - ) + #Todo: remove Jupyter reference, if not needed if JUPYTERNOTEBOOK in resenv: LOG.info("Add jupyternotebook rule to security group {}".format(name)) @@ -2727,6 +2676,7 @@ def update_playbooks(self): LOG.info("STARTED update") r = req.get(GITHUB_PLAYBOOKS_REPO) contents = json.loads(r.content) + #Todo maybe clone entire direcotry for f in contents: if f["name"] != "LICENSE": LOG.info("started download of" + f["name"]) @@ -2747,10 +2697,11 @@ def update_playbooks(self): template_metadata[SECURITYGROUP_SSH], template_metadata[DIRECTION], template_metadata[PROTOCOL]) - if metadata not in self.loaded_resenv_metadata(): + if metadata not in self.loaded_resenv_metadata.keys(): self.loaded_resenv_metadata[metadata.name] = metadata else: - + if self.loaded_resenv_metadata[metadata.name] != metadata: + self.loaded_resenv_metadata[metadata.name] = metadata except Exception as e: LOG.exception( @@ -2772,7 +2723,7 @@ def load_resenv_metadata(self): templates_metada.append(loaded_metadata) if template_name not in self.ALL_TEMPLATES: - ALL_TEMPLATES.append() + ALL_TEMPLATES.append(template_name) except Exception as e: LOG.exception( "Failed to parse Metadata yml: " diff --git a/VirtualMachineService/VirtualMachineService-remote b/VirtualMachineService/VirtualMachineService-remote index 09fd4a96..8a0588f1 100755 --- a/VirtualMachineService/VirtualMachineService-remote +++ b/VirtualMachineService/VirtualMachineService-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.12.0) +# Autogenerated by Thrift Compiler (0.13.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # diff --git a/VirtualMachineService/VirtualMachineService.py b/VirtualMachineService/VirtualMachineService.py index ec4af51e..6e922583 100644 --- a/VirtualMachineService/VirtualMachineService.py +++ b/VirtualMachineService/VirtualMachineService.py @@ -1,18 +1,12 @@ # -# Autogenerated by Thrift Compiler (0.12.0) +# Autogenerated by Thrift Compiler (0.13.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.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec @@ -21,7 +15,6 @@ from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport - all_structs = [] @@ -30,7 +23,6 @@ class Iface(object): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ - def check_Version(self, version): """ Parameters: @@ -200,9 +192,7 @@ def add_floating_ip_to_server(self, openstack_id, network): """ pass - def create_connection( - self, username, password, auth_url, user_domain_name, project_domain_name - ): + def create_connection(self, username, password, auth_url, user_domain_name, project_domain_name): """ Create connection to OpenStack. Connection instance @@ -220,19 +210,7 @@ def create_connection( """ pass - def start_server_without_playbook( - self, - flavor, - image, - public_key, - servername, - metadata, - https, - http, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): + def start_server_without_playbook(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): """ Parameters: - flavor: Name of the Flavor to use. @@ -261,19 +239,7 @@ def detach_ip_from_server(self, server_id, floating_ip): """ pass - def start_server_with_mounted_volume( - self, - flavor, - image, - public_key, - servername, - metadata, - https, - http, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): + def start_server_with_mounted_volume(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): """ Parameters: - flavor: Name of the Flavor to use. @@ -290,19 +256,7 @@ def start_server_with_mounted_volume( """ pass - def start_server( - self, - flavor, - image, - public_key, - servername, - metadata, - diskspace, - volumename, - https, - http, - resenv, - ): + def start_server(self, flavor, image, public_key, servername, metadata, diskspace, volumename, https, http, resenv): """ Start a new server. @@ -321,18 +275,7 @@ def start_server( """ pass - def start_server_with_custom_key( - self, - flavor, - image, - servername, - metadata, - http, - https, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): + def start_server_with_custom_key(self, flavor, image, servername, metadata, http, https, resenv, volume_ids_path_new, volume_ids_path_attach): """ Start a new server with custom key for ansible. @@ -360,9 +303,7 @@ def exist_server(self, name): """ pass - def create_and_deploy_playbook( - self, public_key, playbooks_information, openstack_id - ): + def create_and_deploy_playbook(self, public_key, playbooks_information, openstack_id): """ Create and deploy an anaconda ansible playbook @@ -559,9 +500,7 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): """ pass - def scale_up_cluster( - self, cluster_id, image, flavor, count, names, start_idx, batch_idx - ): + def scale_up_cluster(self, cluster_id, image, flavor, count, names, start_idx, batch_idx): """ Parameters: - cluster_id @@ -769,7 +708,6 @@ class Client(Iface): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ - def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: @@ -786,7 +724,7 @@ def check_Version(self, version): return self.recv_check_Version() def send_check_Version(self, version): - self._oprot.writeMessageBegin("check_Version", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('check_Version', TMessageType.CALL, self._seqid) args = check_Version_args() args.version = version args.write(self._oprot) @@ -806,9 +744,7 @@ def recv_check_Version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "check_Version failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "check_Version failed: unknown result") def get_client_version(self): """ @@ -820,9 +756,7 @@ def get_client_version(self): return self.recv_get_client_version() def send_get_client_version(self): - self._oprot.writeMessageBegin( - "get_client_version", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_client_version', TMessageType.CALL, self._seqid) args = get_client_version_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -841,10 +775,7 @@ def recv_get_client_version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_client_version failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_client_version failed: unknown result") def get_gateway_ip(self): """ @@ -855,7 +786,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() @@ -874,19 +805,14 @@ def recv_get_gateway_ip(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_gateway_ip failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_gateway_ip failed: unknown result") def get_calculation_formulars(self): self.send_get_calculation_formulars() return self.recv_get_calculation_formulars() def send_get_calculation_formulars(self): - self._oprot.writeMessageBegin( - "get_calculation_formulars", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_calculation_formulars', TMessageType.CALL, self._seqid) args = get_calculation_formulars_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -905,10 +831,7 @@ def recv_get_calculation_formulars(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_calculation_formulars failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_calculation_formulars failed: unknown result") def import_keypair(self, keyname, public_key): """ @@ -924,7 +847,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 @@ -945,10 +868,7 @@ def recv_import_keypair(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "import_keypair failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "import_keypair failed: unknown result") def get_vm_ports(self, openstack_id): """ @@ -963,7 +883,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) @@ -983,9 +903,7 @@ def recv_get_vm_ports(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result") def get_Flavors(self): """ @@ -997,7 +915,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() @@ -1016,9 +934,7 @@ def recv_get_Flavors(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_Flavors failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_Flavors failed: unknown result") def get_Images(self): """ @@ -1030,7 +946,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() @@ -1049,9 +965,7 @@ def recv_get_Images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_Images failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_Images failed: unknown result") def get_public_Images(self): """ @@ -1063,9 +977,7 @@ def get_public_Images(self): return self.recv_get_public_Images() def send_get_public_Images(self): - self._oprot.writeMessageBegin( - "get_public_Images", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_public_Images', TMessageType.CALL, self._seqid) args = get_public_Images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1084,10 +996,7 @@ def recv_get_public_Images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_public_Images failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_public_Images failed: unknown result") def get_private_Images(self): """ @@ -1099,9 +1008,7 @@ def get_private_Images(self): return self.recv_get_private_Images() def send_get_private_Images(self): - self._oprot.writeMessageBegin( - "get_private_Images", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_private_Images', TMessageType.CALL, self._seqid) args = get_private_Images_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1120,10 +1027,7 @@ def recv_get_private_Images(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_private_Images failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_private_Images failed: unknown result") def get_Image_with_Tag(self, openstack_id): """ @@ -1138,9 +1042,7 @@ def get_Image_with_Tag(self, openstack_id): return self.recv_get_Image_with_Tag() def send_get_Image_with_Tag(self, openstack_id): - self._oprot.writeMessageBegin( - "get_Image_with_Tag", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_Image_with_Tag', TMessageType.CALL, self._seqid) args = get_Image_with_Tag_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1160,10 +1062,7 @@ def recv_get_Image_with_Tag(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_Image_with_Tag failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_Image_with_Tag failed: unknown result") def get_Images_by_filter(self, filter_json): """ @@ -1178,9 +1077,7 @@ def get_Images_by_filter(self, filter_json): return self.recv_get_Images_by_filter() def send_get_Images_by_filter(self, filter_json): - self._oprot.writeMessageBegin( - "get_Images_by_filter", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_Images_by_filter', TMessageType.CALL, self._seqid) args = get_Images_by_filter_args() args.filter_json = filter_json args.write(self._oprot) @@ -1200,10 +1097,7 @@ def recv_get_Images_by_filter(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_Images_by_filter failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_Images_by_filter failed: unknown result") def get_volume(self, volume_id): """ @@ -1215,7 +1109,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) @@ -1235,9 +1129,7 @@ def recv_get_volume(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -1249,9 +1141,7 @@ def get_volumes_by_ids(self, volume_ids): return self.recv_get_volumes_by_ids() def send_get_volumes_by_ids(self, volume_ids): - self._oprot.writeMessageBegin( - "get_volumes_by_ids", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_volumes_by_ids', TMessageType.CALL, self._seqid) args = get_volumes_by_ids_args() args.volume_ids = volume_ids args.write(self._oprot) @@ -1271,10 +1161,7 @@ def recv_get_volumes_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_volumes_by_ids failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_volumes_by_ids failed: unknown result") def resize_volume(self, volume_id, size): """ @@ -1287,7 +1174,7 @@ def resize_volume(self, volume_id, size): return 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 @@ -1308,9 +1195,7 @@ def recv_resize_volume(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "resize_volume failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "resize_volume failed: unknown result") def delete_server(self, openstack_id): """ @@ -1325,7 +1210,7 @@ def delete_server(self, openstack_id): return 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) @@ -1349,9 +1234,7 @@ def recv_delete_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, "delete_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_server failed: unknown result") def add_metadata_to_server(self, servername, metadata): """ @@ -1364,9 +1247,7 @@ def add_metadata_to_server(self, servername, metadata): return self.recv_add_metadata_to_server() def send_add_metadata_to_server(self, servername, 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.servername = servername args.metadata = metadata @@ -1389,10 +1270,7 @@ def recv_add_metadata_to_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "add_metadata_to_server failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_metadata_to_server failed: unknown result") def delete_metadata_from_server(self, servername, keys): """ @@ -1405,9 +1283,7 @@ def delete_metadata_from_server(self, servername, keys): return self.recv_delete_metadata_from_server() def send_delete_metadata_from_server(self, servername, keys): - self._oprot.writeMessageBegin( - "delete_metadata_from_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_metadata_from_server', TMessageType.CALL, self._seqid) args = delete_metadata_from_server_args() args.servername = servername args.keys = keys @@ -1430,10 +1306,7 @@ def recv_delete_metadata_from_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "delete_metadata_from_server failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_metadata_from_server failed: unknown result") def add_floating_ip_to_server(self, openstack_id, network): """ @@ -1449,9 +1322,7 @@ def add_floating_ip_to_server(self, openstack_id, network): return self.recv_add_floating_ip_to_server() def send_add_floating_ip_to_server(self, openstack_id, network): - self._oprot.writeMessageBegin( - "add_floating_ip_to_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('add_floating_ip_to_server', TMessageType.CALL, self._seqid) args = add_floating_ip_to_server_args() args.openstack_id = openstack_id args.network = network @@ -1476,14 +1347,9 @@ def recv_add_floating_ip_to_server(self): raise result.e if result.f is not None: raise result.f - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "add_floating_ip_to_server failed: unknown result", - ) - - def create_connection( - self, username, password, auth_url, user_domain_name, project_domain_name - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_floating_ip_to_server failed: unknown result") + + def create_connection(self, username, password, auth_url, user_domain_name, project_domain_name): """ Create connection to OpenStack. Connection instance @@ -1499,17 +1365,11 @@ def create_connection( - project_domain_name: Project domain name of OpenStack """ - self.send_create_connection( - username, password, auth_url, user_domain_name, project_domain_name - ) + self.send_create_connection(username, password, auth_url, user_domain_name, project_domain_name) return self.recv_create_connection() - def send_create_connection( - self, username, password, auth_url, user_domain_name, project_domain_name - ): - self._oprot.writeMessageBegin( - "create_connection", TMessageType.CALL, self._seqid - ) + def send_create_connection(self, username, password, auth_url, user_domain_name, project_domain_name): + self._oprot.writeMessageBegin('create_connection', TMessageType.CALL, self._seqid) args = create_connection_args() args.username = username args.password = password @@ -1535,24 +1395,9 @@ def recv_create_connection(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_connection failed: unknown result", - ) - - def start_server_without_playbook( - self, - flavor, - image, - public_key, - servername, - metadata, - https, - http, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_connection failed: unknown result") + + def start_server_without_playbook(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): """ Parameters: - flavor: Name of the Flavor to use. @@ -1567,36 +1412,11 @@ def start_server_without_playbook( - volume_ids_path_attach """ - self.send_start_server_without_playbook( - flavor, - image, - public_key, - servername, - metadata, - https, - http, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ) + self.send_start_server_without_playbook(flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach) return self.recv_start_server_without_playbook() - def send_start_server_without_playbook( - self, - flavor, - image, - public_key, - servername, - metadata, - https, - http, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): - self._oprot.writeMessageBegin( - "start_server_without_playbook", TMessageType.CALL, self._seqid - ) + def send_start_server_without_playbook(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): + self._oprot.writeMessageBegin('start_server_without_playbook', TMessageType.CALL, self._seqid) args = start_server_without_playbook_args() args.flavor = flavor args.image = image @@ -1639,19 +1459,14 @@ def recv_start_server_without_playbook(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "start_server_without_playbook failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_without_playbook failed: unknown result") def bibigrid_available(self): self.send_bibigrid_available() return self.recv_bibigrid_available() def send_bibigrid_available(self): - self._oprot.writeMessageBegin( - "bibigrid_available", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('bibigrid_available', TMessageType.CALL, self._seqid) args = bibigrid_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1670,10 +1485,7 @@ def recv_bibigrid_available(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "bibigrid_available failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "bibigrid_available failed: unknown result") def detach_ip_from_server(self, server_id, floating_ip): """ @@ -1686,9 +1498,7 @@ def detach_ip_from_server(self, server_id, floating_ip): return 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 @@ -1709,24 +1519,9 @@ def recv_detach_ip_from_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "detach_ip_from_server failed: unknown result", - ) - - def start_server_with_mounted_volume( - self, - flavor, - image, - public_key, - servername, - metadata, - https, - http, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "detach_ip_from_server failed: unknown result") + + def start_server_with_mounted_volume(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): """ Parameters: - flavor: Name of the Flavor to use. @@ -1741,36 +1536,11 @@ def start_server_with_mounted_volume( - volume_ids_path_attach """ - self.send_start_server_with_mounted_volume( - flavor, - image, - public_key, - servername, - metadata, - https, - http, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ) + self.send_start_server_with_mounted_volume(flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach) return self.recv_start_server_with_mounted_volume() - def send_start_server_with_mounted_volume( - self, - flavor, - image, - public_key, - servername, - metadata, - https, - http, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): - self._oprot.writeMessageBegin( - "start_server_with_mounted_volume", TMessageType.CALL, self._seqid - ) + def send_start_server_with_mounted_volume(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): + self._oprot.writeMessageBegin('start_server_with_mounted_volume', TMessageType.CALL, self._seqid) args = start_server_with_mounted_volume_args() args.flavor = flavor args.image = image @@ -1813,24 +1583,9 @@ def recv_start_server_with_mounted_volume(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "start_server_with_mounted_volume failed: unknown result", - ) - - def start_server( - self, - flavor, - image, - public_key, - servername, - metadata, - diskspace, - volumename, - https, - http, - resenv, - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_with_mounted_volume failed: unknown result") + + def start_server(self, flavor, image, public_key, servername, metadata, diskspace, volumename, https, http, resenv): """ Start a new server. @@ -1847,34 +1602,11 @@ def start_server( - resenv """ - self.send_start_server( - flavor, - image, - public_key, - servername, - metadata, - diskspace, - volumename, - https, - http, - resenv, - ) + self.send_start_server(flavor, image, public_key, servername, metadata, diskspace, volumename, https, http, resenv) return self.recv_start_server() - def send_start_server( - self, - flavor, - image, - public_key, - servername, - metadata, - diskspace, - volumename, - https, - http, - resenv, - ): - self._oprot.writeMessageBegin("start_server", TMessageType.CALL, self._seqid) + def send_start_server(self, flavor, image, public_key, servername, metadata, diskspace, volumename, https, http, resenv): + self._oprot.writeMessageBegin('start_server', TMessageType.CALL, self._seqid) args = start_server_args() args.flavor = flavor args.image = image @@ -1917,22 +1649,9 @@ 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" - ) - - def start_server_with_custom_key( - self, - flavor, - image, - servername, - metadata, - http, - https, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server failed: unknown result") + + def start_server_with_custom_key(self, flavor, image, servername, metadata, http, https, resenv, volume_ids_path_new, volume_ids_path_attach): """ Start a new server with custom key for ansible. @@ -1948,34 +1667,11 @@ def start_server_with_custom_key( - volume_ids_path_attach """ - self.send_start_server_with_custom_key( - flavor, - image, - servername, - metadata, - http, - https, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ) + self.send_start_server_with_custom_key(flavor, image, servername, metadata, http, https, resenv, volume_ids_path_new, volume_ids_path_attach) return self.recv_start_server_with_custom_key() - def send_start_server_with_custom_key( - self, - flavor, - image, - servername, - metadata, - http, - https, - resenv, - volume_ids_path_new, - volume_ids_path_attach, - ): - self._oprot.writeMessageBegin( - "start_server_with_custom_key", TMessageType.CALL, self._seqid - ) + def send_start_server_with_custom_key(self, flavor, image, servername, metadata, http, https, resenv, volume_ids_path_new, volume_ids_path_attach): + self._oprot.writeMessageBegin('start_server_with_custom_key', TMessageType.CALL, self._seqid) args = start_server_with_custom_key_args() args.flavor = flavor args.image = image @@ -2017,10 +1713,7 @@ def recv_start_server_with_custom_key(self): raise result.f if result.o is not None: raise result.o - 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): """ @@ -2034,7 +1727,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) @@ -2054,13 +1747,9 @@ def recv_exist_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "exist_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "exist_server failed: unknown result") - def create_and_deploy_playbook( - self, public_key, playbooks_information, openstack_id - ): + def create_and_deploy_playbook(self, public_key, playbooks_information, openstack_id): """ Create and deploy an anaconda ansible playbook @@ -2070,17 +1759,11 @@ def create_and_deploy_playbook( - openstack_id """ - self.send_create_and_deploy_playbook( - public_key, playbooks_information, openstack_id - ) + self.send_create_and_deploy_playbook(public_key, playbooks_information, openstack_id) return self.recv_create_and_deploy_playbook() - def send_create_and_deploy_playbook( - self, public_key, playbooks_information, openstack_id - ): - self._oprot.writeMessageBegin( - "create_and_deploy_playbook", TMessageType.CALL, self._seqid - ) + def send_create_and_deploy_playbook(self, public_key, playbooks_information, openstack_id): + self._oprot.writeMessageBegin('create_and_deploy_playbook', TMessageType.CALL, self._seqid) args = create_and_deploy_playbook_args() args.public_key = public_key args.playbooks_information = playbooks_information @@ -2102,10 +1785,7 @@ def recv_create_and_deploy_playbook(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2119,9 +1799,7 @@ def get_playbook_logs(self, openstack_id): return self.recv_get_playbook_logs() def send_get_playbook_logs(self, openstack_id): - self._oprot.writeMessageBegin( - "get_playbook_logs", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_playbook_logs', TMessageType.CALL, self._seqid) args = get_playbook_logs_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2141,10 +1819,7 @@ def recv_get_playbook_logs(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2155,7 +1830,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() @@ -2174,16 +1849,14 @@ def recv_has_forc(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "has_forc failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "has_forc failed: unknown result") def get_forc_url(self): self.send_get_forc_url() return self.recv_get_forc_url() def send_get_forc_url(self): - self._oprot.writeMessageBegin("get_forc_url", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_forc_url', TMessageType.CALL, self._seqid) args = get_forc_url_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2202,9 +1875,7 @@ def recv_get_forc_url(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_forc_url failed: unknown result") def create_backend(self, elixir_id, user_key_url, template, upstream_url): """ @@ -2221,7 +1892,7 @@ def create_backend(self, elixir_id, user_key_url, template, upstream_url): return self.recv_create_backend() def send_create_backend(self, elixir_id, user_key_url, 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.elixir_id = elixir_id args.user_key_url = user_key_url @@ -2244,10 +1915,7 @@ def recv_create_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_backend failed: unknown result") def get_backends(self): """ @@ -2258,7 +1926,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() @@ -2277,9 +1945,7 @@ def recv_get_backends(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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, elixir_id): """ @@ -2293,9 +1959,7 @@ def get_backends_by_owner(self, elixir_id): return self.recv_get_backends_by_owner() def send_get_backends_by_owner(self, elixir_id): - 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.elixir_id = elixir_id args.write(self._oprot) @@ -2315,10 +1979,7 @@ def recv_get_backends_by_owner(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2332,9 +1993,7 @@ def get_backends_by_template(self, template): return self.recv_get_backends_by_template() def send_get_backends_by_template(self, template): - self._oprot.writeMessageBegin( - "get_backends_by_template", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_backends_by_template', TMessageType.CALL, self._seqid) args = get_backends_by_template_args() args.template = template args.write(self._oprot) @@ -2354,10 +2013,7 @@ def recv_get_backends_by_template(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2371,9 +2027,7 @@ def get_backend_by_id(self, id): return self.recv_get_backend_by_id() def send_get_backend_by_id(self, id): - self._oprot.writeMessageBegin( - "get_backend_by_id", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_backend_by_id', TMessageType.CALL, self._seqid) args = get_backend_by_id_args() args.id = id args.write(self._oprot) @@ -2393,10 +2047,7 @@ def recv_get_backend_by_id(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_backend_by_id failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backend_by_id failed: unknown result") def delete_backend(self, id): """ @@ -2410,7 +2061,7 @@ def delete_backend(self, id): return 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) @@ -2430,10 +2081,7 @@ def recv_delete_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "delete_backend failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_backend failed: unknown result") def add_user_to_backend(self, backend_id, owner_id, user_id): """ @@ -2449,9 +2097,7 @@ def add_user_to_backend(self, backend_id, owner_id, user_id): return self.recv_add_user_to_backend() def send_add_user_to_backend(self, backend_id, owner_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.owner_id = owner_id @@ -2473,10 +2119,7 @@ def recv_add_user_to_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2490,9 +2133,7 @@ def get_users_from_backend(self, backend_id): return self.recv_get_users_from_backend() def send_get_users_from_backend(self, backend_id): - self._oprot.writeMessageBegin( - "get_users_from_backend", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_users_from_backend', TMessageType.CALL, self._seqid) args = get_users_from_backend_args() args.backend_id = backend_id args.write(self._oprot) @@ -2512,10 +2153,7 @@ def recv_get_users_from_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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, owner_id, user_id): """ @@ -2531,9 +2169,7 @@ def delete_user_from_backend(self, backend_id, owner_id, user_id): return self.recv_delete_user_from_backend() def send_delete_user_from_backend(self, backend_id, owner_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.owner_id = owner_id @@ -2555,17 +2191,14 @@ def recv_delete_user_from_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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_templates(self): self.send_get_templates() return self.recv_get_templates() def send_get_templates(self): - self._oprot.writeMessageBegin("get_templates", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('get_templates', TMessageType.CALL, self._seqid) args = get_templates_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2584,18 +2217,14 @@ def recv_get_templates(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_templates failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_templates 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() @@ -2614,10 +2243,7 @@ def recv_get_allowed_templates(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_allowed_templates failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_allowed_templates failed: unknown result") def get_templates_by_template(self, template_name): """ @@ -2629,9 +2255,7 @@ def get_templates_by_template(self, template_name): return self.recv_get_templates_by_template() def send_get_templates_by_template(self, template_name): - self._oprot.writeMessageBegin( - "get_templates_by_template", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_templates_by_template', TMessageType.CALL, self._seqid) args = get_templates_by_template_args() args.template_name = template_name args.write(self._oprot) @@ -2651,10 +2275,7 @@ def recv_get_templates_by_template(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_templates_by_template failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_templates_by_template failed: unknown result") def check_template(self, template_name, template_version): """ @@ -2667,7 +2288,7 @@ def check_template(self, template_name, template_version): return self.recv_check_template() def send_check_template(self, template_name, template_version): - self._oprot.writeMessageBegin("check_template", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('check_template', TMessageType.CALL, self._seqid) args = check_template_args() args.template_name = template_name args.template_version = template_version @@ -2688,10 +2309,7 @@ def recv_check_template(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "check_template failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "check_template failed: unknown result") def add_udp_security_group(self, server_id): """ @@ -2705,9 +2323,7 @@ def add_udp_security_group(self, server_id): return 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) @@ -2731,10 +2347,7 @@ def recv_add_udp_security_group(self): raise result.r if result.s is not None: raise result.s - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "add_udp_security_group failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_udp_security_group failed: unknown result") def get_servers(self): """ @@ -2746,7 +2359,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() @@ -2765,9 +2378,7 @@ def recv_get_servers(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_servers failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers failed: unknown result") def get_servers_by_ids(self, server_ids): """ @@ -2782,9 +2393,7 @@ def get_servers_by_ids(self, server_ids): return self.recv_get_servers_by_ids() def send_get_servers_by_ids(self, server_ids): - self._oprot.writeMessageBegin( - "get_servers_by_ids", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_servers_by_ids', TMessageType.CALL, self._seqid) args = get_servers_by_ids_args() args.server_ids = server_ids args.write(self._oprot) @@ -2804,10 +2413,7 @@ def recv_get_servers_by_ids(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_servers_by_ids failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_ids failed: unknown result") def check_server_task_state(self, openstack_id): """ @@ -2819,9 +2425,7 @@ def check_server_task_state(self, openstack_id): return self.recv_check_server_task_state() def send_check_server_task_state(self, openstack_id): - self._oprot.writeMessageBegin( - "check_server_task_state", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('check_server_task_state', TMessageType.CALL, self._seqid) args = check_server_task_state_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2841,10 +2445,7 @@ def recv_check_server_task_state(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "check_server_task_state failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "check_server_task_state failed: unknown result") def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -2859,9 +2460,7 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): return self.recv_get_servers_by_bibigrid_id() def send_get_servers_by_bibigrid_id(self, bibigrid_id): - self._oprot.writeMessageBegin( - "get_servers_by_bibigrid_id", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_servers_by_bibigrid_id', TMessageType.CALL, self._seqid) args = get_servers_by_bibigrid_id_args() args.bibigrid_id = bibigrid_id args.write(self._oprot) @@ -2881,14 +2480,9 @@ 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", - ) - - def scale_up_cluster( - self, cluster_id, image, flavor, count, names, start_idx, batch_idx - ): + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_servers_by_bibigrid_id failed: unknown result") + + def scale_up_cluster(self, cluster_id, image, flavor, count, names, start_idx, batch_idx): """ Parameters: - cluster_id @@ -2900,17 +2494,11 @@ def scale_up_cluster( - batch_idx """ - self.send_scale_up_cluster( - cluster_id, image, flavor, count, names, start_idx, batch_idx - ) + self.send_scale_up_cluster(cluster_id, image, flavor, count, names, start_idx, batch_idx) return self.recv_scale_up_cluster() - def send_scale_up_cluster( - self, cluster_id, image, flavor, 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, flavor, 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 = image @@ -2936,10 +2524,7 @@ def recv_scale_up_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "scale_up_cluster failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "scale_up_cluster failed: unknown result") def get_cluster_info(self, cluster_id): """ @@ -2951,9 +2536,7 @@ def get_cluster_info(self, cluster_id): return self.recv_get_cluster_info() def send_get_cluster_info(self, cluster_id): - self._oprot.writeMessageBegin( - "get_cluster_info", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_cluster_info', TMessageType.CALL, self._seqid) args = get_cluster_info_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -2973,10 +2556,7 @@ def recv_get_cluster_info(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2988,9 +2568,7 @@ def get_cluster_status(self, cluster_id): return self.recv_get_cluster_status() def send_get_cluster_status(self, cluster_id): - self._oprot.writeMessageBegin( - "get_cluster_status", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('get_cluster_status', TMessageType.CALL, self._seqid) args = get_cluster_status_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -3010,10 +2588,7 @@ def recv_get_cluster_status(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "get_cluster_status failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_status failed: unknown result") def get_server(self, openstack_id): """ @@ -3028,7 +2603,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) @@ -3050,9 +2625,7 @@ def recv_get_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server failed: unknown result") def stop_server(self, openstack_id): """ @@ -3067,7 +2640,7 @@ def stop_server(self, openstack_id): return 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) @@ -3091,9 +2664,7 @@ def recv_stop_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, "stop_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "stop_server failed: unknown result") def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description): """ @@ -3112,10 +2683,8 @@ def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description) self.send_create_snapshot(openstack_id, name, elixir_id, base_tags, description) return self.recv_create_snapshot() - def send_create_snapshot( - self, openstack_id, name, elixir_id, base_tags, description - ): - self._oprot.writeMessageBegin("create_snapshot", TMessageType.CALL, self._seqid) + def send_create_snapshot(self, openstack_id, name, elixir_id, base_tags, description): + self._oprot.writeMessageBegin('create_snapshot', TMessageType.CALL, self._seqid) args = create_snapshot_args() args.openstack_id = openstack_id args.name = name @@ -3143,10 +2712,7 @@ def recv_create_snapshot(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "create_snapshot failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_snapshot failed: unknown result") def get_limits(self): """ @@ -3160,7 +2726,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() @@ -3179,9 +2745,7 @@ def recv_get_limits(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "get_limits failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_limits failed: unknown result") def start_cluster(self, public_key, master_instance, worker_instance, user): """ @@ -3196,7 +2760,7 @@ def start_cluster(self, public_key, master_instance, worker_instance, user): return self.recv_start_cluster() def send_start_cluster(self, public_key, master_instance, worker_instance, user): - self._oprot.writeMessageBegin("start_cluster", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('start_cluster', TMessageType.CALL, self._seqid) args = start_cluster_args() args.public_key = public_key args.master_instance = master_instance @@ -3219,9 +2783,7 @@ def recv_start_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException( - TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "start_cluster failed: unknown result") def terminate_cluster(self, cluster_id): """ @@ -3233,9 +2795,7 @@ def terminate_cluster(self, cluster_id): return self.recv_terminate_cluster() def send_terminate_cluster(self, cluster_id): - self._oprot.writeMessageBegin( - "terminate_cluster", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('terminate_cluster', TMessageType.CALL, self._seqid) args = terminate_cluster_args() args.cluster_id = cluster_id args.write(self._oprot) @@ -3255,10 +2815,7 @@ def recv_terminate_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -3273,7 +2830,7 @@ def delete_image(self, image_id): return self.recv_delete_image() def send_delete_image(self, image_id): - self._oprot.writeMessageBegin("delete_image", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('delete_image', TMessageType.CALL, self._seqid) args = delete_image_args() args.image_id = image_id args.write(self._oprot) @@ -3295,9 +2852,7 @@ def recv_delete_image(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, "delete_image failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_image failed: unknown result") def delete_volume_attachment(self, volume_id, server_id): """ @@ -3313,9 +2868,7 @@ def delete_volume_attachment(self, volume_id, server_id): return self.recv_delete_volume_attachment() def send_delete_volume_attachment(self, volume_id, server_id): - self._oprot.writeMessageBegin( - "delete_volume_attachment", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('delete_volume_attachment', TMessageType.CALL, self._seqid) args = delete_volume_attachment_args() args.volume_id = volume_id args.server_id = server_id @@ -3340,10 +2893,7 @@ def recv_delete_volume_attachment(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "delete_volume_attachment failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_volume_attachment failed: unknown result") def delete_volume(self, volume_id): """ @@ -3358,7 +2908,7 @@ def delete_volume(self, volume_id): return 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) @@ -3380,9 +2930,7 @@ def recv_delete_volume(self): return result.success if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, "delete_volume failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_volume failed: unknown result") def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -3398,9 +2946,7 @@ def attach_volume_to_server(self, openstack_id, volume_id): return self.recv_attach_volume_to_server() def send_attach_volume_to_server(self, openstack_id, volume_id): - self._oprot.writeMessageBegin( - "attach_volume_to_server", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('attach_volume_to_server', TMessageType.CALL, self._seqid) args = attach_volume_to_server_args() args.openstack_id = openstack_id args.volume_id = volume_id @@ -3425,10 +2971,7 @@ def recv_attach_volume_to_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "attach_volume_to_server failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "attach_volume_to_server failed: unknown result") def check_server_status(self, openstack_id): """ @@ -3443,9 +2986,7 @@ def check_server_status(self, openstack_id): return self.recv_check_server_status() def send_check_server_status(self, openstack_id): - self._oprot.writeMessageBegin( - "check_server_status", TMessageType.CALL, self._seqid - ) + self._oprot.writeMessageBegin('check_server_status', TMessageType.CALL, self._seqid) args = check_server_status_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3469,10 +3010,7 @@ def recv_check_server_status(self): raise result.e if result.r is not None: raise result.r - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "check_server_status failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "check_server_status failed: unknown result") def setUserPassword(self, user, password): """ @@ -3488,7 +3026,7 @@ def setUserPassword(self, user, password): return self.recv_setUserPassword() def send_setUserPassword(self, user, password): - self._oprot.writeMessageBegin("setUserPassword", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('setUserPassword', TMessageType.CALL, self._seqid) args = setUserPassword_args() args.user = user args.password = password @@ -3511,10 +3049,7 @@ def recv_setUserPassword(self): return result.success if result.e is not None: raise result.e - raise TApplicationException( - TApplicationException.MISSING_RESULT, - "setUserPassword failed: unknown result", - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "setUserPassword failed: unknown result") def resume_server(self, openstack_id): """ @@ -3529,7 +3064,7 @@ def resume_server(self, openstack_id): return 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) @@ -3553,9 +3088,7 @@ def recv_resume_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, "resume_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "resume_server failed: unknown result") def create_volume(self, volume_name, volume_storage, metadata): """ @@ -3572,7 +3105,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 @@ -3596,9 +3129,7 @@ def recv_create_volume(self): return result.success if result.r is not None: raise result.r - raise TApplicationException( - TApplicationException.MISSING_RESULT, "create_volume failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume failed: unknown result") def reboot_server(self, server_id, reboot_type): """ @@ -3614,7 +3145,7 @@ def reboot_server(self, server_id, reboot_type): return self.recv_reboot_server() def send_reboot_server(self, server_id, reboot_type): - self._oprot.writeMessageBegin("reboot_server", TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin('reboot_server', TMessageType.CALL, self._seqid) args = reboot_server_args() args.server_id = server_id args.reboot_type = reboot_type @@ -3639,9 +3170,7 @@ def recv_reboot_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException( - TApplicationException.MISSING_RESULT, "reboot_server failed: unknown result" - ) + raise TApplicationException(TApplicationException.MISSING_RESULT, "reboot_server failed: unknown result") class Processor(Iface, TProcessor): @@ -3651,9 +3180,7 @@ def __init__(self, handler): self._processMap["check_Version"] = Processor.process_check_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_formulars" - ] = Processor.process_get_calculation_formulars + self._processMap["get_calculation_formulars"] = Processor.process_get_calculation_formulars self._processMap["import_keypair"] = Processor.process_import_keypair self._processMap["get_vm_ports"] = Processor.process_get_vm_ports self._processMap["get_Flavors"] = Processor.process_get_Flavors @@ -3661,80 +3188,44 @@ def __init__(self, handler): self._processMap["get_public_Images"] = Processor.process_get_public_Images self._processMap["get_private_Images"] = Processor.process_get_private_Images self._processMap["get_Image_with_Tag"] = Processor.process_get_Image_with_Tag - self._processMap[ - "get_Images_by_filter" - ] = Processor.process_get_Images_by_filter + self._processMap["get_Images_by_filter"] = Processor.process_get_Images_by_filter 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["delete_server"] = Processor.process_delete_server - self._processMap[ - "add_metadata_to_server" - ] = Processor.process_add_metadata_to_server - self._processMap[ - "delete_metadata_from_server" - ] = Processor.process_delete_metadata_from_server - self._processMap[ - "add_floating_ip_to_server" - ] = Processor.process_add_floating_ip_to_server + self._processMap["add_metadata_to_server"] = Processor.process_add_metadata_to_server + self._processMap["delete_metadata_from_server"] = Processor.process_delete_metadata_from_server + self._processMap["add_floating_ip_to_server"] = Processor.process_add_floating_ip_to_server self._processMap["create_connection"] = Processor.process_create_connection - self._processMap[ - "start_server_without_playbook" - ] = Processor.process_start_server_without_playbook + self._processMap["start_server_without_playbook"] = Processor.process_start_server_without_playbook self._processMap["bibigrid_available"] = Processor.process_bibigrid_available - self._processMap[ - "detach_ip_from_server" - ] = Processor.process_detach_ip_from_server - self._processMap[ - "start_server_with_mounted_volume" - ] = Processor.process_start_server_with_mounted_volume + self._processMap["detach_ip_from_server"] = Processor.process_detach_ip_from_server + self._processMap["start_server_with_mounted_volume"] = Processor.process_start_server_with_mounted_volume self._processMap["start_server"] = Processor.process_start_server - self._processMap[ - "start_server_with_custom_key" - ] = Processor.process_start_server_with_custom_key + self._processMap["start_server_with_custom_key"] = Processor.process_start_server_with_custom_key self._processMap["exist_server"] = Processor.process_exist_server - self._processMap[ - "create_and_deploy_playbook" - ] = Processor.process_create_and_deploy_playbook + self._processMap["create_and_deploy_playbook"] = Processor.process_create_and_deploy_playbook self._processMap["get_playbook_logs"] = Processor.process_get_playbook_logs self._processMap["has_forc"] = Processor.process_has_forc self._processMap["get_forc_url"] = Processor.process_get_forc_url self._processMap["create_backend"] = Processor.process_create_backend self._processMap["get_backends"] = Processor.process_get_backends - self._processMap[ - "get_backends_by_owner" - ] = Processor.process_get_backends_by_owner - self._processMap[ - "get_backends_by_template" - ] = Processor.process_get_backends_by_template + self._processMap["get_backends_by_owner"] = Processor.process_get_backends_by_owner + self._processMap["get_backends_by_template"] = Processor.process_get_backends_by_template self._processMap["get_backend_by_id"] = Processor.process_get_backend_by_id self._processMap["delete_backend"] = Processor.process_delete_backend self._processMap["add_user_to_backend"] = Processor.process_add_user_to_backend - self._processMap[ - "get_users_from_backend" - ] = Processor.process_get_users_from_backend - self._processMap[ - "delete_user_from_backend" - ] = Processor.process_delete_user_from_backend + self._processMap["get_users_from_backend"] = Processor.process_get_users_from_backend + self._processMap["delete_user_from_backend"] = Processor.process_delete_user_from_backend self._processMap["get_templates"] = Processor.process_get_templates - self._processMap[ - "get_allowed_templates" - ] = Processor.process_get_allowed_templates - self._processMap[ - "get_templates_by_template" - ] = Processor.process_get_templates_by_template + self._processMap["get_allowed_templates"] = Processor.process_get_allowed_templates + self._processMap["get_templates_by_template"] = Processor.process_get_templates_by_template self._processMap["check_template"] = Processor.process_check_template - self._processMap[ - "add_udp_security_group" - ] = Processor.process_add_udp_security_group + self._processMap["add_udp_security_group"] = Processor.process_add_udp_security_group self._processMap["get_servers"] = Processor.process_get_servers self._processMap["get_servers_by_ids"] = Processor.process_get_servers_by_ids - self._processMap[ - "check_server_task_state" - ] = Processor.process_check_server_task_state - self._processMap[ - "get_servers_by_bibigrid_id" - ] = Processor.process_get_servers_by_bibigrid_id + self._processMap["check_server_task_state"] = Processor.process_check_server_task_state + 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["get_cluster_info"] = Processor.process_get_cluster_info self._processMap["get_cluster_status"] = Processor.process_get_cluster_status @@ -3745,27 +3236,27 @@ def __init__(self, handler): self._processMap["start_cluster"] = Processor.process_start_cluster self._processMap["terminate_cluster"] = Processor.process_terminate_cluster self._processMap["delete_image"] = Processor.process_delete_image - self._processMap[ - "delete_volume_attachment" - ] = Processor.process_delete_volume_attachment + self._processMap["delete_volume_attachment"] = Processor.process_delete_volume_attachment 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["check_server_status"] = Processor.process_check_server_status self._processMap["setUserPassword"] = Processor.process_setUserPassword self._processMap["resume_server"] = Processor.process_resume_server self._processMap["create_volume"] = Processor.process_create_volume self._processMap["reboot_server"] = Processor.process_reboot_server + self._on_message_begin = None + + def on_message_begin(self, func): + self._on_message_begin = func def process(self, iprot, oprot): (name, type, seqid) = iprot.readMessageBegin() + if self._on_message_begin: + self._on_message_begin(name, type, seqid) 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() @@ -3786,15 +3277,13 @@ def process_check_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("check_Version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3811,15 +3300,13 @@ def process_get_client_version(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_client_version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3836,15 +3323,13 @@ def process_get_gateway_ip(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_gateway_ip", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3861,15 +3346,13 @@ def process_get_calculation_formulars(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_formulars", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3886,15 +3369,13 @@ def process_import_keypair(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("import_keypair", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3911,15 +3392,13 @@ def process_get_vm_ports(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_vm_ports", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3936,15 +3415,13 @@ def process_get_Flavors(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_Flavors", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3961,15 +3438,13 @@ def process_get_Images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_Images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3986,15 +3461,13 @@ def process_get_public_Images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_public_Images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4011,15 +3484,13 @@ def process_get_private_Images(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_private_Images", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4036,15 +3507,13 @@ def process_get_Image_with_Tag(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_Image_with_Tag", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4061,15 +3530,13 @@ def process_get_Images_by_filter(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_by_filter", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4086,15 +3553,13 @@ def process_get_volume(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_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4111,15 +3576,13 @@ def process_get_volumes_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_volumes_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4136,15 +3599,13 @@ def process_resize_volume(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("resize_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4167,15 +3628,13 @@ def process_delete_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4187,9 +3646,7 @@ def process_add_metadata_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_metadata_to_server_result() try: - result.success = self._handler.add_metadata_to_server( - args.servername, args.metadata - ) + result.success = self._handler.add_metadata_to_server(args.servername, args.metadata) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4197,15 +3654,13 @@ def process_add_metadata_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" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_metadata_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4217,9 +3672,7 @@ def process_delete_metadata_from_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_metadata_from_server_result() try: - result.success = self._handler.delete_metadata_from_server( - args.servername, args.keys - ) + result.success = self._handler.delete_metadata_from_server(args.servername, args.keys) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4227,15 +3680,13 @@ def process_delete_metadata_from_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("delete_metadata_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4247,9 +3698,7 @@ def process_add_floating_ip_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_floating_ip_to_server_result() try: - result.success = self._handler.add_floating_ip_to_server( - args.openstack_id, args.network - ) + result.success = self._handler.add_floating_ip_to_server(args.openstack_id, args.network) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4260,15 +3709,13 @@ def process_add_floating_ip_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.f = f except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_floating_ip_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4280,13 +3727,7 @@ def process_create_connection(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_connection_result() try: - result.success = self._handler.create_connection( - args.username, - args.password, - args.auth_url, - args.user_domain_name, - args.project_domain_name, - ) + result.success = self._handler.create_connection(args.username, args.password, args.auth_url, args.user_domain_name, args.project_domain_name) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4294,15 +3735,13 @@ def process_create_connection(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("create_connection", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4314,18 +3753,7 @@ def process_start_server_without_playbook(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_without_playbook_result() try: - result.success = self._handler.start_server_without_playbook( - args.flavor, - args.image, - args.public_key, - args.servername, - args.metadata, - args.https, - args.http, - args.resenv, - args.volume_ids_path_new, - args.volume_ids_path_attach, - ) + result.success = self._handler.start_server_without_playbook(args.flavor, args.image, args.public_key, args.servername, args.metadata, args.https, args.http, args.resenv, args.volume_ids_path_new, args.volume_ids_path_attach) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4351,15 +3779,13 @@ def process_start_server_without_playbook(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_without_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4376,15 +3802,13 @@ def process_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("bibigrid_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4396,22 +3820,18 @@ def process_detach_ip_from_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = detach_ip_from_server_result() try: - result.success = self._handler.detach_ip_from_server( - args.server_id, args.floating_ip - ) + result.success = self._handler.detach_ip_from_server(args.server_id, args.floating_ip) 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("detach_ip_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4423,18 +3843,7 @@ def process_start_server_with_mounted_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_with_mounted_volume_result() try: - result.success = self._handler.start_server_with_mounted_volume( - args.flavor, - args.image, - args.public_key, - args.servername, - args.metadata, - args.https, - args.http, - args.resenv, - args.volume_ids_path_new, - args.volume_ids_path_attach, - ) + result.success = self._handler.start_server_with_mounted_volume(args.flavor, args.image, args.public_key, args.servername, args.metadata, args.https, args.http, args.resenv, args.volume_ids_path_new, args.volume_ids_path_attach) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4460,15 +3869,13 @@ def process_start_server_with_mounted_volume(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_with_mounted_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4480,18 +3887,7 @@ def process_start_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_result() try: - result.success = self._handler.start_server( - args.flavor, - args.image, - args.public_key, - args.servername, - args.metadata, - args.diskspace, - args.volumename, - args.https, - args.http, - args.resenv, - ) + result.success = self._handler.start_server(args.flavor, args.image, args.public_key, args.servername, args.metadata, args.diskspace, args.volumename, args.https, args.http, args.resenv) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4517,15 +3913,13 @@ def process_start_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.o = o except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("start_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4537,17 +3931,7 @@ def process_start_server_with_custom_key(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_with_custom_key_result() try: - result.success = self._handler.start_server_with_custom_key( - args.flavor, - args.image, - args.servername, - args.metadata, - args.http, - args.https, - args.resenv, - args.volume_ids_path_new, - args.volume_ids_path_attach, - ) + result.success = self._handler.start_server_with_custom_key(args.flavor, args.image, args.servername, args.metadata, args.http, args.https, args.resenv, args.volume_ids_path_new, args.volume_ids_path_attach) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4573,15 +3957,13 @@ def process_start_server_with_custom_key(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_with_custom_key", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4598,15 +3980,13 @@ def process_exist_server(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("exist_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4618,22 +3998,18 @@ 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.playbooks_information, args.openstack_id - ) + result.success = self._handler.create_and_deploy_playbook(args.public_key, args.playbooks_information, args.openstack_id) 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("create_and_deploy_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4650,15 +4026,13 @@ def process_get_playbook_logs(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_playbook_logs", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4675,15 +4049,13 @@ def process_has_forc(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("has_forc", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4700,15 +4072,13 @@ def process_get_forc_url(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_forc_url", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4720,22 +4090,18 @@ def process_create_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_backend_result() try: - result.success = self._handler.create_backend( - args.elixir_id, args.user_key_url, args.template, args.upstream_url - ) + result.success = self._handler.create_backend(args.elixir_id, args.user_key_url, args.template, args.upstream_url) 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("create_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4752,15 +4118,13 @@ def process_get_backends(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_backends", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4777,15 +4141,13 @@ def process_get_backends_by_owner(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_backends_by_owner", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4802,15 +4164,13 @@ def process_get_backends_by_template(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_backends_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4827,15 +4187,13 @@ def process_get_backend_by_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_backend_by_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4852,15 +4210,13 @@ def process_delete_backend(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_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4872,22 +4228,18 @@ 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.owner_id, args.user_id - ) + result.success = self._handler.add_user_to_backend(args.backend_id, args.owner_id, args.user_id) 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_user_to_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4904,15 +4256,13 @@ def process_get_users_from_backend(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_users_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4924,22 +4274,18 @@ 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.owner_id, args.user_id - ) + result.success = self._handler.delete_user_from_backend(args.backend_id, args.owner_id, args.user_id) 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("delete_user_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4956,15 +4302,13 @@ def process_get_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_templates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4981,15 +4325,13 @@ def process_get_allowed_templates(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_allowed_templates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5006,15 +4348,13 @@ def process_get_templates_by_template(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_templates_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5026,22 +4366,18 @@ def process_check_template(self, seqid, iprot, oprot): iprot.readMessageEnd() result = check_template_result() try: - result.success = self._handler.check_template( - args.template_name, args.template_version - ) + result.success = self._handler.check_template(args.template_name, args.template_version) 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("check_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5064,15 +4400,13 @@ def process_add_udp_security_group(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.s = s except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("add_udp_security_group", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5089,15 +4423,13 @@ def process_get_servers(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5114,15 +4446,13 @@ def process_get_servers_by_ids(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers_by_ids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5139,15 +4469,13 @@ def process_check_server_task_state(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("check_server_task_state", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5164,15 +4492,13 @@ def process_get_servers_by_bibigrid_id(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_servers_by_bibigrid_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5184,28 +4510,18 @@ def process_scale_up_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = scale_up_cluster_result() try: - result.success = self._handler.scale_up_cluster( - args.cluster_id, - args.image, - args.flavor, - args.count, - args.names, - args.start_idx, - args.batch_idx, - ) + result.success = self._handler.scale_up_cluster(args.cluster_id, args.image, args.flavor, 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() @@ -5222,15 +4538,13 @@ def process_get_cluster_info(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_cluster_info", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5247,15 +4561,13 @@ def process_get_cluster_status(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_cluster_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5275,15 +4587,13 @@ def process_get_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5306,15 +4616,13 @@ def process_stop_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("stop_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5326,13 +4634,7 @@ def process_create_snapshot(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_snapshot_result() try: - result.success = self._handler.create_snapshot( - args.openstack_id, - args.name, - args.elixir_id, - args.base_tags, - args.description, - ) + result.success = self._handler.create_snapshot(args.openstack_id, args.name, args.elixir_id, args.base_tags, args.description) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5343,15 +4645,13 @@ def process_create_snapshot(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("create_snapshot", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5368,15 +4668,13 @@ def process_get_limits(self, seqid, iprot, oprot): except TTransport.TTransportException: raise except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("get_limits", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5388,22 +4686,18 @@ def process_start_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_cluster_result() try: - result.success = self._handler.start_cluster( - args.public_key, args.master_instance, args.worker_instance, args.user - ) + result.success = self._handler.start_cluster(args.public_key, args.master_instance, args.worker_instance, 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() @@ -5420,15 +4714,13 @@ def process_terminate_cluster(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("terminate_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5448,15 +4740,13 @@ def process_delete_image(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("delete_image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5468,9 +4758,7 @@ def process_delete_volume_attachment(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_volume_attachment_result() try: - result.success = self._handler.delete_volume_attachment( - args.volume_id, args.server_id - ) + result.success = self._handler.delete_volume_attachment(args.volume_id, args.server_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5481,15 +4769,13 @@ def process_delete_volume_attachment(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_volume_attachment", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5509,15 +4795,13 @@ def process_delete_volume(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_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5529,9 +4813,7 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = attach_volume_to_server_result() try: - result.success = self._handler.attach_volume_to_server( - args.openstack_id, args.volume_id - ) + result.success = self._handler.attach_volume_to_server(args.openstack_id, args.volume_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5542,15 +4824,13 @@ def process_attach_volume_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("attach_volume_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5573,15 +4853,13 @@ def process_check_server_status(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("check_server_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5601,15 +4879,13 @@ def process_setUserPassword(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("setUserPassword", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5632,15 +4908,13 @@ def process_resume_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.c = c except TApplicationException as ex: - logging.exception("TApplication exception in handler") + logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception("Unexpected exception in handler") + logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION - result = TApplicationException( - TApplicationException.INTERNAL_ERROR, "Internal error" - ) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resume_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5652,9 +4926,7 @@ def process_create_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_volume_result() try: - result.success = self._handler.create_volume( - args.volume_name, args.volume_storage, args.metadata - ) + result.success = self._handler.create_volume(args.volume_name, args.volume_storage, args.metadata) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5662,15 +4934,13 @@ def process_create_volume(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", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -5682,9 +4952,7 @@ def process_reboot_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = reboot_server_result() try: - result.success = self._handler.reboot_server( - args.server_id, args.reboot_type - ) + result.success = self._handler.reboot_server(args.server_id, args.reboot_type) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -5695,21 +4963,18 @@ def process_reboot_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_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - # HELPER FUNCTIONS AND STRUCTURES @@ -5720,18 +4985,12 @@ class check_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() @@ -5751,13 +5010,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("check_Version_args") + oprot.writeStructBegin('check_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() @@ -5767,26 +5024,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(check_Version_args) check_Version_args.thrift_spec = ( None, # 0 - ( - 1, - TType.DOUBLE, - "version", - None, - None, - ), # 1 + (1, TType.DOUBLE, 'version', None, None, ), # 1 ) @@ -5797,18 +5047,12 @@ class check_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() @@ -5828,13 +5072,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("check_Version_result") + oprot.writeStructBegin('check_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() @@ -5844,35 +5086,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(check_Version_result) check_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() @@ -5887,11 +5120,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -5899,18 +5130,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): @@ -5920,18 +5151,12 @@ 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() @@ -5941,11 +5166,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -5955,18 +5176,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -5975,35 +5190,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_client_version_result) get_client_version_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) class get_gateway_ip_args(object): + + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6018,11 +5224,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -6030,18 +5234,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): @@ -6051,18 +5255,12 @@ 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() @@ -6075,16 +5273,8 @@ def read(self, iprot): self.success = {} (_ktype24, _vtype25, _size23) = iprot.readMapBegin() for _i27 in range(_size23): - _key28 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val29 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key28 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val29 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key28] = _val29 iprot.readMapEnd() else: @@ -6096,21 +5286,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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 kiter30, viter31 in self.success.items(): - oprot.writeString( - kiter30.encode("utf-8") if sys.version_info[0] == 2 else kiter30 - ) - oprot.writeString( - viter31.encode("utf-8") if sys.version_info[0] == 2 else viter31 - ) + oprot.writeString(kiter30.encode('utf-8') if sys.version_info[0] == 2 else kiter30) + oprot.writeString(viter31.encode('utf-8') if sys.version_info[0] == 2 else viter31) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6120,35 +5304,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_gateway_ip_result) get_gateway_ip_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) class get_calculation_formulars_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() @@ -6163,11 +5338,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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_formulars_args") + oprot.writeStructBegin('get_calculation_formulars_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -6175,18 +5348,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_formulars_args) -get_calculation_formulars_args.thrift_spec = () +get_calculation_formulars_args.thrift_spec = ( +) class get_calculation_formulars_result(object): @@ -6196,18 +5369,12 @@ class get_calculation_formulars_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() @@ -6220,16 +5387,8 @@ def read(self, iprot): self.success = {} (_ktype33, _vtype34, _size32) = iprot.readMapBegin() for _i36 in range(_size32): - _key37 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val38 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key37 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val38 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key37] = _val38 iprot.readMapEnd() else: @@ -6241,21 +5400,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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_formulars_result") + oprot.writeStructBegin('get_calculation_formulars_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter39, viter40 in self.success.items(): - oprot.writeString( - kiter39.encode("utf-8") if sys.version_info[0] == 2 else kiter39 - ) - oprot.writeString( - viter40.encode("utf-8") if sys.version_info[0] == 2 else viter40 - ) + oprot.writeString(kiter39.encode('utf-8') if sys.version_info[0] == 2 else kiter39) + oprot.writeString(viter40.encode('utf-8') if sys.version_info[0] == 2 else viter40) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6265,25 +5418,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_formulars_result) get_calculation_formulars_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 ) @@ -6295,20 +5441,13 @@ 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() @@ -6318,20 +5457,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.keyname = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.keyname = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6341,26 +5472,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("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() @@ -6369,33 +5490,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(import_keypair_args) import_keypair_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "keyname", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "public_key", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'keyname', 'UTF8', None, ), # 1 + (2, TType.STRING, 'public_key', 'UTF8', None, ), # 2 ) @@ -6406,18 +5514,12 @@ 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() @@ -6427,11 +5529,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6441,18 +5539,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -6461,25 +5553,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(import_keypair_result) import_keypair_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -6490,18 +5575,12 @@ 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() @@ -6511,11 +5590,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -6525,18 +5600,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -6545,26 +5614,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_vm_ports_args) get_vm_ports_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -6575,18 +5637,12 @@ class get_vm_ports_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() @@ -6599,16 +5655,8 @@ def read(self, iprot): self.success = {} (_ktype42, _vtype43, _size41) = iprot.readMapBegin() for _i45 in range(_size41): - _key46 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val47 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key46 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val47 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key46] = _val47 iprot.readMapEnd() else: @@ -6620,21 +5668,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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 kiter48, viter49 in self.success.items(): - oprot.writeString( - kiter48.encode("utf-8") if sys.version_info[0] == 2 else kiter48 - ) - oprot.writeString( - viter49.encode("utf-8") if sys.version_info[0] == 2 else viter49 - ) + oprot.writeString(kiter48.encode('utf-8') if sys.version_info[0] == 2 else kiter48) + oprot.writeString(viter49.encode('utf-8') if sys.version_info[0] == 2 else viter49) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6644,35 +5686,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_result) get_vm_ports_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_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() @@ -6687,11 +5720,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -6699,18 +5730,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): @@ -6720,18 +5751,12 @@ 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() @@ -6757,13 +5782,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_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 iter56 in self.success: iter56.write(oprot) @@ -6776,35 +5799,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_Flavors_result) get_Flavors_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Flavor, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Flavor, None], False), None, ), # 0 ) class get_Images_args(object): + + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6819,11 +5833,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -6831,18 +5843,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): @@ -6852,18 +5864,12 @@ 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() @@ -6889,13 +5895,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_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 iter63 in self.success: iter63.write(oprot) @@ -6908,35 +5912,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_Images_result) get_Images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) class get_public_Images_args(object): + + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6951,11 +5946,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -6963,18 +5956,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): @@ -6984,18 +5977,12 @@ 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() @@ -7021,13 +6008,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_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 iter70 in self.success: iter70.write(oprot) @@ -7040,35 +6025,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_public_Images_result) get_public_Images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) class get_private_Images_args(object): + + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7083,11 +6059,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -7095,18 +6069,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): @@ -7116,18 +6090,12 @@ 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() @@ -7153,13 +6121,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_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 iter77 in self.success: iter77.write(oprot) @@ -7172,25 +6138,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_private_Images_result) get_private_Images_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Image, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 ) @@ -7201,18 +6160,12 @@ class get_Image_with_Tag_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() @@ -7222,11 +6175,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7236,18 +6185,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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_with_Tag_args") + oprot.writeStructBegin('get_Image_with_Tag_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() @@ -7256,26 +6199,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_Image_with_Tag_args) get_Image_with_Tag_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -7286,18 +6222,12 @@ class get_Image_with_Tag_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() @@ -7318,13 +6248,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_Image_with_Tag_result") + oprot.writeStructBegin('get_Image_with_Tag_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() oprot.writeFieldStop() @@ -7334,25 +6262,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_Image_with_Tag_result) get_Image_with_Tag_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Image, None], - None, - ), # 0 + (0, TType.STRUCT, 'success', [Image, None], None, ), # 0 ) @@ -7363,18 +6284,12 @@ class get_Images_by_filter_args(object): """ - def __init__( - self, - filter_json=None, - ): + + def __init__(self, filter_json=None,): self.filter_json = filter_json def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7387,16 +6302,8 @@ def read(self, iprot): self.filter_json = {} (_ktype79, _vtype80, _size78) = iprot.readMapBegin() for _i82 in range(_size78): - _key83 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val84 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key83 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val84 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.filter_json[_key83] = _val84 iprot.readMapEnd() else: @@ -7408,21 +6315,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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_by_filter_args") + oprot.writeStructBegin('get_Images_by_filter_args') if self.filter_json is not None: - oprot.writeFieldBegin("filter_json", TType.MAP, 1) + oprot.writeFieldBegin('filter_json', TType.MAP, 1) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.filter_json)) for kiter85, viter86 in self.filter_json.items(): - oprot.writeString( - kiter85.encode("utf-8") if sys.version_info[0] == 2 else kiter85 - ) - oprot.writeString( - viter86.encode("utf-8") if sys.version_info[0] == 2 else viter86 - ) + oprot.writeString(kiter85.encode('utf-8') if sys.version_info[0] == 2 else kiter85) + oprot.writeString(viter86.encode('utf-8') if sys.version_info[0] == 2 else viter86) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7432,26 +6333,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_Images_by_filter_args) get_Images_by_filter_args.thrift_spec = ( None, # 0 - ( - 1, - TType.MAP, - "filter_json", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 1 + (1, TType.MAP, 'filter_json', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 1 ) @@ -7462,18 +6356,12 @@ class get_Images_by_filter_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() @@ -7499,13 +6387,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_by_filter_result") + oprot.writeStructBegin('get_Images_by_filter_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 iter93 in self.success: iter93.write(oprot) @@ -7518,25 +6404,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_by_filter_result) get_Images_by_filter_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 ) @@ -7547,18 +6426,12 @@ 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() @@ -7568,11 +6441,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -7582,18 +6451,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -7602,26 +6465,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volume_args) get_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 ) @@ -7632,18 +6488,12 @@ class get_volume_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() @@ -7664,13 +6514,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_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() oprot.writeFieldStop() @@ -7680,25 +6528,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_volume_result) get_volume_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Volume, None], - None, - ), # 0 + (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 ) @@ -7709,18 +6550,12 @@ 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() @@ -7733,11 +6568,7 @@ def read(self, iprot): self.volume_ids = [] (_etype97, _size94) = iprot.readListBegin() for _i98 in range(_size94): - _elem99 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem99 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.volume_ids.append(_elem99) iprot.readListEnd() else: @@ -7749,18 +6580,14 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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 iter100 in self.volume_ids: - oprot.writeString( - iter100.encode("utf-8") if sys.version_info[0] == 2 else iter100 - ) + oprot.writeString(iter100.encode('utf-8') if sys.version_info[0] == 2 else iter100) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7770,26 +6597,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volumes_by_ids_args) get_volumes_by_ids_args.thrift_spec = ( None, # 0 - ( - 1, - TType.LIST, - "volume_ids", - (TType.STRING, "UTF8", False), - None, - ), # 1 + (1, TType.LIST, 'volume_ids', (TType.STRING, 'UTF8', False), None, ), # 1 ) @@ -7800,18 +6620,12 @@ 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() @@ -7837,13 +6651,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_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 iter107 in self.success: iter107.write(oprot) @@ -7856,25 +6668,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_volumes_by_ids_result) get_volumes_by_ids_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Volume, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Volume, None], False), None, ), # 0 ) @@ -7886,20 +6691,13 @@ 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() @@ -7909,11 +6707,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -7928,21 +6722,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -7952,33 +6740,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resize_volume_args) resize_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.I32, - "size", - None, - None, - ), # 2 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 + (2, TType.I32, 'size', None, None, ), # 2 ) @@ -7989,18 +6764,12 @@ class resize_volume_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() @@ -8020,13 +6789,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("resize_volume_result") + oprot.writeStructBegin('resize_volume_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() oprot.writeFieldStop() @@ -8036,25 +6803,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(resize_volume_result) resize_volume_result.thrift_spec = ( - ( - 0, - TType.I32, - "success", - None, - None, - ), # 0 + (0, TType.I32, 'success', None, None, ), # 0 ) @@ -8065,18 +6825,12 @@ 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() @@ -8086,11 +6840,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -8100,18 +6850,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -8120,26 +6864,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_server_args) delete_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -8152,22 +6889,14 @@ class delete_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() @@ -8199,21 +6928,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(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() @@ -8223,39 +6950,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_server_result) delete_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [conflictException, None], - None, - ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 ) @@ -8267,20 +6975,13 @@ class add_metadata_to_server_args(object): """ - def __init__( - self, - servername=None, - metadata=None, - ): + + def __init__(self, servername=None, metadata=None,): self.servername = servername 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() @@ -8290,11 +6991,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.servername = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -8302,16 +6999,8 @@ def read(self, iprot): self.metadata = {} (_ktype109, _vtype110, _size108) = iprot.readMapBegin() for _i112 in range(_size108): - _key113 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val114 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key113 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val114 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key113] = _val114 iprot.readMapEnd() else: @@ -8323,29 +7012,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.servername is not None: - oprot.writeFieldBegin("servername", TType.STRING, 1) - oprot.writeString( - self.servername.encode("utf-8") - if sys.version_info[0] == 2 - else self.servername - ) + oprot.writeFieldBegin('servername', TType.STRING, 1) + 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, 2) + oprot.writeFieldBegin('metadata', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter115, viter116 in self.metadata.items(): - oprot.writeString( - kiter115.encode("utf-8") if sys.version_info[0] == 2 else kiter115 - ) - oprot.writeString( - viter116.encode("utf-8") if sys.version_info[0] == 2 else viter116 - ) + oprot.writeString(kiter115.encode('utf-8') if sys.version_info[0] == 2 else kiter115) + oprot.writeString(viter116.encode('utf-8') if sys.version_info[0] == 2 else viter116) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8355,33 +7034,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_metadata_to_server_args) add_metadata_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "servername", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 2 + (1, TType.STRING, 'servername', 'UTF8', None, ), # 1 + (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 ) @@ -8393,20 +7059,13 @@ class add_metadata_to_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() @@ -8419,16 +7078,8 @@ def read(self, iprot): self.success = {} (_ktype118, _vtype119, _size117) = iprot.readMapBegin() for _i121 in range(_size117): - _key122 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val123 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key122 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val123 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key122] = _val123 iprot.readMapEnd() else: @@ -8446,25 +7097,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("add_metadata_to_server_result") + oprot.writeStructBegin('add_metadata_to_server_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter124, viter125 in self.success.items(): - oprot.writeString( - kiter124.encode("utf-8") if sys.version_info[0] == 2 else kiter124 - ) - oprot.writeString( - viter125.encode("utf-8") if sys.version_info[0] == 2 else viter125 - ) + oprot.writeString(kiter124.encode('utf-8') if sys.version_info[0] == 2 else kiter124) + oprot.writeString(viter125.encode('utf-8') if sys.version_info[0] == 2 else viter125) 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() oprot.writeFieldStop() @@ -8474,32 +7119,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_metadata_to_server_result) add_metadata_to_server_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 ) @@ -8511,20 +7143,13 @@ class delete_metadata_from_server_args(object): """ - def __init__( - self, - servername=None, - keys=None, - ): + + def __init__(self, servername=None, keys=None,): self.servername = servername self.keys = keys def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8534,11 +7159,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.servername = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -8546,11 +7167,7 @@ def read(self, iprot): self.keys = set() (_etype129, _size126) = iprot.readSetBegin() for _i130 in range(_size126): - _elem131 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem131 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.keys.add(_elem131) iprot.readSetEnd() else: @@ -8562,26 +7179,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_metadata_from_server_args") + oprot.writeStructBegin('delete_metadata_from_server_args') if self.servername is not None: - oprot.writeFieldBegin("servername", TType.STRING, 1) - oprot.writeString( - self.servername.encode("utf-8") - if sys.version_info[0] == 2 - else self.servername - ) + oprot.writeFieldBegin('servername', TType.STRING, 1) + oprot.writeString(self.servername.encode('utf-8') if sys.version_info[0] == 2 else self.servername) oprot.writeFieldEnd() if self.keys is not None: - oprot.writeFieldBegin("keys", TType.SET, 2) + oprot.writeFieldBegin('keys', TType.SET, 2) oprot.writeSetBegin(TType.STRING, len(self.keys)) for iter132 in self.keys: - oprot.writeString( - iter132.encode("utf-8") if sys.version_info[0] == 2 else iter132 - ) + oprot.writeString(iter132.encode('utf-8') if sys.version_info[0] == 2 else iter132) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8591,33 +7200,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_metadata_from_server_args) delete_metadata_from_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "servername", - "UTF8", - None, - ), # 1 - ( - 2, - TType.SET, - "keys", - (TType.STRING, "UTF8", False), - None, - ), # 2 + (1, TType.STRING, 'servername', 'UTF8', None, ), # 1 + (2, TType.SET, 'keys', (TType.STRING, 'UTF8', False), None, ), # 2 ) @@ -8629,20 +7225,13 @@ class delete_metadata_from_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() @@ -8655,11 +7244,7 @@ def read(self, iprot): self.success = set() (_etype136, _size133) = iprot.readSetBegin() for _i137 in range(_size133): - _elem138 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem138 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.add(_elem138) iprot.readSetEnd() else: @@ -8677,22 +7262,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_metadata_from_server_result") + oprot.writeStructBegin('delete_metadata_from_server_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.SET, 0) + oprot.writeFieldBegin('success', TType.SET, 0) oprot.writeSetBegin(TType.STRING, len(self.success)) for iter139 in self.success: - oprot.writeString( - iter139.encode("utf-8") if sys.version_info[0] == 2 else iter139 - ) + oprot.writeString(iter139.encode('utf-8') if sys.version_info[0] == 2 else iter139) oprot.writeSetEnd() 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() @@ -8702,32 +7283,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_metadata_from_server_result) delete_metadata_from_server_result.thrift_spec = ( - ( - 0, - TType.SET, - "success", - (TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 + (0, TType.SET, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 ) @@ -8739,20 +7307,13 @@ class add_floating_ip_to_server_args(object): """ - def __init__( - self, - openstack_id=None, - network=None, - ): + + def __init__(self, openstack_id=None, network=None,): self.openstack_id = openstack_id self.network = network def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8762,20 +7323,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.network = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.network = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -8785,26 +7338,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("add_floating_ip_to_server_args") + oprot.writeStructBegin('add_floating_ip_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.network is not None: - oprot.writeFieldBegin("network", TType.STRING, 2) - oprot.writeString( - self.network.encode("utf-8") - if sys.version_info[0] == 2 - else self.network - ) + oprot.writeFieldBegin('network', TType.STRING, 2) + oprot.writeString(self.network.encode('utf-8') if sys.version_info[0] == 2 else self.network) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8813,33 +7356,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_floating_ip_to_server_args) add_floating_ip_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "network", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'network', 'UTF8', None, ), # 2 ) @@ -8852,22 +7382,14 @@ class add_floating_ip_to_server_result(object): """ - def __init__( - self, - success=None, - e=None, - f=None, - ): + + def __init__(self, success=None, e=None, f=None,): self.success = success 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() @@ -8877,11 +7399,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -8903,25 +7421,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_floating_ip_to_server_result") + oprot.writeStructBegin('add_floating_ip_to_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.f is not None: - oprot.writeFieldBegin("f", TType.STRUCT, 2) + oprot.writeFieldBegin('f', TType.STRUCT, 2) self.f.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8931,39 +7443,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_floating_ip_to_server_result) add_floating_ip_to_server_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "f", - [networkNotFoundException, None], - None, - ), # 2 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'f', [networkNotFoundException, None], None, ), # 2 ) @@ -8981,14 +7474,8 @@ class create_connection_args(object): """ - def __init__( - self, - username=None, - password=None, - auth_url=None, - user_domain_name=None, - project_domain_name=None, - ): + + def __init__(self, username=None, password=None, auth_url=None, user_domain_name=None, project_domain_name=None,): self.username = username self.password = password self.auth_url = auth_url @@ -8996,11 +7483,7 @@ def __init__( self.project_domain_name = project_domain_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() @@ -9010,47 +7493,27 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.username = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.username = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.password = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.auth_url = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.auth_url = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.user_domain_name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_domain_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.project_domain_name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.project_domain_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -9060,50 +7523,28 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_connection_args") + oprot.writeStructBegin('create_connection_args') if self.username is not None: - oprot.writeFieldBegin("username", TType.STRING, 1) - oprot.writeString( - self.username.encode("utf-8") - if sys.version_info[0] == 2 - else self.username - ) + oprot.writeFieldBegin('username', TType.STRING, 1) + oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) oprot.writeFieldEnd() if self.password is not None: - oprot.writeFieldBegin("password", TType.STRING, 2) - oprot.writeString( - self.password.encode("utf-8") - if sys.version_info[0] == 2 - else self.password - ) + oprot.writeFieldBegin('password', TType.STRING, 2) + oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) oprot.writeFieldEnd() if self.auth_url is not None: - oprot.writeFieldBegin("auth_url", TType.STRING, 3) - oprot.writeString( - self.auth_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.auth_url - ) + oprot.writeFieldBegin('auth_url', TType.STRING, 3) + oprot.writeString(self.auth_url.encode('utf-8') if sys.version_info[0] == 2 else self.auth_url) oprot.writeFieldEnd() if self.user_domain_name is not None: - oprot.writeFieldBegin("user_domain_name", TType.STRING, 5) - oprot.writeString( - self.user_domain_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.user_domain_name - ) + oprot.writeFieldBegin('user_domain_name', TType.STRING, 5) + oprot.writeString(self.user_domain_name.encode('utf-8') if sys.version_info[0] == 2 else self.user_domain_name) oprot.writeFieldEnd() if self.project_domain_name is not None: - oprot.writeFieldBegin("project_domain_name", TType.STRING, 6) - oprot.writeString( - self.project_domain_name.encode("utf-8") - if sys.version_info[0] == 2 - else self.project_domain_name - ) + oprot.writeFieldBegin('project_domain_name', TType.STRING, 6) + oprot.writeString(self.project_domain_name.encode('utf-8') if sys.version_info[0] == 2 else self.project_domain_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9112,55 +7553,24 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __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_connection_args) create_connection_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "username", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "password", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "auth_url", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'username', 'UTF8', None, ), # 1 + (2, TType.STRING, 'password', 'UTF8', None, ), # 2 + (3, TType.STRING, 'auth_url', 'UTF8', None, ), # 3 None, # 4 - ( - 5, - TType.STRING, - "user_domain_name", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "project_domain_name", - "UTF8", - None, - ), # 6 + (5, TType.STRING, 'user_domain_name', 'UTF8', None, ), # 5 + (6, TType.STRING, 'project_domain_name', 'UTF8', None, ), # 6 ) @@ -9172,20 +7582,13 @@ class create_connection_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() @@ -9211,17 +7614,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_connection_result") + oprot.writeStructBegin('create_connection_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() 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() @@ -9231,32 +7632,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_connection_result) create_connection_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [authenticationException, None], - None, - ), # 1 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', [authenticationException, None], None, ), # 1 ) @@ -9276,19 +7664,8 @@ class start_server_without_playbook_args(object): """ - def __init__( - self, - flavor=None, - image=None, - public_key=None, - servername=None, - metadata=None, - https=None, - http=None, - resenv=None, - volume_ids_path_new=None, - volume_ids_path_attach=None, - ): + + def __init__(self, flavor=None, image=None, public_key=None, servername=None, metadata=None, https=None, http=None, resenv=None, volume_ids_path_new=None, volume_ids_path_attach=None,): self.flavor = flavor self.image = image self.public_key = public_key @@ -9301,11 +7678,7 @@ def __init__( self.volume_ids_path_attach = volume_ids_path_attach def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9315,38 +7688,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: @@ -9354,16 +7711,8 @@ def read(self, iprot): self.metadata = {} (_ktype141, _vtype142, _size140) = iprot.readMapBegin() for _i144 in range(_size140): - _key145 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val146 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key145 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val146 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key145] = _val146 iprot.readMapEnd() else: @@ -9383,11 +7732,7 @@ def read(self, iprot): self.resenv = [] (_etype150, _size147) = iprot.readListBegin() for _i151 in range(_size147): - _elem152 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem152 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.resenv.append(_elem152) iprot.readListEnd() else: @@ -9400,16 +7745,8 @@ def read(self, iprot): _elem158 = {} (_ktype160, _vtype161, _size159) = iprot.readMapBegin() for _i163 in range(_size159): - _key164 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val165 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key164 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val165 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _elem158[_key164] = _val165 iprot.readMapEnd() self.volume_ids_path_new.append(_elem158) @@ -9424,16 +7761,8 @@ def read(self, iprot): _elem171 = {} (_ktype173, _vtype174, _size172) = iprot.readMapBegin() for _i176 in range(_size172): - _key177 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val178 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key177 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val178 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _elem171[_key177] = _val178 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem171) @@ -9447,103 +7776,67 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_without_playbook_args") + oprot.writeStructBegin('start_server_without_playbook_args') if self.flavor is not None: - oprot.writeFieldBegin("flavor", TType.STRING, 1) - oprot.writeString( - self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor - ) + oprot.writeFieldBegin('flavor', TType.STRING, 1) + oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) 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.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 kiter179, viter180 in self.metadata.items(): - oprot.writeString( - kiter179.encode("utf-8") if sys.version_info[0] == 2 else kiter179 - ) - oprot.writeString( - viter180.encode("utf-8") if sys.version_info[0] == 2 else viter180 - ) + oprot.writeString(kiter179.encode('utf-8') if sys.version_info[0] == 2 else kiter179) + oprot.writeString(viter180.encode('utf-8') if sys.version_info[0] == 2 else viter180) oprot.writeMapEnd() oprot.writeFieldEnd() if self.https is not None: - oprot.writeFieldBegin("https", TType.BOOL, 6) + oprot.writeFieldBegin('https', TType.BOOL, 6) oprot.writeBool(self.https) oprot.writeFieldEnd() if self.http is not None: - oprot.writeFieldBegin("http", TType.BOOL, 7) + oprot.writeFieldBegin('http', TType.BOOL, 7) oprot.writeBool(self.http) oprot.writeFieldEnd() if self.resenv is not None: - oprot.writeFieldBegin("resenv", TType.LIST, 8) + oprot.writeFieldBegin('resenv', TType.LIST, 8) oprot.writeListBegin(TType.STRING, len(self.resenv)) for iter181 in self.resenv: - oprot.writeString( - iter181.encode("utf-8") if sys.version_info[0] == 2 else iter181 - ) + oprot.writeString(iter181.encode('utf-8') if sys.version_info[0] == 2 else iter181) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 9) + oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 9) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter182 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter182)) for kiter183, viter184 in iter182.items(): - oprot.writeString( - kiter183.encode("utf-8") - if sys.version_info[0] == 2 - else kiter183 - ) - oprot.writeString( - viter184.encode("utf-8") - if sys.version_info[0] == 2 - else viter184 - ) + oprot.writeString(kiter183.encode('utf-8') if sys.version_info[0] == 2 else kiter183) + oprot.writeString(viter184.encode('utf-8') if sys.version_info[0] == 2 else viter184) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 10) + oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 10) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter185 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter185)) for kiter186, viter187 in iter185.items(): - oprot.writeString( - kiter186.encode("utf-8") - if sys.version_info[0] == 2 - else kiter186 - ) - oprot.writeString( - viter187.encode("utf-8") - if sys.version_info[0] == 2 - else viter187 - ) + oprot.writeString(kiter186.encode('utf-8') if sys.version_info[0] == 2 else kiter186) + oprot.writeString(viter187.encode('utf-8') if sys.version_info[0] == 2 else viter187) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -9554,89 +7847,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_without_playbook_args) start_server_without_playbook_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "flavor", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image", - "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 - ( - 6, - TType.BOOL, - "https", - None, - None, - ), # 6 - ( - 7, - TType.BOOL, - "http", - None, - None, - ), # 7 - ( - 8, - TType.LIST, - "resenv", - (TType.STRING, "UTF8", False), - None, - ), # 8 - ( - 9, - TType.LIST, - "volume_ids_path_new", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 9 - ( - 10, - TType.LIST, - "volume_ids_path_attach", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 10 + (1, TType.STRING, 'flavor', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image', '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 + (6, TType.BOOL, 'https', None, None, ), # 6 + (7, TType.BOOL, 'http', None, None, ), # 7 + (8, TType.LIST, 'resenv', (TType.STRING, 'UTF8', False), None, ), # 8 + (9, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 9 + (10, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 10 ) @@ -9654,17 +7886,8 @@ class start_server_without_playbook_result(object): """ - def __init__( - self, - success=None, - e=None, - r=None, - s=None, - n=None, - i=None, - f=None, - o=None, - ): + + def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=None, o=None,): self.success = success self.e = e self.r = r @@ -9675,11 +7898,7 @@ def __init__( self.o = o def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9692,16 +7911,8 @@ def read(self, iprot): self.success = {} (_ktype189, _vtype190, _size188) = iprot.readMapBegin() for _i192 in range(_size188): - _key193 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val194 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key193 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val194 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key193] = _val194 iprot.readMapEnd() else: @@ -9755,49 +7966,43 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_without_playbook_result") + oprot.writeStructBegin('start_server_without_playbook_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 kiter195, viter196 in self.success.items(): - oprot.writeString( - kiter195.encode("utf-8") if sys.version_info[0] == 2 else kiter195 - ) - oprot.writeString( - viter196.encode("utf-8") if sys.version_info[0] == 2 else viter196 - ) + oprot.writeString(kiter195.encode('utf-8') if sys.version_info[0] == 2 else kiter195) + oprot.writeString(viter196.encode('utf-8') if sys.version_info[0] == 2 else viter196) 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.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 2) + oprot.writeFieldBegin('r', TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 3) + oprot.writeFieldBegin('s', TType.STRUCT, 3) self.s.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin("n", TType.STRUCT, 4) + oprot.writeFieldBegin('n', TType.STRUCT, 4) self.n.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() @@ -9807,84 +8012,33 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_without_playbook_result) start_server_without_playbook_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [nameException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ressourceException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "s", - [serverNotFoundException, None], - None, - ), # 3 - ( - 4, - TType.STRUCT, - "n", - [networkNotFoundException, None], - None, - ), # 4 - ( - 5, - TType.STRUCT, - "i", - [imageNotFoundException, None], - None, - ), # 5 - ( - 6, - TType.STRUCT, - "f", - [flavorNotFoundException, None], - None, - ), # 6 - ( - 7, - TType.STRUCT, - "o", - [otherException, None], - None, - ), # 7 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [nameException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 + (3, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 3 + (4, TType.STRUCT, 'n', [networkNotFoundException, None], None, ), # 4 + (5, TType.STRUCT, 'i', [imageNotFoundException, None], None, ), # 5 + (6, TType.STRUCT, 'f', [flavorNotFoundException, None], None, ), # 6 + (7, TType.STRUCT, 'o', [otherException, None], None, ), # 7 ) class 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() @@ -9899,11 +8053,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("bibigrid_available_args") + oprot.writeStructBegin('bibigrid_available_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -9911,18 +8063,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(bibigrid_available_args) -bibigrid_available_args.thrift_spec = () +bibigrid_available_args.thrift_spec = ( +) class bibigrid_available_result(object): @@ -9932,18 +8084,12 @@ class 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() @@ -9963,13 +8109,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("bibigrid_available_result") + oprot.writeStructBegin('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() @@ -9979,25 +8123,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(bibigrid_available_result) bibigrid_available_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -10009,20 +8146,13 @@ 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() @@ -10032,20 +8162,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.floating_ip = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -10055,26 +8177,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("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() @@ -10083,33 +8195,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(detach_ip_from_server_args) detach_ip_from_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "floating_ip", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'floating_ip', 'UTF8', None, ), # 2 ) @@ -10120,18 +8219,12 @@ class detach_ip_from_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() @@ -10151,13 +8244,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("detach_ip_from_server_result") + oprot.writeStructBegin('detach_ip_from_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() @@ -10167,25 +8258,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(detach_ip_from_server_result) detach_ip_from_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -10205,19 +8289,8 @@ class start_server_with_mounted_volume_args(object): """ - def __init__( - self, - flavor=None, - image=None, - public_key=None, - servername=None, - metadata=None, - https=None, - http=None, - resenv=None, - volume_ids_path_new=None, - volume_ids_path_attach=None, - ): + + def __init__(self, flavor=None, image=None, public_key=None, servername=None, metadata=None, https=None, http=None, resenv=None, volume_ids_path_new=None, volume_ids_path_attach=None,): self.flavor = flavor self.image = image self.public_key = public_key @@ -10230,11 +8303,7 @@ def __init__( self.volume_ids_path_attach = volume_ids_path_attach def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10244,38 +8313,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: @@ -10283,16 +8336,8 @@ def read(self, iprot): self.metadata = {} (_ktype198, _vtype199, _size197) = iprot.readMapBegin() for _i201 in range(_size197): - _key202 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val203 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key202 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val203 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key202] = _val203 iprot.readMapEnd() else: @@ -10312,11 +8357,7 @@ def read(self, iprot): self.resenv = [] (_etype207, _size204) = iprot.readListBegin() for _i208 in range(_size204): - _elem209 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem209 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.resenv.append(_elem209) iprot.readListEnd() else: @@ -10329,16 +8370,8 @@ def read(self, iprot): _elem215 = {} (_ktype217, _vtype218, _size216) = iprot.readMapBegin() for _i220 in range(_size216): - _key221 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val222 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key221 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val222 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _elem215[_key221] = _val222 iprot.readMapEnd() self.volume_ids_path_new.append(_elem215) @@ -10353,16 +8386,8 @@ def read(self, iprot): _elem228 = {} (_ktype230, _vtype231, _size229) = iprot.readMapBegin() for _i233 in range(_size229): - _key234 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val235 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key234 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val235 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _elem228[_key234] = _val235 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem228) @@ -10376,103 +8401,67 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_mounted_volume_args") + oprot.writeStructBegin('start_server_with_mounted_volume_args') if self.flavor is not None: - oprot.writeFieldBegin("flavor", TType.STRING, 1) - oprot.writeString( - self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor - ) + oprot.writeFieldBegin('flavor', TType.STRING, 1) + oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) 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.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 kiter236, viter237 in self.metadata.items(): - oprot.writeString( - kiter236.encode("utf-8") if sys.version_info[0] == 2 else kiter236 - ) - oprot.writeString( - viter237.encode("utf-8") if sys.version_info[0] == 2 else viter237 - ) + oprot.writeString(kiter236.encode('utf-8') if sys.version_info[0] == 2 else kiter236) + oprot.writeString(viter237.encode('utf-8') if sys.version_info[0] == 2 else viter237) oprot.writeMapEnd() oprot.writeFieldEnd() if self.https is not None: - oprot.writeFieldBegin("https", TType.BOOL, 6) + oprot.writeFieldBegin('https', TType.BOOL, 6) oprot.writeBool(self.https) oprot.writeFieldEnd() if self.http is not None: - oprot.writeFieldBegin("http", TType.BOOL, 7) + oprot.writeFieldBegin('http', TType.BOOL, 7) oprot.writeBool(self.http) oprot.writeFieldEnd() if self.resenv is not None: - oprot.writeFieldBegin("resenv", TType.LIST, 8) + oprot.writeFieldBegin('resenv', TType.LIST, 8) oprot.writeListBegin(TType.STRING, len(self.resenv)) for iter238 in self.resenv: - oprot.writeString( - iter238.encode("utf-8") if sys.version_info[0] == 2 else iter238 - ) + oprot.writeString(iter238.encode('utf-8') if sys.version_info[0] == 2 else iter238) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 9) + oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 9) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter239 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter239)) for kiter240, viter241 in iter239.items(): - oprot.writeString( - kiter240.encode("utf-8") - if sys.version_info[0] == 2 - else kiter240 - ) - oprot.writeString( - viter241.encode("utf-8") - if sys.version_info[0] == 2 - else viter241 - ) + oprot.writeString(kiter240.encode('utf-8') if sys.version_info[0] == 2 else kiter240) + oprot.writeString(viter241.encode('utf-8') if sys.version_info[0] == 2 else viter241) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 10) + oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 10) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter242 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter242)) for kiter243, viter244 in iter242.items(): - oprot.writeString( - kiter243.encode("utf-8") - if sys.version_info[0] == 2 - else kiter243 - ) - oprot.writeString( - viter244.encode("utf-8") - if sys.version_info[0] == 2 - else viter244 - ) + oprot.writeString(kiter243.encode('utf-8') if sys.version_info[0] == 2 else kiter243) + oprot.writeString(viter244.encode('utf-8') if sys.version_info[0] == 2 else viter244) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -10483,89 +8472,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_with_mounted_volume_args) start_server_with_mounted_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "flavor", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image", - "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 - ( - 6, - TType.BOOL, - "https", - None, - None, - ), # 6 - ( - 7, - TType.BOOL, - "http", - None, - None, - ), # 7 - ( - 8, - TType.LIST, - "resenv", - (TType.STRING, "UTF8", False), - None, - ), # 8 - ( - 9, - TType.LIST, - "volume_ids_path_new", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 9 - ( - 10, - TType.LIST, - "volume_ids_path_attach", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 10 + (1, TType.STRING, 'flavor', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image', '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 + (6, TType.BOOL, 'https', None, None, ), # 6 + (7, TType.BOOL, 'http', None, None, ), # 7 + (8, TType.LIST, 'resenv', (TType.STRING, 'UTF8', False), None, ), # 8 + (9, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 9 + (10, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 10 ) @@ -10583,17 +8511,8 @@ class start_server_with_mounted_volume_result(object): """ - def __init__( - self, - success=None, - e=None, - r=None, - s=None, - n=None, - i=None, - f=None, - o=None, - ): + + def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=None, o=None,): self.success = success self.e = e self.r = r @@ -10604,11 +8523,7 @@ def __init__( self.o = o def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10621,16 +8536,8 @@ def read(self, iprot): self.success = {} (_ktype246, _vtype247, _size245) = iprot.readMapBegin() for _i249 in range(_size245): - _key250 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val251 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key250 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val251 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key250] = _val251 iprot.readMapEnd() else: @@ -10684,49 +8591,43 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_mounted_volume_result") + oprot.writeStructBegin('start_server_with_mounted_volume_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 kiter252, viter253 in self.success.items(): - oprot.writeString( - kiter252.encode("utf-8") if sys.version_info[0] == 2 else kiter252 - ) - oprot.writeString( - viter253.encode("utf-8") if sys.version_info[0] == 2 else viter253 - ) + oprot.writeString(kiter252.encode('utf-8') if sys.version_info[0] == 2 else kiter252) + oprot.writeString(viter253.encode('utf-8') if sys.version_info[0] == 2 else viter253) 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.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 2) + oprot.writeFieldBegin('r', TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 3) + oprot.writeFieldBegin('s', TType.STRUCT, 3) self.s.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin("n", TType.STRUCT, 4) + oprot.writeFieldBegin('n', TType.STRUCT, 4) self.n.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() @@ -10736,74 +8637,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_server_with_mounted_volume_result) start_server_with_mounted_volume_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [nameException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ressourceException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "s", - [serverNotFoundException, None], - None, - ), # 3 - ( - 4, - TType.STRUCT, - "n", - [networkNotFoundException, None], - None, - ), # 4 - ( - 5, - TType.STRUCT, - "i", - [imageNotFoundException, None], - None, - ), # 5 - ( - 6, - TType.STRUCT, - "f", - [flavorNotFoundException, None], - None, - ), # 6 - ( - 7, - TType.STRUCT, - "o", - [otherException, None], - None, - ), # 7 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [nameException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 + (3, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 3 + (4, TType.STRUCT, 'n', [networkNotFoundException, None], None, ), # 4 + (5, TType.STRUCT, 'i', [imageNotFoundException, None], None, ), # 5 + (6, TType.STRUCT, 'f', [flavorNotFoundException, None], None, ), # 6 + (7, TType.STRUCT, 'o', [otherException, None], None, ), # 7 ) @@ -10823,19 +8675,8 @@ class start_server_args(object): """ - def __init__( - self, - flavor=None, - image=None, - public_key=None, - servername=None, - metadata=None, - diskspace=None, - volumename=None, - https=None, - http=None, - resenv=None, - ): + + def __init__(self, flavor=None, image=None, public_key=None, servername=None, metadata=None, diskspace=None, volumename=None, https=None, http=None, resenv=None,): self.flavor = flavor self.image = image self.public_key = public_key @@ -10848,11 +8689,7 @@ def __init__( self.resenv = resenv def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -10862,38 +8699,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: @@ -10901,36 +8722,20 @@ def read(self, iprot): self.metadata = {} (_ktype255, _vtype256, _size254) = iprot.readMapBegin() for _i258 in range(_size254): - _key259 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val260 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key259 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val260 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key259] = _val260 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.diskspace = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.diskspace = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.volumename = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volumename = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: @@ -10948,11 +8753,7 @@ def read(self, iprot): self.resenv = [] (_etype264, _size261) = iprot.readListBegin() for _i265 in range(_size261): - _elem266 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem266 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.resenv.append(_elem266) iprot.readListEnd() else: @@ -10964,82 +8765,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("start_server_args") + oprot.writeStructBegin('start_server_args') if self.flavor is not None: - oprot.writeFieldBegin("flavor", TType.STRING, 1) - oprot.writeString( - self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor - ) + oprot.writeFieldBegin('flavor', TType.STRING, 1) + oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) 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.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 kiter267, viter268 in self.metadata.items(): - oprot.writeString( - kiter267.encode("utf-8") if sys.version_info[0] == 2 else kiter267 - ) - oprot.writeString( - viter268.encode("utf-8") if sys.version_info[0] == 2 else viter268 - ) + oprot.writeString(kiter267.encode('utf-8') if sys.version_info[0] == 2 else kiter267) + oprot.writeString(viter268.encode('utf-8') if sys.version_info[0] == 2 else viter268) oprot.writeMapEnd() oprot.writeFieldEnd() if self.diskspace is not None: - oprot.writeFieldBegin("diskspace", TType.STRING, 6) - oprot.writeString( - self.diskspace.encode("utf-8") - if sys.version_info[0] == 2 - else self.diskspace - ) + oprot.writeFieldBegin('diskspace', TType.STRING, 6) + oprot.writeString(self.diskspace.encode('utf-8') if sys.version_info[0] == 2 else self.diskspace) oprot.writeFieldEnd() if self.volumename is not None: - oprot.writeFieldBegin("volumename", TType.STRING, 7) - oprot.writeString( - self.volumename.encode("utf-8") - if sys.version_info[0] == 2 - else self.volumename - ) + oprot.writeFieldBegin('volumename', TType.STRING, 7) + oprot.writeString(self.volumename.encode('utf-8') if sys.version_info[0] == 2 else self.volumename) oprot.writeFieldEnd() if self.https is not None: - oprot.writeFieldBegin("https", TType.BOOL, 8) + oprot.writeFieldBegin('https', TType.BOOL, 8) oprot.writeBool(self.https) oprot.writeFieldEnd() if self.http is not None: - oprot.writeFieldBegin("http", TType.BOOL, 9) + oprot.writeFieldBegin('http', TType.BOOL, 9) oprot.writeBool(self.http) oprot.writeFieldEnd() if self.resenv is not None: - oprot.writeFieldBegin("resenv", TType.LIST, 10) + oprot.writeFieldBegin('resenv', TType.LIST, 10) oprot.writeListBegin(TType.STRING, len(self.resenv)) for iter269 in self.resenv: - oprot.writeString( - iter269.encode("utf-8") if sys.version_info[0] == 2 else iter269 - ) + oprot.writeString(iter269.encode('utf-8') if sys.version_info[0] == 2 else iter269) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11049,89 +8822,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_args) start_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "flavor", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image", - "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 - ( - 6, - TType.STRING, - "diskspace", - "UTF8", - None, - ), # 6 - ( - 7, - TType.STRING, - "volumename", - "UTF8", - None, - ), # 7 - ( - 8, - TType.BOOL, - "https", - None, - None, - ), # 8 - ( - 9, - TType.BOOL, - "http", - None, - None, - ), # 9 - ( - 10, - TType.LIST, - "resenv", - (TType.STRING, "UTF8", False), - None, - ), # 10 + (1, TType.STRING, 'flavor', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image', '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 + (6, TType.STRING, 'diskspace', 'UTF8', None, ), # 6 + (7, TType.STRING, 'volumename', 'UTF8', None, ), # 7 + (8, TType.BOOL, 'https', None, None, ), # 8 + (9, TType.BOOL, 'http', None, None, ), # 9 + (10, TType.LIST, 'resenv', (TType.STRING, 'UTF8', False), None, ), # 10 ) @@ -11149,17 +8861,8 @@ class start_server_result(object): """ - def __init__( - self, - success=None, - e=None, - r=None, - s=None, - n=None, - i=None, - f=None, - o=None, - ): + + def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=None, o=None,): self.success = success self.e = e self.r = r @@ -11170,11 +8873,7 @@ def __init__( self.o = o def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11187,16 +8886,8 @@ def read(self, iprot): self.success = {} (_ktype271, _vtype272, _size270) = iprot.readMapBegin() for _i274 in range(_size270): - _key275 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val276 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key275 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val276 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key275] = _val276 iprot.readMapEnd() else: @@ -11250,49 +8941,43 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter277, viter278 in self.success.items(): - oprot.writeString( - kiter277.encode("utf-8") if sys.version_info[0] == 2 else kiter277 - ) - oprot.writeString( - viter278.encode("utf-8") if sys.version_info[0] == 2 else viter278 - ) + oprot.writeString(kiter277.encode('utf-8') if sys.version_info[0] == 2 else kiter277) + oprot.writeString(viter278.encode('utf-8') if sys.version_info[0] == 2 else viter278) 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.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 2) + oprot.writeFieldBegin('r', TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 3) + oprot.writeFieldBegin('s', TType.STRUCT, 3) self.s.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin("n", TType.STRUCT, 4) + oprot.writeFieldBegin('n', TType.STRUCT, 4) self.n.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() @@ -11302,74 +8987,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_server_result) start_server_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [nameException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ressourceException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "s", - [serverNotFoundException, None], - None, - ), # 3 - ( - 4, - TType.STRUCT, - "n", - [networkNotFoundException, None], - None, - ), # 4 - ( - 5, - TType.STRUCT, - "i", - [imageNotFoundException, None], - None, - ), # 5 - ( - 6, - TType.STRUCT, - "f", - [flavorNotFoundException, None], - None, - ), # 6 - ( - 7, - TType.STRUCT, - "o", - [otherException, None], - None, - ), # 7 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [nameException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 + (3, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 3 + (4, TType.STRUCT, 'n', [networkNotFoundException, None], None, ), # 4 + (5, TType.STRUCT, 'i', [imageNotFoundException, None], None, ), # 5 + (6, TType.STRUCT, 'f', [flavorNotFoundException, None], None, ), # 6 + (7, TType.STRUCT, 'o', [otherException, None], None, ), # 7 ) @@ -11388,18 +9024,8 @@ class start_server_with_custom_key_args(object): """ - def __init__( - self, - flavor=None, - image=None, - servername=None, - metadata=None, - http=None, - https=None, - resenv=None, - volume_ids_path_new=None, - volume_ids_path_attach=None, - ): + + def __init__(self, flavor=None, image=None, servername=None, metadata=None, http=None, https=None, resenv=None, volume_ids_path_new=None, volume_ids_path_attach=None,): self.flavor = flavor self.image = image self.servername = servername @@ -11411,11 +9037,7 @@ def __init__( self.volume_ids_path_attach = volume_ids_path_attach def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11425,29 +9047,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.servername = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -11455,16 +9065,8 @@ def read(self, iprot): self.metadata = {} (_ktype280, _vtype281, _size279) = iprot.readMapBegin() for _i283 in range(_size279): - _key284 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val285 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key284 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val285 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key284] = _val285 iprot.readMapEnd() else: @@ -11484,11 +9086,7 @@ def read(self, iprot): self.resenv = [] (_etype289, _size286) = iprot.readListBegin() for _i290 in range(_size286): - _elem291 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem291 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.resenv.append(_elem291) iprot.readListEnd() else: @@ -11501,16 +9099,8 @@ def read(self, iprot): _elem297 = {} (_ktype299, _vtype300, _size298) = iprot.readMapBegin() for _i302 in range(_size298): - _key303 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val304 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key303 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val304 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _elem297[_key303] = _val304 iprot.readMapEnd() self.volume_ids_path_new.append(_elem297) @@ -11525,16 +9115,8 @@ def read(self, iprot): _elem310 = {} (_ktype312, _vtype313, _size311) = iprot.readMapBegin() for _i315 in range(_size311): - _key316 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val317 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key316 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val317 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _elem310[_key316] = _val317 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem310) @@ -11548,95 +9130,63 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 is not None: - oprot.writeFieldBegin("flavor", TType.STRING, 1) - oprot.writeString( - self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor - ) + oprot.writeFieldBegin('flavor', TType.STRING, 1) + oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) 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.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 kiter318, viter319 in self.metadata.items(): - oprot.writeString( - kiter318.encode("utf-8") if sys.version_info[0] == 2 else kiter318 - ) - oprot.writeString( - viter319.encode("utf-8") if sys.version_info[0] == 2 else viter319 - ) + oprot.writeString(kiter318.encode('utf-8') if sys.version_info[0] == 2 else kiter318) + oprot.writeString(viter319.encode('utf-8') if sys.version_info[0] == 2 else viter319) oprot.writeMapEnd() oprot.writeFieldEnd() if self.http is not None: - oprot.writeFieldBegin("http", TType.BOOL, 5) + oprot.writeFieldBegin('http', TType.BOOL, 5) oprot.writeBool(self.http) oprot.writeFieldEnd() if self.https is not None: - oprot.writeFieldBegin("https", TType.BOOL, 6) + oprot.writeFieldBegin('https', TType.BOOL, 6) oprot.writeBool(self.https) oprot.writeFieldEnd() if self.resenv is not None: - oprot.writeFieldBegin("resenv", TType.LIST, 7) + oprot.writeFieldBegin('resenv', TType.LIST, 7) oprot.writeListBegin(TType.STRING, len(self.resenv)) for iter320 in self.resenv: - oprot.writeString( - iter320.encode("utf-8") if sys.version_info[0] == 2 else iter320 - ) + oprot.writeString(iter320.encode('utf-8') if sys.version_info[0] == 2 else iter320) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 9) + oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 9) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter321 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter321)) for kiter322, viter323 in iter321.items(): - oprot.writeString( - kiter322.encode("utf-8") - if sys.version_info[0] == 2 - else kiter322 - ) - oprot.writeString( - viter323.encode("utf-8") - if sys.version_info[0] == 2 - else viter323 - ) + oprot.writeString(kiter322.encode('utf-8') if sys.version_info[0] == 2 else kiter322) + oprot.writeString(viter323.encode('utf-8') if sys.version_info[0] == 2 else viter323) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 10) + oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 10) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter324 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter324)) for kiter325, viter326 in iter324.items(): - oprot.writeString( - kiter325.encode("utf-8") - if sys.version_info[0] == 2 - else kiter325 - ) - oprot.writeString( - viter326.encode("utf-8") - if sys.version_info[0] == 2 - else viter326 - ) + oprot.writeString(kiter325.encode('utf-8') if sys.version_info[0] == 2 else kiter325) + oprot.writeString(viter326.encode('utf-8') if sys.version_info[0] == 2 else viter326) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -11647,83 +9197,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_server_with_custom_key_args) start_server_with_custom_key_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "flavor", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image", - "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.BOOL, - "http", - None, - None, - ), # 5 - ( - 6, - TType.BOOL, - "https", - None, - None, - ), # 6 - ( - 7, - TType.LIST, - "resenv", - (TType.STRING, "UTF8", False), - None, - ), # 7 + (1, TType.STRING, 'flavor', 'UTF8', None, ), # 1 + (2, TType.STRING, 'image', '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.BOOL, 'http', None, None, ), # 5 + (6, TType.BOOL, 'https', None, None, ), # 6 + (7, TType.LIST, 'resenv', (TType.STRING, 'UTF8', False), None, ), # 7 None, # 8 - ( - 9, - TType.LIST, - "volume_ids_path_new", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 9 - ( - 10, - TType.LIST, - "volume_ids_path_attach", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 10 + (9, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 9 + (10, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 10 ) @@ -11741,17 +9236,8 @@ class start_server_with_custom_key_result(object): """ - def __init__( - self, - success=None, - e=None, - r=None, - s=None, - n=None, - i=None, - f=None, - o=None, - ): + + def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=None, o=None,): self.success = success self.e = e self.r = r @@ -11762,11 +9248,7 @@ def __init__( self.o = o def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11779,16 +9261,8 @@ def read(self, iprot): self.success = {} (_ktype328, _vtype329, _size327) = iprot.readMapBegin() for _i331 in range(_size327): - _key332 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val333 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key332 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val333 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key332] = _val333 iprot.readMapEnd() else: @@ -11842,49 +9316,43 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter334, viter335 in self.success.items(): - oprot.writeString( - kiter334.encode("utf-8") if sys.version_info[0] == 2 else kiter334 - ) - oprot.writeString( - viter335.encode("utf-8") if sys.version_info[0] == 2 else viter335 - ) + oprot.writeString(kiter334.encode('utf-8') if sys.version_info[0] == 2 else kiter334) + oprot.writeString(viter335.encode('utf-8') if sys.version_info[0] == 2 else viter335) 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.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 2) + oprot.writeFieldBegin('r', TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 3) + oprot.writeFieldBegin('s', TType.STRUCT, 3) self.s.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin("n", TType.STRUCT, 4) + oprot.writeFieldBegin('n', TType.STRUCT, 4) self.n.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() @@ -11894,74 +9362,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_server_with_custom_key_result) start_server_with_custom_key_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [nameException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ressourceException, None], - None, - ), # 2 - ( - 3, - TType.STRUCT, - "s", - [serverNotFoundException, None], - None, - ), # 3 - ( - 4, - TType.STRUCT, - "n", - [networkNotFoundException, None], - None, - ), # 4 - ( - 5, - TType.STRUCT, - "i", - [imageNotFoundException, None], - None, - ), # 5 - ( - 6, - TType.STRUCT, - "f", - [flavorNotFoundException, None], - None, - ), # 6 - ( - 7, - TType.STRUCT, - "o", - [otherException, None], - None, - ), # 7 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [nameException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 + (3, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 3 + (4, TType.STRUCT, 'n', [networkNotFoundException, None], None, ), # 4 + (5, TType.STRUCT, 'i', [imageNotFoundException, None], None, ), # 5 + (6, TType.STRUCT, 'f', [flavorNotFoundException, None], None, ), # 6 + (7, TType.STRUCT, 'o', [otherException, None], None, ), # 7 ) @@ -11972,18 +9391,12 @@ 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() @@ -11993,11 +9406,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12007,16 +9416,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12025,26 +9430,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(exist_server_args) exist_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 ) @@ -12055,18 +9453,12 @@ 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() @@ -12086,13 +9478,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("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() @@ -12102,25 +9492,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(exist_server_result) exist_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) @@ -12133,22 +9516,14 @@ class create_and_deploy_playbook_args(object): """ - def __init__( - self, - public_key=None, - playbooks_information=None, - openstack_id=None, - ): + + def __init__(self, public_key=None, playbooks_information=None, openstack_id=None,): self.public_key = public_key self.playbooks_information = playbooks_information 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() @@ -12158,11 +9533,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -12170,24 +9541,12 @@ def read(self, iprot): self.playbooks_information = {} (_ktype337, _vtype338, _size336) = iprot.readMapBegin() for _i340 in range(_size336): - _key341 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key341 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val342 = {} (_ktype344, _vtype345, _size343) = iprot.readMapBegin() for _i347 in range(_size343): - _key348 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val349 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key348 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val349 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val342[_key348] = _val349 iprot.readMapEnd() self.playbooks_information[_key341] = _val342 @@ -12196,11 +9555,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12210,50 +9565,28 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.playbooks_information is not None: - oprot.writeFieldBegin("playbooks_information", TType.MAP, 2) - oprot.writeMapBegin( - TType.STRING, TType.MAP, len(self.playbooks_information) - ) + oprot.writeFieldBegin('playbooks_information', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.playbooks_information)) for kiter350, viter351 in self.playbooks_information.items(): - oprot.writeString( - kiter350.encode("utf-8") if sys.version_info[0] == 2 else kiter350 - ) + oprot.writeString(kiter350.encode('utf-8') if sys.version_info[0] == 2 else kiter350) oprot.writeMapBegin(TType.STRING, TType.STRING, len(viter351)) for kiter352, viter353 in viter351.items(): - oprot.writeString( - kiter352.encode("utf-8") - if sys.version_info[0] == 2 - else kiter352 - ) - oprot.writeString( - viter353.encode("utf-8") - if sys.version_info[0] == 2 - else viter353 - ) + oprot.writeString(kiter352.encode('utf-8') if sys.version_info[0] == 2 else kiter352) + oprot.writeString(viter353.encode('utf-8') if sys.version_info[0] == 2 else viter353) oprot.writeMapEnd() oprot.writeMapEnd() 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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -12262,46 +9595,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_and_deploy_playbook_args) create_and_deploy_playbook_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "public_key", - "UTF8", - None, - ), # 1 - ( - 2, - TType.MAP, - "playbooks_information", - ( - TType.STRING, - "UTF8", - TType.MAP, - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - False, - ), - None, - ), # 2 - ( - 3, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 3 + (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 + (2, TType.MAP, 'playbooks_information', (TType.STRING, 'UTF8', TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 2 + (3, TType.STRING, 'openstack_id', 'UTF8', None, ), # 3 ) @@ -12312,18 +9620,12 @@ class create_and_deploy_playbook_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() @@ -12343,13 +9645,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("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() oprot.writeFieldStop() @@ -12359,25 +9659,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(create_and_deploy_playbook_result) create_and_deploy_playbook_result.thrift_spec = ( - ( - 0, - TType.I32, - "success", - None, - None, - ), # 0 + (0, TType.I32, 'success', None, None, ), # 0 ) @@ -12388,18 +9681,12 @@ 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() @@ -12409,11 +9696,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12423,18 +9706,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -12443,26 +9720,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_playbook_logs_args) get_playbook_logs_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -12473,18 +9743,12 @@ class get_playbook_logs_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() @@ -12505,13 +9769,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_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() oprot.writeFieldStop() @@ -12521,35 +9783,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_result) get_playbook_logs_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [PlaybookResult, None], - None, - ), # 0 + (0, TType.STRUCT, 'success', [PlaybookResult, None], None, ), # 0 ) 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() @@ -12564,11 +9817,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -12576,18 +9827,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): @@ -12597,18 +9848,12 @@ 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() @@ -12628,13 +9873,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_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() @@ -12644,35 +9887,26 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(has_forc_result) has_forc_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) class get_forc_url_args(object): + + def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -12687,11 +9921,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -12699,18 +9931,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): @@ -12720,18 +9952,12 @@ 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() @@ -12741,11 +9967,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12755,18 +9977,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -12775,25 +9991,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_forc_url_result) get_forc_url_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -12807,24 +10016,15 @@ class create_backend_args(object): """ - def __init__( - self, - elixir_id=None, - user_key_url=None, - template=None, - upstream_url=None, - ): + + def __init__(self, elixir_id=None, user_key_url=None, template=None, upstream_url=None,): self.elixir_id = elixir_id self.user_key_url = user_key_url 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() @@ -12834,38 +10034,22 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.elixir_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.elixir_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_key_url = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_key_url = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.upstream_url = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -12875,42 +10059,24 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.elixir_id is not None: - oprot.writeFieldBegin("elixir_id", TType.STRING, 1) - oprot.writeString( - self.elixir_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.elixir_id - ) + oprot.writeFieldBegin('elixir_id', TType.STRING, 1) + oprot.writeString(self.elixir_id.encode('utf-8') if sys.version_info[0] == 2 else self.elixir_id) oprot.writeFieldEnd() if self.user_key_url is not None: - oprot.writeFieldBegin("user_key_url", TType.STRING, 2) - oprot.writeString( - self.user_key_url.encode("utf-8") - if sys.version_info[0] == 2 - else self.user_key_url - ) + oprot.writeFieldBegin('user_key_url', TType.STRING, 2) + oprot.writeString(self.user_key_url.encode('utf-8') if sys.version_info[0] == 2 else self.user_key_url) 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() @@ -12919,47 +10085,22 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_backend_args) create_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "elixir_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "user_key_url", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "template", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "upstream_url", - "UTF8", - None, - ), # 4 + (1, TType.STRING, 'elixir_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'user_key_url', 'UTF8', None, ), # 2 + (3, TType.STRING, 'template', 'UTF8', None, ), # 3 + (4, TType.STRING, 'upstream_url', 'UTF8', None, ), # 4 ) @@ -12970,18 +10111,12 @@ class create_backend_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() @@ -13002,13 +10137,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("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() oprot.writeFieldStop() @@ -13018,35 +10151,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(create_backend_result) create_backend_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Backend, None], - None, - ), # 0 + (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 ) 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() @@ -13061,11 +10185,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -13073,18 +10195,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): @@ -13094,18 +10216,12 @@ class get_backends_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() @@ -13131,13 +10247,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_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 iter360 in self.success: iter360.write(oprot) @@ -13150,25 +10264,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_result) get_backends_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 ) @@ -13179,18 +10286,12 @@ class get_backends_by_owner_args(object): """ - def __init__( - self, - elixir_id=None, - ): + + def __init__(self, elixir_id=None,): self.elixir_id = elixir_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() @@ -13200,11 +10301,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.elixir_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.elixir_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -13214,18 +10311,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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.elixir_id is not None: - oprot.writeFieldBegin("elixir_id", TType.STRING, 1) - oprot.writeString( - self.elixir_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.elixir_id - ) + oprot.writeFieldBegin('elixir_id', TType.STRING, 1) + oprot.writeString(self.elixir_id.encode('utf-8') if sys.version_info[0] == 2 else self.elixir_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13234,26 +10325,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_owner_args) get_backends_by_owner_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "elixir_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'elixir_id', 'UTF8', None, ), # 1 ) @@ -13264,18 +10348,12 @@ class get_backends_by_owner_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() @@ -13301,13 +10379,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_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 iter367 in self.success: iter367.write(oprot) @@ -13320,25 +10396,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_by_owner_result) get_backends_by_owner_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 ) @@ -13349,18 +10418,12 @@ 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() @@ -13370,11 +10433,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -13384,18 +10443,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -13404,26 +10457,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backends_by_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 ) @@ -13434,18 +10480,12 @@ class get_backends_by_template_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() @@ -13471,13 +10511,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_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 iter374 in self.success: iter374.write(oprot) @@ -13490,25 +10528,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_by_template_result) get_backends_by_template_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [Backend, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 ) @@ -13519,18 +10550,12 @@ 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() @@ -13550,13 +10575,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_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() @@ -13566,26 +10589,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_backend_by_id_args) get_backend_by_id_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 + (1, TType.I64, 'id', None, None, ), # 1 ) @@ -13596,18 +10612,12 @@ class get_backend_by_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() @@ -13628,13 +10638,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_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() oprot.writeFieldStop() @@ -13644,25 +10652,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_backend_by_id_result) get_backend_by_id_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [Backend, None], - None, - ), # 0 + (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 ) @@ -13673,18 +10674,12 @@ 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() @@ -13704,13 +10699,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_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() @@ -13720,26 +10713,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_backend_args) delete_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 + (1, TType.I64, 'id', None, None, ), # 1 ) @@ -13750,18 +10736,12 @@ class delete_backend_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() @@ -13771,11 +10751,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -13785,18 +10761,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.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() @@ -13805,25 +10775,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_backend_result) delete_backend_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -13836,22 +10799,14 @@ class add_user_to_backend_args(object): """ - def __init__( - self, - backend_id=None, - owner_id=None, - user_id=None, - ): + + def __init__(self, backend_id=None, owner_id=None, user_id=None,): self.backend_id = backend_id self.owner_id = owner_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() @@ -13866,20 +10821,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.user_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -13889,30 +10836,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("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.owner_id is not None: - oprot.writeFieldBegin("owner_id", TType.STRING, 2) - oprot.writeString( - self.owner_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.owner_id - ) + oprot.writeFieldBegin('owner_id', TType.STRING, 2) + oprot.writeString(self.owner_id.encode('utf-8') if sys.version_info[0] == 2 else self.owner_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin("user_id", TType.STRING, 3) - oprot.writeString( - self.user_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.user_id - ) + oprot.writeFieldBegin('user_id', TType.STRING, 3) + oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13921,40 +10858,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(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, - "owner_id", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "user_id", - "UTF8", - None, - ), # 3 + (1, TType.I64, 'backend_id', None, None, ), # 1 + (2, TType.STRING, 'owner_id', 'UTF8', None, ), # 2 + (3, TType.STRING, 'user_id', 'UTF8', None, ), # 3 ) @@ -13965,18 +10883,12 @@ class add_user_to_backend_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() @@ -13989,16 +10901,8 @@ def read(self, iprot): self.success = {} (_ktype376, _vtype377, _size375) = iprot.readMapBegin() for _i379 in range(_size375): - _key380 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val381 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key380 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val381 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key380] = _val381 iprot.readMapEnd() else: @@ -14010,21 +10914,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter382, viter383 in self.success.items(): - oprot.writeString( - kiter382.encode("utf-8") if sys.version_info[0] == 2 else kiter382 - ) - oprot.writeString( - viter383.encode("utf-8") if sys.version_info[0] == 2 else viter383 - ) + oprot.writeString(kiter382.encode('utf-8') if sys.version_info[0] == 2 else kiter382) + oprot.writeString(viter383.encode('utf-8') if sys.version_info[0] == 2 else viter383) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14034,25 +10932,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_user_to_backend_result) add_user_to_backend_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 ) @@ -14063,18 +10954,12 @@ 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() @@ -14094,13 +10979,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_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() @@ -14110,26 +10993,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_users_from_backend_args) get_users_from_backend_args.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "backend_id", - None, - None, - ), # 1 + (1, TType.I64, 'backend_id', None, None, ), # 1 ) @@ -14140,18 +11016,12 @@ class get_users_from_backend_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() @@ -14164,11 +11034,7 @@ def read(self, iprot): self.success = [] (_etype387, _size384) = iprot.readListBegin() for _i388 in range(_size384): - _elem389 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem389 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem389) iprot.readListEnd() else: @@ -14180,18 +11046,14 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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 iter390 in self.success: - oprot.writeString( - iter390.encode("utf-8") if sys.version_info[0] == 2 else iter390 - ) + oprot.writeString(iter390.encode('utf-8') if sys.version_info[0] == 2 else iter390) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14201,25 +11063,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_users_from_backend_result) get_users_from_backend_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -14232,22 +11087,14 @@ class delete_user_from_backend_args(object): """ - def __init__( - self, - backend_id=None, - owner_id=None, - user_id=None, - ): + + def __init__(self, backend_id=None, owner_id=None, user_id=None,): self.backend_id = backend_id self.owner_id = owner_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() @@ -14262,20 +11109,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.user_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -14285,30 +11124,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("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.owner_id is not None: - oprot.writeFieldBegin("owner_id", TType.STRING, 2) - oprot.writeString( - self.owner_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.owner_id - ) + oprot.writeFieldBegin('owner_id', TType.STRING, 2) + oprot.writeString(self.owner_id.encode('utf-8') if sys.version_info[0] == 2 else self.owner_id) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin("user_id", TType.STRING, 3) - oprot.writeString( - self.user_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.user_id - ) + oprot.writeFieldBegin('user_id', TType.STRING, 3) + oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14317,40 +11146,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(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, - "owner_id", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "user_id", - "UTF8", - None, - ), # 3 + (1, TType.I64, 'backend_id', None, None, ), # 1 + (2, TType.STRING, 'owner_id', 'UTF8', None, ), # 2 + (3, TType.STRING, 'user_id', 'UTF8', None, ), # 3 ) @@ -14361,18 +11171,12 @@ class delete_user_from_backend_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() @@ -14385,16 +11189,8 @@ def read(self, iprot): self.success = {} (_ktype392, _vtype393, _size391) = iprot.readMapBegin() for _i395 in range(_size391): - _key396 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val397 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key396 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val397 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key396] = _val397 iprot.readMapEnd() else: @@ -14406,21 +11202,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter398, viter399 in self.success.items(): - oprot.writeString( - kiter398.encode("utf-8") if sys.version_info[0] == 2 else kiter398 - ) - oprot.writeString( - viter399.encode("utf-8") if sys.version_info[0] == 2 else viter399 - ) + oprot.writeString(kiter398.encode('utf-8') if sys.version_info[0] == 2 else kiter398) + oprot.writeString(viter399.encode('utf-8') if sys.version_info[0] == 2 else viter399) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14430,35 +11220,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_user_from_backend_result) delete_user_from_backend_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_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() @@ -14473,11 +11254,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_templates_args") + oprot.writeStructBegin('get_templates_args') oprot.writeFieldStop() oprot.writeStructEnd() @@ -14485,18 +11264,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_templates_args) -get_templates_args.thrift_spec = () +get_templates_args.thrift_spec = ( +) class get_templates_result(object): @@ -14506,18 +11285,12 @@ class get_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() @@ -14533,16 +11306,8 @@ def read(self, iprot): _elem405 = {} (_ktype407, _vtype408, _size406) = iprot.readMapBegin() for _i410 in range(_size406): - _key411 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val412 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key411 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val412 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _elem405[_key411] = _val412 iprot.readMapEnd() self.success.append(_elem405) @@ -14556,27 +11321,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_templates_result") + oprot.writeStructBegin('get_templates_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.MAP, len(self.success)) for iter413 in self.success: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter413)) for kiter414, viter415 in iter413.items(): - oprot.writeString( - kiter414.encode("utf-8") - if sys.version_info[0] == 2 - else kiter414 - ) - oprot.writeString( - viter415.encode("utf-8") - if sys.version_info[0] == 2 - else viter415 - ) + oprot.writeString(kiter414.encode('utf-8') if sys.version_info[0] == 2 else kiter414) + oprot.writeString(viter415.encode('utf-8') if sys.version_info[0] == 2 else viter415) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -14587,35 +11342,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_templates_result) get_templates_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 0 ) 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() @@ -14630,11 +11376,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -14642,18 +11386,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): @@ -14663,18 +11407,12 @@ 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() @@ -14687,11 +11425,7 @@ def read(self, iprot): self.success = [] (_etype419, _size416) = iprot.readListBegin() for _i420 in range(_size416): - _elem421 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem421 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem421) iprot.readListEnd() else: @@ -14703,18 +11437,14 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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.STRING, len(self.success)) for iter422 in self.success: - oprot.writeString( - iter422.encode("utf-8") if sys.version_info[0] == 2 else iter422 - ) + oprot.writeString(iter422.encode('utf-8') if sys.version_info[0] == 2 else iter422) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14724,25 +11454,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_result) get_allowed_templates_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -14753,18 +11476,12 @@ class get_templates_by_template_args(object): """ - def __init__( - self, - template_name=None, - ): + + def __init__(self, template_name=None,): self.template_name = template_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() @@ -14774,11 +11491,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template_name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -14788,18 +11501,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("get_templates_by_template_args") + oprot.writeStructBegin('get_templates_by_template_args') 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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14808,26 +11515,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_templates_by_template_args) get_templates_by_template_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "template_name", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'template_name', 'UTF8', None, ), # 1 ) @@ -14838,18 +11538,12 @@ class get_templates_by_template_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() @@ -14865,16 +11559,8 @@ def read(self, iprot): _elem428 = {} (_ktype430, _vtype431, _size429) = iprot.readMapBegin() for _i433 in range(_size429): - _key434 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val435 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key434 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val435 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _elem428[_key434] = _val435 iprot.readMapEnd() self.success.append(_elem428) @@ -14888,27 +11574,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_templates_by_template_result") + oprot.writeStructBegin('get_templates_by_template_result') if self.success is not None: - oprot.writeFieldBegin("success", TType.LIST, 0) + oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.MAP, len(self.success)) for iter436 in self.success: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter436)) for kiter437, viter438 in iter436.items(): - oprot.writeString( - kiter437.encode("utf-8") - if sys.version_info[0] == 2 - else kiter437 - ) - oprot.writeString( - viter438.encode("utf-8") - if sys.version_info[0] == 2 - else viter438 - ) + oprot.writeString(kiter437.encode('utf-8') if sys.version_info[0] == 2 else kiter437) + oprot.writeString(viter438.encode('utf-8') if sys.version_info[0] == 2 else viter438) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -14919,25 +11595,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_templates_by_template_result) get_templates_by_template_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 0 ) @@ -14949,20 +11618,13 @@ class check_template_args(object): """ - def __init__( - self, - template_name=None, - template_version=None, - ): + + def __init__(self, template_name=None, template_version=None,): self.template_name = template_name 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() @@ -14972,20 +11634,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template_name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.template_version = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_version = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -14995,26 +11649,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("check_template_args") + oprot.writeStructBegin('check_template_args') 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.template_version is not None: - oprot.writeFieldBegin("template_version", TType.STRING, 2) - oprot.writeString( - self.template_version.encode("utf-8") - if sys.version_info[0] == 2 - else self.template_version - ) + oprot.writeFieldBegin('template_version', TType.STRING, 2) + oprot.writeString(self.template_version.encode('utf-8') if sys.version_info[0] == 2 else self.template_version) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -15023,33 +11667,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(check_template_args) check_template_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "template_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "template_version", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'template_name', 'UTF8', None, ), # 1 + (2, TType.STRING, 'template_version', 'UTF8', None, ), # 2 ) @@ -15060,18 +11691,12 @@ class check_template_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() @@ -15084,16 +11709,8 @@ def read(self, iprot): self.success = {} (_ktype440, _vtype441, _size439) = iprot.readMapBegin() for _i443 in range(_size439): - _key444 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val445 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key444 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val445 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key444] = _val445 iprot.readMapEnd() else: @@ -15105,21 +11722,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("check_template_result") + oprot.writeStructBegin('check_template_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 kiter446, viter447 in self.success.items(): - oprot.writeString( - kiter446.encode("utf-8") if sys.version_info[0] == 2 else kiter446 - ) - oprot.writeString( - viter447.encode("utf-8") if sys.version_info[0] == 2 else viter447 - ) + oprot.writeString(kiter446.encode('utf-8') if sys.version_info[0] == 2 else kiter446) + oprot.writeString(viter447.encode('utf-8') if sys.version_info[0] == 2 else viter447) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15129,25 +11740,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(check_template_result) check_template_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 ) @@ -15158,18 +11762,12 @@ 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() @@ -15179,11 +11777,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15193,18 +11787,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -15213,26 +11801,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_udp_security_group_args) add_udp_security_group_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 ) @@ -15245,22 +11826,14 @@ class add_udp_security_group_result(object): """ - def __init__( - self, - success=None, - r=None, - s=None, - ): + + def __init__(self, success=None, r=None, s=None,): self.success = success self.r = r self.s = s def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15292,21 +11865,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin("s", TType.STRUCT, 2) + oprot.writeFieldBegin('s', TType.STRUCT, 2) self.s.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15316,49 +11887,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(add_udp_security_group_result) add_udp_security_group_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [ressourceException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "s", - [serverNotFoundException, None], - None, - ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'r', [ressourceException, None], None, ), # 1 + (2, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 2 ) 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() @@ -15373,11 +11923,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -15385,18 +11933,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): @@ -15406,18 +11954,12 @@ 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() @@ -15443,13 +11985,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_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 iter454 in self.success: iter454.write(oprot) @@ -15462,25 +12002,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_result) get_servers_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -15491,18 +12024,12 @@ 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() @@ -15515,11 +12042,7 @@ def read(self, iprot): self.server_ids = [] (_etype458, _size455) = iprot.readListBegin() for _i459 in range(_size455): - _elem460 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem460 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.server_ids.append(_elem460) iprot.readListEnd() else: @@ -15531,18 +12054,14 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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 iter461 in self.server_ids: - oprot.writeString( - iter461.encode("utf-8") if sys.version_info[0] == 2 else iter461 - ) + oprot.writeString(iter461.encode('utf-8') if sys.version_info[0] == 2 else iter461) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15552,26 +12071,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_ids_args) get_servers_by_ids_args.thrift_spec = ( None, # 0 - ( - 1, - TType.LIST, - "server_ids", - (TType.STRING, "UTF8", False), - None, - ), # 1 + (1, TType.LIST, 'server_ids', (TType.STRING, 'UTF8', False), None, ), # 1 ) @@ -15582,18 +12094,12 @@ 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() @@ -15619,13 +12125,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_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 iter468 in self.success: iter468.write(oprot) @@ -15638,25 +12142,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_ids_result) get_servers_by_ids_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -15667,18 +12164,12 @@ class check_server_task_state_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() @@ -15688,11 +12179,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15702,18 +12189,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("check_server_task_state_args") + oprot.writeStructBegin('check_server_task_state_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() @@ -15722,26 +12203,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(check_server_task_state_args) check_server_task_state_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -15752,18 +12226,12 @@ class check_server_task_state_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() @@ -15773,11 +12241,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15787,18 +12251,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("check_server_task_state_result") + oprot.writeStructBegin('check_server_task_state_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() @@ -15807,25 +12265,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(check_server_task_state_result) check_server_task_state_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) @@ -15836,18 +12287,12 @@ 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() @@ -15857,11 +12302,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.bibigrid_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.bibigrid_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -15871,18 +12312,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -15891,26 +12326,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_bibigrid_id_args) get_servers_by_bibigrid_id_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "bibigrid_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'bibigrid_id', 'UTF8', None, ), # 1 ) @@ -15921,18 +12349,12 @@ 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() @@ -15958,13 +12380,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_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 iter475 in self.success: iter475.write(oprot) @@ -15977,25 +12397,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_servers_by_bibigrid_id_result) get_servers_by_bibigrid_id_result.thrift_spec = ( - ( - 0, - TType.LIST, - "success", - (TType.STRUCT, [VM, None], False), - None, - ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT, [VM, None], False), None, ), # 0 ) @@ -16012,16 +12425,8 @@ class scale_up_cluster_args(object): """ - def __init__( - self, - cluster_id=None, - image=None, - flavor=None, - count=None, - names=None, - start_idx=None, - batch_idx=None, - ): + + def __init__(self, cluster_id=None, image=None, flavor=None, count=None, names=None, start_idx=None, batch_idx=None,): self.cluster_id = cluster_id self.image = image self.flavor = flavor @@ -16031,11 +12436,7 @@ def __init__( self.batch_idx = batch_idx def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -16045,29 +12446,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.flavor = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.flavor = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -16080,11 +12469,7 @@ def read(self, iprot): self.names = [] (_etype479, _size476) = iprot.readListBegin() for _i480 in range(_size476): - _elem481 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem481 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.names.append(_elem481) iprot.readListEnd() else: @@ -16106,50 +12491,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("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 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.flavor is not None: - oprot.writeFieldBegin("flavor", TType.STRING, 3) - oprot.writeString( - self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor - ) + oprot.writeFieldBegin('flavor', TType.STRING, 3) + oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) 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 iter482 in self.names: - oprot.writeString( - iter482.encode("utf-8") if sys.version_info[0] == 2 else iter482 - ) + oprot.writeString(iter482.encode('utf-8') if sys.version_info[0] == 2 else iter482) 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() @@ -16159,68 +12532,25 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(scale_up_cluster_args) scale_up_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "image", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "flavor", - "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', 'UTF8', None, ), # 2 + (3, TType.STRING, 'flavor', '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 ) @@ -16231,18 +12561,12 @@ 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() @@ -16255,19 +12579,11 @@ def read(self, iprot): self.success = {} (_ktype484, _vtype485, _size483) = iprot.readMapBegin() for _i487 in range(_size483): - _key488 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key488 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val489 = [] (_etype493, _size490) = iprot.readListBegin() for _i494 in range(_size490): - _elem495 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem495 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val489.append(_elem495) iprot.readListEnd() self.success[_key488] = _val489 @@ -16281,23 +12597,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("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 kiter496, viter497 in self.success.items(): - oprot.writeString( - kiter496.encode("utf-8") if sys.version_info[0] == 2 else kiter496 - ) + oprot.writeString(kiter496.encode('utf-8') if sys.version_info[0] == 2 else kiter496) oprot.writeListBegin(TType.STRING, len(viter497)) for iter498 in viter497: - oprot.writeString( - iter498.encode("utf-8") if sys.version_info[0] == 2 else iter498 - ) + oprot.writeString(iter498.encode('utf-8') if sys.version_info[0] == 2 else iter498) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -16308,25 +12618,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(scale_up_cluster_result) scale_up_cluster_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.LIST, (TType.STRING, "UTF8", False), False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.LIST, (TType.STRING, 'UTF8', False), False), None, ), # 0 ) @@ -16337,18 +12640,12 @@ 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() @@ -16358,11 +12655,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16372,18 +12665,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -16392,26 +12679,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_info_args) get_cluster_info_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -16422,18 +12702,12 @@ class get_cluster_info_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() @@ -16454,13 +12728,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_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() oprot.writeFieldStop() @@ -16470,25 +12742,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_cluster_info_result) get_cluster_info_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [ClusterInfo, None], - None, - ), # 0 + (0, TType.STRUCT, 'success', [ClusterInfo, None], None, ), # 0 ) @@ -16499,18 +12764,12 @@ 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() @@ -16520,11 +12779,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16534,18 +12789,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -16554,26 +12803,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_cluster_status_args) get_cluster_status_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -16584,18 +12826,12 @@ class get_cluster_status_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() @@ -16608,16 +12844,8 @@ def read(self, iprot): self.success = {} (_ktype500, _vtype501, _size499) = iprot.readMapBegin() for _i503 in range(_size499): - _key504 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val505 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key504 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val505 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key504] = _val505 iprot.readMapEnd() else: @@ -16629,21 +12857,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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 kiter506, viter507 in self.success.items(): - oprot.writeString( - kiter506.encode("utf-8") if sys.version_info[0] == 2 else kiter506 - ) - oprot.writeString( - viter507.encode("utf-8") if sys.version_info[0] == 2 else viter507 - ) + oprot.writeString(kiter506.encode('utf-8') if sys.version_info[0] == 2 else kiter506) + oprot.writeString(viter507.encode('utf-8') if sys.version_info[0] == 2 else viter507) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -16653,25 +12875,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_cluster_status_result) get_cluster_status_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 ) @@ -16682,18 +12897,12 @@ 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() @@ -16703,11 +12912,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16717,18 +12922,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -16737,26 +12936,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_args) get_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -16768,20 +12960,13 @@ 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() @@ -16808,17 +12993,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -16828,32 +13011,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_server_result) get_server_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [VM, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 + (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 ) @@ -16864,18 +13034,12 @@ 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() @@ -16885,11 +13049,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -16899,18 +13059,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -16919,26 +13073,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(stop_server_args) stop_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -16951,22 +13098,14 @@ class stop_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() @@ -16998,21 +13137,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(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() @@ -17022,39 +13159,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(stop_server_result) stop_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [conflictException, None], - None, - ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 ) @@ -17069,14 +13187,8 @@ class create_snapshot_args(object): """ - def __init__( - self, - openstack_id=None, - name=None, - elixir_id=None, - base_tags=None, - description=None, - ): + + def __init__(self, openstack_id=None, name=None, elixir_id=None, base_tags=None, description=None,): self.openstack_id = openstack_id self.name = name self.elixir_id = elixir_id @@ -17084,11 +13196,7 @@ def __init__( self.description = description def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -17098,29 +13206,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.elixir_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.elixir_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -17128,22 +13224,14 @@ def read(self, iprot): self.base_tags = [] (_etype511, _size508) = iprot.readListBegin() for _i512 in range(_size508): - _elem513 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem513 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.base_tags.append(_elem513) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -17153,49 +13241,31 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.elixir_id is not None: - oprot.writeFieldBegin("elixir_id", TType.STRING, 3) - oprot.writeString( - self.elixir_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.elixir_id - ) + oprot.writeFieldBegin('elixir_id', TType.STRING, 3) + oprot.writeString(self.elixir_id.encode('utf-8') if sys.version_info[0] == 2 else self.elixir_id) 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 iter514 in self.base_tags: - oprot.writeString( - iter514.encode("utf-8") if sys.version_info[0] == 2 else iter514 - ) + oprot.writeString(iter514.encode('utf-8') if sys.version_info[0] == 2 else iter514) 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() @@ -17204,54 +13274,23 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_snapshot_args) create_snapshot_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "name", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "elixir_id", - "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, 'elixir_id', 'UTF8', None, ), # 3 + (4, TType.LIST, 'base_tags', (TType.STRING, 'UTF8', False), None, ), # 4 + (5, TType.STRING, 'description', 'UTF8', None, ), # 5 ) @@ -17264,22 +13303,14 @@ 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() @@ -17289,11 +13320,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -17315,25 +13342,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -17343,49 +13364,28 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_snapshot_result) create_snapshot_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [conflictException, None], - None, - ), # 2 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [conflictException, 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() @@ -17400,11 +13400,9 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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() @@ -17412,18 +13410,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): @@ -17433,18 +13431,12 @@ 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() @@ -17457,16 +13449,8 @@ def read(self, iprot): self.success = {} (_ktype516, _vtype517, _size515) = iprot.readMapBegin() for _i519 in range(_size515): - _key520 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val521 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key520 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val521 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key520] = _val521 iprot.readMapEnd() else: @@ -17478,21 +13462,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._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 kiter522, viter523 in self.success.items(): - oprot.writeString( - kiter522.encode("utf-8") if sys.version_info[0] == 2 else kiter522 - ) - oprot.writeString( - viter523.encode("utf-8") if sys.version_info[0] == 2 else viter523 - ) + oprot.writeString(kiter522.encode('utf-8') if sys.version_info[0] == 2 else kiter522) + oprot.writeString(viter523.encode('utf-8') if sys.version_info[0] == 2 else viter523) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -17502,25 +13480,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(get_limits_result) get_limits_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -17534,24 +13505,15 @@ class start_cluster_args(object): """ - def __init__( - self, - public_key=None, - master_instance=None, - worker_instance=None, - user=None, - ): + + def __init__(self, public_key=None, master_instance=None, worker_instance=None, user=None,): self.public_key = public_key self.master_instance = master_instance self.worker_instance = worker_instance 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() @@ -17561,11 +13523,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_key = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -17587,11 +13545,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.user = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -17601,35 +13555,27 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("start_cluster_args") + oprot.writeStructBegin('start_cluster_args') if self.public_key is not None: - oprot.writeFieldBegin("public_key", TType.STRING, 1) - oprot.writeString( - self.public_key.encode("utf-8") - if sys.version_info[0] == 2 - else self.public_key - ) + oprot.writeFieldBegin('public_key', TType.STRING, 1) + oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) oprot.writeFieldEnd() if self.master_instance is not None: - oprot.writeFieldBegin("master_instance", TType.STRUCT, 2) + oprot.writeFieldBegin('master_instance', TType.STRUCT, 2) self.master_instance.write(oprot) oprot.writeFieldEnd() if self.worker_instance is not None: - oprot.writeFieldBegin("worker_instance", TType.LIST, 3) + oprot.writeFieldBegin('worker_instance', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.worker_instance)) for iter530 in self.worker_instance: iter530.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() @@ -17638,47 +13584,22 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_cluster_args) start_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "public_key", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRUCT, - "master_instance", - [ClusterInstance, None], - None, - ), # 2 - ( - 3, - TType.LIST, - "worker_instance", - (TType.STRUCT, [ClusterInstance, None], False), - None, - ), # 3 - ( - 4, - TType.STRING, - "user", - "UTF8", - None, - ), # 4 + (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 + (2, TType.STRUCT, 'master_instance', [ClusterInstance, None], None, ), # 2 + (3, TType.LIST, 'worker_instance', (TType.STRUCT, [ClusterInstance, None], False), None, ), # 3 + (4, TType.STRING, 'user', 'UTF8', None, ), # 4 ) @@ -17689,18 +13610,12 @@ 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() @@ -17713,16 +13628,8 @@ def read(self, iprot): self.success = {} (_ktype532, _vtype533, _size531) = iprot.readMapBegin() for _i535 in range(_size531): - _key536 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val537 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key536 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val537 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key536] = _val537 iprot.readMapEnd() else: @@ -17734,21 +13641,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter538, viter539 in self.success.items(): - oprot.writeString( - kiter538.encode("utf-8") if sys.version_info[0] == 2 else kiter538 - ) - oprot.writeString( - viter539.encode("utf-8") if sys.version_info[0] == 2 else viter539 - ) + oprot.writeString(kiter538.encode('utf-8') if sys.version_info[0] == 2 else kiter538) + oprot.writeString(viter539.encode('utf-8') if sys.version_info[0] == 2 else viter539) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -17758,25 +13659,18 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(start_cluster_result) start_cluster_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 ) @@ -17787,18 +13681,12 @@ 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() @@ -17808,11 +13696,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -17822,18 +13706,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -17842,26 +13720,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(terminate_cluster_args) terminate_cluster_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "cluster_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'cluster_id', 'UTF8', None, ), # 1 ) @@ -17872,18 +13743,12 @@ class terminate_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() @@ -17896,16 +13761,8 @@ def read(self, iprot): self.success = {} (_ktype541, _vtype542, _size540) = iprot.readMapBegin() for _i544 in range(_size540): - _key545 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val546 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key545 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val546 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key545] = _val546 iprot.readMapEnd() else: @@ -17917,21 +13774,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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 kiter547, viter548 in self.success.items(): - oprot.writeString( - kiter547.encode("utf-8") if sys.version_info[0] == 2 else kiter547 - ) - oprot.writeString( - viter548.encode("utf-8") if sys.version_info[0] == 2 else viter548 - ) + oprot.writeString(kiter547.encode('utf-8') if sys.version_info[0] == 2 else kiter547) + oprot.writeString(viter548.encode('utf-8') if sys.version_info[0] == 2 else viter548) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -17941,25 +13792,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(terminate_cluster_result) terminate_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 ) @@ -17970,18 +13814,12 @@ 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() @@ -17991,11 +13829,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.image_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18005,18 +13839,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -18025,26 +13853,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_image_args) delete_image_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "image_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'image_id', 'UTF8', None, ), # 1 ) @@ -18056,20 +13877,13 @@ class delete_image_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() @@ -18095,17 +13909,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(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() oprot.writeFieldStop() @@ -18115,32 +13927,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_image_result) delete_image_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [imageNotFoundException, None], - None, - ), # 1 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', [imageNotFoundException, None], None, ), # 1 ) @@ -18152,20 +13951,13 @@ class delete_volume_attachment_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() @@ -18175,20 +13967,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18198,26 +13982,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("delete_volume_attachment_args") + oprot.writeStructBegin('delete_volume_attachment_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() @@ -18226,33 +14000,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_attachment_args) delete_volume_attachment_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 ) @@ -18265,22 +14026,14 @@ class delete_volume_attachment_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() @@ -18312,21 +14065,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_attachment_result") + oprot.writeStructBegin('delete_volume_attachment_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() 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() @@ -18336,39 +14087,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_attachment_result) delete_volume_attachment_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [conflictException, None], - None, - ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 ) @@ -18379,18 +14111,12 @@ 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() @@ -18400,11 +14126,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18414,18 +14136,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -18434,26 +14150,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_args) delete_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'volume_id', 'UTF8', None, ), # 1 ) @@ -18465,20 +14174,13 @@ class delete_volume_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() @@ -18504,17 +14206,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) 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() @@ -18524,32 +14224,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(delete_volume_result) delete_volume_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "c", - [conflictException, None], - None, - ), # 1 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'c', [conflictException, None], None, ), # 1 ) @@ -18561,20 +14248,13 @@ 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() @@ -18584,20 +14264,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18607,26 +14279,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("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() @@ -18635,33 +14297,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(attach_volume_to_server_args) attach_volume_to_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'volume_id', 'UTF8', None, ), # 2 ) @@ -18674,22 +14323,14 @@ 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() @@ -18702,16 +14343,8 @@ def read(self, iprot): self.success = {} (_ktype550, _vtype551, _size549) = iprot.readMapBegin() for _i553 in range(_size549): - _key554 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val555 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key554 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val555 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key554] = _val555 iprot.readMapEnd() else: @@ -18735,29 +14368,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("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 kiter556, viter557 in self.success.items(): - oprot.writeString( - kiter556.encode("utf-8") if sys.version_info[0] == 2 else kiter556 - ) - oprot.writeString( - viter557.encode("utf-8") if sys.version_info[0] == 2 else viter557 - ) + oprot.writeString(kiter556.encode('utf-8') if sys.version_info[0] == 2 else kiter556) + oprot.writeString(viter557.encode('utf-8') if sys.version_info[0] == 2 else viter557) 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() @@ -18767,39 +14394,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(attach_volume_to_server_result) attach_volume_to_server_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [conflictException, None], - None, - ), # 2 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 ) @@ -18810,18 +14418,12 @@ class check_server_status_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() @@ -18831,11 +14433,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -18845,18 +14443,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("check_server_status_args") + oprot.writeStructBegin('check_server_status_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() @@ -18865,26 +14457,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(check_server_status_args) check_server_status_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -18897,22 +14482,14 @@ class check_server_status_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() @@ -18945,21 +14522,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("check_server_status_result") + oprot.writeStructBegin('check_server_status_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.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 2) + oprot.writeFieldBegin('r', TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -18969,39 +14544,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(check_server_status_result) check_server_status_result.thrift_spec = ( - ( - 0, - TType.STRUCT, - "success", - [VM, None], - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "r", - [ressourceException, None], - None, - ), # 2 + (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 ) @@ -19013,20 +14569,13 @@ class setUserPassword_args(object): """ - def __init__( - self, - user=None, - password=None, - ): + + def __init__(self, user=None, password=None,): self.user = user self.password = password def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19036,20 +14585,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.user = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.password = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19059,24 +14600,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("setUserPassword_args") + oprot.writeStructBegin('setUserPassword_args') if self.user is not None: - oprot.writeFieldBegin("user", TType.STRING, 1) - oprot.writeString( - self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user - ) + oprot.writeFieldBegin('user', TType.STRING, 1) + oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user) oprot.writeFieldEnd() if self.password is not None: - oprot.writeFieldBegin("password", TType.STRING, 2) - oprot.writeString( - self.password.encode("utf-8") - if sys.version_info[0] == 2 - else self.password - ) + oprot.writeFieldBegin('password', TType.STRING, 2) + oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -19085,33 +14618,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(setUserPassword_args) setUserPassword_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "user", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "password", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'user', 'UTF8', None, ), # 1 + (2, TType.STRING, 'password', 'UTF8', None, ), # 2 ) @@ -19123,20 +14643,13 @@ class setUserPassword_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() @@ -19146,11 +14659,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: @@ -19166,21 +14675,15 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("setUserPassword_result") + oprot.writeStructBegin('setUserPassword_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() oprot.writeFieldStop() @@ -19190,32 +14693,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(setUserPassword_result) setUserPassword_result.thrift_spec = ( - ( - 0, - TType.STRING, - "success", - "UTF8", - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [otherException, None], - None, - ), # 1 + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'e', [otherException, None], None, ), # 1 ) @@ -19226,18 +14716,12 @@ 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() @@ -19247,11 +14731,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19261,18 +14741,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -19281,26 +14755,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resume_server_args) resume_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) @@ -19313,22 +14780,14 @@ class resume_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() @@ -19360,21 +14819,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.success is not None: - oprot.writeFieldBegin("success", TType.BOOL, 0) + oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(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() @@ -19384,39 +14841,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(resume_server_result) resume_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [conflictException, None], - None, - ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 ) @@ -19429,22 +14867,14 @@ 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() @@ -19454,11 +14884,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -19471,16 +14897,8 @@ def read(self, iprot): self.metadata = {} (_ktype559, _vtype560, _size558) = iprot.readMapBegin() for _i562 in range(_size558): - _key563 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val564 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key563 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val564 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key563] = _val564 iprot.readMapEnd() else: @@ -19492,33 +14910,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("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 kiter565, viter566 in self.metadata.items(): - oprot.writeString( - kiter565.encode("utf-8") if sys.version_info[0] == 2 else kiter565 - ) - oprot.writeString( - viter566.encode("utf-8") if sys.version_info[0] == 2 else viter566 - ) + oprot.writeString(kiter565.encode('utf-8') if sys.version_info[0] == 2 else kiter565) + oprot.writeString(viter566.encode('utf-8') if sys.version_info[0] == 2 else viter566) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -19528,40 +14936,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_args) create_volume_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "volume_name", - "UTF8", - None, - ), # 1 - ( - 2, - TType.I32, - "volume_storage", - None, - None, - ), # 2 - ( - 3, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 3 + (1, TType.STRING, 'volume_name', 'UTF8', None, ), # 1 + (2, TType.I32, 'volume_storage', None, None, ), # 2 + (3, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 ) @@ -19573,20 +14962,13 @@ class create_volume_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() @@ -19599,16 +14981,8 @@ def read(self, iprot): self.success = {} (_ktype568, _vtype569, _size567) = iprot.readMapBegin() for _i571 in range(_size567): - _key572 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val573 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key572 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val573 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key572] = _val573 iprot.readMapEnd() else: @@ -19626,25 +15000,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.MAP, 0) + oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter574, viter575 in self.success.items(): - oprot.writeString( - kiter574.encode("utf-8") if sys.version_info[0] == 2 else kiter574 - ) - oprot.writeString( - viter575.encode("utf-8") if sys.version_info[0] == 2 else viter575 - ) + oprot.writeString(kiter574.encode('utf-8') if sys.version_info[0] == 2 else kiter574) + oprot.writeString(viter575.encode('utf-8') if sys.version_info[0] == 2 else viter575) oprot.writeMapEnd() oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin("r", TType.STRUCT, 1) + oprot.writeFieldBegin('r', TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -19654,32 +15022,19 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(create_volume_result) create_volume_result.thrift_spec = ( - ( - 0, - TType.MAP, - "success", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 0 - ( - 1, - TType.STRUCT, - "r", - [ressourceException, None], - None, - ), # 1 + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'r', [ressourceException, None], None, ), # 1 ) @@ -19691,20 +15046,13 @@ class reboot_server_args(object): """ - def __init__( - self, - server_id=None, - reboot_type=None, - ): + + def __init__(self, server_id=None, reboot_type=None,): self.server_id = server_id self.reboot_type = reboot_type def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -19714,20 +15062,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.server_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.reboot_type = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.reboot_type = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -19737,26 +15077,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("reboot_server_args") + oprot.writeStructBegin('reboot_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.reboot_type is not None: - oprot.writeFieldBegin("reboot_type", TType.STRING, 2) - oprot.writeString( - self.reboot_type.encode("utf-8") - if sys.version_info[0] == 2 - else self.reboot_type - ) + oprot.writeFieldBegin('reboot_type', TType.STRING, 2) + oprot.writeString(self.reboot_type.encode('utf-8') if sys.version_info[0] == 2 else self.reboot_type) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -19765,33 +15095,20 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_server_args) reboot_server_args.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "server_id", - "UTF8", - None, - ), # 1 - ( - 2, - TType.STRING, - "reboot_type", - "UTF8", - None, - ), # 2 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'reboot_type', 'UTF8', None, ), # 2 ) @@ -19804,22 +15121,14 @@ class reboot_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() @@ -19851,21 +15160,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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_server_result") + oprot.writeStructBegin('reboot_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() 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() @@ -19875,39 +15182,21 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(reboot_server_result) reboot_server_result.thrift_spec = ( - ( - 0, - TType.BOOL, - "success", - None, - None, - ), # 0 - ( - 1, - TType.STRUCT, - "e", - [serverNotFoundException, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "c", - [conflictException, None], - None, - ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 ) fix_spec(all_structs) del all_structs + diff --git a/VirtualMachineService/__init__.py b/VirtualMachineService/__init__.py index ba9c185a..86a570c6 100644 --- a/VirtualMachineService/__init__.py +++ b/VirtualMachineService/__init__.py @@ -1 +1 @@ -__all__ = ["ttypes", "constants", "VirtualMachineService"] +__all__ = ['ttypes', 'constants', 'VirtualMachineService'] diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index f06a8151..c5ba12dd 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -35,8 +35,9 @@ class Playbook(object): PLAYBOOK_FAILED = "PLAYBOOK_FAILED" def __init__( - self, ip, port, playbooks_information, osi_private_key, public_key, pool + self, ip, port, playbooks_information, osi_private_key, public_key, pool, loaded_metadata ): + self.loaded_metadata = loaded_metadata self.redis = redis.Redis(connection_pool=pool) # redis connection self.yaml_exec = ruamel.yaml.YAML() # yaml writer/reader self.vars_files = [] # _vars_file.yml to read @@ -74,6 +75,7 @@ def __init__( mode="w+", dir=self.directory.name, delete=False ) + inventory_string = ( "[vm]\n" + ip + ":" + port + " ansible_user=ubuntu " "ansible_ssh_private_key_file=" @@ -85,8 +87,8 @@ def __init__( def copy_playbooks_and_init(self, playbooks_information, public_key): # go through every wanted playbook - for k, v, i in playbooks_information.items(): - self.copy_and_init(k, v, i) + for k, v in playbooks_information.items(): + self.copy_and_init(k, v) # init yml to change public keys as last task shutil.copy(self.playbooks_dir + "/change_key.yml", self.directory.name) @@ -120,7 +122,7 @@ def copy_playbooks_and_init(self, playbooks_information, public_key): ) as generic_playbook: self.yaml_exec.dump(data_gp, generic_playbook) - def copy_and_init(self, playbook_name, playbook_vars, is_resenv): + def copy_and_init(self, playbook_name, playbook_vars): def load_vars(): if playbook_name == BIOCONDA: for k, v in playbook_vars.items(): @@ -132,7 +134,7 @@ def load_vars(): for p in p_array: p_dict.update({p[0]: {"version": p[1], "build": p[2]}}) data[playbook_name + "_tools"][k] = p_dict - if is_resenv: + if playbook_name in self.loaded_metadata.keys(): for k, v in playbook_vars.items(): if k == "template_version": data[playbook_name + "_vars"][k] = v diff --git a/VirtualMachineService/constants.py b/VirtualMachineService/constants.py index b182601b..550f6038 100644 --- a/VirtualMachineService/constants.py +++ b/VirtualMachineService/constants.py @@ -1,22 +1,15 @@ # -# Autogenerated by Thrift Compiler (0.12.0) +# Autogenerated by Thrift Compiler (0.13.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.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/VirtualMachineService/ttypes.py b/VirtualMachineService/ttypes.py index 16057a07..7a7d1988 100644 --- a/VirtualMachineService/ttypes.py +++ b/VirtualMachineService/ttypes.py @@ -1,25 +1,18 @@ # -# Autogenerated by Thrift Compiler (0.12.0) +# Autogenerated by Thrift Compiler (0.13.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.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys from thrift.transport import TTransport - all_structs = [] @@ -34,14 +27,8 @@ 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 @@ -49,11 +36,7 @@ def __init__( self.template_version = template_version def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -68,38 +51,22 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.owner = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.location_url = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.template_version = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -109,44 +76,28 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -155,8 +106,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -180,18 +132,8 @@ 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 @@ -203,11 +145,7 @@ def __init__( self.key_name = key_name def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -217,56 +155,32 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.launch_date = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.launch_date = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.group_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.network_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.public_ip = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.subnet_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.user = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -276,20 +190,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.cluster_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.cluster_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.key_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -299,76 +205,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("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() @@ -377,8 +251,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -400,16 +275,8 @@ class Volume(object): """ - def __init__( - self, - id=None, - name=None, - description=None, - status=None, - created_at=None, - device=None, - size=None, - ): + + def __init__(self, id=None, name=None, description=None, status=None, created_at=None, device=None, size=None,): self.id = id self.name = name self.description = description @@ -419,11 +286,7 @@ def __init__( 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() @@ -433,56 +296,32 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.device = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -497,53 +336,35 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("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() oprot.writeFieldStop() @@ -553,8 +374,9 @@ def validate(self): return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -579,17 +401,8 @@ class Flavor(object): """ - def __init__( - self, - vcpus=None, - ram=None, - disk=None, - name=None, - openstack_id=None, - description=None, - tags=None, - ephemeral_disk=None, - ): + + def __init__(self, vcpus=None, ram=None, disk=None, name=None, openstack_id=None, description=None, tags=None, ephemeral_disk=None,): self.vcpus = vcpus self.ram = ram self.disk = disk @@ -600,11 +413,7 @@ def __init__( self.ephemeral_disk = ephemeral_disk def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -629,29 +438,17 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.openstack_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.description = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: @@ -659,11 +456,7 @@ def read(self, iprot): self.tags = [] (_etype3, _size0) = iprot.readListBegin() for _i4 in range(_size0): - _elem5 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.tags.append(_elem5) iprot.readListEnd() else: @@ -680,56 +473,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("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.openstack_id is not None: - oprot.writeFieldBegin("openstack_id", TType.STRING, 5) - oprot.writeString( - self.openstack_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.openstack_id - ) + oprot.writeFieldBegin('openstack_id', TType.STRING, 5) + 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, 6) - oprot.writeString( - self.description.encode("utf-8") - if sys.version_info[0] == 2 - else self.description - ) + oprot.writeFieldBegin('description', TType.STRING, 6) + 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, 7) + oprot.writeFieldBegin('tags', TType.LIST, 7) oprot.writeListBegin(TType.STRING, len(self.tags)) for iter6 in self.tags: - oprot.writeString( - iter6.encode("utf-8") if sys.version_info[0] == 2 else iter6 - ) + oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6) oprot.writeListEnd() oprot.writeFieldEnd() if self.ephemeral_disk is not None: - oprot.writeFieldBegin("ephemeral_disk", TType.I32, 8) + oprot.writeFieldBegin('ephemeral_disk', TType.I32, 8) oprot.writeI32(self.ephemeral_disk) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -737,22 +516,23 @@ 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!') 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__ @@ -779,19 +559,8 @@ 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, - tag=None, - is_snapshot=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, tag=None, is_snapshot=None,): self.name = name self.min_disk = min_disk self.min_ram = min_ram @@ -804,11 +573,7 @@ def __init__( self.is_snapshot = is_snapshot def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -818,11 +583,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -837,47 +598,27 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.updated_at = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: @@ -885,11 +626,7 @@ def read(self, iprot): self.tag = [] (_etype10, _size7) = iprot.readListBegin() for _i11 in range(_size7): - _elem12 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _elem12 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.tag.append(_elem12) iprot.readListEnd() else: @@ -906,74 +643,50 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.tag is not None: - oprot.writeFieldBegin("tag", TType.LIST, 9) + oprot.writeFieldBegin('tag', TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.tag)) for iter13 in self.tag: - oprot.writeString( - iter13.encode("utf-8") if sys.version_info[0] == 2 else iter13 - ) + oprot.writeString(iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13) oprot.writeListEnd() oprot.writeFieldEnd() if self.is_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() oprot.writeFieldStop() @@ -981,22 +694,23 @@ def write(self, oprot): def validate(self): if self.name is None: - raise TProtocolException(message="Required field name is unset!") + raise TProtocolException(message='Required field name is unset!') if self.min_disk is None: - raise TProtocolException(message="Required field min_disk is unset!") + raise TProtocolException(message='Required field min_disk is unset!') if self.min_ram is None: - raise TProtocolException(message="Required field min_ram is unset!") + raise TProtocolException(message='Required field min_ram is unset!') if self.status is None: - raise TProtocolException(message="Required field status is unset!") + raise TProtocolException(message='Required field status is unset!') if self.openstack_id is None: - raise TProtocolException(message="Required field openstack_id is unset!") + raise TProtocolException(message='Required field openstack_id is unset!') if self.tag is None: - raise TProtocolException(message="Required field tag is unset!") + raise TProtocolException(message='Required field tag 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__ @@ -1026,22 +740,8 @@ class VM(object): """ - def __init__( - self, - flav=None, - img=None, - status=None, - metadata=None, - project_id=None, - keyname=None, - openstack_id=None, - name=None, - created_at=None, - floating_ip=None, - fixed_ip=None, - diskspace=None, - volume_id=None, - ): + + def __init__(self, flav=None, img=None, status=None, metadata=None, project_id=None, keyname=None, openstack_id=None, name=None, created_at=None, floating_ip=None, fixed_ip=None, diskspace=None, volume_id=None,): self.flav = flav self.img = img self.status = status @@ -1057,11 +757,7 @@ def __init__( self.volume_id = volume_id def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1083,11 +779,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.status = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.status = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: @@ -1095,81 +787,45 @@ def read(self, iprot): self.metadata = {} (_ktype15, _vtype16, _size14) = iprot.readMapBegin() for _i18 in range(_size14): - _key19 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) - _val20 = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + _key19 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val20 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.metadata[_key19] = _val20 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.project_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.project_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.keyname = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.keyname = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.name = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: - self.created_at = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.created_at = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: - self.floating_ip = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.floating_ip = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: - self.fixed_ip = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.fixed_ip = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: @@ -1179,11 +835,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 13: if ftype == TType.STRING: - self.volume_id = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1193,128 +845,91 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.flav is not None: - oprot.writeFieldBegin("flav", TType.STRUCT, 1) + oprot.writeFieldBegin('flav', TType.STRUCT, 1) self.flav.write(oprot) oprot.writeFieldEnd() if self.img is not None: - oprot.writeFieldBegin("img", TType.STRUCT, 2) + oprot.writeFieldBegin('img', TType.STRUCT, 2) self.img.write(oprot) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin("status", TType.STRING, 3) - oprot.writeString( - self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status - ) + oprot.writeFieldBegin('status', TType.STRING, 3) + oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) 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 kiter21, viter22 in self.metadata.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.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.project_id is not None: - oprot.writeFieldBegin("project_id", TType.STRING, 5) - oprot.writeString( - self.project_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.project_id - ) + oprot.writeFieldBegin('project_id', TType.STRING, 5) + 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, 6) - oprot.writeString( - self.keyname.encode("utf-8") - if sys.version_info[0] == 2 - else self.keyname - ) + oprot.writeFieldBegin('keyname', TType.STRING, 6) + 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, 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.name is not None: - oprot.writeFieldBegin("name", TType.STRING, 8) - oprot.writeString( - self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name - ) + oprot.writeFieldBegin('name', TType.STRING, 8) + 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, 9) - oprot.writeString( - self.created_at.encode("utf-8") - if sys.version_info[0] == 2 - else self.created_at - ) + oprot.writeFieldBegin('created_at', TType.STRING, 9) + 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, 10) - oprot.writeString( - self.floating_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.floating_ip - ) + oprot.writeFieldBegin('floating_ip', TType.STRING, 10) + 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, 11) - oprot.writeString( - self.fixed_ip.encode("utf-8") - if sys.version_info[0] == 2 - else self.fixed_ip - ) + oprot.writeFieldBegin('fixed_ip', TType.STRING, 11) + oprot.writeString(self.fixed_ip.encode('utf-8') if sys.version_info[0] == 2 else self.fixed_ip) oprot.writeFieldEnd() if self.diskspace is not None: - oprot.writeFieldBegin("diskspace", TType.I32, 12) + oprot.writeFieldBegin('diskspace', TType.I32, 12) oprot.writeI32(self.diskspace) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin("volume_id", TType.STRING, 13) - oprot.writeString( - self.volume_id.encode("utf-8") - if sys.version_info[0] == 2 - else self.volume_id - ) + oprot.writeFieldBegin('volume_id', TType.STRING, 13) + oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.flav is None: - raise TProtocolException(message="Required field flav is unset!") + raise TProtocolException(message='Required field flav is unset!') if self.img is None: - raise TProtocolException(message="Required field img is unset!") + raise TProtocolException(message='Required field img 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.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!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1332,22 +947,14 @@ 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() @@ -1357,20 +964,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.type = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.type = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.image = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: @@ -1385,25 +984,19 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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() @@ -1411,14 +1004,15 @@ def write(self, oprot): def validate(self): if self.type is None: - raise TProtocolException(message="Required field type is unset!") + raise TProtocolException(message='Required field type is unset!') if self.image is None: - raise TProtocolException(message="Required field image is unset!") + raise TProtocolException(message='Required field image is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1438,22 +1032,14 @@ 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() @@ -1468,20 +1054,12 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.stdout = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.stdout = iprot.readString().decode('utf-8') 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") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.stderr = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1491,42 +1069,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("PlaybookResult") + oprot.writeStructBegin('PlaybookResult') if self.status is not None: - oprot.writeFieldBegin("status", TType.I32, 1) + oprot.writeFieldBegin('status', TType.I32, 1) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.stdout is not None: - oprot.writeFieldBegin("stdout", TType.STRING, 2) - oprot.writeString( - self.stdout.encode("utf-8") if sys.version_info[0] == 2 else self.stdout - ) + oprot.writeFieldBegin('stdout', TType.STRING, 2) + oprot.writeString(self.stdout.encode('utf-8') if sys.version_info[0] == 2 else self.stdout) oprot.writeFieldEnd() if self.stderr is not None: - oprot.writeFieldBegin("stderr", TType.STRING, 3) - oprot.writeString( - self.stderr.encode("utf-8") if sys.version_info[0] == 2 else self.stderr - ) + oprot.writeFieldBegin('stderr', TType.STRING, 3) + oprot.writeString(self.stderr.encode('utf-8') if sys.version_info[0] == 2 else self.stderr) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.status is None: - raise TProtocolException(message="Required field status is unset!") + raise TProtocolException(message='Required field status is unset!') if self.stdout is None: - raise TProtocolException(message="Required field stdout is unset!") + raise TProtocolException(message='Required field stdout is unset!') if self.stderr is None: - raise TProtocolException(message="Required field stderr is unset!") + raise TProtocolException(message='Required field stderr is unset!') return def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1542,18 +1115,12 @@ class otherException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1563,11 +1130,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1577,16 +1140,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("otherException") + oprot.writeStructBegin('otherException') if self.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1598,8 +1157,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1615,18 +1175,12 @@ class ressourceException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1636,11 +1190,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1650,16 +1200,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("ressourceException") + oprot.writeStructBegin('ressourceException') if self.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1671,8 +1217,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1688,18 +1235,12 @@ class nameException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1709,11 +1250,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1723,16 +1260,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("nameException") + oprot.writeStructBegin('nameException') if self.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1744,8 +1277,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1761,18 +1295,12 @@ class serverNotFoundException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1782,11 +1310,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1796,16 +1320,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1817,8 +1337,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1834,18 +1355,12 @@ class networkNotFoundException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1855,11 +1370,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1869,16 +1380,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("networkNotFoundException") + oprot.writeStructBegin('networkNotFoundException') if self.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1890,8 +1397,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1907,18 +1415,12 @@ class imageNotFoundException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1928,11 +1430,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -1942,16 +1440,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1963,8 +1457,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1980,18 +1475,12 @@ class flavorNotFoundException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -2001,11 +1490,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2015,16 +1500,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - 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.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2036,8 +1517,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2055,18 +1537,12 @@ class authenticationException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -2076,11 +1552,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2090,16 +1562,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("authenticationException") + oprot.writeStructBegin('authenticationException') if self.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2111,8 +1579,9 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -2130,18 +1599,12 @@ class conflictException(TException): """ - def __init__( - self, - Reason=None, - ): + + def __init__(self, Reason=None,): self.Reason = Reason def read(self, iprot): - if ( - iprot._fast_decode is not None - and isinstance(iprot.trans, TTransport.CReadableTransport) - and self.thrift_spec is not None - ): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -2151,11 +1614,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = ( - iprot.readString().decode("utf-8") - if sys.version_info[0] == 2 - else iprot.readString() - ) + self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: @@ -2165,16 +1624,12 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write( - oprot._fast_encode(self, [self.__class__, self.thrift_spec]) - ) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin("conflictException") + oprot.writeStructBegin('conflictException') if self.Reason is not None: - oprot.writeFieldBegin("Reason", TType.STRING, 1) - oprot.writeString( - self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason - ) + oprot.writeFieldBegin('Reason', TType.STRING, 1) + oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2186,552 +1641,149 @@ def __str__(self): return repr(self) def __repr__(self): - L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] - return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) - - all_structs.append(Backend) Backend.thrift_spec = ( None, # 0 - ( - 1, - TType.I64, - "id", - None, - None, - ), # 1 - ( - 2, - TType.STRING, - "owner", - "UTF8", - None, - ), # 2 - ( - 3, - TType.STRING, - "location_url", - "UTF8", - None, - ), # 3 - ( - 4, - TType.STRING, - "template", - "UTF8", - None, - ), # 4 - ( - 5, - TType.STRING, - "template_version", - "UTF8", - None, - ), # 5 + (1, TType.I64, 'id', None, None, ), # 1 + (2, TType.STRING, 'owner', 'UTF8', None, ), # 2 + (3, TType.STRING, 'location_url', 'UTF8', None, ), # 3 + (4, TType.STRING, 'template', 'UTF8', None, ), # 4 + (5, TType.STRING, 'template_version', 'UTF8', None, ), # 5 ) all_structs.append(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 + (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 ) 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, - "openstack_id", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "description", - "UTF8", - None, - ), # 6 - ( - 7, - TType.LIST, - "tags", - (TType.STRING, "UTF8", False), - None, - ), # 7 - ( - 8, - TType.I32, - "ephemeral_disk", - None, - None, - ), # 8 + (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, 'openstack_id', 'UTF8', None, ), # 5 + (6, TType.STRING, 'description', 'UTF8', None, ), # 6 + (7, TType.LIST, 'tags', (TType.STRING, 'UTF8', False), None, ), # 7 + (8, TType.I32, 'ephemeral_disk', None, None, ), # 8 ) 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, - "tag", - (TType.STRING, "UTF8", False), - None, - ), # 9 - ( - 10, - TType.BOOL, - "is_snapshot", - None, - None, - ), # 10 + (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, 'tag', (TType.STRING, 'UTF8', False), None, ), # 9 + (10, TType.BOOL, 'is_snapshot', None, None, ), # 10 ) all_structs.append(VM) VM.thrift_spec = ( None, # 0 - ( - 1, - TType.STRUCT, - "flav", - [Flavor, None], - None, - ), # 1 - ( - 2, - TType.STRUCT, - "img", - [Image, None], - None, - ), # 2 - ( - 3, - TType.STRING, - "status", - "UTF8", - None, - ), # 3 - ( - 4, - TType.MAP, - "metadata", - (TType.STRING, "UTF8", TType.STRING, "UTF8", False), - None, - ), # 4 - ( - 5, - TType.STRING, - "project_id", - "UTF8", - None, - ), # 5 - ( - 6, - TType.STRING, - "keyname", - "UTF8", - None, - ), # 6 - ( - 7, - TType.STRING, - "openstack_id", - "UTF8", - None, - ), # 7 - ( - 8, - TType.STRING, - "name", - "UTF8", - None, - ), # 8 - ( - 9, - TType.STRING, - "created_at", - "UTF8", - None, - ), # 9 - ( - 10, - TType.STRING, - "floating_ip", - "UTF8", - None, - ), # 10 - ( - 11, - TType.STRING, - "fixed_ip", - "UTF8", - None, - ), # 11 - ( - 12, - TType.I32, - "diskspace", - None, - None, - ), # 12 - ( - 13, - TType.STRING, - "volume_id", - "UTF8", - None, - ), # 13 + (1, TType.STRUCT, 'flav', [Flavor, None], None, ), # 1 + (2, TType.STRUCT, 'img', [Image, None], None, ), # 2 + (3, TType.STRING, 'status', 'UTF8', None, ), # 3 + (4, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 + (5, TType.STRING, 'project_id', 'UTF8', None, ), # 5 + (6, TType.STRING, 'keyname', 'UTF8', None, ), # 6 + (7, TType.STRING, 'openstack_id', 'UTF8', None, ), # 7 + (8, TType.STRING, 'name', 'UTF8', None, ), # 8 + (9, TType.STRING, 'created_at', 'UTF8', None, ), # 9 + (10, TType.STRING, 'floating_ip', 'UTF8', None, ), # 10 + (11, TType.STRING, 'fixed_ip', 'UTF8', None, ), # 11 + (12, TType.I32, 'diskspace', None, None, ), # 12 + (13, TType.STRING, 'volume_id', 'UTF8', None, ), # 13 ) 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(otherException) otherException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) all_structs.append(ressourceException) ressourceException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) all_structs.append(nameException) nameException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) all_structs.append(serverNotFoundException) serverNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) all_structs.append(networkNotFoundException) networkNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) all_structs.append(imageNotFoundException) imageNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) all_structs.append(flavorNotFoundException) flavorNotFoundException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) all_structs.append(authenticationException) authenticationException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) all_structs.append(conflictException) conflictException.thrift_spec = ( None, # 0 - ( - 1, - TType.STRING, - "Reason", - "UTF8", - None, - ), # 1 + (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 ) fix_spec(all_structs) del all_structs From d4590578df8572104c2b67615e770a0a78213984 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Jan 2021 15:28:19 +0000 Subject: [PATCH 09/14] fix(Linting):blacked code --- VirtualMachineService/ResenvMetadata.py | 14 +- .../VirtualMachineHandler.py | 67 +- .../VirtualMachineService.py | 9433 +++++++++++++---- VirtualMachineService/__init__.py | 2 +- VirtualMachineService/ancon/Playbook.py | 10 +- VirtualMachineService/constants.py | 9 +- VirtualMachineService/ttypes.py | 1752 ++- 7 files changed, 8493 insertions(+), 2794 deletions(-) diff --git a/VirtualMachineService/ResenvMetadata.py b/VirtualMachineService/ResenvMetadata.py index 78227d3e..7f4329a2 100644 --- a/VirtualMachineService/ResenvMetadata.py +++ b/VirtualMachineService/ResenvMetadata.py @@ -1,5 +1,15 @@ class ResenvMetadata: - def __init__(self, name, port_range_max, port_range_min, security_group_name, security_group_description, security_group_ssh, direction, protocol): + def __init__( + self, + name, + port_range_max, + port_range_min, + security_group_name, + security_group_description, + security_group_ssh, + direction, + protocol, + ): self.name = name self.port_range_max = port_range_max self.port_range_min = port_range_min @@ -7,4 +17,4 @@ def __init__(self, name, port_range_max, port_range_min, security_group_name, se self.security_group_description = security_group_description self.security_group_ssh = security_group_ssh self.direction = direction - self.protocol = protocol \ No newline at end of file + self.protocol = protocol diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 86fef3e9..0bdcd11a 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -111,7 +111,6 @@ class VirtualMachineHandler(Iface): ALL_TEMPLATES = ALL_TEMPLATES loaded_resenv_metadata = {} - def keyboard_interrupt_handler_playbooks(self): global active_playbooks for k, v in active_playbooks.items(): @@ -960,9 +959,12 @@ def prepare_security_groups_new_server(self, resenv, servername, http, https): ).name ) else: - LOG.info("Failure to load metadata of reasearch enviroment: " + research_enviroment) + LOG.info( + "Failure to load metadata of reasearch enviroment: " + + research_enviroment + ) - #TODO: remove if JUPYTERNOTEBOOK is no longer used, as it appears + # TODO: remove if JUPYTERNOTEBOOK is no longer used, as it appears if JUPYTERNOTEBOOK in resenv: custom_security_groups.append( self.create_security_group( @@ -1214,7 +1216,7 @@ def create_and_deploy_playbook( osi_private_key=key, public_key=public_key, pool=self.pool, - loaded_metadata=self.loaded_resenv_metadata + loaded_metadata=self.loaded_resenv_metadata, ) self.redis.hset(openstack_id, "status", self.BUILD_PLAYBOOK) playbook.run_it() @@ -1537,7 +1539,10 @@ def cross_check_templates(self, templates): if template_name not in self.ALL_TEMPLATES: ALL_TEMPLATES.append(template_name) else: - LOG.info("Failed to find supporting FORC file for " + str(template_name)) + LOG.info( + "Failed to find supporting FORC file for " + + str(template_name) + ) else: templates_metada.append(str(loaded_metadata)) if template_name not in self.ALL_TEMPLATES: @@ -1545,9 +1550,7 @@ def cross_check_templates(self, templates): except Exception as e: LOG.exception( - "Failed to parse Metadata yml: " - + file + "\n" - + str(e) + "Failed to parse Metadata yml: " + file + "\n" + str(e) ) LOG.info("Plays DEBUG: Values of metadata: " + str(templates_metada)) return templates_metada @@ -1569,7 +1572,7 @@ def get_templates(self): except Timeout as e: LOG.info(msg="get_templates timed out. {0}".format(e)) - #Todo test this method + # Todo test this method def get_allowed_templates(self): get_url = "{0}templates/".format(self.RE_BACKEND_URL) try: @@ -2616,7 +2619,11 @@ def create_security_group( ) for research_enviroment in resenv: if research_enviroment in self.loaded_resenv_metadata: - LOG.info("Add " + research_enviroment + " rule to security group {}".format(name)) + LOG.info( + "Add " + + research_enviroment + + " rule to security group {}".format(name) + ) resenv_metadata = self.loaded_resenv_metadata[research_enviroment] self.conn.network.create_security_group_rule( direction=resenv_metadata.direction, @@ -2626,10 +2633,13 @@ def create_security_group( security_group_id=new_security_group["id"], ) else: - #Todo add mail for this logging as this should not happen - LOG.info("Warning: Could not find metadata for research enviroment: " + research_enviroment) + # Todo add mail for this logging as this should not happen + LOG.info( + "Warning: Could not find metadata for research enviroment: " + + research_enviroment + ) - #Todo: remove Jupyter reference, if not needed + # Todo: remove Jupyter reference, if not needed if JUPYTERNOTEBOOK in resenv: LOG.info("Add jupyternotebook rule to security group {}".format(name)) @@ -2676,7 +2686,7 @@ def update_playbooks(self): LOG.info("STARTED update") r = req.get(GITHUB_PLAYBOOKS_REPO) contents = json.loads(r.content) - #Todo maybe clone entire direcotry + # Todo maybe clone entire direcotry for f in contents: if f["name"] != "LICENSE": LOG.info("started download of" + f["name"]) @@ -2689,14 +2699,16 @@ def update_playbooks(self): templates_metadata = self.load_resenv_metadata() for template_metadata in templates_metadata: try: - metadata = ResenvMetadata(template_metadata[TEMPLATE_NAME], - template_metadata[PORT_RANGE_MAX], - template_metadata[PORT_RANGE_MIN], - template_metadata[SECURITYGROUP_NAME], - template_metadata[SECURITYGROUP_DESCRIPTION], - template_metadata[SECURITYGROUP_SSH], - template_metadata[DIRECTION], - template_metadata[PROTOCOL]) + metadata = ResenvMetadata( + template_metadata[TEMPLATE_NAME], + template_metadata[PORT_RANGE_MAX], + template_metadata[PORT_RANGE_MIN], + template_metadata[SECURITYGROUP_NAME], + template_metadata[SECURITYGROUP_DESCRIPTION], + template_metadata[SECURITYGROUP_SSH], + template_metadata[DIRECTION], + template_metadata[PROTOCOL], + ) if metadata not in self.loaded_resenv_metadata.keys(): self.loaded_resenv_metadata[metadata.name] = metadata else: @@ -2706,13 +2718,14 @@ def update_playbooks(self): except Exception as e: LOG.exception( "Failed to parse Metadata yml: " - + str(template_metadata) + "\n" + + str(template_metadata) + + "\n" + str(e) ) def load_resenv_metadata(self): for file in os.listdir(PLAYBOOKS_DIR): - templates_metada= [] + templates_metada = [] if "_metadata.yml" in file: with open(PLAYBOOKS_DIR + file) as template_metadata: try: @@ -2726,8 +2739,6 @@ def load_resenv_metadata(self): ALL_TEMPLATES.append(template_name) except Exception as e: LOG.exception( - "Failed to parse Metadata yml: " - + file + "\n" - + str(e) + "Failed to parse Metadata yml: " + file + "\n" + str(e) ) - return templates_metada \ No newline at end of file + return templates_metada diff --git a/VirtualMachineService/VirtualMachineService.py b/VirtualMachineService/VirtualMachineService.py index 6e922583..2e1d0a48 100644 --- a/VirtualMachineService/VirtualMachineService.py +++ b/VirtualMachineService/VirtualMachineService.py @@ -6,7 +6,13 @@ # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.Thrift import ( + TType, + TMessageType, + TFrozenDict, + TException, + TApplicationException, +) from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec @@ -15,6 +21,7 @@ from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport + all_structs = [] @@ -23,6 +30,7 @@ class Iface(object): This VirtualMachiine service deploys methods for creating,deleting,stopping etc. VirtualMachines in Openstack. """ + def check_Version(self, version): """ Parameters: @@ -192,7 +200,9 @@ def add_floating_ip_to_server(self, openstack_id, network): """ pass - def create_connection(self, username, password, auth_url, user_domain_name, project_domain_name): + def create_connection( + self, username, password, auth_url, user_domain_name, project_domain_name + ): """ Create connection to OpenStack. Connection instance @@ -210,7 +220,19 @@ def create_connection(self, username, password, auth_url, user_domain_name, proj """ pass - def start_server_without_playbook(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): + def start_server_without_playbook( + self, + flavor, + image, + public_key, + servername, + metadata, + https, + http, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): """ Parameters: - flavor: Name of the Flavor to use. @@ -239,7 +261,19 @@ def detach_ip_from_server(self, server_id, floating_ip): """ pass - def start_server_with_mounted_volume(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): + def start_server_with_mounted_volume( + self, + flavor, + image, + public_key, + servername, + metadata, + https, + http, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): """ Parameters: - flavor: Name of the Flavor to use. @@ -256,7 +290,19 @@ def start_server_with_mounted_volume(self, flavor, image, public_key, servername """ pass - def start_server(self, flavor, image, public_key, servername, metadata, diskspace, volumename, https, http, resenv): + def start_server( + self, + flavor, + image, + public_key, + servername, + metadata, + diskspace, + volumename, + https, + http, + resenv, + ): """ Start a new server. @@ -275,7 +321,18 @@ def start_server(self, flavor, image, public_key, servername, metadata, diskspac """ pass - def start_server_with_custom_key(self, flavor, image, servername, metadata, http, https, resenv, volume_ids_path_new, volume_ids_path_attach): + def start_server_with_custom_key( + self, + flavor, + image, + servername, + metadata, + http, + https, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): """ Start a new server with custom key for ansible. @@ -303,7 +360,9 @@ def exist_server(self, name): """ pass - def create_and_deploy_playbook(self, public_key, playbooks_information, openstack_id): + def create_and_deploy_playbook( + self, public_key, playbooks_information, openstack_id + ): """ Create and deploy an anaconda ansible playbook @@ -500,7 +559,9 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): """ pass - def scale_up_cluster(self, cluster_id, image, flavor, count, names, start_idx, batch_idx): + def scale_up_cluster( + self, cluster_id, image, flavor, count, names, start_idx, batch_idx + ): """ Parameters: - cluster_id @@ -708,6 +769,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: @@ -724,7 +786,7 @@ def check_Version(self, version): return self.recv_check_Version() def send_check_Version(self, version): - self._oprot.writeMessageBegin('check_Version', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("check_Version", TMessageType.CALL, self._seqid) args = check_Version_args() args.version = version args.write(self._oprot) @@ -744,7 +806,9 @@ def recv_check_Version(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "check_Version failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "check_Version failed: unknown result" + ) def get_client_version(self): """ @@ -756,7 +820,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() @@ -775,7 +841,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): """ @@ -786,7 +855,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() @@ -805,14 +874,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_formulars(self): self.send_get_calculation_formulars() return self.recv_get_calculation_formulars() def send_get_calculation_formulars(self): - self._oprot.writeMessageBegin('get_calculation_formulars', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_calculation_formulars", TMessageType.CALL, self._seqid + ) args = get_calculation_formulars_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -831,7 +905,10 @@ def recv_get_calculation_formulars(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_calculation_formulars failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_calculation_formulars failed: unknown result", + ) def import_keypair(self, keyname, public_key): """ @@ -847,7 +924,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 @@ -868,7 +945,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): """ @@ -883,7 +963,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) @@ -903,7 +983,9 @@ def recv_get_vm_ports(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result" + ) def get_Flavors(self): """ @@ -915,7 +997,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() @@ -934,7 +1016,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): """ @@ -946,7 +1030,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() @@ -965,7 +1049,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): """ @@ -977,7 +1063,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() @@ -996,7 +1084,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): """ @@ -1008,7 +1099,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() @@ -1027,7 +1120,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_with_Tag(self, openstack_id): """ @@ -1042,7 +1138,9 @@ def get_Image_with_Tag(self, openstack_id): return self.recv_get_Image_with_Tag() def send_get_Image_with_Tag(self, openstack_id): - self._oprot.writeMessageBegin('get_Image_with_Tag', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_Image_with_Tag", TMessageType.CALL, self._seqid + ) args = get_Image_with_Tag_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -1062,7 +1160,10 @@ def recv_get_Image_with_Tag(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_Image_with_Tag failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_Image_with_Tag failed: unknown result", + ) def get_Images_by_filter(self, filter_json): """ @@ -1077,7 +1178,9 @@ def get_Images_by_filter(self, filter_json): return self.recv_get_Images_by_filter() def send_get_Images_by_filter(self, filter_json): - self._oprot.writeMessageBegin('get_Images_by_filter', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_Images_by_filter", TMessageType.CALL, self._seqid + ) args = get_Images_by_filter_args() args.filter_json = filter_json args.write(self._oprot) @@ -1097,7 +1200,10 @@ def recv_get_Images_by_filter(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_Images_by_filter failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_Images_by_filter failed: unknown result", + ) def get_volume(self, volume_id): """ @@ -1109,7 +1215,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) @@ -1129,7 +1235,9 @@ def recv_get_volume(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -1141,7 +1249,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) @@ -1161,7 +1271,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): """ @@ -1174,7 +1287,7 @@ def resize_volume(self, volume_id, size): return 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 @@ -1195,7 +1308,9 @@ def recv_resize_volume(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "resize_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "resize_volume failed: unknown result" + ) def delete_server(self, openstack_id): """ @@ -1210,7 +1325,7 @@ def delete_server(self, openstack_id): return 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) @@ -1234,7 +1349,9 @@ def recv_delete_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "delete_server failed: unknown result" + ) def add_metadata_to_server(self, servername, metadata): """ @@ -1247,7 +1364,9 @@ def add_metadata_to_server(self, servername, metadata): return self.recv_add_metadata_to_server() def send_add_metadata_to_server(self, servername, 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.servername = servername args.metadata = metadata @@ -1270,7 +1389,10 @@ def recv_add_metadata_to_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_metadata_to_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_metadata_to_server failed: unknown result", + ) def delete_metadata_from_server(self, servername, keys): """ @@ -1283,7 +1405,9 @@ def delete_metadata_from_server(self, servername, keys): return self.recv_delete_metadata_from_server() def send_delete_metadata_from_server(self, servername, keys): - self._oprot.writeMessageBegin('delete_metadata_from_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_metadata_from_server", TMessageType.CALL, self._seqid + ) args = delete_metadata_from_server_args() args.servername = servername args.keys = keys @@ -1306,7 +1430,10 @@ def recv_delete_metadata_from_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_metadata_from_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "delete_metadata_from_server failed: unknown result", + ) def add_floating_ip_to_server(self, openstack_id, network): """ @@ -1322,7 +1449,9 @@ def add_floating_ip_to_server(self, openstack_id, network): return self.recv_add_floating_ip_to_server() def send_add_floating_ip_to_server(self, openstack_id, network): - self._oprot.writeMessageBegin('add_floating_ip_to_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "add_floating_ip_to_server", TMessageType.CALL, self._seqid + ) args = add_floating_ip_to_server_args() args.openstack_id = openstack_id args.network = network @@ -1347,9 +1476,14 @@ def recv_add_floating_ip_to_server(self): raise result.e if result.f is not None: raise result.f - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_floating_ip_to_server failed: unknown result") - - def create_connection(self, username, password, auth_url, user_domain_name, project_domain_name): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_floating_ip_to_server failed: unknown result", + ) + + def create_connection( + self, username, password, auth_url, user_domain_name, project_domain_name + ): """ Create connection to OpenStack. Connection instance @@ -1365,11 +1499,17 @@ def create_connection(self, username, password, auth_url, user_domain_name, proj - project_domain_name: Project domain name of OpenStack """ - self.send_create_connection(username, password, auth_url, user_domain_name, project_domain_name) + self.send_create_connection( + username, password, auth_url, user_domain_name, project_domain_name + ) return self.recv_create_connection() - def send_create_connection(self, username, password, auth_url, user_domain_name, project_domain_name): - self._oprot.writeMessageBegin('create_connection', TMessageType.CALL, self._seqid) + def send_create_connection( + self, username, password, auth_url, user_domain_name, project_domain_name + ): + self._oprot.writeMessageBegin( + "create_connection", TMessageType.CALL, self._seqid + ) args = create_connection_args() args.username = username args.password = password @@ -1395,9 +1535,24 @@ def recv_create_connection(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_connection failed: unknown result") - - def start_server_without_playbook(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_connection failed: unknown result", + ) + + def start_server_without_playbook( + self, + flavor, + image, + public_key, + servername, + metadata, + https, + http, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): """ Parameters: - flavor: Name of the Flavor to use. @@ -1412,11 +1567,36 @@ def start_server_without_playbook(self, flavor, image, public_key, servername, m - volume_ids_path_attach """ - self.send_start_server_without_playbook(flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach) + self.send_start_server_without_playbook( + flavor, + image, + public_key, + servername, + metadata, + https, + http, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ) return self.recv_start_server_without_playbook() - def send_start_server_without_playbook(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): - self._oprot.writeMessageBegin('start_server_without_playbook', TMessageType.CALL, self._seqid) + def send_start_server_without_playbook( + self, + flavor, + image, + public_key, + servername, + metadata, + https, + http, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): + self._oprot.writeMessageBegin( + "start_server_without_playbook", TMessageType.CALL, self._seqid + ) args = start_server_without_playbook_args() args.flavor = flavor args.image = image @@ -1459,14 +1639,19 @@ def recv_start_server_without_playbook(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_without_playbook failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "start_server_without_playbook failed: unknown result", + ) def bibigrid_available(self): self.send_bibigrid_available() return self.recv_bibigrid_available() def send_bibigrid_available(self): - self._oprot.writeMessageBegin('bibigrid_available', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "bibigrid_available", TMessageType.CALL, self._seqid + ) args = bibigrid_available_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1485,7 +1670,10 @@ def recv_bibigrid_available(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "bibigrid_available failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "bibigrid_available failed: unknown result", + ) def detach_ip_from_server(self, server_id, floating_ip): """ @@ -1498,7 +1686,9 @@ def detach_ip_from_server(self, server_id, floating_ip): return 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 @@ -1519,9 +1709,24 @@ def recv_detach_ip_from_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "detach_ip_from_server failed: unknown result") - - def start_server_with_mounted_volume(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "detach_ip_from_server failed: unknown result", + ) + + def start_server_with_mounted_volume( + self, + flavor, + image, + public_key, + servername, + metadata, + https, + http, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): """ Parameters: - flavor: Name of the Flavor to use. @@ -1536,11 +1741,36 @@ def start_server_with_mounted_volume(self, flavor, image, public_key, servername - volume_ids_path_attach """ - self.send_start_server_with_mounted_volume(flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach) + self.send_start_server_with_mounted_volume( + flavor, + image, + public_key, + servername, + metadata, + https, + http, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ) return self.recv_start_server_with_mounted_volume() - def send_start_server_with_mounted_volume(self, flavor, image, public_key, servername, metadata, https, http, resenv, volume_ids_path_new, volume_ids_path_attach): - self._oprot.writeMessageBegin('start_server_with_mounted_volume', TMessageType.CALL, self._seqid) + def send_start_server_with_mounted_volume( + self, + flavor, + image, + public_key, + servername, + metadata, + https, + http, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): + self._oprot.writeMessageBegin( + "start_server_with_mounted_volume", TMessageType.CALL, self._seqid + ) args = start_server_with_mounted_volume_args() args.flavor = flavor args.image = image @@ -1583,9 +1813,24 @@ def recv_start_server_with_mounted_volume(self): raise result.f if result.o is not None: raise result.o - raise TApplicationException(TApplicationException.MISSING_RESULT, "start_server_with_mounted_volume failed: unknown result") - - def start_server(self, flavor, image, public_key, servername, metadata, diskspace, volumename, https, http, resenv): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "start_server_with_mounted_volume failed: unknown result", + ) + + def start_server( + self, + flavor, + image, + public_key, + servername, + metadata, + diskspace, + volumename, + https, + http, + resenv, + ): """ Start a new server. @@ -1602,11 +1847,34 @@ def start_server(self, flavor, image, public_key, servername, metadata, diskspac - resenv """ - self.send_start_server(flavor, image, public_key, servername, metadata, diskspace, volumename, https, http, resenv) + self.send_start_server( + flavor, + image, + public_key, + servername, + metadata, + diskspace, + volumename, + https, + http, + resenv, + ) return self.recv_start_server() - def send_start_server(self, flavor, image, public_key, servername, metadata, diskspace, volumename, https, http, resenv): - self._oprot.writeMessageBegin('start_server', TMessageType.CALL, self._seqid) + def send_start_server( + self, + flavor, + image, + public_key, + servername, + metadata, + diskspace, + volumename, + https, + http, + resenv, + ): + self._oprot.writeMessageBegin("start_server", TMessageType.CALL, self._seqid) args = start_server_args() args.flavor = flavor args.image = image @@ -1649,9 +1917,22 @@ 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") - - def start_server_with_custom_key(self, flavor, image, servername, metadata, http, https, resenv, volume_ids_path_new, volume_ids_path_attach): + raise TApplicationException( + TApplicationException.MISSING_RESULT, "start_server failed: unknown result" + ) + + def start_server_with_custom_key( + self, + flavor, + image, + servername, + metadata, + http, + https, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): """ Start a new server with custom key for ansible. @@ -1667,11 +1948,34 @@ def start_server_with_custom_key(self, flavor, image, servername, metadata, http - volume_ids_path_attach """ - self.send_start_server_with_custom_key(flavor, image, servername, metadata, http, https, resenv, volume_ids_path_new, volume_ids_path_attach) + self.send_start_server_with_custom_key( + flavor, + image, + servername, + metadata, + http, + https, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ) return self.recv_start_server_with_custom_key() - def send_start_server_with_custom_key(self, flavor, image, servername, metadata, http, https, resenv, volume_ids_path_new, volume_ids_path_attach): - self._oprot.writeMessageBegin('start_server_with_custom_key', TMessageType.CALL, self._seqid) + def send_start_server_with_custom_key( + self, + flavor, + image, + servername, + metadata, + http, + https, + resenv, + volume_ids_path_new, + volume_ids_path_attach, + ): + self._oprot.writeMessageBegin( + "start_server_with_custom_key", TMessageType.CALL, self._seqid + ) args = start_server_with_custom_key_args() args.flavor = flavor args.image = image @@ -1713,7 +2017,10 @@ def recv_start_server_with_custom_key(self): raise result.f if result.o is not None: raise result.o - 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): """ @@ -1727,7 +2034,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) @@ -1747,9 +2054,13 @@ def recv_exist_server(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "exist_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "exist_server failed: unknown result" + ) - def create_and_deploy_playbook(self, public_key, playbooks_information, openstack_id): + def create_and_deploy_playbook( + self, public_key, playbooks_information, openstack_id + ): """ Create and deploy an anaconda ansible playbook @@ -1759,11 +2070,17 @@ def create_and_deploy_playbook(self, public_key, playbooks_information, openstac - openstack_id """ - self.send_create_and_deploy_playbook(public_key, playbooks_information, openstack_id) + self.send_create_and_deploy_playbook( + public_key, playbooks_information, openstack_id + ) return self.recv_create_and_deploy_playbook() - def send_create_and_deploy_playbook(self, public_key, playbooks_information, openstack_id): - self._oprot.writeMessageBegin('create_and_deploy_playbook', TMessageType.CALL, self._seqid) + def send_create_and_deploy_playbook( + self, public_key, playbooks_information, openstack_id + ): + self._oprot.writeMessageBegin( + "create_and_deploy_playbook", TMessageType.CALL, self._seqid + ) args = create_and_deploy_playbook_args() args.public_key = public_key args.playbooks_information = playbooks_information @@ -1785,7 +2102,10 @@ def recv_create_and_deploy_playbook(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -1799,7 +2119,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) @@ -1819,7 +2141,10 @@ def recv_get_playbook_logs(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -1830,7 +2155,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() @@ -1849,14 +2174,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() @@ -1875,7 +2202,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, elixir_id, user_key_url, template, upstream_url): """ @@ -1892,7 +2221,7 @@ def create_backend(self, elixir_id, user_key_url, template, upstream_url): return self.recv_create_backend() def send_create_backend(self, elixir_id, user_key_url, 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.elixir_id = elixir_id args.user_key_url = user_key_url @@ -1915,7 +2244,10 @@ def recv_create_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "create_backend failed: unknown result", + ) def get_backends(self): """ @@ -1926,7 +2258,7 @@ def get_backends(self): return self.recv_get_backends() def send_get_backends(self): - self._oprot.writeMessageBegin('get_backends', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_backends", TMessageType.CALL, self._seqid) args = get_backends_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1945,7 +2277,9 @@ def recv_get_backends(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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, elixir_id): """ @@ -1959,7 +2293,9 @@ def get_backends_by_owner(self, elixir_id): return self.recv_get_backends_by_owner() def send_get_backends_by_owner(self, elixir_id): - 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.elixir_id = elixir_id args.write(self._oprot) @@ -1979,7 +2315,10 @@ def recv_get_backends_by_owner(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -1993,7 +2332,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) @@ -2013,7 +2354,10 @@ def recv_get_backends_by_template(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2027,7 +2371,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) @@ -2047,7 +2393,10 @@ def recv_get_backend_by_id(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_backend_by_id failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_backend_by_id failed: unknown result", + ) def delete_backend(self, id): """ @@ -2061,7 +2410,7 @@ def delete_backend(self, id): return 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) @@ -2081,7 +2430,10 @@ def recv_delete_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_backend failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "delete_backend failed: unknown result", + ) def add_user_to_backend(self, backend_id, owner_id, user_id): """ @@ -2097,7 +2449,9 @@ def add_user_to_backend(self, backend_id, owner_id, user_id): return self.recv_add_user_to_backend() def send_add_user_to_backend(self, backend_id, owner_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.owner_id = owner_id @@ -2119,7 +2473,10 @@ def recv_add_user_to_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2133,7 +2490,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) @@ -2153,7 +2512,10 @@ def recv_get_users_from_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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, owner_id, user_id): """ @@ -2169,7 +2531,9 @@ def delete_user_from_backend(self, backend_id, owner_id, user_id): return self.recv_delete_user_from_backend() def send_delete_user_from_backend(self, backend_id, owner_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.owner_id = owner_id @@ -2191,14 +2555,17 @@ def recv_delete_user_from_backend(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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_templates(self): self.send_get_templates() return self.recv_get_templates() def send_get_templates(self): - self._oprot.writeMessageBegin('get_templates', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("get_templates", TMessageType.CALL, self._seqid) args = get_templates_args() args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2217,14 +2584,18 @@ def recv_get_templates(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_templates failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_templates 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() @@ -2243,7 +2614,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_templates_by_template(self, template_name): """ @@ -2255,7 +2629,9 @@ def get_templates_by_template(self, template_name): return self.recv_get_templates_by_template() def send_get_templates_by_template(self, template_name): - self._oprot.writeMessageBegin('get_templates_by_template', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "get_templates_by_template", TMessageType.CALL, self._seqid + ) args = get_templates_by_template_args() args.template_name = template_name args.write(self._oprot) @@ -2275,7 +2651,10 @@ def recv_get_templates_by_template(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_templates_by_template failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_templates_by_template failed: unknown result", + ) def check_template(self, template_name, template_version): """ @@ -2288,7 +2667,7 @@ def check_template(self, template_name, template_version): return self.recv_check_template() def send_check_template(self, template_name, template_version): - self._oprot.writeMessageBegin('check_template', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("check_template", TMessageType.CALL, self._seqid) args = check_template_args() args.template_name = template_name args.template_version = template_version @@ -2309,7 +2688,10 @@ def recv_check_template(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "check_template failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "check_template failed: unknown result", + ) def add_udp_security_group(self, server_id): """ @@ -2323,7 +2705,9 @@ def add_udp_security_group(self, server_id): return 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) @@ -2347,7 +2731,10 @@ def recv_add_udp_security_group(self): raise result.r if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_udp_security_group failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "add_udp_security_group failed: unknown result", + ) def get_servers(self): """ @@ -2359,7 +2746,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() @@ -2378,7 +2765,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): """ @@ -2393,7 +2782,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) @@ -2413,7 +2804,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 check_server_task_state(self, openstack_id): """ @@ -2425,7 +2819,9 @@ def check_server_task_state(self, openstack_id): return self.recv_check_server_task_state() def send_check_server_task_state(self, openstack_id): - self._oprot.writeMessageBegin('check_server_task_state', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "check_server_task_state", TMessageType.CALL, self._seqid + ) args = check_server_task_state_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -2445,7 +2841,10 @@ def recv_check_server_task_state(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "check_server_task_state failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "check_server_task_state failed: unknown result", + ) def get_servers_by_bibigrid_id(self, bibigrid_id): """ @@ -2460,7 +2859,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) @@ -2480,9 +2881,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") - - def scale_up_cluster(self, cluster_id, image, flavor, count, names, start_idx, batch_idx): + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_servers_by_bibigrid_id failed: unknown result", + ) + + def scale_up_cluster( + self, cluster_id, image, flavor, count, names, start_idx, batch_idx + ): """ Parameters: - cluster_id @@ -2494,11 +2900,17 @@ def scale_up_cluster(self, cluster_id, image, flavor, count, names, start_idx, b - batch_idx """ - self.send_scale_up_cluster(cluster_id, image, flavor, count, names, start_idx, batch_idx) + self.send_scale_up_cluster( + cluster_id, image, flavor, count, names, start_idx, batch_idx + ) return self.recv_scale_up_cluster() - def send_scale_up_cluster(self, cluster_id, image, flavor, 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, flavor, 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 = image @@ -2524,7 +2936,10 @@ def recv_scale_up_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "scale_up_cluster failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "scale_up_cluster failed: unknown result", + ) def get_cluster_info(self, cluster_id): """ @@ -2536,7 +2951,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) @@ -2556,7 +2973,10 @@ def recv_get_cluster_info(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2568,7 +2988,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) @@ -2588,7 +3010,10 @@ def recv_get_cluster_status(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_cluster_status failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "get_cluster_status failed: unknown result", + ) def get_server(self, openstack_id): """ @@ -2603,7 +3028,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) @@ -2625,7 +3050,9 @@ def recv_get_server(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_server failed: unknown result" + ) def stop_server(self, openstack_id): """ @@ -2640,7 +3067,7 @@ def stop_server(self, openstack_id): return 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) @@ -2664,7 +3091,9 @@ def recv_stop_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "stop_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "stop_server failed: unknown result" + ) def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description): """ @@ -2683,8 +3112,10 @@ def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description) self.send_create_snapshot(openstack_id, name, elixir_id, base_tags, description) return self.recv_create_snapshot() - def send_create_snapshot(self, openstack_id, name, elixir_id, base_tags, description): - self._oprot.writeMessageBegin('create_snapshot', TMessageType.CALL, self._seqid) + def send_create_snapshot( + self, openstack_id, name, elixir_id, base_tags, description + ): + self._oprot.writeMessageBegin("create_snapshot", TMessageType.CALL, self._seqid) args = create_snapshot_args() args.openstack_id = openstack_id args.name = name @@ -2712,7 +3143,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): """ @@ -2726,7 +3160,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() @@ -2745,7 +3179,9 @@ def recv_get_limits(self): iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_limits failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "get_limits failed: unknown result" + ) def start_cluster(self, public_key, master_instance, worker_instance, user): """ @@ -2760,7 +3196,7 @@ def start_cluster(self, public_key, master_instance, worker_instance, user): return self.recv_start_cluster() def send_start_cluster(self, public_key, master_instance, worker_instance, user): - self._oprot.writeMessageBegin('start_cluster', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("start_cluster", TMessageType.CALL, self._seqid) args = start_cluster_args() args.public_key = public_key args.master_instance = master_instance @@ -2783,7 +3219,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): """ @@ -2795,7 +3233,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) @@ -2815,7 +3255,10 @@ def recv_terminate_cluster(self): iprot.readMessageEnd() if result.success is not None: return result.success - 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): """ @@ -2830,7 +3273,7 @@ def delete_image(self, image_id): return 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) @@ -2852,7 +3295,9 @@ def recv_delete_image(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_image failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "delete_image failed: unknown result" + ) def delete_volume_attachment(self, volume_id, server_id): """ @@ -2868,7 +3313,9 @@ def delete_volume_attachment(self, volume_id, server_id): return self.recv_delete_volume_attachment() def send_delete_volume_attachment(self, volume_id, server_id): - self._oprot.writeMessageBegin('delete_volume_attachment', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "delete_volume_attachment", TMessageType.CALL, self._seqid + ) args = delete_volume_attachment_args() args.volume_id = volume_id args.server_id = server_id @@ -2893,7 +3340,10 @@ def recv_delete_volume_attachment(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_volume_attachment failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "delete_volume_attachment failed: unknown result", + ) def delete_volume(self, volume_id): """ @@ -2908,7 +3358,7 @@ def delete_volume(self, volume_id): return 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) @@ -2930,7 +3380,9 @@ def recv_delete_volume(self): return result.success if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "delete_volume failed: unknown result" + ) def attach_volume_to_server(self, openstack_id, volume_id): """ @@ -2946,7 +3398,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 @@ -2971,7 +3425,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 check_server_status(self, openstack_id): """ @@ -2986,7 +3443,9 @@ def check_server_status(self, openstack_id): return self.recv_check_server_status() def send_check_server_status(self, openstack_id): - self._oprot.writeMessageBegin('check_server_status', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin( + "check_server_status", TMessageType.CALL, self._seqid + ) args = check_server_status_args() args.openstack_id = openstack_id args.write(self._oprot) @@ -3010,7 +3469,10 @@ def recv_check_server_status(self): raise result.e if result.r is not None: raise result.r - raise TApplicationException(TApplicationException.MISSING_RESULT, "check_server_status failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "check_server_status failed: unknown result", + ) def setUserPassword(self, user, password): """ @@ -3026,7 +3488,7 @@ def setUserPassword(self, user, password): return self.recv_setUserPassword() def send_setUserPassword(self, user, password): - self._oprot.writeMessageBegin('setUserPassword', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("setUserPassword", TMessageType.CALL, self._seqid) args = setUserPassword_args() args.user = user args.password = password @@ -3049,7 +3511,10 @@ def recv_setUserPassword(self): return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "setUserPassword failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, + "setUserPassword failed: unknown result", + ) def resume_server(self, openstack_id): """ @@ -3064,7 +3529,7 @@ def resume_server(self, openstack_id): return 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) @@ -3088,7 +3553,9 @@ def recv_resume_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "resume_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "resume_server failed: unknown result" + ) def create_volume(self, volume_name, volume_storage, metadata): """ @@ -3105,7 +3572,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 @@ -3129,7 +3596,9 @@ def recv_create_volume(self): return result.success if result.r is not None: raise result.r - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_volume failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "create_volume failed: unknown result" + ) def reboot_server(self, server_id, reboot_type): """ @@ -3145,7 +3614,7 @@ def reboot_server(self, server_id, reboot_type): return self.recv_reboot_server() def send_reboot_server(self, server_id, reboot_type): - self._oprot.writeMessageBegin('reboot_server', TMessageType.CALL, self._seqid) + self._oprot.writeMessageBegin("reboot_server", TMessageType.CALL, self._seqid) args = reboot_server_args() args.server_id = server_id args.reboot_type = reboot_type @@ -3170,7 +3639,9 @@ def recv_reboot_server(self): raise result.e if result.c is not None: raise result.c - raise TApplicationException(TApplicationException.MISSING_RESULT, "reboot_server failed: unknown result") + raise TApplicationException( + TApplicationException.MISSING_RESULT, "reboot_server failed: unknown result" + ) class Processor(Iface, TProcessor): @@ -3180,7 +3651,9 @@ def __init__(self, handler): self._processMap["check_Version"] = Processor.process_check_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_formulars"] = Processor.process_get_calculation_formulars + self._processMap[ + "get_calculation_formulars" + ] = Processor.process_get_calculation_formulars self._processMap["import_keypair"] = Processor.process_import_keypair self._processMap["get_vm_ports"] = Processor.process_get_vm_ports self._processMap["get_Flavors"] = Processor.process_get_Flavors @@ -3188,44 +3661,80 @@ def __init__(self, handler): self._processMap["get_public_Images"] = Processor.process_get_public_Images self._processMap["get_private_Images"] = Processor.process_get_private_Images self._processMap["get_Image_with_Tag"] = Processor.process_get_Image_with_Tag - self._processMap["get_Images_by_filter"] = Processor.process_get_Images_by_filter + self._processMap[ + "get_Images_by_filter" + ] = Processor.process_get_Images_by_filter 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["delete_server"] = Processor.process_delete_server - self._processMap["add_metadata_to_server"] = Processor.process_add_metadata_to_server - self._processMap["delete_metadata_from_server"] = Processor.process_delete_metadata_from_server - self._processMap["add_floating_ip_to_server"] = Processor.process_add_floating_ip_to_server + self._processMap[ + "add_metadata_to_server" + ] = Processor.process_add_metadata_to_server + self._processMap[ + "delete_metadata_from_server" + ] = Processor.process_delete_metadata_from_server + self._processMap[ + "add_floating_ip_to_server" + ] = Processor.process_add_floating_ip_to_server self._processMap["create_connection"] = Processor.process_create_connection - self._processMap["start_server_without_playbook"] = Processor.process_start_server_without_playbook + self._processMap[ + "start_server_without_playbook" + ] = Processor.process_start_server_without_playbook self._processMap["bibigrid_available"] = Processor.process_bibigrid_available - self._processMap["detach_ip_from_server"] = Processor.process_detach_ip_from_server - self._processMap["start_server_with_mounted_volume"] = Processor.process_start_server_with_mounted_volume + self._processMap[ + "detach_ip_from_server" + ] = Processor.process_detach_ip_from_server + self._processMap[ + "start_server_with_mounted_volume" + ] = Processor.process_start_server_with_mounted_volume self._processMap["start_server"] = Processor.process_start_server - self._processMap["start_server_with_custom_key"] = Processor.process_start_server_with_custom_key + self._processMap[ + "start_server_with_custom_key" + ] = Processor.process_start_server_with_custom_key self._processMap["exist_server"] = Processor.process_exist_server - self._processMap["create_and_deploy_playbook"] = Processor.process_create_and_deploy_playbook + self._processMap[ + "create_and_deploy_playbook" + ] = Processor.process_create_and_deploy_playbook self._processMap["get_playbook_logs"] = Processor.process_get_playbook_logs self._processMap["has_forc"] = Processor.process_has_forc self._processMap["get_forc_url"] = Processor.process_get_forc_url self._processMap["create_backend"] = Processor.process_create_backend self._processMap["get_backends"] = Processor.process_get_backends - self._processMap["get_backends_by_owner"] = Processor.process_get_backends_by_owner - self._processMap["get_backends_by_template"] = Processor.process_get_backends_by_template + self._processMap[ + "get_backends_by_owner" + ] = Processor.process_get_backends_by_owner + self._processMap[ + "get_backends_by_template" + ] = Processor.process_get_backends_by_template self._processMap["get_backend_by_id"] = Processor.process_get_backend_by_id self._processMap["delete_backend"] = Processor.process_delete_backend self._processMap["add_user_to_backend"] = Processor.process_add_user_to_backend - self._processMap["get_users_from_backend"] = Processor.process_get_users_from_backend - self._processMap["delete_user_from_backend"] = Processor.process_delete_user_from_backend + self._processMap[ + "get_users_from_backend" + ] = Processor.process_get_users_from_backend + self._processMap[ + "delete_user_from_backend" + ] = Processor.process_delete_user_from_backend self._processMap["get_templates"] = Processor.process_get_templates - self._processMap["get_allowed_templates"] = Processor.process_get_allowed_templates - self._processMap["get_templates_by_template"] = Processor.process_get_templates_by_template + self._processMap[ + "get_allowed_templates" + ] = Processor.process_get_allowed_templates + self._processMap[ + "get_templates_by_template" + ] = Processor.process_get_templates_by_template self._processMap["check_template"] = Processor.process_check_template - self._processMap["add_udp_security_group"] = Processor.process_add_udp_security_group + self._processMap[ + "add_udp_security_group" + ] = Processor.process_add_udp_security_group self._processMap["get_servers"] = Processor.process_get_servers self._processMap["get_servers_by_ids"] = Processor.process_get_servers_by_ids - self._processMap["check_server_task_state"] = Processor.process_check_server_task_state - self._processMap["get_servers_by_bibigrid_id"] = Processor.process_get_servers_by_bibigrid_id + self._processMap[ + "check_server_task_state" + ] = Processor.process_check_server_task_state + 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["get_cluster_info"] = Processor.process_get_cluster_info self._processMap["get_cluster_status"] = Processor.process_get_cluster_status @@ -3236,9 +3745,13 @@ def __init__(self, handler): self._processMap["start_cluster"] = Processor.process_start_cluster self._processMap["terminate_cluster"] = Processor.process_terminate_cluster self._processMap["delete_image"] = Processor.process_delete_image - self._processMap["delete_volume_attachment"] = Processor.process_delete_volume_attachment + self._processMap[ + "delete_volume_attachment" + ] = Processor.process_delete_volume_attachment 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["check_server_status"] = Processor.process_check_server_status self._processMap["setUserPassword"] = Processor.process_setUserPassword self._processMap["resume_server"] = Processor.process_resume_server @@ -3256,7 +3769,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() @@ -3277,13 +3792,15 @@ def process_check_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("check_Version", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3300,13 +3817,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() @@ -3323,13 +3842,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() @@ -3346,13 +3867,15 @@ def process_get_calculation_formulars(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_formulars", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3369,13 +3892,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() @@ -3392,13 +3917,15 @@ def process_get_vm_ports(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_vm_ports", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3415,13 +3942,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() @@ -3438,13 +3967,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() @@ -3461,13 +3992,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() @@ -3484,13 +4017,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() @@ -3507,13 +4042,15 @@ def process_get_Image_with_Tag(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_Image_with_Tag", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3530,13 +4067,15 @@ def process_get_Images_by_filter(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_by_filter", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3553,13 +4092,15 @@ def process_get_volume(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_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3576,13 +4117,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() @@ -3599,13 +4142,15 @@ def process_resize_volume(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("resize_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3628,13 +4173,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() @@ -3646,7 +4193,9 @@ def process_add_metadata_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_metadata_to_server_result() try: - result.success = self._handler.add_metadata_to_server(args.servername, args.metadata) + result.success = self._handler.add_metadata_to_server( + args.servername, args.metadata + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3654,13 +4203,15 @@ def process_add_metadata_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') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_metadata_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3672,7 +4223,9 @@ def process_delete_metadata_from_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_metadata_from_server_result() try: - result.success = self._handler.delete_metadata_from_server(args.servername, args.keys) + result.success = self._handler.delete_metadata_from_server( + args.servername, args.keys + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3680,13 +4233,15 @@ def process_delete_metadata_from_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("delete_metadata_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3698,7 +4253,9 @@ def process_add_floating_ip_to_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = add_floating_ip_to_server_result() try: - result.success = self._handler.add_floating_ip_to_server(args.openstack_id, args.network) + result.success = self._handler.add_floating_ip_to_server( + args.openstack_id, args.network + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3709,13 +4266,15 @@ def process_add_floating_ip_to_server(self, seqid, iprot, oprot): msg_type = TMessageType.REPLY result.f = f except TApplicationException as ex: - logging.exception('TApplication exception in handler') + logging.exception("TApplication exception in handler") msg_type = TMessageType.EXCEPTION result = ex except Exception: - logging.exception('Unexpected exception in handler') + logging.exception("Unexpected exception in handler") msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + result = TApplicationException( + TApplicationException.INTERNAL_ERROR, "Internal error" + ) oprot.writeMessageBegin("add_floating_ip_to_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3727,7 +4286,13 @@ def process_create_connection(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_connection_result() try: - result.success = self._handler.create_connection(args.username, args.password, args.auth_url, args.user_domain_name, args.project_domain_name) + result.success = self._handler.create_connection( + args.username, + args.password, + args.auth_url, + args.user_domain_name, + args.project_domain_name, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3735,13 +4300,15 @@ def process_create_connection(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("create_connection", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3753,7 +4320,18 @@ def process_start_server_without_playbook(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_without_playbook_result() try: - result.success = self._handler.start_server_without_playbook(args.flavor, args.image, args.public_key, args.servername, args.metadata, args.https, args.http, args.resenv, args.volume_ids_path_new, args.volume_ids_path_attach) + result.success = self._handler.start_server_without_playbook( + args.flavor, + args.image, + args.public_key, + args.servername, + args.metadata, + args.https, + args.http, + args.resenv, + args.volume_ids_path_new, + args.volume_ids_path_attach, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3779,13 +4357,15 @@ def process_start_server_without_playbook(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_without_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3802,13 +4382,15 @@ def process_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("bibigrid_available", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3820,18 +4402,22 @@ def process_detach_ip_from_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = detach_ip_from_server_result() try: - result.success = self._handler.detach_ip_from_server(args.server_id, args.floating_ip) + result.success = self._handler.detach_ip_from_server( + args.server_id, args.floating_ip + ) 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("detach_ip_from_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3843,7 +4429,18 @@ def process_start_server_with_mounted_volume(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_with_mounted_volume_result() try: - result.success = self._handler.start_server_with_mounted_volume(args.flavor, args.image, args.public_key, args.servername, args.metadata, args.https, args.http, args.resenv, args.volume_ids_path_new, args.volume_ids_path_attach) + result.success = self._handler.start_server_with_mounted_volume( + args.flavor, + args.image, + args.public_key, + args.servername, + args.metadata, + args.https, + args.http, + args.resenv, + args.volume_ids_path_new, + args.volume_ids_path_attach, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3869,13 +4466,15 @@ def process_start_server_with_mounted_volume(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_with_mounted_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3887,7 +4486,18 @@ def process_start_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_server_result() try: - result.success = self._handler.start_server(args.flavor, args.image, args.public_key, args.servername, args.metadata, args.diskspace, args.volumename, args.https, args.http, args.resenv) + result.success = self._handler.start_server( + args.flavor, + args.image, + args.public_key, + args.servername, + args.metadata, + args.diskspace, + args.volumename, + args.https, + args.http, + args.resenv, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3913,13 +4523,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() @@ -3931,7 +4543,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, args.image, args.servername, args.metadata, args.http, args.https, args.resenv, args.volume_ids_path_new, args.volume_ids_path_attach) + result.success = self._handler.start_server_with_custom_key( + args.flavor, + args.image, + args.servername, + args.metadata, + args.http, + args.https, + args.resenv, + args.volume_ids_path_new, + args.volume_ids_path_attach, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3957,13 +4579,15 @@ def process_start_server_with_custom_key(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_with_custom_key", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3980,13 +4604,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() @@ -3998,18 +4624,22 @@ 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.playbooks_information, args.openstack_id) + result.success = self._handler.create_and_deploy_playbook( + args.public_key, args.playbooks_information, args.openstack_id + ) 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("create_and_deploy_playbook", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4026,13 +4656,15 @@ def process_get_playbook_logs(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_playbook_logs", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4049,13 +4681,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() @@ -4072,13 +4706,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() @@ -4090,18 +4726,22 @@ def process_create_backend(self, seqid, iprot, oprot): iprot.readMessageEnd() result = create_backend_result() try: - result.success = self._handler.create_backend(args.elixir_id, args.user_key_url, args.template, args.upstream_url) + result.success = self._handler.create_backend( + args.elixir_id, args.user_key_url, args.template, args.upstream_url + ) 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("create_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4118,13 +4758,15 @@ def process_get_backends(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_backends", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4141,13 +4783,15 @@ def process_get_backends_by_owner(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_backends_by_owner", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4164,13 +4808,15 @@ def process_get_backends_by_template(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_backends_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4187,13 +4833,15 @@ def process_get_backend_by_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_backend_by_id", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4210,13 +4858,15 @@ def process_delete_backend(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_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4228,18 +4878,22 @@ 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.owner_id, args.user_id) + result.success = self._handler.add_user_to_backend( + args.backend_id, args.owner_id, args.user_id + ) 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_user_to_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4256,13 +4910,15 @@ def process_get_users_from_backend(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_users_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4274,18 +4930,22 @@ 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.owner_id, args.user_id) + result.success = self._handler.delete_user_from_backend( + args.backend_id, args.owner_id, args.user_id + ) 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("delete_user_from_backend", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4302,13 +4962,15 @@ def process_get_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_templates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4325,13 +4987,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() @@ -4348,13 +5012,15 @@ def process_get_templates_by_template(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_templates_by_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4366,18 +5032,22 @@ def process_check_template(self, seqid, iprot, oprot): iprot.readMessageEnd() result = check_template_result() try: - result.success = self._handler.check_template(args.template_name, args.template_version) + result.success = self._handler.check_template( + args.template_name, args.template_version + ) 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("check_template", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4400,13 +5070,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() @@ -4423,13 +5095,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() @@ -4446,13 +5120,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() @@ -4469,13 +5145,15 @@ def process_check_server_task_state(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("check_server_task_state", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4492,13 +5170,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() @@ -4510,18 +5190,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, args.flavor, args.count, args.names, args.start_idx, args.batch_idx) + result.success = self._handler.scale_up_cluster( + args.cluster_id, + args.image, + args.flavor, + 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() @@ -4538,13 +5228,15 @@ def process_get_cluster_info(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_cluster_info", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4561,13 +5253,15 @@ def process_get_cluster_status(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_cluster_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4587,13 +5281,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() @@ -4616,13 +5312,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() @@ -4634,7 +5332,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.elixir_id, args.base_tags, args.description) + result.success = self._handler.create_snapshot( + args.openstack_id, + args.name, + args.elixir_id, + args.base_tags, + args.description, + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4645,13 +5349,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() @@ -4668,13 +5374,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() @@ -4686,18 +5394,22 @@ def process_start_cluster(self, seqid, iprot, oprot): iprot.readMessageEnd() result = start_cluster_result() try: - result.success = self._handler.start_cluster(args.public_key, args.master_instance, args.worker_instance, args.user) + result.success = self._handler.start_cluster( + args.public_key, args.master_instance, args.worker_instance, 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() @@ -4714,13 +5426,15 @@ def process_terminate_cluster(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("terminate_cluster", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4740,13 +5454,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() @@ -4758,7 +5474,9 @@ def process_delete_volume_attachment(self, seqid, iprot, oprot): iprot.readMessageEnd() result = delete_volume_attachment_result() try: - result.success = self._handler.delete_volume_attachment(args.volume_id, args.server_id) + result.success = self._handler.delete_volume_attachment( + args.volume_id, args.server_id + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4769,13 +5487,15 @@ def process_delete_volume_attachment(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_volume_attachment", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4795,13 +5515,15 @@ def process_delete_volume(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_volume", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4813,7 +5535,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 @@ -4824,13 +5548,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() @@ -4853,13 +5579,15 @@ def process_check_server_status(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("check_server_status", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4879,13 +5607,15 @@ def process_setUserPassword(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("setUserPassword", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4908,13 +5638,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() @@ -4926,7 +5658,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 @@ -4934,13 +5668,15 @@ def process_create_volume(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", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4952,7 +5688,9 @@ def process_reboot_server(self, seqid, iprot, oprot): iprot.readMessageEnd() result = reboot_server_result() try: - result.success = self._handler.reboot_server(args.server_id, args.reboot_type) + result.success = self._handler.reboot_server( + args.server_id, args.reboot_type + ) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -4963,18 +5701,21 @@ def process_reboot_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_server", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() + # HELPER FUNCTIONS AND STRUCTURES @@ -4985,12 +5726,18 @@ class check_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() @@ -5010,11 +5757,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('check_Version_args') + oprot.writeStructBegin("check_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() @@ -5024,19 +5773,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(check_Version_args) check_Version_args.thrift_spec = ( None, # 0 - (1, TType.DOUBLE, 'version', None, None, ), # 1 + ( + 1, + TType.DOUBLE, + "version", + None, + None, + ), # 1 ) @@ -5047,12 +5803,18 @@ class check_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() @@ -5072,11 +5834,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('check_Version_result') + oprot.writeStructBegin("check_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() @@ -5086,26 +5850,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(check_Version_result) check_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() @@ -5120,9 +5893,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() @@ -5130,18 +5905,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): @@ -5151,12 +5926,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() @@ -5166,7 +5947,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5176,12 +5961,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() @@ -5190,26 +5981,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(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() @@ -5224,9 +6024,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() @@ -5234,18 +6036,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): @@ -5255,12 +6057,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() @@ -5273,8 +6081,16 @@ def read(self, iprot): self.success = {} (_ktype24, _vtype25, _size23) = iprot.readMapBegin() for _i27 in range(_size23): - _key28 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val29 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key28 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val29 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key28] = _val29 iprot.readMapEnd() else: @@ -5286,15 +6102,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 kiter30, viter31 in self.success.items(): - oprot.writeString(kiter30.encode('utf-8') if sys.version_info[0] == 2 else kiter30) - oprot.writeString(viter31.encode('utf-8') if sys.version_info[0] == 2 else viter31) + oprot.writeString( + kiter30.encode("utf-8") if sys.version_info[0] == 2 else kiter30 + ) + oprot.writeString( + viter31.encode("utf-8") if sys.version_info[0] == 2 else viter31 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5304,26 +6126,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(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_formulars_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() @@ -5338,9 +6169,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_formulars_args') + oprot.writeStructBegin("get_calculation_formulars_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -5348,18 +6181,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_formulars_args) -get_calculation_formulars_args.thrift_spec = ( -) +get_calculation_formulars_args.thrift_spec = () class get_calculation_formulars_result(object): @@ -5369,12 +6202,18 @@ class get_calculation_formulars_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() @@ -5387,8 +6226,16 @@ def read(self, iprot): self.success = {} (_ktype33, _vtype34, _size32) = iprot.readMapBegin() for _i36 in range(_size32): - _key37 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val38 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key37 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val38 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key37] = _val38 iprot.readMapEnd() else: @@ -5400,15 +6247,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_formulars_result') + oprot.writeStructBegin("get_calculation_formulars_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter39, viter40 in self.success.items(): - oprot.writeString(kiter39.encode('utf-8') if sys.version_info[0] == 2 else kiter39) - oprot.writeString(viter40.encode('utf-8') if sys.version_info[0] == 2 else viter40) + oprot.writeString( + kiter39.encode("utf-8") if sys.version_info[0] == 2 else kiter39 + ) + oprot.writeString( + viter40.encode("utf-8") if sys.version_info[0] == 2 else viter40 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5418,18 +6271,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_formulars_result) get_calculation_formulars_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 ) @@ -5441,13 +6301,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() @@ -5457,12 +6324,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.keyname = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.keyname = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5472,16 +6347,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() @@ -5490,20 +6375,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 ) @@ -5514,12 +6412,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() @@ -5529,7 +6433,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5539,12 +6447,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() @@ -5553,18 +6467,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 ) @@ -5575,12 +6496,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() @@ -5590,7 +6517,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -5600,12 +6531,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() @@ -5614,19 +6551,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 ) @@ -5637,12 +6581,18 @@ class get_vm_ports_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() @@ -5655,8 +6605,16 @@ def read(self, iprot): self.success = {} (_ktype42, _vtype43, _size41) = iprot.readMapBegin() for _i45 in range(_size41): - _key46 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val47 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key46 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val47 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key46] = _val47 iprot.readMapEnd() else: @@ -5668,15 +6626,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_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 kiter48, viter49 in self.success.items(): - oprot.writeString(kiter48.encode('utf-8') if sys.version_info[0] == 2 else kiter48) - oprot.writeString(viter49.encode('utf-8') if sys.version_info[0] == 2 else viter49) + oprot.writeString( + kiter48.encode("utf-8") if sys.version_info[0] == 2 else kiter48 + ) + oprot.writeString( + viter49.encode("utf-8") if sys.version_info[0] == 2 else viter49 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5686,26 +6650,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(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 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) 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() @@ -5720,9 +6693,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() @@ -5730,18 +6705,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): @@ -5751,12 +6726,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() @@ -5782,11 +6763,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_Flavors_result') + oprot.writeStructBegin("get_Flavors_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter56 in self.success: iter56.write(oprot) @@ -5799,26 +6782,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(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() @@ -5833,9 +6825,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() @@ -5843,18 +6837,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): @@ -5864,12 +6858,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() @@ -5895,11 +6895,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_Images_result') + oprot.writeStructBegin("get_Images_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter63 in self.success: iter63.write(oprot) @@ -5912,26 +6914,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(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() @@ -5946,9 +6957,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() @@ -5956,18 +6969,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): @@ -5977,12 +6990,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() @@ -6008,11 +7027,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_public_Images_result') + oprot.writeStructBegin("get_public_Images_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter70 in self.success: iter70.write(oprot) @@ -6025,26 +7046,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(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() @@ -6059,9 +7089,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() @@ -6069,18 +7101,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): @@ -6090,12 +7122,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() @@ -6121,11 +7159,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_private_Images_result') + oprot.writeStructBegin("get_private_Images_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter77 in self.success: iter77.write(oprot) @@ -6138,18 +7178,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 ) @@ -6160,12 +7207,18 @@ class get_Image_with_Tag_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() @@ -6175,7 +7228,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -6185,12 +7242,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_Image_with_Tag_args') + oprot.writeStructBegin("get_Image_with_Tag_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() @@ -6199,19 +7262,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_Image_with_Tag_args) get_Image_with_Tag_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -6222,12 +7292,18 @@ class get_Image_with_Tag_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() @@ -6248,11 +7324,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_Image_with_Tag_result') + oprot.writeStructBegin("get_Image_with_Tag_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() oprot.writeFieldStop() @@ -6262,18 +7340,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_Image_with_Tag_result) get_Image_with_Tag_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Image, None], None, ), # 0 + ( + 0, + TType.STRUCT, + "success", + [Image, None], + None, + ), # 0 ) @@ -6284,12 +7369,18 @@ class get_Images_by_filter_args(object): """ - - def __init__(self, filter_json=None,): + def __init__( + self, + filter_json=None, + ): self.filter_json = filter_json def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -6302,8 +7393,16 @@ def read(self, iprot): self.filter_json = {} (_ktype79, _vtype80, _size78) = iprot.readMapBegin() for _i82 in range(_size78): - _key83 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val84 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key83 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val84 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.filter_json[_key83] = _val84 iprot.readMapEnd() else: @@ -6315,15 +7414,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_Images_by_filter_args') + oprot.writeStructBegin("get_Images_by_filter_args") if self.filter_json is not None: - oprot.writeFieldBegin('filter_json', TType.MAP, 1) + oprot.writeFieldBegin("filter_json", TType.MAP, 1) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.filter_json)) for kiter85, viter86 in self.filter_json.items(): - oprot.writeString(kiter85.encode('utf-8') if sys.version_info[0] == 2 else kiter85) - oprot.writeString(viter86.encode('utf-8') if sys.version_info[0] == 2 else viter86) + oprot.writeString( + kiter85.encode("utf-8") if sys.version_info[0] == 2 else kiter85 + ) + oprot.writeString( + viter86.encode("utf-8") if sys.version_info[0] == 2 else viter86 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6333,19 +7438,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_Images_by_filter_args) get_Images_by_filter_args.thrift_spec = ( None, # 0 - (1, TType.MAP, 'filter_json', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 1 + ( + 1, + TType.MAP, + "filter_json", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 1 ) @@ -6356,12 +7468,18 @@ class get_Images_by_filter_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() @@ -6387,11 +7505,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_Images_by_filter_result') + oprot.writeStructBegin("get_Images_by_filter_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 iter93 in self.success: iter93.write(oprot) @@ -6404,18 +7524,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_Images_by_filter_result) get_Images_by_filter_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 ) @@ -6426,12 +7553,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() @@ -6441,7 +7574,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -6451,12 +7588,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() @@ -6465,19 +7608,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 ) @@ -6488,12 +7638,18 @@ class get_volume_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() @@ -6514,11 +7670,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_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() oprot.writeFieldStop() @@ -6528,18 +7686,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_volume_result) get_volume_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Volume, None], None, ), # 0 + ( + 0, + TType.STRUCT, + "success", + [Volume, None], + None, + ), # 0 ) @@ -6550,12 +7715,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() @@ -6568,7 +7739,11 @@ def read(self, iprot): self.volume_ids = [] (_etype97, _size94) = iprot.readListBegin() for _i98 in range(_size94): - _elem99 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem99 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.volume_ids.append(_elem99) iprot.readListEnd() else: @@ -6580,14 +7755,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 iter100 in self.volume_ids: - oprot.writeString(iter100.encode('utf-8') if sys.version_info[0] == 2 else iter100) + oprot.writeString( + iter100.encode("utf-8") if sys.version_info[0] == 2 else iter100 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6597,19 +7776,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 ) @@ -6620,12 +7806,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() @@ -6651,11 +7843,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_volumes_by_ids_result') + oprot.writeStructBegin("get_volumes_by_ids_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter107 in self.success: iter107.write(oprot) @@ -6668,18 +7862,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 ) @@ -6691,13 +7892,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() @@ -6707,7 +7915,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -6722,15 +7934,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() @@ -6740,20 +7958,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 ) @@ -6764,12 +7995,18 @@ class resize_volume_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() @@ -6789,11 +8026,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.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeFieldBegin("success", TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6803,18 +8042,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(resize_volume_result) resize_volume_result.thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 ) @@ -6825,12 +8071,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() @@ -6840,7 +8092,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -6850,12 +8106,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() @@ -6864,19 +8126,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 ) @@ -6889,14 +8158,22 @@ class delete_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() @@ -6928,19 +8205,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('delete_server_result') + oprot.writeStructBegin("delete_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() 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() @@ -6950,20 +8229,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(delete_server_result) delete_server_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [conflictException, None], + None, + ), # 2 ) @@ -6975,13 +8273,20 @@ class add_metadata_to_server_args(object): """ - - def __init__(self, servername=None, metadata=None,): + def __init__( + self, + servername=None, + metadata=None, + ): self.servername = servername 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() @@ -6991,7 +8296,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.servername = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -6999,8 +8308,16 @@ def read(self, iprot): self.metadata = {} (_ktype109, _vtype110, _size108) = iprot.readMapBegin() for _i112 in range(_size108): - _key113 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val114 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key113 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val114 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key113] = _val114 iprot.readMapEnd() else: @@ -7012,19 +8329,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.servername is not None: - oprot.writeFieldBegin('servername', TType.STRING, 1) - oprot.writeString(self.servername.encode('utf-8') if sys.version_info[0] == 2 else self.servername) + oprot.writeFieldBegin("servername", TType.STRING, 1) + 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, 2) + oprot.writeFieldBegin("metadata", TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) for kiter115, viter116 in self.metadata.items(): - oprot.writeString(kiter115.encode('utf-8') if sys.version_info[0] == 2 else kiter115) - oprot.writeString(viter116.encode('utf-8') if sys.version_info[0] == 2 else viter116) + oprot.writeString( + kiter115.encode("utf-8") if sys.version_info[0] == 2 else kiter115 + ) + oprot.writeString( + viter116.encode("utf-8") if sys.version_info[0] == 2 else viter116 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7034,20 +8361,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, 'servername', 'UTF8', None, ), # 1 - (2, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 + ( + 1, + TType.STRING, + "servername", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 2 ) @@ -7059,13 +8399,20 @@ class add_metadata_to_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() @@ -7078,8 +8425,16 @@ def read(self, iprot): self.success = {} (_ktype118, _vtype119, _size117) = iprot.readMapBegin() for _i121 in range(_size117): - _key122 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val123 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key122 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val123 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key122] = _val123 iprot.readMapEnd() else: @@ -7097,19 +8452,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_metadata_to_server_result') + oprot.writeStructBegin("add_metadata_to_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter124, viter125 in self.success.items(): - oprot.writeString(kiter124.encode('utf-8') if sys.version_info[0] == 2 else kiter124) - oprot.writeString(viter125.encode('utf-8') if sys.version_info[0] == 2 else viter125) + oprot.writeString( + kiter124.encode("utf-8") if sys.version_info[0] == 2 else kiter124 + ) + oprot.writeString( + viter125.encode("utf-8") if sys.version_info[0] == 2 else viter125 + ) 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() oprot.writeFieldStop() @@ -7119,19 +8480,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_metadata_to_server_result) add_metadata_to_server_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 ) @@ -7143,13 +8517,20 @@ class delete_metadata_from_server_args(object): """ - - def __init__(self, servername=None, keys=None,): + def __init__( + self, + servername=None, + keys=None, + ): self.servername = servername self.keys = keys def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7159,7 +8540,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.servername = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -7167,7 +8552,11 @@ def read(self, iprot): self.keys = set() (_etype129, _size126) = iprot.readSetBegin() for _i130 in range(_size126): - _elem131 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem131 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.keys.add(_elem131) iprot.readSetEnd() else: @@ -7179,18 +8568,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('delete_metadata_from_server_args') + oprot.writeStructBegin("delete_metadata_from_server_args") if self.servername is not None: - oprot.writeFieldBegin('servername', TType.STRING, 1) - oprot.writeString(self.servername.encode('utf-8') if sys.version_info[0] == 2 else self.servername) + oprot.writeFieldBegin("servername", TType.STRING, 1) + oprot.writeString( + self.servername.encode("utf-8") + if sys.version_info[0] == 2 + else self.servername + ) oprot.writeFieldEnd() if self.keys is not None: - oprot.writeFieldBegin('keys', TType.SET, 2) + oprot.writeFieldBegin("keys", TType.SET, 2) oprot.writeSetBegin(TType.STRING, len(self.keys)) for iter132 in self.keys: - oprot.writeString(iter132.encode('utf-8') if sys.version_info[0] == 2 else iter132) + oprot.writeString( + iter132.encode("utf-8") if sys.version_info[0] == 2 else iter132 + ) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7200,20 +8597,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_metadata_from_server_args) delete_metadata_from_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'servername', 'UTF8', None, ), # 1 - (2, TType.SET, 'keys', (TType.STRING, 'UTF8', False), None, ), # 2 + ( + 1, + TType.STRING, + "servername", + "UTF8", + None, + ), # 1 + ( + 2, + TType.SET, + "keys", + (TType.STRING, "UTF8", False), + None, + ), # 2 ) @@ -7225,13 +8635,20 @@ class delete_metadata_from_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() @@ -7244,7 +8661,11 @@ def read(self, iprot): self.success = set() (_etype136, _size133) = iprot.readSetBegin() for _i137 in range(_size133): - _elem138 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem138 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success.add(_elem138) iprot.readSetEnd() else: @@ -7262,18 +8683,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_metadata_from_server_result') + oprot.writeStructBegin("delete_metadata_from_server_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.SET, 0) + oprot.writeFieldBegin("success", TType.SET, 0) oprot.writeSetBegin(TType.STRING, len(self.success)) for iter139 in self.success: - oprot.writeString(iter139.encode('utf-8') if sys.version_info[0] == 2 else iter139) + oprot.writeString( + iter139.encode("utf-8") if sys.version_info[0] == 2 else iter139 + ) oprot.writeSetEnd() 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() @@ -7283,19 +8708,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(delete_metadata_from_server_result) delete_metadata_from_server_result.thrift_spec = ( - (0, TType.SET, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 + ( + 0, + TType.SET, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 ) @@ -7307,13 +8745,20 @@ class add_floating_ip_to_server_args(object): """ - - def __init__(self, openstack_id=None, network=None,): + def __init__( + self, + openstack_id=None, + network=None, + ): self.openstack_id = openstack_id self.network = network def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7323,12 +8768,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.network = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.network = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7338,16 +8791,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_floating_ip_to_server_args') + oprot.writeStructBegin("add_floating_ip_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.network is not None: - oprot.writeFieldBegin('network', TType.STRING, 2) - oprot.writeString(self.network.encode('utf-8') if sys.version_info[0] == 2 else self.network) + oprot.writeFieldBegin("network", TType.STRING, 2) + oprot.writeString( + self.network.encode("utf-8") + if sys.version_info[0] == 2 + else self.network + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7356,20 +8819,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_floating_ip_to_server_args) add_floating_ip_to_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'network', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "network", + "UTF8", + None, + ), # 2 ) @@ -7382,14 +8858,22 @@ class add_floating_ip_to_server_result(object): """ - - def __init__(self, success=None, e=None, f=None,): + def __init__( + self, + success=None, + e=None, + f=None, + ): self.success = success 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() @@ -7399,7 +8883,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -7421,19 +8909,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_floating_ip_to_server_result') + oprot.writeStructBegin("add_floating_ip_to_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.f is not None: - oprot.writeFieldBegin('f', TType.STRUCT, 2) + oprot.writeFieldBegin("f", TType.STRUCT, 2) self.f.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7443,20 +8937,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(add_floating_ip_to_server_result) add_floating_ip_to_server_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'f', [networkNotFoundException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "f", + [networkNotFoundException, None], + None, + ), # 2 ) @@ -7474,8 +8987,14 @@ class create_connection_args(object): """ - - def __init__(self, username=None, password=None, auth_url=None, user_domain_name=None, project_domain_name=None,): + def __init__( + self, + username=None, + password=None, + auth_url=None, + user_domain_name=None, + project_domain_name=None, + ): self.username = username self.password = password self.auth_url = auth_url @@ -7483,7 +9002,11 @@ def __init__(self, username=None, password=None, auth_url=None, user_domain_name self.project_domain_name = project_domain_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() @@ -7493,27 +9016,47 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.username = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.username = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.password = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.auth_url = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.auth_url = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.user_domain_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.user_domain_name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.project_domain_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.project_domain_name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -7523,28 +9066,50 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_connection_args') + oprot.writeStructBegin("create_connection_args") if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 1) - oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) + oprot.writeFieldBegin("username", TType.STRING, 1) + oprot.writeString( + self.username.encode("utf-8") + if sys.version_info[0] == 2 + else self.username + ) oprot.writeFieldEnd() if self.password is not None: - oprot.writeFieldBegin('password', TType.STRING, 2) - oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) + oprot.writeFieldBegin("password", TType.STRING, 2) + oprot.writeString( + self.password.encode("utf-8") + if sys.version_info[0] == 2 + else self.password + ) oprot.writeFieldEnd() if self.auth_url is not None: - oprot.writeFieldBegin('auth_url', TType.STRING, 3) - oprot.writeString(self.auth_url.encode('utf-8') if sys.version_info[0] == 2 else self.auth_url) + oprot.writeFieldBegin("auth_url", TType.STRING, 3) + oprot.writeString( + self.auth_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.auth_url + ) oprot.writeFieldEnd() if self.user_domain_name is not None: - oprot.writeFieldBegin('user_domain_name', TType.STRING, 5) - oprot.writeString(self.user_domain_name.encode('utf-8') if sys.version_info[0] == 2 else self.user_domain_name) + oprot.writeFieldBegin("user_domain_name", TType.STRING, 5) + oprot.writeString( + self.user_domain_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_domain_name + ) oprot.writeFieldEnd() if self.project_domain_name is not None: - oprot.writeFieldBegin('project_domain_name', TType.STRING, 6) - oprot.writeString(self.project_domain_name.encode('utf-8') if sys.version_info[0] == 2 else self.project_domain_name) + oprot.writeFieldBegin("project_domain_name", TType.STRING, 6) + oprot.writeString( + self.project_domain_name.encode("utf-8") + if sys.version_info[0] == 2 + else self.project_domain_name + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7553,24 +9118,55 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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_connection_args) create_connection_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'username', 'UTF8', None, ), # 1 - (2, TType.STRING, 'password', 'UTF8', None, ), # 2 - (3, TType.STRING, 'auth_url', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "username", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "password", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "auth_url", + "UTF8", + None, + ), # 3 None, # 4 - (5, TType.STRING, 'user_domain_name', 'UTF8', None, ), # 5 - (6, TType.STRING, 'project_domain_name', 'UTF8', None, ), # 6 + ( + 5, + TType.STRING, + "user_domain_name", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "project_domain_name", + "UTF8", + None, + ), # 6 ) @@ -7582,13 +9178,20 @@ class create_connection_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() @@ -7614,15 +9217,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_connection_result') + oprot.writeStructBegin("create_connection_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() 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() @@ -7632,19 +9237,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_connection_result) create_connection_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'e', [authenticationException, None], None, ), # 1 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [authenticationException, None], + None, + ), # 1 ) @@ -7664,8 +9282,19 @@ class start_server_without_playbook_args(object): """ - - def __init__(self, flavor=None, image=None, public_key=None, servername=None, metadata=None, https=None, http=None, resenv=None, volume_ids_path_new=None, volume_ids_path_attach=None,): + def __init__( + self, + flavor=None, + image=None, + public_key=None, + servername=None, + metadata=None, + https=None, + http=None, + resenv=None, + volume_ids_path_new=None, + volume_ids_path_attach=None, + ): self.flavor = flavor self.image = image self.public_key = public_key @@ -7678,7 +9307,11 @@ def __init__(self, flavor=None, image=None, public_key=None, servername=None, me self.volume_ids_path_attach = volume_ids_path_attach def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -7688,22 +9321,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.flavor = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.image = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: @@ -7711,8 +9360,16 @@ def read(self, iprot): self.metadata = {} (_ktype141, _vtype142, _size140) = iprot.readMapBegin() for _i144 in range(_size140): - _key145 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val146 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key145 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val146 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key145] = _val146 iprot.readMapEnd() else: @@ -7732,7 +9389,11 @@ def read(self, iprot): self.resenv = [] (_etype150, _size147) = iprot.readListBegin() for _i151 in range(_size147): - _elem152 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem152 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.resenv.append(_elem152) iprot.readListEnd() else: @@ -7745,8 +9406,16 @@ def read(self, iprot): _elem158 = {} (_ktype160, _vtype161, _size159) = iprot.readMapBegin() for _i163 in range(_size159): - _key164 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val165 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key164 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val165 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem158[_key164] = _val165 iprot.readMapEnd() self.volume_ids_path_new.append(_elem158) @@ -7761,8 +9430,16 @@ def read(self, iprot): _elem171 = {} (_ktype173, _vtype174, _size172) = iprot.readMapBegin() for _i176 in range(_size172): - _key177 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val178 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key177 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val178 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem171[_key177] = _val178 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem171) @@ -7776,67 +9453,103 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_without_playbook_args') + oprot.writeStructBegin("start_server_without_playbook_args") if self.flavor is not None: - oprot.writeFieldBegin('flavor', TType.STRING, 1) - oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) + oprot.writeFieldBegin("flavor", TType.STRING, 1) + oprot.writeString( + self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor + ) 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.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 kiter179, viter180 in self.metadata.items(): - oprot.writeString(kiter179.encode('utf-8') if sys.version_info[0] == 2 else kiter179) - oprot.writeString(viter180.encode('utf-8') if sys.version_info[0] == 2 else viter180) + oprot.writeString( + kiter179.encode("utf-8") if sys.version_info[0] == 2 else kiter179 + ) + oprot.writeString( + viter180.encode("utf-8") if sys.version_info[0] == 2 else viter180 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.https is not None: - oprot.writeFieldBegin('https', TType.BOOL, 6) + oprot.writeFieldBegin("https", TType.BOOL, 6) oprot.writeBool(self.https) oprot.writeFieldEnd() if self.http is not None: - oprot.writeFieldBegin('http', TType.BOOL, 7) + oprot.writeFieldBegin("http", TType.BOOL, 7) oprot.writeBool(self.http) oprot.writeFieldEnd() if self.resenv is not None: - oprot.writeFieldBegin('resenv', TType.LIST, 8) + oprot.writeFieldBegin("resenv", TType.LIST, 8) oprot.writeListBegin(TType.STRING, len(self.resenv)) for iter181 in self.resenv: - oprot.writeString(iter181.encode('utf-8') if sys.version_info[0] == 2 else iter181) + oprot.writeString( + iter181.encode("utf-8") if sys.version_info[0] == 2 else iter181 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 9) + oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 9) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter182 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter182)) for kiter183, viter184 in iter182.items(): - oprot.writeString(kiter183.encode('utf-8') if sys.version_info[0] == 2 else kiter183) - oprot.writeString(viter184.encode('utf-8') if sys.version_info[0] == 2 else viter184) + oprot.writeString( + kiter183.encode("utf-8") + if sys.version_info[0] == 2 + else kiter183 + ) + oprot.writeString( + viter184.encode("utf-8") + if sys.version_info[0] == 2 + else viter184 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 10) + oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 10) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter185 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter185)) for kiter186, viter187 in iter185.items(): - oprot.writeString(kiter186.encode('utf-8') if sys.version_info[0] == 2 else kiter186) - oprot.writeString(viter187.encode('utf-8') if sys.version_info[0] == 2 else viter187) + oprot.writeString( + kiter186.encode("utf-8") + if sys.version_info[0] == 2 + else kiter186 + ) + oprot.writeString( + viter187.encode("utf-8") + if sys.version_info[0] == 2 + else viter187 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -7847,28 +9560,89 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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_without_playbook_args) start_server_without_playbook_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'flavor', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image', '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 - (6, TType.BOOL, 'https', None, None, ), # 6 - (7, TType.BOOL, 'http', None, None, ), # 7 - (8, TType.LIST, 'resenv', (TType.STRING, 'UTF8', False), None, ), # 8 - (9, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 9 - (10, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 10 + ( + 1, + TType.STRING, + "flavor", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image", + "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 + ( + 6, + TType.BOOL, + "https", + None, + None, + ), # 6 + ( + 7, + TType.BOOL, + "http", + None, + None, + ), # 7 + ( + 8, + TType.LIST, + "resenv", + (TType.STRING, "UTF8", False), + None, + ), # 8 + ( + 9, + TType.LIST, + "volume_ids_path_new", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 9 + ( + 10, + TType.LIST, + "volume_ids_path_attach", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 10 ) @@ -7886,8 +9660,17 @@ class start_server_without_playbook_result(object): """ - - def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=None, o=None,): + def __init__( + self, + success=None, + e=None, + r=None, + s=None, + n=None, + i=None, + f=None, + o=None, + ): self.success = success self.e = e self.r = r @@ -7898,7 +9681,11 @@ def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=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() @@ -7911,8 +9698,16 @@ def read(self, iprot): self.success = {} (_ktype189, _vtype190, _size188) = iprot.readMapBegin() for _i192 in range(_size188): - _key193 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val194 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key193 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val194 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key193] = _val194 iprot.readMapEnd() else: @@ -7966,43 +9761,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('start_server_without_playbook_result') + oprot.writeStructBegin("start_server_without_playbook_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 kiter195, viter196 in self.success.items(): - oprot.writeString(kiter195.encode('utf-8') if sys.version_info[0] == 2 else kiter195) - oprot.writeString(viter196.encode('utf-8') if sys.version_info[0] == 2 else viter196) + oprot.writeString( + kiter195.encode("utf-8") if sys.version_info[0] == 2 else kiter195 + ) + oprot.writeString( + viter196.encode("utf-8") if sys.version_info[0] == 2 else viter196 + ) 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.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 3) + oprot.writeFieldBegin("s", TType.STRUCT, 3) self.s.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 4) + oprot.writeFieldBegin("n", TType.STRUCT, 4) self.n.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() @@ -8012,33 +9813,84 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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_without_playbook_result) start_server_without_playbook_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [nameException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 - (3, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 3 - (4, TType.STRUCT, 'n', [networkNotFoundException, None], None, ), # 4 - (5, TType.STRUCT, 'i', [imageNotFoundException, None], None, ), # 5 - (6, TType.STRUCT, 'f', [flavorNotFoundException, None], None, ), # 6 - (7, TType.STRUCT, 'o', [otherException, None], None, ), # 7 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [nameException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ressourceException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "s", + [serverNotFoundException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "n", + [networkNotFoundException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "i", + [imageNotFoundException, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "f", + [flavorNotFoundException, None], + None, + ), # 6 + ( + 7, + TType.STRUCT, + "o", + [otherException, None], + None, + ), # 7 ) class 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() @@ -8053,9 +9905,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('bibigrid_available_args') + oprot.writeStructBegin("bibigrid_available_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -8063,18 +9917,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(bibigrid_available_args) -bibigrid_available_args.thrift_spec = ( -) +bibigrid_available_args.thrift_spec = () class bibigrid_available_result(object): @@ -8084,12 +9938,18 @@ class 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() @@ -8109,11 +9969,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('bibigrid_available_result') + oprot.writeStructBegin("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() @@ -8123,18 +9985,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(bibigrid_available_result) bibigrid_available_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) @@ -8146,13 +10015,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() @@ -8162,12 +10038,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.floating_ip = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -8177,16 +10061,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() @@ -8195,20 +10089,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 ) @@ -8219,12 +10126,18 @@ class detach_ip_from_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() @@ -8244,11 +10157,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.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8258,18 +10173,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(detach_ip_from_server_result) detach_ip_from_server_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 ) @@ -8289,8 +10211,19 @@ class start_server_with_mounted_volume_args(object): """ - - def __init__(self, flavor=None, image=None, public_key=None, servername=None, metadata=None, https=None, http=None, resenv=None, volume_ids_path_new=None, volume_ids_path_attach=None,): + def __init__( + self, + flavor=None, + image=None, + public_key=None, + servername=None, + metadata=None, + https=None, + http=None, + resenv=None, + volume_ids_path_new=None, + volume_ids_path_attach=None, + ): self.flavor = flavor self.image = image self.public_key = public_key @@ -8303,7 +10236,11 @@ def __init__(self, flavor=None, image=None, public_key=None, servername=None, me self.volume_ids_path_attach = volume_ids_path_attach def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8313,22 +10250,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.flavor = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.image = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: @@ -8336,8 +10289,16 @@ def read(self, iprot): self.metadata = {} (_ktype198, _vtype199, _size197) = iprot.readMapBegin() for _i201 in range(_size197): - _key202 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val203 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key202 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val203 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key202] = _val203 iprot.readMapEnd() else: @@ -8357,7 +10318,11 @@ def read(self, iprot): self.resenv = [] (_etype207, _size204) = iprot.readListBegin() for _i208 in range(_size204): - _elem209 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem209 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.resenv.append(_elem209) iprot.readListEnd() else: @@ -8370,8 +10335,16 @@ def read(self, iprot): _elem215 = {} (_ktype217, _vtype218, _size216) = iprot.readMapBegin() for _i220 in range(_size216): - _key221 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val222 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key221 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val222 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem215[_key221] = _val222 iprot.readMapEnd() self.volume_ids_path_new.append(_elem215) @@ -8386,8 +10359,16 @@ def read(self, iprot): _elem228 = {} (_ktype230, _vtype231, _size229) = iprot.readMapBegin() for _i233 in range(_size229): - _key234 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val235 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key234 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val235 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem228[_key234] = _val235 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem228) @@ -8401,67 +10382,103 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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_mounted_volume_args') + oprot.writeStructBegin("start_server_with_mounted_volume_args") if self.flavor is not None: - oprot.writeFieldBegin('flavor', TType.STRING, 1) - oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) + oprot.writeFieldBegin("flavor", TType.STRING, 1) + oprot.writeString( + self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor + ) 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.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 kiter236, viter237 in self.metadata.items(): - oprot.writeString(kiter236.encode('utf-8') if sys.version_info[0] == 2 else kiter236) - oprot.writeString(viter237.encode('utf-8') if sys.version_info[0] == 2 else viter237) + oprot.writeString( + kiter236.encode("utf-8") if sys.version_info[0] == 2 else kiter236 + ) + oprot.writeString( + viter237.encode("utf-8") if sys.version_info[0] == 2 else viter237 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.https is not None: - oprot.writeFieldBegin('https', TType.BOOL, 6) + oprot.writeFieldBegin("https", TType.BOOL, 6) oprot.writeBool(self.https) oprot.writeFieldEnd() if self.http is not None: - oprot.writeFieldBegin('http', TType.BOOL, 7) + oprot.writeFieldBegin("http", TType.BOOL, 7) oprot.writeBool(self.http) oprot.writeFieldEnd() if self.resenv is not None: - oprot.writeFieldBegin('resenv', TType.LIST, 8) + oprot.writeFieldBegin("resenv", TType.LIST, 8) oprot.writeListBegin(TType.STRING, len(self.resenv)) for iter238 in self.resenv: - oprot.writeString(iter238.encode('utf-8') if sys.version_info[0] == 2 else iter238) + oprot.writeString( + iter238.encode("utf-8") if sys.version_info[0] == 2 else iter238 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 9) + oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 9) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter239 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter239)) for kiter240, viter241 in iter239.items(): - oprot.writeString(kiter240.encode('utf-8') if sys.version_info[0] == 2 else kiter240) - oprot.writeString(viter241.encode('utf-8') if sys.version_info[0] == 2 else viter241) + oprot.writeString( + kiter240.encode("utf-8") + if sys.version_info[0] == 2 + else kiter240 + ) + oprot.writeString( + viter241.encode("utf-8") + if sys.version_info[0] == 2 + else viter241 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 10) + oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 10) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter242 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter242)) for kiter243, viter244 in iter242.items(): - oprot.writeString(kiter243.encode('utf-8') if sys.version_info[0] == 2 else kiter243) - oprot.writeString(viter244.encode('utf-8') if sys.version_info[0] == 2 else viter244) + oprot.writeString( + kiter243.encode("utf-8") + if sys.version_info[0] == 2 + else kiter243 + ) + oprot.writeString( + viter244.encode("utf-8") + if sys.version_info[0] == 2 + else viter244 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -8472,28 +10489,89 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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_mounted_volume_args) start_server_with_mounted_volume_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'flavor', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image', '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 - (6, TType.BOOL, 'https', None, None, ), # 6 - (7, TType.BOOL, 'http', None, None, ), # 7 - (8, TType.LIST, 'resenv', (TType.STRING, 'UTF8', False), None, ), # 8 - (9, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 9 - (10, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 10 + ( + 1, + TType.STRING, + "flavor", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image", + "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 + ( + 6, + TType.BOOL, + "https", + None, + None, + ), # 6 + ( + 7, + TType.BOOL, + "http", + None, + None, + ), # 7 + ( + 8, + TType.LIST, + "resenv", + (TType.STRING, "UTF8", False), + None, + ), # 8 + ( + 9, + TType.LIST, + "volume_ids_path_new", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 9 + ( + 10, + TType.LIST, + "volume_ids_path_attach", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 10 ) @@ -8511,8 +10589,17 @@ class start_server_with_mounted_volume_result(object): """ - - def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=None, o=None,): + def __init__( + self, + success=None, + e=None, + r=None, + s=None, + n=None, + i=None, + f=None, + o=None, + ): self.success = success self.e = e self.r = r @@ -8523,7 +10610,11 @@ def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=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() @@ -8536,8 +10627,16 @@ def read(self, iprot): self.success = {} (_ktype246, _vtype247, _size245) = iprot.readMapBegin() for _i249 in range(_size245): - _key250 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val251 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key250 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val251 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key250] = _val251 iprot.readMapEnd() else: @@ -8591,43 +10690,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('start_server_with_mounted_volume_result') + oprot.writeStructBegin("start_server_with_mounted_volume_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 kiter252, viter253 in self.success.items(): - oprot.writeString(kiter252.encode('utf-8') if sys.version_info[0] == 2 else kiter252) - oprot.writeString(viter253.encode('utf-8') if sys.version_info[0] == 2 else viter253) + oprot.writeString( + kiter252.encode("utf-8") if sys.version_info[0] == 2 else kiter252 + ) + oprot.writeString( + viter253.encode("utf-8") if sys.version_info[0] == 2 else viter253 + ) 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.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 3) + oprot.writeFieldBegin("s", TType.STRUCT, 3) self.s.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 4) + oprot.writeFieldBegin("n", TType.STRUCT, 4) self.n.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() @@ -8637,25 +10742,74 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_server_with_mounted_volume_result) start_server_with_mounted_volume_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [nameException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 - (3, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 3 - (4, TType.STRUCT, 'n', [networkNotFoundException, None], None, ), # 4 - (5, TType.STRUCT, 'i', [imageNotFoundException, None], None, ), # 5 - (6, TType.STRUCT, 'f', [flavorNotFoundException, None], None, ), # 6 - (7, TType.STRUCT, 'o', [otherException, None], None, ), # 7 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [nameException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ressourceException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "s", + [serverNotFoundException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "n", + [networkNotFoundException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "i", + [imageNotFoundException, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "f", + [flavorNotFoundException, None], + None, + ), # 6 + ( + 7, + TType.STRUCT, + "o", + [otherException, None], + None, + ), # 7 ) @@ -8675,8 +10829,19 @@ class start_server_args(object): """ - - def __init__(self, flavor=None, image=None, public_key=None, servername=None, metadata=None, diskspace=None, volumename=None, https=None, http=None, resenv=None,): + def __init__( + self, + flavor=None, + image=None, + public_key=None, + servername=None, + metadata=None, + diskspace=None, + volumename=None, + https=None, + http=None, + resenv=None, + ): self.flavor = flavor self.image = image self.public_key = public_key @@ -8689,7 +10854,11 @@ def __init__(self, flavor=None, image=None, public_key=None, servername=None, me self.resenv = resenv def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -8699,22 +10868,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.flavor = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.image = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: @@ -8722,20 +10907,36 @@ def read(self, iprot): self.metadata = {} (_ktype255, _vtype256, _size254) = iprot.readMapBegin() for _i258 in range(_size254): - _key259 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val260 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key259 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val260 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key259] = _val260 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.diskspace = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.diskspace = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.volumename = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.volumename = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 8: @@ -8753,7 +10954,11 @@ def read(self, iprot): self.resenv = [] (_etype264, _size261) = iprot.readListBegin() for _i265 in range(_size261): - _elem266 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem266 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.resenv.append(_elem266) iprot.readListEnd() else: @@ -8765,54 +10970,82 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 is not None: - oprot.writeFieldBegin('flavor', TType.STRING, 1) - oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) + oprot.writeFieldBegin("flavor", TType.STRING, 1) + oprot.writeString( + self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor + ) 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.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 kiter267, viter268 in self.metadata.items(): - oprot.writeString(kiter267.encode('utf-8') if sys.version_info[0] == 2 else kiter267) - oprot.writeString(viter268.encode('utf-8') if sys.version_info[0] == 2 else viter268) + oprot.writeString( + kiter267.encode("utf-8") if sys.version_info[0] == 2 else kiter267 + ) + oprot.writeString( + viter268.encode("utf-8") if sys.version_info[0] == 2 else viter268 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.diskspace is not None: - oprot.writeFieldBegin('diskspace', TType.STRING, 6) - oprot.writeString(self.diskspace.encode('utf-8') if sys.version_info[0] == 2 else self.diskspace) + oprot.writeFieldBegin("diskspace", TType.STRING, 6) + oprot.writeString( + self.diskspace.encode("utf-8") + if sys.version_info[0] == 2 + else self.diskspace + ) oprot.writeFieldEnd() if self.volumename is not None: - oprot.writeFieldBegin('volumename', TType.STRING, 7) - oprot.writeString(self.volumename.encode('utf-8') if sys.version_info[0] == 2 else self.volumename) + oprot.writeFieldBegin("volumename", TType.STRING, 7) + oprot.writeString( + self.volumename.encode("utf-8") + if sys.version_info[0] == 2 + else self.volumename + ) oprot.writeFieldEnd() if self.https is not None: - oprot.writeFieldBegin('https', TType.BOOL, 8) + oprot.writeFieldBegin("https", TType.BOOL, 8) oprot.writeBool(self.https) oprot.writeFieldEnd() if self.http is not None: - oprot.writeFieldBegin('http', TType.BOOL, 9) + oprot.writeFieldBegin("http", TType.BOOL, 9) oprot.writeBool(self.http) oprot.writeFieldEnd() if self.resenv is not None: - oprot.writeFieldBegin('resenv', TType.LIST, 10) + oprot.writeFieldBegin("resenv", TType.LIST, 10) oprot.writeListBegin(TType.STRING, len(self.resenv)) for iter269 in self.resenv: - oprot.writeString(iter269.encode('utf-8') if sys.version_info[0] == 2 else iter269) + oprot.writeString( + iter269.encode("utf-8") if sys.version_info[0] == 2 else iter269 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8822,28 +11055,89 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image', '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 - (6, TType.STRING, 'diskspace', 'UTF8', None, ), # 6 - (7, TType.STRING, 'volumename', 'UTF8', None, ), # 7 - (8, TType.BOOL, 'https', None, None, ), # 8 - (9, TType.BOOL, 'http', None, None, ), # 9 - (10, TType.LIST, 'resenv', (TType.STRING, 'UTF8', False), None, ), # 10 + ( + 1, + TType.STRING, + "flavor", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image", + "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 + ( + 6, + TType.STRING, + "diskspace", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "volumename", + "UTF8", + None, + ), # 7 + ( + 8, + TType.BOOL, + "https", + None, + None, + ), # 8 + ( + 9, + TType.BOOL, + "http", + None, + None, + ), # 9 + ( + 10, + TType.LIST, + "resenv", + (TType.STRING, "UTF8", False), + None, + ), # 10 ) @@ -8861,8 +11155,17 @@ class start_server_result(object): """ - - def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=None, o=None,): + def __init__( + self, + success=None, + e=None, + r=None, + s=None, + n=None, + i=None, + f=None, + o=None, + ): self.success = success self.e = e self.r = r @@ -8873,7 +11176,11 @@ def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=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() @@ -8886,8 +11193,16 @@ def read(self, iprot): self.success = {} (_ktype271, _vtype272, _size270) = iprot.readMapBegin() for _i274 in range(_size270): - _key275 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val276 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key275 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val276 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key275] = _val276 iprot.readMapEnd() else: @@ -8941,43 +11256,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('start_server_result') + oprot.writeStructBegin("start_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 kiter277, viter278 in self.success.items(): - oprot.writeString(kiter277.encode('utf-8') if sys.version_info[0] == 2 else kiter277) - oprot.writeString(viter278.encode('utf-8') if sys.version_info[0] == 2 else viter278) + oprot.writeString( + kiter277.encode("utf-8") if sys.version_info[0] == 2 else kiter277 + ) + oprot.writeString( + viter278.encode("utf-8") if sys.version_info[0] == 2 else viter278 + ) 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.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 3) + oprot.writeFieldBegin("s", TType.STRUCT, 3) self.s.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 4) + oprot.writeFieldBegin("n", TType.STRUCT, 4) self.n.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() @@ -8987,25 +11308,74 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_server_result) start_server_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [nameException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 - (3, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 3 - (4, TType.STRUCT, 'n', [networkNotFoundException, None], None, ), # 4 - (5, TType.STRUCT, 'i', [imageNotFoundException, None], None, ), # 5 - (6, TType.STRUCT, 'f', [flavorNotFoundException, None], None, ), # 6 - (7, TType.STRUCT, 'o', [otherException, None], None, ), # 7 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [nameException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ressourceException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "s", + [serverNotFoundException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "n", + [networkNotFoundException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "i", + [imageNotFoundException, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "f", + [flavorNotFoundException, None], + None, + ), # 6 + ( + 7, + TType.STRUCT, + "o", + [otherException, None], + None, + ), # 7 ) @@ -9024,8 +11394,18 @@ class start_server_with_custom_key_args(object): """ - - def __init__(self, flavor=None, image=None, servername=None, metadata=None, http=None, https=None, resenv=None, volume_ids_path_new=None, volume_ids_path_attach=None,): + def __init__( + self, + flavor=None, + image=None, + servername=None, + metadata=None, + http=None, + https=None, + resenv=None, + volume_ids_path_new=None, + volume_ids_path_attach=None, + ): self.flavor = flavor self.image = image self.servername = servername @@ -9037,7 +11417,11 @@ def __init__(self, flavor=None, image=None, servername=None, metadata=None, http self.volume_ids_path_attach = volume_ids_path_attach def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -9047,17 +11431,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.flavor = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.flavor = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.image = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.servername = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -9065,8 +11461,16 @@ def read(self, iprot): self.metadata = {} (_ktype280, _vtype281, _size279) = iprot.readMapBegin() for _i283 in range(_size279): - _key284 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val285 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key284 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val285 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key284] = _val285 iprot.readMapEnd() else: @@ -9086,7 +11490,11 @@ def read(self, iprot): self.resenv = [] (_etype289, _size286) = iprot.readListBegin() for _i290 in range(_size286): - _elem291 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem291 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.resenv.append(_elem291) iprot.readListEnd() else: @@ -9099,8 +11507,16 @@ def read(self, iprot): _elem297 = {} (_ktype299, _vtype300, _size298) = iprot.readMapBegin() for _i302 in range(_size298): - _key303 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val304 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key303 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val304 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem297[_key303] = _val304 iprot.readMapEnd() self.volume_ids_path_new.append(_elem297) @@ -9115,8 +11531,16 @@ def read(self, iprot): _elem310 = {} (_ktype312, _vtype313, _size311) = iprot.readMapBegin() for _i315 in range(_size311): - _key316 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val317 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key316 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val317 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem310[_key316] = _val317 iprot.readMapEnd() self.volume_ids_path_attach.append(_elem310) @@ -9130,63 +11554,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('start_server_with_custom_key_args') + oprot.writeStructBegin("start_server_with_custom_key_args") if self.flavor is not None: - oprot.writeFieldBegin('flavor', TType.STRING, 1) - oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) + oprot.writeFieldBegin("flavor", TType.STRING, 1) + oprot.writeString( + self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor + ) 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.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 kiter318, viter319 in self.metadata.items(): - oprot.writeString(kiter318.encode('utf-8') if sys.version_info[0] == 2 else kiter318) - oprot.writeString(viter319.encode('utf-8') if sys.version_info[0] == 2 else viter319) + oprot.writeString( + kiter318.encode("utf-8") if sys.version_info[0] == 2 else kiter318 + ) + oprot.writeString( + viter319.encode("utf-8") if sys.version_info[0] == 2 else viter319 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.http is not None: - oprot.writeFieldBegin('http', TType.BOOL, 5) + oprot.writeFieldBegin("http", TType.BOOL, 5) oprot.writeBool(self.http) oprot.writeFieldEnd() if self.https is not None: - oprot.writeFieldBegin('https', TType.BOOL, 6) + oprot.writeFieldBegin("https", TType.BOOL, 6) oprot.writeBool(self.https) oprot.writeFieldEnd() if self.resenv is not None: - oprot.writeFieldBegin('resenv', TType.LIST, 7) + oprot.writeFieldBegin("resenv", TType.LIST, 7) oprot.writeListBegin(TType.STRING, len(self.resenv)) for iter320 in self.resenv: - oprot.writeString(iter320.encode('utf-8') if sys.version_info[0] == 2 else iter320) + oprot.writeString( + iter320.encode("utf-8") if sys.version_info[0] == 2 else iter320 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: - oprot.writeFieldBegin('volume_ids_path_new', TType.LIST, 9) + oprot.writeFieldBegin("volume_ids_path_new", TType.LIST, 9) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_new)) for iter321 in self.volume_ids_path_new: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter321)) for kiter322, viter323 in iter321.items(): - oprot.writeString(kiter322.encode('utf-8') if sys.version_info[0] == 2 else kiter322) - oprot.writeString(viter323.encode('utf-8') if sys.version_info[0] == 2 else viter323) + oprot.writeString( + kiter322.encode("utf-8") + if sys.version_info[0] == 2 + else kiter322 + ) + oprot.writeString( + viter323.encode("utf-8") + if sys.version_info[0] == 2 + else viter323 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_attach is not None: - oprot.writeFieldBegin('volume_ids_path_attach', TType.LIST, 10) + oprot.writeFieldBegin("volume_ids_path_attach", TType.LIST, 10) oprot.writeListBegin(TType.MAP, len(self.volume_ids_path_attach)) for iter324 in self.volume_ids_path_attach: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter324)) for kiter325, viter326 in iter324.items(): - oprot.writeString(kiter325.encode('utf-8') if sys.version_info[0] == 2 else kiter325) - oprot.writeString(viter326.encode('utf-8') if sys.version_info[0] == 2 else viter326) + oprot.writeString( + kiter325.encode("utf-8") + if sys.version_info[0] == 2 + else kiter325 + ) + oprot.writeString( + viter326.encode("utf-8") + if sys.version_info[0] == 2 + else viter326 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -9197,28 +11653,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', 'UTF8', None, ), # 1 - (2, TType.STRING, 'image', '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.BOOL, 'http', None, None, ), # 5 - (6, TType.BOOL, 'https', None, None, ), # 6 - (7, TType.LIST, 'resenv', (TType.STRING, 'UTF8', False), None, ), # 7 + ( + 1, + TType.STRING, + "flavor", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "image", + "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.BOOL, + "http", + None, + None, + ), # 5 + ( + 6, + TType.BOOL, + "https", + None, + None, + ), # 6 + ( + 7, + TType.LIST, + "resenv", + (TType.STRING, "UTF8", False), + None, + ), # 7 None, # 8 - (9, TType.LIST, 'volume_ids_path_new', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 9 - (10, TType.LIST, 'volume_ids_path_attach', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 10 + ( + 9, + TType.LIST, + "volume_ids_path_new", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 9 + ( + 10, + TType.LIST, + "volume_ids_path_attach", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 10 ) @@ -9236,8 +11747,17 @@ class start_server_with_custom_key_result(object): """ - - def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=None, o=None,): + def __init__( + self, + success=None, + e=None, + r=None, + s=None, + n=None, + i=None, + f=None, + o=None, + ): self.success = success self.e = e self.r = r @@ -9248,7 +11768,11 @@ def __init__(self, success=None, e=None, r=None, s=None, n=None, i=None, f=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() @@ -9261,8 +11785,16 @@ def read(self, iprot): self.success = {} (_ktype328, _vtype329, _size327) = iprot.readMapBegin() for _i331 in range(_size327): - _key332 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val333 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key332 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val333 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key332] = _val333 iprot.readMapEnd() else: @@ -9316,43 +11848,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('start_server_with_custom_key_result') + oprot.writeStructBegin("start_server_with_custom_key_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 kiter334, viter335 in self.success.items(): - oprot.writeString(kiter334.encode('utf-8') if sys.version_info[0] == 2 else kiter334) - oprot.writeString(viter335.encode('utf-8') if sys.version_info[0] == 2 else viter335) + oprot.writeString( + kiter334.encode("utf-8") if sys.version_info[0] == 2 else kiter334 + ) + oprot.writeString( + viter335.encode("utf-8") if sys.version_info[0] == 2 else viter335 + ) 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.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() if self.s is not None: - oprot.writeFieldBegin('s', TType.STRUCT, 3) + oprot.writeFieldBegin("s", TType.STRUCT, 3) self.s.write(oprot) oprot.writeFieldEnd() if self.n is not None: - oprot.writeFieldBegin('n', TType.STRUCT, 4) + oprot.writeFieldBegin("n", TType.STRUCT, 4) self.n.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() @@ -9362,25 +11900,74 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_server_with_custom_key_result) start_server_with_custom_key_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'e', [nameException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 - (3, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 3 - (4, TType.STRUCT, 'n', [networkNotFoundException, None], None, ), # 4 - (5, TType.STRUCT, 'i', [imageNotFoundException, None], None, ), # 5 - (6, TType.STRUCT, 'f', [flavorNotFoundException, None], None, ), # 6 - (7, TType.STRUCT, 'o', [otherException, None], None, ), # 7 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [nameException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ressourceException, None], + None, + ), # 2 + ( + 3, + TType.STRUCT, + "s", + [serverNotFoundException, None], + None, + ), # 3 + ( + 4, + TType.STRUCT, + "n", + [networkNotFoundException, None], + None, + ), # 4 + ( + 5, + TType.STRUCT, + "i", + [imageNotFoundException, None], + None, + ), # 5 + ( + 6, + TType.STRUCT, + "f", + [flavorNotFoundException, None], + None, + ), # 6 + ( + 7, + TType.STRUCT, + "o", + [otherException, None], + None, + ), # 7 ) @@ -9391,12 +11978,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() @@ -9406,7 +11999,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9416,12 +12013,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() @@ -9430,19 +12031,26 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(exist_server_args) exist_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "name", + "UTF8", + None, + ), # 1 ) @@ -9453,12 +12061,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() @@ -9478,11 +12092,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() @@ -9492,18 +12108,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 ) @@ -9516,14 +12139,22 @@ class create_and_deploy_playbook_args(object): """ - - def __init__(self, public_key=None, playbooks_information=None, openstack_id=None,): + def __init__( + self, + public_key=None, + playbooks_information=None, + openstack_id=None, + ): self.public_key = public_key self.playbooks_information = playbooks_information 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() @@ -9533,7 +12164,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -9541,12 +12176,24 @@ def read(self, iprot): self.playbooks_information = {} (_ktype337, _vtype338, _size336) = iprot.readMapBegin() for _i340 in range(_size336): - _key341 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key341 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _val342 = {} (_ktype344, _vtype345, _size343) = iprot.readMapBegin() for _i347 in range(_size343): - _key348 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val349 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key348 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val349 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _val342[_key348] = _val349 iprot.readMapEnd() self.playbooks_information[_key341] = _val342 @@ -9555,7 +12202,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9565,28 +12216,50 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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.playbooks_information is not None: - oprot.writeFieldBegin('playbooks_information', TType.MAP, 2) - oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.playbooks_information)) + oprot.writeFieldBegin("playbooks_information", TType.MAP, 2) + oprot.writeMapBegin( + TType.STRING, TType.MAP, len(self.playbooks_information) + ) for kiter350, viter351 in self.playbooks_information.items(): - oprot.writeString(kiter350.encode('utf-8') if sys.version_info[0] == 2 else kiter350) + oprot.writeString( + kiter350.encode("utf-8") if sys.version_info[0] == 2 else kiter350 + ) oprot.writeMapBegin(TType.STRING, TType.STRING, len(viter351)) for kiter352, viter353 in viter351.items(): - oprot.writeString(kiter352.encode('utf-8') if sys.version_info[0] == 2 else kiter352) - oprot.writeString(viter353.encode('utf-8') if sys.version_info[0] == 2 else viter353) + oprot.writeString( + kiter352.encode("utf-8") + if sys.version_info[0] == 2 + else kiter352 + ) + oprot.writeString( + viter353.encode("utf-8") + if sys.version_info[0] == 2 + else viter353 + ) oprot.writeMapEnd() oprot.writeMapEnd() 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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9595,21 +12268,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(create_and_deploy_playbook_args) create_and_deploy_playbook_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 - (2, TType.MAP, 'playbooks_information', (TType.STRING, 'UTF8', TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 2 - (3, TType.STRING, 'openstack_id', 'UTF8', None, ), # 3 + ( + 1, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.MAP, + "playbooks_information", + ( + TType.STRING, + "UTF8", + TType.MAP, + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + False, + ), + None, + ), # 2 + ( + 3, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 3 ) @@ -9620,12 +12318,18 @@ class create_and_deploy_playbook_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() @@ -9645,11 +12349,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('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() oprot.writeFieldStop() @@ -9659,18 +12365,25 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(create_and_deploy_playbook_result) create_and_deploy_playbook_result.thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 + ( + 0, + TType.I32, + "success", + None, + None, + ), # 0 ) @@ -9681,12 +12394,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() @@ -9696,7 +12415,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9706,12 +12429,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() @@ -9720,19 +12449,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 ) @@ -9743,12 +12479,18 @@ class get_playbook_logs_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() @@ -9769,11 +12511,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_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() oprot.writeFieldStop() @@ -9783,26 +12527,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(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 + ( + 0, + TType.STRUCT, + "success", + [PlaybookResult, None], + None, + ), # 0 ) 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() @@ -9817,9 +12570,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() @@ -9827,18 +12582,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): @@ -9848,12 +12603,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() @@ -9873,11 +12634,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() @@ -9887,26 +12650,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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() @@ -9921,9 +12693,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() @@ -9931,18 +12705,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): @@ -9952,12 +12726,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() @@ -9967,7 +12747,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -9977,12 +12761,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() @@ -9991,18 +12781,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 ) @@ -10016,15 +12813,24 @@ class create_backend_args(object): """ - - def __init__(self, elixir_id=None, user_key_url=None, template=None, upstream_url=None,): + def __init__( + self, + elixir_id=None, + user_key_url=None, + template=None, + upstream_url=None, + ): self.elixir_id = elixir_id self.user_key_url = user_key_url 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() @@ -10034,22 +12840,38 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.elixir_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.elixir_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.user_key_url = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.user_key_url = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.upstream_url = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10059,24 +12881,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('create_backend_args') + oprot.writeStructBegin("create_backend_args") if self.elixir_id is not None: - oprot.writeFieldBegin('elixir_id', TType.STRING, 1) - oprot.writeString(self.elixir_id.encode('utf-8') if sys.version_info[0] == 2 else self.elixir_id) + oprot.writeFieldBegin("elixir_id", TType.STRING, 1) + oprot.writeString( + self.elixir_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.elixir_id + ) oprot.writeFieldEnd() if self.user_key_url is not None: - oprot.writeFieldBegin('user_key_url', TType.STRING, 2) - oprot.writeString(self.user_key_url.encode('utf-8') if sys.version_info[0] == 2 else self.user_key_url) + oprot.writeFieldBegin("user_key_url", TType.STRING, 2) + oprot.writeString( + self.user_key_url.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_key_url + ) 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() @@ -10085,22 +12925,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, 'elixir_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'user_key_url', 'UTF8', None, ), # 2 - (3, TType.STRING, 'template', 'UTF8', None, ), # 3 - (4, TType.STRING, 'upstream_url', 'UTF8', None, ), # 4 + ( + 1, + TType.STRING, + "elixir_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "user_key_url", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "template", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "upstream_url", + "UTF8", + None, + ), # 4 ) @@ -10111,12 +12976,18 @@ class create_backend_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() @@ -10137,11 +13008,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('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() oprot.writeFieldStop() @@ -10151,26 +13024,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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 + ( + 0, + TType.STRUCT, + "success", + [Backend, None], + None, + ), # 0 ) 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() @@ -10185,9 +13067,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() @@ -10195,18 +13079,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): @@ -10216,12 +13100,18 @@ class get_backends_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() @@ -10247,11 +13137,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_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 iter360 in self.success: iter360.write(oprot) @@ -10264,18 +13156,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_backends_result) get_backends_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 ) @@ -10286,12 +13185,18 @@ class get_backends_by_owner_args(object): """ - - def __init__(self, elixir_id=None,): + def __init__( + self, + elixir_id=None, + ): self.elixir_id = elixir_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() @@ -10301,7 +13206,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.elixir_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.elixir_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10311,12 +13220,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_owner_args') + oprot.writeStructBegin("get_backends_by_owner_args") if self.elixir_id is not None: - oprot.writeFieldBegin('elixir_id', TType.STRING, 1) - oprot.writeString(self.elixir_id.encode('utf-8') if sys.version_info[0] == 2 else self.elixir_id) + oprot.writeFieldBegin("elixir_id", TType.STRING, 1) + oprot.writeString( + self.elixir_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.elixir_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10325,19 +13240,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, 'elixir_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "elixir_id", + "UTF8", + None, + ), # 1 ) @@ -10348,12 +13270,18 @@ class get_backends_by_owner_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() @@ -10379,11 +13307,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_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 iter367 in self.success: iter367.write(oprot) @@ -10396,18 +13326,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_backends_by_owner_result) get_backends_by_owner_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 ) @@ -10418,12 +13355,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() @@ -10433,7 +13376,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10443,12 +13390,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() @@ -10457,19 +13410,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 ) @@ -10480,12 +13440,18 @@ class get_backends_by_template_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() @@ -10511,11 +13477,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_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 iter374 in self.success: iter374.write(oprot) @@ -10528,18 +13496,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_backends_by_template_result) get_backends_by_template_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, [Backend, None], False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRUCT, [Backend, None], False), + None, + ), # 0 ) @@ -10550,12 +13525,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() @@ -10575,11 +13556,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() @@ -10589,19 +13572,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 ) @@ -10612,12 +13602,18 @@ class get_backend_by_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() @@ -10638,11 +13634,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_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() oprot.writeFieldStop() @@ -10652,18 +13650,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_backend_by_id_result) get_backend_by_id_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [Backend, None], None, ), # 0 + ( + 0, + TType.STRUCT, + "success", + [Backend, None], + None, + ), # 0 ) @@ -10674,12 +13679,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() @@ -10699,11 +13710,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() @@ -10713,19 +13726,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 ) @@ -10736,12 +13756,18 @@ class delete_backend_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() @@ -10751,7 +13777,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10761,12 +13791,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_backend_result') + oprot.writeStructBegin("delete_backend_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() @@ -10775,18 +13811,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(delete_backend_result) delete_backend_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -10799,14 +13842,22 @@ class add_user_to_backend_args(object): """ - - def __init__(self, backend_id=None, owner_id=None, user_id=None,): + def __init__( + self, + backend_id=None, + owner_id=None, + user_id=None, + ): self.backend_id = backend_id self.owner_id = owner_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() @@ -10821,12 +13872,20 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.owner_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.user_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.user_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -10836,20 +13895,30 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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.owner_id is not None: - oprot.writeFieldBegin('owner_id', TType.STRING, 2) - oprot.writeString(self.owner_id.encode('utf-8') if sys.version_info[0] == 2 else self.owner_id) + oprot.writeFieldBegin("owner_id", TType.STRING, 2) + oprot.writeString( + self.owner_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.owner_id + ) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin('user_id', TType.STRING, 3) - oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) + oprot.writeFieldBegin("user_id", TType.STRING, 3) + oprot.writeString( + self.user_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10858,21 +13927,40 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(add_user_to_backend_args) add_user_to_backend_args.thrift_spec = ( None, # 0 - (1, TType.I64, 'backend_id', None, None, ), # 1 - (2, TType.STRING, 'owner_id', 'UTF8', None, ), # 2 - (3, TType.STRING, 'user_id', 'UTF8', None, ), # 3 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "owner_id", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 3 ) @@ -10883,12 +13971,18 @@ class add_user_to_backend_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() @@ -10901,8 +13995,16 @@ def read(self, iprot): self.success = {} (_ktype376, _vtype377, _size375) = iprot.readMapBegin() for _i379 in range(_size375): - _key380 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val381 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key380 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val381 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key380] = _val381 iprot.readMapEnd() else: @@ -10914,15 +14016,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('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 kiter382, viter383 in self.success.items(): - oprot.writeString(kiter382.encode('utf-8') if sys.version_info[0] == 2 else kiter382) - oprot.writeString(viter383.encode('utf-8') if sys.version_info[0] == 2 else viter383) + oprot.writeString( + kiter382.encode("utf-8") if sys.version_info[0] == 2 else kiter382 + ) + oprot.writeString( + viter383.encode("utf-8") if sys.version_info[0] == 2 else viter383 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10932,18 +14040,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_user_to_backend_result) add_user_to_backend_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 ) @@ -10954,12 +14069,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() @@ -10979,11 +14100,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() @@ -10993,19 +14116,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 ) @@ -11016,12 +14146,18 @@ class get_users_from_backend_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() @@ -11034,7 +14170,11 @@ def read(self, iprot): self.success = [] (_etype387, _size384) = iprot.readListBegin() for _i388 in range(_size384): - _elem389 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem389 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success.append(_elem389) iprot.readListEnd() else: @@ -11046,14 +14186,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_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 iter390 in self.success: - oprot.writeString(iter390.encode('utf-8') if sys.version_info[0] == 2 else iter390) + oprot.writeString( + iter390.encode("utf-8") if sys.version_info[0] == 2 else iter390 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11063,18 +14207,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_users_from_backend_result) get_users_from_backend_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -11087,14 +14238,22 @@ class delete_user_from_backend_args(object): """ - - def __init__(self, backend_id=None, owner_id=None, user_id=None,): + def __init__( + self, + backend_id=None, + owner_id=None, + user_id=None, + ): self.backend_id = backend_id self.owner_id = owner_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() @@ -11109,12 +14268,20 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.owner_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.user_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.user_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11124,20 +14291,30 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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.owner_id is not None: - oprot.writeFieldBegin('owner_id', TType.STRING, 2) - oprot.writeString(self.owner_id.encode('utf-8') if sys.version_info[0] == 2 else self.owner_id) + oprot.writeFieldBegin("owner_id", TType.STRING, 2) + oprot.writeString( + self.owner_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.owner_id + ) oprot.writeFieldEnd() if self.user_id is not None: - oprot.writeFieldBegin('user_id', TType.STRING, 3) - oprot.writeString(self.user_id.encode('utf-8') if sys.version_info[0] == 2 else self.user_id) + oprot.writeFieldBegin("user_id", TType.STRING, 3) + oprot.writeString( + self.user_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.user_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11146,21 +14323,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(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, 'owner_id', 'UTF8', None, ), # 2 - (3, TType.STRING, 'user_id', 'UTF8', None, ), # 3 + ( + 1, + TType.I64, + "backend_id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "owner_id", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "user_id", + "UTF8", + None, + ), # 3 ) @@ -11171,12 +14367,18 @@ class delete_user_from_backend_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() @@ -11189,8 +14391,16 @@ def read(self, iprot): self.success = {} (_ktype392, _vtype393, _size391) = iprot.readMapBegin() for _i395 in range(_size391): - _key396 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val397 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key396 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val397 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key396] = _val397 iprot.readMapEnd() else: @@ -11202,15 +14412,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('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 kiter398, viter399 in self.success.items(): - oprot.writeString(kiter398.encode('utf-8') if sys.version_info[0] == 2 else kiter398) - oprot.writeString(viter399.encode('utf-8') if sys.version_info[0] == 2 else viter399) + oprot.writeString( + kiter398.encode("utf-8") if sys.version_info[0] == 2 else kiter398 + ) + oprot.writeString( + viter399.encode("utf-8") if sys.version_info[0] == 2 else viter399 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11220,26 +14436,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 ) class get_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() @@ -11254,9 +14479,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_templates_args') + oprot.writeStructBegin("get_templates_args") oprot.writeFieldStop() oprot.writeStructEnd() @@ -11264,18 +14491,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_templates_args) -get_templates_args.thrift_spec = ( -) +get_templates_args.thrift_spec = () class get_templates_result(object): @@ -11285,12 +14512,18 @@ class get_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() @@ -11306,8 +14539,16 @@ def read(self, iprot): _elem405 = {} (_ktype407, _vtype408, _size406) = iprot.readMapBegin() for _i410 in range(_size406): - _key411 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val412 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key411 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val412 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem405[_key411] = _val412 iprot.readMapEnd() self.success.append(_elem405) @@ -11321,17 +14562,27 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_templates_result') + oprot.writeStructBegin("get_templates_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.MAP, len(self.success)) for iter413 in self.success: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter413)) for kiter414, viter415 in iter413.items(): - oprot.writeString(kiter414.encode('utf-8') if sys.version_info[0] == 2 else kiter414) - oprot.writeString(viter415.encode('utf-8') if sys.version_info[0] == 2 else viter415) + oprot.writeString( + kiter414.encode("utf-8") + if sys.version_info[0] == 2 + else kiter414 + ) + oprot.writeString( + viter415.encode("utf-8") + if sys.version_info[0] == 2 + else viter415 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -11342,26 +14593,35 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(get_templates_result) get_templates_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 0 ) 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() @@ -11376,9 +14636,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() @@ -11386,18 +14648,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): @@ -11407,12 +14669,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() @@ -11425,7 +14693,11 @@ def read(self, iprot): self.success = [] (_etype419, _size416) = iprot.readListBegin() for _i420 in range(_size416): - _elem421 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem421 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success.append(_elem421) iprot.readListEnd() else: @@ -11437,14 +14709,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_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.STRING, len(self.success)) for iter422 in self.success: - oprot.writeString(iter422.encode('utf-8') if sys.version_info[0] == 2 else iter422) + oprot.writeString( + iter422.encode("utf-8") if sys.version_info[0] == 2 else iter422 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11454,18 +14730,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_allowed_templates_result) get_allowed_templates_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.STRING, "UTF8", False), + None, + ), # 0 ) @@ -11476,12 +14759,18 @@ class get_templates_by_template_args(object): """ - - def __init__(self, template_name=None,): + def __init__( + self, + template_name=None, + ): self.template_name = template_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() @@ -11491,7 +14780,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.template_name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11501,12 +14794,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_templates_by_template_args') + oprot.writeStructBegin("get_templates_by_template_args") 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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11515,19 +14814,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_templates_by_template_args) get_templates_by_template_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'template_name', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "template_name", + "UTF8", + None, + ), # 1 ) @@ -11538,12 +14844,18 @@ class get_templates_by_template_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() @@ -11559,8 +14871,16 @@ def read(self, iprot): _elem428 = {} (_ktype430, _vtype431, _size429) = iprot.readMapBegin() for _i433 in range(_size429): - _key434 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val435 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key434 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val435 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _elem428[_key434] = _val435 iprot.readMapEnd() self.success.append(_elem428) @@ -11574,17 +14894,27 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_templates_by_template_result') + oprot.writeStructBegin("get_templates_by_template_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.MAP, len(self.success)) for iter436 in self.success: oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter436)) for kiter437, viter438 in iter436.items(): - oprot.writeString(kiter437.encode('utf-8') if sys.version_info[0] == 2 else kiter437) - oprot.writeString(viter438.encode('utf-8') if sys.version_info[0] == 2 else viter438) + oprot.writeString( + kiter437.encode("utf-8") + if sys.version_info[0] == 2 + else kiter437 + ) + oprot.writeString( + viter438.encode("utf-8") + if sys.version_info[0] == 2 + else viter438 + ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -11595,18 +14925,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_templates_by_template_result) get_templates_by_template_result.thrift_spec = ( - (0, TType.LIST, 'success', (TType.MAP, (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), False), None, ), # 0 + ( + 0, + TType.LIST, + "success", + (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), + None, + ), # 0 ) @@ -11618,13 +14955,20 @@ class check_template_args(object): """ - - def __init__(self, template_name=None, template_version=None,): + def __init__( + self, + template_name=None, + template_version=None, + ): self.template_name = template_name 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() @@ -11634,12 +14978,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.template_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.template_name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.template_version = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.template_version = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11649,16 +15001,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('check_template_args') + oprot.writeStructBegin("check_template_args") 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.template_version is not None: - oprot.writeFieldBegin('template_version', TType.STRING, 2) - oprot.writeString(self.template_version.encode('utf-8') if sys.version_info[0] == 2 else self.template_version) + oprot.writeFieldBegin("template_version", TType.STRING, 2) + oprot.writeString( + self.template_version.encode("utf-8") + if sys.version_info[0] == 2 + else self.template_version + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11667,20 +15029,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(check_template_args) check_template_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'template_name', 'UTF8', None, ), # 1 - (2, TType.STRING, 'template_version', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "template_name", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "template_version", + "UTF8", + None, + ), # 2 ) @@ -11691,12 +15066,18 @@ class check_template_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() @@ -11709,8 +15090,16 @@ def read(self, iprot): self.success = {} (_ktype440, _vtype441, _size439) = iprot.readMapBegin() for _i443 in range(_size439): - _key444 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val445 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key444 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val445 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key444] = _val445 iprot.readMapEnd() else: @@ -11722,15 +15111,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('check_template_result') + oprot.writeStructBegin("check_template_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 kiter446, viter447 in self.success.items(): - oprot.writeString(kiter446.encode('utf-8') if sys.version_info[0] == 2 else kiter446) - oprot.writeString(viter447.encode('utf-8') if sys.version_info[0] == 2 else viter447) + oprot.writeString( + kiter446.encode("utf-8") if sys.version_info[0] == 2 else kiter446 + ) + oprot.writeString( + viter447.encode("utf-8") if sys.version_info[0] == 2 else viter447 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11740,18 +15135,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(check_template_result) check_template_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 ) @@ -11762,12 +15164,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() @@ -11777,7 +15185,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -11787,12 +15199,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() @@ -11801,19 +15219,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 ) @@ -11826,14 +15251,22 @@ class add_udp_security_group_result(object): """ - - def __init__(self, success=None, r=None, s=None,): + def __init__( + self, + success=None, + r=None, + s=None, + ): self.success = success self.r = r self.s = s def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -11865,19 +15298,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('add_udp_security_group_result') + oprot.writeStructBegin("add_udp_security_group_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() 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() @@ -11887,28 +15322,49 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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 = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'r', [ressourceException, None], None, ), # 1 - (2, TType.STRUCT, 's', [serverNotFoundException, None], None, ), # 2 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [ressourceException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "s", + [serverNotFoundException, None], + None, + ), # 2 ) 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() @@ -11923,9 +15379,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() @@ -11933,18 +15391,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): @@ -11954,12 +15412,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() @@ -11985,11 +15449,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_result') + oprot.writeStructBegin("get_servers_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter454 in self.success: iter454.write(oprot) @@ -12002,18 +15468,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 ) @@ -12024,12 +15497,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() @@ -12042,7 +15521,11 @@ def read(self, iprot): self.server_ids = [] (_etype458, _size455) = iprot.readListBegin() for _i459 in range(_size455): - _elem460 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem460 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.server_ids.append(_elem460) iprot.readListEnd() else: @@ -12054,14 +15537,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 iter461 in self.server_ids: - oprot.writeString(iter461.encode('utf-8') if sys.version_info[0] == 2 else iter461) + oprot.writeString( + iter461.encode("utf-8") if sys.version_info[0] == 2 else iter461 + ) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12071,19 +15558,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 ) @@ -12094,12 +15588,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() @@ -12125,11 +15625,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_ids_result') + oprot.writeStructBegin("get_servers_by_ids_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter468 in self.success: iter468.write(oprot) @@ -12142,18 +15644,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 ) @@ -12164,12 +15673,18 @@ class check_server_task_state_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() @@ -12179,7 +15694,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12189,12 +15708,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('check_server_task_state_args') + oprot.writeStructBegin("check_server_task_state_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() @@ -12203,19 +15728,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(check_server_task_state_args) check_server_task_state_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -12226,12 +15758,18 @@ class check_server_task_state_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() @@ -12241,7 +15779,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12251,12 +15793,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('check_server_task_state_result') + oprot.writeStructBegin("check_server_task_state_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() @@ -12265,18 +15813,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(check_server_task_state_result) check_server_task_state_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 ) @@ -12287,12 +15842,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() @@ -12302,7 +15863,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.bibigrid_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.bibigrid_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12312,12 +15877,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() @@ -12326,19 +15897,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 ) @@ -12349,12 +15927,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() @@ -12380,11 +15964,13 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('get_servers_by_bibigrid_id_result') + oprot.writeStructBegin("get_servers_by_bibigrid_id_result") if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter475 in self.success: iter475.write(oprot) @@ -12397,18 +15983,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 ) @@ -12425,8 +16018,16 @@ class scale_up_cluster_args(object): """ - - def __init__(self, cluster_id=None, image=None, flavor=None, count=None, names=None, start_idx=None, batch_idx=None,): + def __init__( + self, + cluster_id=None, + image=None, + flavor=None, + count=None, + names=None, + start_idx=None, + batch_idx=None, + ): self.cluster_id = cluster_id self.image = image self.flavor = flavor @@ -12436,7 +16037,11 @@ def __init__(self, cluster_id=None, image=None, flavor=None, count=None, names=N 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() @@ -12446,17 +16051,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.image = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.flavor = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.flavor = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -12469,7 +16086,11 @@ def read(self, iprot): self.names = [] (_etype479, _size476) = iprot.readListBegin() for _i480 in range(_size476): - _elem481 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem481 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.names.append(_elem481) iprot.readListEnd() else: @@ -12491,38 +16112,50 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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 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.flavor is not None: - oprot.writeFieldBegin('flavor', TType.STRING, 3) - oprot.writeString(self.flavor.encode('utf-8') if sys.version_info[0] == 2 else self.flavor) + oprot.writeFieldBegin("flavor", TType.STRING, 3) + oprot.writeString( + self.flavor.encode("utf-8") if sys.version_info[0] == 2 else self.flavor + ) 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 iter482 in self.names: - oprot.writeString(iter482.encode('utf-8') if sys.version_info[0] == 2 else iter482) + oprot.writeString( + iter482.encode("utf-8") if sys.version_info[0] == 2 else iter482 + ) 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() @@ -12532,25 +16165,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', 'UTF8', None, ), # 2 - (3, TType.STRING, 'flavor', '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", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "flavor", + "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 ) @@ -12561,12 +16237,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() @@ -12579,11 +16261,19 @@ def read(self, iprot): self.success = {} (_ktype484, _vtype485, _size483) = iprot.readMapBegin() for _i487 in range(_size483): - _key488 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key488 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _val489 = [] (_etype493, _size490) = iprot.readListBegin() for _i494 in range(_size490): - _elem495 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem495 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) _val489.append(_elem495) iprot.readListEnd() self.success[_key488] = _val489 @@ -12597,17 +16287,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 kiter496, viter497 in self.success.items(): - oprot.writeString(kiter496.encode('utf-8') if sys.version_info[0] == 2 else kiter496) + oprot.writeString( + kiter496.encode("utf-8") if sys.version_info[0] == 2 else kiter496 + ) oprot.writeListBegin(TType.STRING, len(viter497)) for iter498 in viter497: - oprot.writeString(iter498.encode('utf-8') if sys.version_info[0] == 2 else iter498) + oprot.writeString( + iter498.encode("utf-8") if sys.version_info[0] == 2 else iter498 + ) oprot.writeListEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -12618,18 +16314,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 ) @@ -12640,12 +16343,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() @@ -12655,7 +16364,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12665,12 +16378,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() @@ -12679,19 +16398,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 ) @@ -12702,12 +16428,18 @@ class get_cluster_info_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() @@ -12728,11 +16460,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_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() oprot.writeFieldStop() @@ -12742,18 +16476,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_cluster_info_result) get_cluster_info_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [ClusterInfo, None], None, ), # 0 + ( + 0, + TType.STRUCT, + "success", + [ClusterInfo, None], + None, + ), # 0 ) @@ -12764,12 +16505,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() @@ -12779,7 +16526,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12789,12 +16540,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() @@ -12803,19 +16560,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 ) @@ -12826,12 +16590,18 @@ class get_cluster_status_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() @@ -12844,8 +16614,16 @@ def read(self, iprot): self.success = {} (_ktype500, _vtype501, _size499) = iprot.readMapBegin() for _i503 in range(_size499): - _key504 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val505 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key504 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val505 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key504] = _val505 iprot.readMapEnd() else: @@ -12857,15 +16635,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_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 kiter506, viter507 in self.success.items(): - oprot.writeString(kiter506.encode('utf-8') if sys.version_info[0] == 2 else kiter506) - oprot.writeString(viter507.encode('utf-8') if sys.version_info[0] == 2 else viter507) + oprot.writeString( + kiter506.encode("utf-8") if sys.version_info[0] == 2 else kiter506 + ) + oprot.writeString( + viter507.encode("utf-8") if sys.version_info[0] == 2 else viter507 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -12875,18 +16659,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_cluster_status_result) get_cluster_status_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 ) @@ -12897,12 +16688,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() @@ -12912,7 +16709,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -12922,12 +16723,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() @@ -12936,19 +16743,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 ) @@ -12960,13 +16774,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() @@ -12993,15 +16814,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() @@ -13011,19 +16834,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 ) @@ -13034,12 +16870,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() @@ -13049,7 +16891,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13059,12 +16905,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() @@ -13073,19 +16925,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 ) @@ -13098,14 +16957,22 @@ class stop_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() @@ -13137,19 +17004,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('stop_server_result') + oprot.writeStructBegin("stop_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() 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() @@ -13159,20 +17028,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(stop_server_result) stop_server_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [conflictException, None], + None, + ), # 2 ) @@ -13187,8 +17075,14 @@ class create_snapshot_args(object): """ - - def __init__(self, openstack_id=None, name=None, elixir_id=None, base_tags=None, description=None,): + def __init__( + self, + openstack_id=None, + name=None, + elixir_id=None, + base_tags=None, + description=None, + ): self.openstack_id = openstack_id self.name = name self.elixir_id = elixir_id @@ -13196,7 +17090,11 @@ def __init__(self, openstack_id=None, name=None, elixir_id=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() @@ -13206,17 +17104,29 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.elixir_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.elixir_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -13224,14 +17134,22 @@ def read(self, iprot): self.base_tags = [] (_etype511, _size508) = iprot.readListBegin() for _i512 in range(_size508): - _elem513 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem513 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.base_tags.append(_elem513) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13241,31 +17159,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.elixir_id is not None: - oprot.writeFieldBegin('elixir_id', TType.STRING, 3) - oprot.writeString(self.elixir_id.encode('utf-8') if sys.version_info[0] == 2 else self.elixir_id) + oprot.writeFieldBegin("elixir_id", TType.STRING, 3) + oprot.writeString( + self.elixir_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.elixir_id + ) 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 iter514 in self.base_tags: - oprot.writeString(iter514.encode('utf-8') if sys.version_info[0] == 2 else iter514) + oprot.writeString( + iter514.encode("utf-8") if sys.version_info[0] == 2 else iter514 + ) 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() @@ -13274,23 +17210,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, 'elixir_id', '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, + "elixir_id", + "UTF8", + None, + ), # 3 + ( + 4, + TType.LIST, + "base_tags", + (TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "description", + "UTF8", + None, + ), # 5 ) @@ -13303,14 +17270,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() @@ -13320,7 +17295,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -13342,19 +17321,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() @@ -13364,28 +17349,49 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __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', [conflictException, None], None, ), # 2 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [conflictException, 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() @@ -13400,9 +17406,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() @@ -13410,18 +17418,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): @@ -13431,12 +17439,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() @@ -13449,8 +17463,16 @@ def read(self, iprot): self.success = {} (_ktype516, _vtype517, _size515) = iprot.readMapBegin() for _i519 in range(_size515): - _key520 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val521 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key520 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val521 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key520] = _val521 iprot.readMapEnd() else: @@ -13462,15 +17484,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 kiter522, viter523 in self.success.items(): - oprot.writeString(kiter522.encode('utf-8') if sys.version_info[0] == 2 else kiter522) - oprot.writeString(viter523.encode('utf-8') if sys.version_info[0] == 2 else viter523) + oprot.writeString( + kiter522.encode("utf-8") if sys.version_info[0] == 2 else kiter522 + ) + oprot.writeString( + viter523.encode("utf-8") if sys.version_info[0] == 2 else viter523 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13480,18 +17508,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 ) @@ -13505,15 +17540,24 @@ class start_cluster_args(object): """ - - def __init__(self, public_key=None, master_instance=None, worker_instance=None, user=None,): + def __init__( + self, + public_key=None, + master_instance=None, + worker_instance=None, + user=None, + ): self.public_key = public_key self.master_instance = master_instance self.worker_instance = worker_instance 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() @@ -13523,7 +17567,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.public_key = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.public_key = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -13545,7 +17593,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.user = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.user = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13555,27 +17607,35 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('start_cluster_args') + oprot.writeStructBegin("start_cluster_args") if self.public_key is not None: - oprot.writeFieldBegin('public_key', TType.STRING, 1) - oprot.writeString(self.public_key.encode('utf-8') if sys.version_info[0] == 2 else self.public_key) + oprot.writeFieldBegin("public_key", TType.STRING, 1) + oprot.writeString( + self.public_key.encode("utf-8") + if sys.version_info[0] == 2 + else self.public_key + ) oprot.writeFieldEnd() if self.master_instance is not None: - oprot.writeFieldBegin('master_instance', TType.STRUCT, 2) + oprot.writeFieldBegin("master_instance", TType.STRUCT, 2) self.master_instance.write(oprot) oprot.writeFieldEnd() if self.worker_instance is not None: - oprot.writeFieldBegin('worker_instance', TType.LIST, 3) + oprot.writeFieldBegin("worker_instance", TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.worker_instance)) for iter530 in self.worker_instance: iter530.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() @@ -13584,22 +17644,47 @@ def validate(self): return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(start_cluster_args) start_cluster_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'public_key', 'UTF8', None, ), # 1 - (2, TType.STRUCT, 'master_instance', [ClusterInstance, None], None, ), # 2 - (3, TType.LIST, 'worker_instance', (TType.STRUCT, [ClusterInstance, None], False), None, ), # 3 - (4, TType.STRING, 'user', 'UTF8', None, ), # 4 + ( + 1, + TType.STRING, + "public_key", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRUCT, + "master_instance", + [ClusterInstance, None], + None, + ), # 2 + ( + 3, + TType.LIST, + "worker_instance", + (TType.STRUCT, [ClusterInstance, None], False), + None, + ), # 3 + ( + 4, + TType.STRING, + "user", + "UTF8", + None, + ), # 4 ) @@ -13610,12 +17695,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() @@ -13628,8 +17719,16 @@ def read(self, iprot): self.success = {} (_ktype532, _vtype533, _size531) = iprot.readMapBegin() for _i535 in range(_size531): - _key536 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val537 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key536 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val537 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key536] = _val537 iprot.readMapEnd() else: @@ -13641,15 +17740,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 kiter538, viter539 in self.success.items(): - oprot.writeString(kiter538.encode('utf-8') if sys.version_info[0] == 2 else kiter538) - oprot.writeString(viter539.encode('utf-8') if sys.version_info[0] == 2 else viter539) + oprot.writeString( + kiter538.encode("utf-8") if sys.version_info[0] == 2 else kiter538 + ) + oprot.writeString( + viter539.encode("utf-8") if sys.version_info[0] == 2 else viter539 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13659,18 +17764,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 ) @@ -13681,12 +17793,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() @@ -13696,7 +17814,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13706,12 +17828,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() @@ -13720,19 +17848,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 ) @@ -13743,12 +17878,18 @@ class terminate_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() @@ -13761,8 +17902,16 @@ def read(self, iprot): self.success = {} (_ktype541, _vtype542, _size540) = iprot.readMapBegin() for _i544 in range(_size540): - _key545 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val546 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key545 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val546 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key545] = _val546 iprot.readMapEnd() else: @@ -13774,15 +17923,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('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 kiter547, viter548 in self.success.items(): - oprot.writeString(kiter547.encode('utf-8') if sys.version_info[0] == 2 else kiter547) - oprot.writeString(viter548.encode('utf-8') if sys.version_info[0] == 2 else viter548) + oprot.writeString( + kiter547.encode("utf-8") if sys.version_info[0] == 2 else kiter547 + ) + oprot.writeString( + viter548.encode("utf-8") if sys.version_info[0] == 2 else viter548 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13792,18 +17947,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(terminate_cluster_result) terminate_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 ) @@ -13814,12 +17976,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() @@ -13829,7 +17997,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.image_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.image_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13839,12 +18011,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() @@ -13853,19 +18031,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 ) @@ -13877,13 +18062,20 @@ class delete_image_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() @@ -13909,15 +18101,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_image_result') + oprot.writeStructBegin("delete_image_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() 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() @@ -13927,19 +18121,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(delete_image_result) delete_image_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'e', [imageNotFoundException, None], None, ), # 1 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [imageNotFoundException, None], + None, + ), # 1 ) @@ -13951,13 +18158,20 @@ class delete_volume_attachment_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() @@ -13967,12 +18181,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -13982,16 +18204,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('delete_volume_attachment_args') + oprot.writeStructBegin("delete_volume_attachment_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() @@ -14000,20 +18232,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_attachment_args) delete_volume_attachment_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 ) @@ -14026,14 +18271,22 @@ class delete_volume_attachment_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() @@ -14065,19 +18318,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('delete_volume_attachment_result') + oprot.writeStructBegin("delete_volume_attachment_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() 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() @@ -14087,20 +18342,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(delete_volume_attachment_result) delete_volume_attachment_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [conflictException, None], + None, + ), # 2 ) @@ -14111,12 +18385,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() @@ -14126,7 +18406,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14136,12 +18420,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() @@ -14150,19 +18440,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 ) @@ -14174,13 +18471,20 @@ class delete_volume_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() @@ -14206,15 +18510,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.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeFieldBegin("success", TType.BOOL, 0) oprot.writeBool(self.success) 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() @@ -14224,19 +18530,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(delete_volume_result) delete_volume_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'c', [conflictException, None], None, ), # 1 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "c", + [conflictException, None], + None, + ), # 1 ) @@ -14248,13 +18567,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() @@ -14264,12 +18590,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14279,16 +18613,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() @@ -14297,20 +18641,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 ) @@ -14323,14 +18680,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() @@ -14343,8 +18708,16 @@ def read(self, iprot): self.success = {} (_ktype550, _vtype551, _size549) = iprot.readMapBegin() for _i553 in range(_size549): - _key554 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val555 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key554 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val555 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key554] = _val555 iprot.readMapEnd() else: @@ -14368,23 +18741,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 kiter556, viter557 in self.success.items(): - oprot.writeString(kiter556.encode('utf-8') if sys.version_info[0] == 2 else kiter556) - oprot.writeString(viter557.encode('utf-8') if sys.version_info[0] == 2 else viter557) + oprot.writeString( + kiter556.encode("utf-8") if sys.version_info[0] == 2 else kiter556 + ) + oprot.writeString( + viter557.encode("utf-8") if sys.version_info[0] == 2 else viter557 + ) 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() @@ -14394,20 +18773,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', [serverNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [conflictException, None], + None, + ), # 2 ) @@ -14418,12 +18816,18 @@ class check_server_status_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() @@ -14433,7 +18837,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14443,12 +18851,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('check_server_status_args') + oprot.writeStructBegin("check_server_status_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() @@ -14457,19 +18871,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(check_server_status_args) check_server_status_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 1 ) @@ -14482,14 +18903,22 @@ class check_server_status_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() @@ -14522,19 +18951,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('check_server_status_result') + oprot.writeStructBegin("check_server_status_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.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 2) + oprot.writeFieldBegin("r", TType.STRUCT, 2) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14544,20 +18975,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(check_server_status_result) check_server_status_result.thrift_spec = ( - (0, TType.STRUCT, 'success', [VM, None], None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'r', [ressourceException, None], None, ), # 2 + ( + 0, + TType.STRUCT, + "success", + [VM, None], + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "r", + [ressourceException, None], + None, + ), # 2 ) @@ -14569,13 +19019,20 @@ class setUserPassword_args(object): """ - - def __init__(self, user=None, password=None,): + def __init__( + self, + user=None, + password=None, + ): self.user = user self.password = password def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -14585,12 +19042,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.user = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.user = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.password = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14600,16 +19065,24 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('setUserPassword_args') + oprot.writeStructBegin("setUserPassword_args") if self.user is not None: - oprot.writeFieldBegin('user', TType.STRING, 1) - oprot.writeString(self.user.encode('utf-8') if sys.version_info[0] == 2 else self.user) + oprot.writeFieldBegin("user", TType.STRING, 1) + oprot.writeString( + self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user + ) oprot.writeFieldEnd() if self.password is not None: - oprot.writeFieldBegin('password', TType.STRING, 2) - oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) + oprot.writeFieldBegin("password", TType.STRING, 2) + oprot.writeString( + self.password.encode("utf-8") + if sys.version_info[0] == 2 + else self.password + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14618,20 +19091,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(setUserPassword_args) setUserPassword_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'user', 'UTF8', None, ), # 1 - (2, TType.STRING, 'password', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "user", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "password", + "UTF8", + None, + ), # 2 ) @@ -14643,13 +19129,20 @@ class setUserPassword_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() @@ -14659,7 +19152,11 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 1: @@ -14675,15 +19172,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('setUserPassword_result') + oprot.writeStructBegin("setUserPassword_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() oprot.writeFieldStop() @@ -14693,19 +19196,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(setUserPassword_result) setUserPassword_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'e', [otherException, None], None, ), # 1 + ( + 0, + TType.STRING, + "success", + "UTF8", + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [otherException, None], + None, + ), # 1 ) @@ -14716,12 +19232,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() @@ -14731,7 +19253,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -14741,12 +19267,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() @@ -14755,19 +19287,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 ) @@ -14780,14 +19319,22 @@ class resume_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() @@ -14819,19 +19366,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('resume_server_result') + oprot.writeStructBegin("resume_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() 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() @@ -14841,20 +19390,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(resume_server_result) resume_server_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [conflictException, None], + None, + ), # 2 ) @@ -14867,14 +19435,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() @@ -14884,7 +19460,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.volume_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.volume_name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -14897,8 +19477,16 @@ def read(self, iprot): self.metadata = {} (_ktype559, _vtype560, _size558) = iprot.readMapBegin() for _i562 in range(_size558): - _key563 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val564 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key563 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val564 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key563] = _val564 iprot.readMapEnd() else: @@ -14910,23 +19498,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 kiter565, viter566 in self.metadata.items(): - oprot.writeString(kiter565.encode('utf-8') if sys.version_info[0] == 2 else kiter565) - oprot.writeString(viter566.encode('utf-8') if sys.version_info[0] == 2 else viter566) + oprot.writeString( + kiter565.encode("utf-8") if sys.version_info[0] == 2 else kiter565 + ) + oprot.writeString( + viter566.encode("utf-8") if sys.version_info[0] == 2 else viter566 + ) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14936,21 +19534,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 ) @@ -14962,13 +19579,20 @@ class create_volume_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() @@ -14981,8 +19605,16 @@ def read(self, iprot): self.success = {} (_ktype568, _vtype569, _size567) = iprot.readMapBegin() for _i571 in range(_size567): - _key572 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val573 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key572 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val573 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.success[_key572] = _val573 iprot.readMapEnd() else: @@ -15000,19 +19632,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_result') + oprot.writeStructBegin("create_volume_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 kiter574, viter575 in self.success.items(): - oprot.writeString(kiter574.encode('utf-8') if sys.version_info[0] == 2 else kiter574) - oprot.writeString(viter575.encode('utf-8') if sys.version_info[0] == 2 else viter575) + oprot.writeString( + kiter574.encode("utf-8") if sys.version_info[0] == 2 else kiter574 + ) + oprot.writeString( + viter575.encode("utf-8") if sys.version_info[0] == 2 else viter575 + ) oprot.writeMapEnd() oprot.writeFieldEnd() if self.r is not None: - oprot.writeFieldBegin('r', TType.STRUCT, 1) + oprot.writeFieldBegin("r", TType.STRUCT, 1) self.r.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15022,19 +19660,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_volume_result) create_volume_result.thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 - (1, TType.STRUCT, 'r', [ressourceException, None], None, ), # 1 + ( + 0, + TType.MAP, + "success", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 0 + ( + 1, + TType.STRUCT, + "r", + [ressourceException, None], + None, + ), # 1 ) @@ -15046,13 +19697,20 @@ class reboot_server_args(object): """ - - def __init__(self, server_id=None, reboot_type=None,): + def __init__( + self, + server_id=None, + reboot_type=None, + ): self.server_id = server_id self.reboot_type = reboot_type def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -15062,12 +19720,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.server_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.server_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.reboot_type = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.reboot_type = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -15077,16 +19743,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('reboot_server_args') + oprot.writeStructBegin("reboot_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.reboot_type is not None: - oprot.writeFieldBegin('reboot_type', TType.STRING, 2) - oprot.writeString(self.reboot_type.encode('utf-8') if sys.version_info[0] == 2 else self.reboot_type) + oprot.writeFieldBegin("reboot_type", TType.STRING, 2) + oprot.writeString( + self.reboot_type.encode("utf-8") + if sys.version_info[0] == 2 + else self.reboot_type + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -15095,20 +19771,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_server_args) reboot_server_args.thrift_spec = ( None, # 0 - (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 - (2, TType.STRING, 'reboot_type', 'UTF8', None, ), # 2 + ( + 1, + TType.STRING, + "server_id", + "UTF8", + None, + ), # 1 + ( + 2, + TType.STRING, + "reboot_type", + "UTF8", + None, + ), # 2 ) @@ -15121,14 +19810,22 @@ class reboot_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() @@ -15160,19 +19857,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('reboot_server_result') + oprot.writeStructBegin("reboot_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() 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() @@ -15182,21 +19881,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(reboot_server_result) reboot_server_result.thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'e', [serverNotFoundException, None], None, ), # 1 - (2, TType.STRUCT, 'c', [conflictException, None], None, ), # 2 + ( + 0, + TType.BOOL, + "success", + None, + None, + ), # 0 + ( + 1, + TType.STRUCT, + "e", + [serverNotFoundException, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "c", + [conflictException, None], + None, + ), # 2 ) fix_spec(all_structs) del all_structs - diff --git a/VirtualMachineService/__init__.py b/VirtualMachineService/__init__.py index 86a570c6..ba9c185a 100644 --- a/VirtualMachineService/__init__.py +++ b/VirtualMachineService/__init__.py @@ -1 +1 @@ -__all__ = ['ttypes', 'constants', 'VirtualMachineService'] +__all__ = ["ttypes", "constants", "VirtualMachineService"] diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index c5ba12dd..8e5c4d1c 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -35,7 +35,14 @@ class Playbook(object): PLAYBOOK_FAILED = "PLAYBOOK_FAILED" def __init__( - self, ip, port, playbooks_information, osi_private_key, public_key, pool, loaded_metadata + self, + ip, + port, + playbooks_information, + osi_private_key, + public_key, + pool, + loaded_metadata, ): self.loaded_metadata = loaded_metadata self.redis = redis.Redis(connection_pool=pool) # redis connection @@ -75,7 +82,6 @@ def __init__( mode="w+", dir=self.directory.name, delete=False ) - inventory_string = ( "[vm]\n" + ip + ":" + port + " ansible_user=ubuntu " "ansible_ssh_private_key_file=" diff --git a/VirtualMachineService/constants.py b/VirtualMachineService/constants.py index 550f6038..4324a467 100644 --- a/VirtualMachineService/constants.py +++ b/VirtualMachineService/constants.py @@ -6,10 +6,17 @@ # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +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/VirtualMachineService/ttypes.py b/VirtualMachineService/ttypes.py index 7a7d1988..80130652 100644 --- a/VirtualMachineService/ttypes.py +++ b/VirtualMachineService/ttypes.py @@ -6,13 +6,20 @@ # options string: py # -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +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.transport import TTransport + all_structs = [] @@ -27,8 +34,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 +49,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 +68,38 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.owner = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.owner = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.location_url = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.template = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.template_version = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -76,28 +109,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 +155,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__ @@ -132,8 +180,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 @@ -145,7 +203,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() @@ -155,32 +217,56 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.launch_date = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.launch_date = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.group_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.network_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.public_ip = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.subnet_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.user = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: @@ -190,12 +276,20 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.cluster_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.cluster_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.key_name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -205,44 +299,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() @@ -251,9 +377,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__ @@ -275,8 +400,16 @@ class Volume(object): """ - - def __init__(self, id=None, name=None, description=None, status=None, created_at=None, device=None, size=None,): + def __init__( + self, + id=None, + name=None, + description=None, + status=None, + created_at=None, + device=None, + size=None, + ): self.id = id self.name = name self.description = description @@ -286,7 +419,11 @@ def __init__(self, id=None, name=None, description=None, status=None, created_at 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() @@ -296,32 +433,56 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.status = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.created_at = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.device = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: @@ -336,35 +497,53 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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() oprot.writeFieldStop() @@ -374,9 +553,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__ @@ -401,8 +579,17 @@ class Flavor(object): """ - - def __init__(self, vcpus=None, ram=None, disk=None, name=None, openstack_id=None, description=None, tags=None, ephemeral_disk=None,): + def __init__( + self, + vcpus=None, + ram=None, + disk=None, + name=None, + openstack_id=None, + description=None, + tags=None, + ephemeral_disk=None, + ): self.vcpus = vcpus self.ram = ram self.disk = disk @@ -413,7 +600,11 @@ def __init__(self, vcpus=None, ram=None, disk=None, name=None, openstack_id=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() @@ -438,17 +629,29 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.openstack_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 7: @@ -456,7 +659,11 @@ def read(self, iprot): self.tags = [] (_etype3, _size0) = iprot.readListBegin() for _i4 in range(_size0): - _elem5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem5 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.tags.append(_elem5) iprot.readListEnd() else: @@ -473,42 +680,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('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.openstack_id is not None: - oprot.writeFieldBegin('openstack_id', TType.STRING, 5) - oprot.writeString(self.openstack_id.encode('utf-8') if sys.version_info[0] == 2 else self.openstack_id) + oprot.writeFieldBegin("openstack_id", TType.STRING, 5) + 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, 6) - oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) + oprot.writeFieldBegin("description", TType.STRING, 6) + 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, 7) + oprot.writeFieldBegin("tags", TType.LIST, 7) oprot.writeListBegin(TType.STRING, len(self.tags)) for iter6 in self.tags: - oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6) + oprot.writeString( + iter6.encode("utf-8") if sys.version_info[0] == 2 else iter6 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.ephemeral_disk is not None: - oprot.writeFieldBegin('ephemeral_disk', TType.I32, 8) + oprot.writeFieldBegin("ephemeral_disk", TType.I32, 8) oprot.writeI32(self.ephemeral_disk) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -516,23 +737,22 @@ 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!") 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__ @@ -559,8 +779,19 @@ 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, tag=None, is_snapshot=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, + tag=None, + is_snapshot=None, + ): self.name = name self.min_disk = min_disk self.min_ram = min_ram @@ -573,7 +804,11 @@ def __init__(self, name=None, min_disk=None, min_ram=None, status=None, created_ self.is_snapshot = is_snapshot def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -583,7 +818,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 2: @@ -598,27 +837,47 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.status = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.status = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.created_at = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.updated_at = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.description = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 9: @@ -626,7 +885,11 @@ def read(self, iprot): self.tag = [] (_etype10, _size7) = iprot.readListBegin() for _i11 in range(_size7): - _elem12 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem12 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.tag.append(_elem12) iprot.readListEnd() else: @@ -643,50 +906,74 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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.tag is not None: - oprot.writeFieldBegin('tag', TType.LIST, 9) + oprot.writeFieldBegin("tag", TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.tag)) for iter13 in self.tag: - oprot.writeString(iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13) + oprot.writeString( + iter13.encode("utf-8") if sys.version_info[0] == 2 else iter13 + ) oprot.writeListEnd() oprot.writeFieldEnd() if self.is_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() oprot.writeFieldStop() @@ -694,23 +981,22 @@ def write(self, oprot): def validate(self): if self.name is None: - raise TProtocolException(message='Required field name is unset!') + raise TProtocolException(message="Required field name is unset!") if self.min_disk is None: - raise TProtocolException(message='Required field min_disk is unset!') + raise TProtocolException(message="Required field min_disk is unset!") if self.min_ram is None: - raise TProtocolException(message='Required field min_ram is unset!') + raise TProtocolException(message="Required field min_ram is unset!") if self.status is None: - raise TProtocolException(message='Required field status is unset!') + raise TProtocolException(message="Required field status is unset!") if self.openstack_id is None: - raise TProtocolException(message='Required field openstack_id is unset!') + raise TProtocolException(message="Required field openstack_id is unset!") if self.tag is None: - raise TProtocolException(message='Required field tag is unset!') + raise TProtocolException(message="Required field tag 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__ @@ -740,8 +1026,22 @@ class VM(object): """ - - def __init__(self, flav=None, img=None, status=None, metadata=None, project_id=None, keyname=None, openstack_id=None, name=None, created_at=None, floating_ip=None, fixed_ip=None, diskspace=None, volume_id=None,): + def __init__( + self, + flav=None, + img=None, + status=None, + metadata=None, + project_id=None, + keyname=None, + openstack_id=None, + name=None, + created_at=None, + floating_ip=None, + fixed_ip=None, + diskspace=None, + volume_id=None, + ): self.flav = flav self.img = img self.status = status @@ -757,7 +1057,11 @@ def __init__(self, flav=None, img=None, status=None, metadata=None, project_id=N 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() @@ -779,7 +1083,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.status = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.status = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 4: @@ -787,45 +1095,81 @@ def read(self, iprot): self.metadata = {} (_ktype15, _vtype16, _size14) = iprot.readMapBegin() for _i18 in range(_size14): - _key19 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val20 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _key19 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + _val20 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) self.metadata[_key19] = _val20 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: - self.project_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.project_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.keyname = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.keyname = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.openstack_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.name = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: - self.created_at = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.created_at = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: - self.floating_ip = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.floating_ip = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: - self.fixed_ip = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.fixed_ip = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 12: @@ -835,7 +1179,11 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 13: if ftype == TType.STRING: - self.volume_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.volume_id = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -845,91 +1193,128 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(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.flav is not None: - oprot.writeFieldBegin('flav', TType.STRUCT, 1) + oprot.writeFieldBegin("flav", TType.STRUCT, 1) self.flav.write(oprot) oprot.writeFieldEnd() if self.img is not None: - oprot.writeFieldBegin('img', TType.STRUCT, 2) + oprot.writeFieldBegin("img", TType.STRUCT, 2) self.img.write(oprot) oprot.writeFieldEnd() if self.status is not None: - oprot.writeFieldBegin('status', TType.STRING, 3) - oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) + oprot.writeFieldBegin("status", TType.STRING, 3) + oprot.writeString( + self.status.encode("utf-8") if sys.version_info[0] == 2 else self.status + ) 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 kiter21, viter22 in self.metadata.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.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.project_id is not None: - oprot.writeFieldBegin('project_id', TType.STRING, 5) - oprot.writeString(self.project_id.encode('utf-8') if sys.version_info[0] == 2 else self.project_id) + oprot.writeFieldBegin("project_id", TType.STRING, 5) + 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, 6) - oprot.writeString(self.keyname.encode('utf-8') if sys.version_info[0] == 2 else self.keyname) + oprot.writeFieldBegin("keyname", TType.STRING, 6) + 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, 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.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 8) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldBegin("name", TType.STRING, 8) + 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, 9) - oprot.writeString(self.created_at.encode('utf-8') if sys.version_info[0] == 2 else self.created_at) + oprot.writeFieldBegin("created_at", TType.STRING, 9) + 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, 10) - oprot.writeString(self.floating_ip.encode('utf-8') if sys.version_info[0] == 2 else self.floating_ip) + oprot.writeFieldBegin("floating_ip", TType.STRING, 10) + 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, 11) - oprot.writeString(self.fixed_ip.encode('utf-8') if sys.version_info[0] == 2 else self.fixed_ip) + oprot.writeFieldBegin("fixed_ip", TType.STRING, 11) + oprot.writeString( + self.fixed_ip.encode("utf-8") + if sys.version_info[0] == 2 + else self.fixed_ip + ) oprot.writeFieldEnd() if self.diskspace is not None: - oprot.writeFieldBegin('diskspace', TType.I32, 12) + oprot.writeFieldBegin("diskspace", TType.I32, 12) oprot.writeI32(self.diskspace) oprot.writeFieldEnd() if self.volume_id is not None: - oprot.writeFieldBegin('volume_id', TType.STRING, 13) - oprot.writeString(self.volume_id.encode('utf-8') if sys.version_info[0] == 2 else self.volume_id) + oprot.writeFieldBegin("volume_id", TType.STRING, 13) + oprot.writeString( + self.volume_id.encode("utf-8") + if sys.version_info[0] == 2 + else self.volume_id + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.flav is None: - raise TProtocolException(message='Required field flav is unset!') + raise TProtocolException(message="Required field flav is unset!") if self.img is None: - raise TProtocolException(message='Required field img is unset!') + raise TProtocolException(message="Required field img 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.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!") return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -947,14 +1332,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() @@ -964,12 +1357,20 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.type = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.type = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.image = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) elif fid == 3: @@ -984,19 +1385,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() @@ -1004,15 +1411,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__ @@ -1032,14 +1438,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() @@ -1054,12 +1468,20 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.stdout = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.stdout = ( + iprot.readString().decode("utf-8") + 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') if sys.version_info[0] == 2 else iprot.readString() + self.stderr = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1069,37 +1491,42 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + oprot.trans.write( + oprot._fast_encode(self, [self.__class__, self.thrift_spec]) + ) return - oprot.writeStructBegin('PlaybookResult') + oprot.writeStructBegin("PlaybookResult") if self.status is not None: - oprot.writeFieldBegin('status', TType.I32, 1) + oprot.writeFieldBegin("status", TType.I32, 1) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.stdout is not None: - oprot.writeFieldBegin('stdout', TType.STRING, 2) - oprot.writeString(self.stdout.encode('utf-8') if sys.version_info[0] == 2 else self.stdout) + oprot.writeFieldBegin("stdout", TType.STRING, 2) + oprot.writeString( + self.stdout.encode("utf-8") if sys.version_info[0] == 2 else self.stdout + ) oprot.writeFieldEnd() if self.stderr is not None: - oprot.writeFieldBegin('stderr', TType.STRING, 3) - oprot.writeString(self.stderr.encode('utf-8') if sys.version_info[0] == 2 else self.stderr) + oprot.writeFieldBegin("stderr", TType.STRING, 3) + oprot.writeString( + self.stderr.encode("utf-8") if sys.version_info[0] == 2 else self.stderr + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.status is None: - raise TProtocolException(message='Required field status is unset!') + raise TProtocolException(message="Required field status is unset!") if self.stdout is None: - raise TProtocolException(message='Required field stdout is unset!') + raise TProtocolException(message="Required field stdout is unset!") if self.stderr is None: - raise TProtocolException(message='Required field stderr is unset!') + raise TProtocolException(message="Required field stderr is unset!") return def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ @@ -1115,12 +1542,18 @@ class otherException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1130,7 +1563,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1140,12 +1577,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('otherException') + oprot.writeStructBegin("otherException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1157,9 +1598,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__ @@ -1175,12 +1615,18 @@ class ressourceException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1190,7 +1636,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1200,12 +1650,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('ressourceException') + oprot.writeStructBegin("ressourceException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1217,9 +1671,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__ @@ -1235,12 +1688,18 @@ class nameException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1250,7 +1709,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1260,12 +1723,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('nameException') + oprot.writeStructBegin("nameException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1277,9 +1744,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__ @@ -1295,12 +1761,18 @@ class serverNotFoundException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1310,7 +1782,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1320,12 +1796,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('serverNotFoundException') + oprot.writeStructBegin("serverNotFoundException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1337,9 +1817,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__ @@ -1355,12 +1834,18 @@ class networkNotFoundException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1370,7 +1855,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1380,12 +1869,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('networkNotFoundException') + oprot.writeStructBegin("networkNotFoundException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1397,9 +1890,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__ @@ -1415,12 +1907,18 @@ class imageNotFoundException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1430,7 +1928,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1440,12 +1942,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('imageNotFoundException') + oprot.writeStructBegin("imageNotFoundException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1457,9 +1963,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__ @@ -1475,12 +1980,18 @@ class flavorNotFoundException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1490,7 +2001,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1500,12 +2015,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('flavorNotFoundException') + oprot.writeStructBegin("flavorNotFoundException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1517,9 +2036,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__ @@ -1537,12 +2055,18 @@ class authenticationException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1552,7 +2076,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1562,12 +2090,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('authenticationException') + oprot.writeStructBegin("authenticationException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1579,9 +2111,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__ @@ -1599,12 +2130,18 @@ class conflictException(TException): """ - - def __init__(self, Reason=None,): + def __init__( + self, + Reason=None, + ): self.Reason = Reason def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + if ( + iprot._fast_decode is not None + and isinstance(iprot.trans, TTransport.CReadableTransport) + and self.thrift_spec is not None + ): iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() @@ -1614,7 +2151,11 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.Reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.Reason = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) else: iprot.skip(ftype) else: @@ -1624,12 +2165,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('conflictException') + oprot.writeStructBegin("conflictException") if self.Reason is not None: - oprot.writeFieldBegin('Reason', TType.STRING, 1) - oprot.writeString(self.Reason.encode('utf-8') if sys.version_info[0] == 2 else self.Reason) + oprot.writeFieldBegin("Reason", TType.STRING, 1) + oprot.writeString( + self.Reason.encode("utf-8") if sys.version_info[0] == 2 else self.Reason + ) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1641,149 +2186,552 @@ def __str__(self): return repr(self) def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()] + return "%s(%s)" % (self.__class__.__name__, ", ".join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) + + all_structs.append(Backend) Backend.thrift_spec = ( None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 - (2, TType.STRING, 'owner', 'UTF8', None, ), # 2 - (3, TType.STRING, 'location_url', 'UTF8', None, ), # 3 - (4, TType.STRING, 'template', 'UTF8', None, ), # 4 - (5, TType.STRING, 'template_version', 'UTF8', None, ), # 5 + ( + 1, + TType.I64, + "id", + None, + None, + ), # 1 + ( + 2, + TType.STRING, + "owner", + "UTF8", + None, + ), # 2 + ( + 3, + TType.STRING, + "location_url", + "UTF8", + None, + ), # 3 + ( + 4, + TType.STRING, + "template", + "UTF8", + None, + ), # 4 + ( + 5, + TType.STRING, + "template_version", + "UTF8", + None, + ), # 5 ) all_structs.append(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 + ( + 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 ) 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, 'openstack_id', 'UTF8', None, ), # 5 - (6, TType.STRING, 'description', 'UTF8', None, ), # 6 - (7, TType.LIST, 'tags', (TType.STRING, 'UTF8', False), None, ), # 7 - (8, TType.I32, 'ephemeral_disk', None, None, ), # 8 + ( + 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, + "openstack_id", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "description", + "UTF8", + None, + ), # 6 + ( + 7, + TType.LIST, + "tags", + (TType.STRING, "UTF8", False), + None, + ), # 7 + ( + 8, + TType.I32, + "ephemeral_disk", + None, + None, + ), # 8 ) 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, 'tag', (TType.STRING, 'UTF8', False), None, ), # 9 - (10, TType.BOOL, 'is_snapshot', None, None, ), # 10 + ( + 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, + "tag", + (TType.STRING, "UTF8", False), + None, + ), # 9 + ( + 10, + TType.BOOL, + "is_snapshot", + None, + None, + ), # 10 ) all_structs.append(VM) VM.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'flav', [Flavor, None], None, ), # 1 - (2, TType.STRUCT, 'img', [Image, None], None, ), # 2 - (3, TType.STRING, 'status', 'UTF8', None, ), # 3 - (4, TType.MAP, 'metadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 - (5, TType.STRING, 'project_id', 'UTF8', None, ), # 5 - (6, TType.STRING, 'keyname', 'UTF8', None, ), # 6 - (7, TType.STRING, 'openstack_id', 'UTF8', None, ), # 7 - (8, TType.STRING, 'name', 'UTF8', None, ), # 8 - (9, TType.STRING, 'created_at', 'UTF8', None, ), # 9 - (10, TType.STRING, 'floating_ip', 'UTF8', None, ), # 10 - (11, TType.STRING, 'fixed_ip', 'UTF8', None, ), # 11 - (12, TType.I32, 'diskspace', None, None, ), # 12 - (13, TType.STRING, 'volume_id', 'UTF8', None, ), # 13 + ( + 1, + TType.STRUCT, + "flav", + [Flavor, None], + None, + ), # 1 + ( + 2, + TType.STRUCT, + "img", + [Image, None], + None, + ), # 2 + ( + 3, + TType.STRING, + "status", + "UTF8", + None, + ), # 3 + ( + 4, + TType.MAP, + "metadata", + (TType.STRING, "UTF8", TType.STRING, "UTF8", False), + None, + ), # 4 + ( + 5, + TType.STRING, + "project_id", + "UTF8", + None, + ), # 5 + ( + 6, + TType.STRING, + "keyname", + "UTF8", + None, + ), # 6 + ( + 7, + TType.STRING, + "openstack_id", + "UTF8", + None, + ), # 7 + ( + 8, + TType.STRING, + "name", + "UTF8", + None, + ), # 8 + ( + 9, + TType.STRING, + "created_at", + "UTF8", + None, + ), # 9 + ( + 10, + TType.STRING, + "floating_ip", + "UTF8", + None, + ), # 10 + ( + 11, + TType.STRING, + "fixed_ip", + "UTF8", + None, + ), # 11 + ( + 12, + TType.I32, + "diskspace", + None, + None, + ), # 12 + ( + 13, + TType.STRING, + "volume_id", + "UTF8", + None, + ), # 13 ) 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(otherException) otherException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) all_structs.append(ressourceException) ressourceException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) all_structs.append(nameException) nameException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) all_structs.append(serverNotFoundException) serverNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) all_structs.append(networkNotFoundException) networkNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) all_structs.append(imageNotFoundException) imageNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) all_structs.append(flavorNotFoundException) flavorNotFoundException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) all_structs.append(authenticationException) authenticationException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) all_structs.append(conflictException) conflictException.thrift_spec = ( None, # 0 - (1, TType.STRING, 'Reason', 'UTF8', None, ), # 1 + ( + 1, + TType.STRING, + "Reason", + "UTF8", + None, + ), # 1 ) fix_spec(all_structs) del all_structs From 3c97383a7e70890a07a0cbe2bf82ceef4863edc9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Jan 2021 05:05:52 +0000 Subject: [PATCH 10/14] feat(deps): bump ansible from 2.10.4 to 2.10.5 Bumps [ansible](https://github.com/ansible/ansible) from 2.10.4 to 2.10.5. - [Release notes](https://github.com/ansible/ansible/releases) - [Commits](https://github.com/ansible/ansible/commits) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7f6bd6d5..f026eb9b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ openstacksdk ==0.52.0 deprecated == 1.2.10 Click==7.1.2 flake8==3.8.4 -ansible==2.10.4 +ansible==2.10.5 ruamel.yaml<0.17.0 paramiko==2.7.2 pyvim==3.0.2 From 1b44d7679876503363b4685d150cf854e1452d64 Mon Sep 17 00:00:00 2001 From: Timo Date: Wed, 13 Jan 2021 21:41:48 +0100 Subject: [PATCH 11/14] fixes --- VirtualMachineService/ResenvMetadata.py | 6 ++---- VirtualMachineService/VirtualMachineHandler.py | 10 ++++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/VirtualMachineService/ResenvMetadata.py b/VirtualMachineService/ResenvMetadata.py index 7f4329a2..6953add4 100644 --- a/VirtualMachineService/ResenvMetadata.py +++ b/VirtualMachineService/ResenvMetadata.py @@ -2,8 +2,7 @@ class ResenvMetadata: def __init__( self, name, - port_range_max, - port_range_min, + port, security_group_name, security_group_description, security_group_ssh, @@ -11,8 +10,7 @@ def __init__( protocol, ): self.name = name - self.port_range_max = port_range_max - self.port_range_min = port_range_min + self.port = port self.security_group_name = security_group_name self.security_group_description = security_group_description self.security_group_ssh = security_group_ssh diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 086a1f6b..852d529e 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -83,8 +83,7 @@ GITHUB_PLAYBOOKS_REPO = os.environ["GITHUB_PLAYBOOKS_REPO"] PLAYBOOKS_DIR = "/code/VirtualMachineService/ancon/playbooks/" -PORT_RANGE_MAX = "port_range_max" -PORT_RANGE_MIN = "port_range_min" +PORT = "port" SECURITYGROUP_NAME = "securitygroup_name" SECURITYGROUP_DESCRIPTION = "securitygroup_description" SECURITYGROUP_SSH = "securitygroup_ssh" @@ -2640,8 +2639,8 @@ def create_security_group( self.conn.network.create_security_group_rule( direction=resenv_metadata.direction, protocol=resenv_metadata.protocol, - port_range_max=resenv_metadata.port_range_max, - port_range_min=resenv_metadata.port_range_min, + port_range_max=resenv_metadata.port, + port_range_min=resenv_metadata.port, security_group_id=new_security_group["id"], ) else: @@ -2713,8 +2712,7 @@ def update_playbooks(self): try: metadata = ResenvMetadata( template_metadata[TEMPLATE_NAME], - template_metadata[PORT_RANGE_MAX], - template_metadata[PORT_RANGE_MIN], + template_metadata[PORT], template_metadata[SECURITYGROUP_NAME], template_metadata[SECURITYGROUP_DESCRIPTION], template_metadata[SECURITYGROUP_SSH], From 27f98cc540f526369a7eec8b3d68099fd91fb72e Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 14 Jan 2021 01:52:39 +0100 Subject: [PATCH 12/14] final fixes --- .../VirtualMachineHandler.py | 43 ++++++++++++++----- VirtualMachineService/ancon/Playbook.py | 6 +-- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 852d529e..8bed70f5 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -59,7 +59,6 @@ from openstack import connection from openstack.exceptions import ConflictException from oslo_utils import encodeutils -import ResenvMetadata import os import json @@ -962,11 +961,11 @@ def prepare_security_groups_new_server(self, resenv, servername, http, https): name=servername + resenv_metadata.security_group_name, resenv=resenv, description=resenv_metadata.security_group_description, - ssh=resenv.security_group_ssh, + ssh=resenv_metadata.security_group_ssh, ).name ) - else: - LOG.info( + elif research_enviroment != "user_key_url": + LOG.error( "Failure to load metadata of reasearch enviroment: " + research_enviroment ) @@ -1223,7 +1222,7 @@ def create_and_deploy_playbook( osi_private_key=key, public_key=public_key, pool=self.pool, - loaded_metadata=self.loaded_resenv_metadata, + loaded_metadata_keys=list(self.loaded_resenv_metadata.keys()), ) self.redis.hset(openstack_id, "status", self.BUILD_PLAYBOOK) playbook.run_it() @@ -1532,7 +1531,6 @@ def cross_check_templates(self, templates): if template_dict["version"] in self.FORC_ALLOWED[template_dict["name"]]: return_templates.add(template_dict["name"]) # Todo load Metadata from multiple folders - # Todo Check here for file in os.listdir(PLAYBOOKS_DIR): if "_metadata.yml" in file: with open(PLAYBOOKS_DIR + file) as template_metadata: @@ -2628,6 +2626,7 @@ def create_security_group( port_range_min=22, security_group_id=new_security_group["id"], ) + print("DEBUG " + str(self.loaded_resenv_metadata)) for research_enviroment in resenv: if research_enviroment in self.loaded_resenv_metadata: LOG.info( @@ -2643,10 +2642,11 @@ def create_security_group( port_range_min=resenv_metadata.port, security_group_id=new_security_group["id"], ) - else: + print("Added security group with_: " + str(resenv_metadata.port) + ", " + str(resenv_metadata.direction) + ", " + str(resenv_metadata.protocol)) + elif research_enviroment != "user_key_url": # Todo add mail for this logging as this should not happen - LOG.info( - "Warning: Could not find metadata for research enviroment: " + LOG.error( + "Error: Could not find metadata for research enviroment: " + research_enviroment ) @@ -2719,7 +2719,7 @@ def update_playbooks(self): template_metadata[DIRECTION], template_metadata[PROTOCOL], ) - if metadata not in self.loaded_resenv_metadata.keys(): + if metadata.name not in list(self.loaded_resenv_metadata.keys()): self.loaded_resenv_metadata[metadata.name] = metadata else: if self.loaded_resenv_metadata[metadata.name] != metadata: @@ -2732,10 +2732,11 @@ def update_playbooks(self): + "\n" + str(e) ) + print("DEBUG loaded the following metadata: " + str(self.loaded_resenv_metadata.keys())) def load_resenv_metadata(self): + templates_metada = [] for file in os.listdir(PLAYBOOKS_DIR): - templates_metada = [] if "_metadata.yml" in file: with open(PLAYBOOKS_DIR + file) as template_metadata: try: @@ -2752,3 +2753,23 @@ def load_resenv_metadata(self): "Failed to parse Metadata yml: " + file + "\n" + str(e) ) return templates_metada + + +class ResenvMetadata: + def __init__( + self, + name, + port, + security_group_name, + security_group_description, + security_group_ssh, + direction, + protocol, + ): + self.name = name + self.port = port + self.security_group_name = security_group_name + self.security_group_description = security_group_description + self.security_group_ssh = security_group_ssh + self.direction = direction + self.protocol = protocol \ No newline at end of file diff --git a/VirtualMachineService/ancon/Playbook.py b/VirtualMachineService/ancon/Playbook.py index 8e5c4d1c..e86012e3 100644 --- a/VirtualMachineService/ancon/Playbook.py +++ b/VirtualMachineService/ancon/Playbook.py @@ -42,9 +42,9 @@ def __init__( osi_private_key, public_key, pool, - loaded_metadata, + loaded_metadata_keys, ): - self.loaded_metadata = loaded_metadata + self.loaded_metadata_keys = loaded_metadata_keys self.redis = redis.Redis(connection_pool=pool) # redis connection self.yaml_exec = ruamel.yaml.YAML() # yaml writer/reader self.vars_files = [] # _vars_file.yml to read @@ -140,7 +140,7 @@ def load_vars(): for p in p_array: p_dict.update({p[0]: {"version": p[1], "build": p[2]}}) data[playbook_name + "_tools"][k] = p_dict - if playbook_name in self.loaded_metadata.keys(): + if playbook_name in self.loaded_metadata_keys: for k, v in playbook_vars.items(): if k == "template_version": data[playbook_name + "_vars"][k] = v From 6c02d1274a986782af02d300f055122782e7696a Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 14 Jan 2021 01:54:47 +0100 Subject: [PATCH 13/14] remove prints --- VirtualMachineService/ResenvMetadata.py | 18 ------------------ VirtualMachineService/VirtualMachineHandler.py | 4 ---- 2 files changed, 22 deletions(-) delete mode 100644 VirtualMachineService/ResenvMetadata.py diff --git a/VirtualMachineService/ResenvMetadata.py b/VirtualMachineService/ResenvMetadata.py deleted file mode 100644 index 6953add4..00000000 --- a/VirtualMachineService/ResenvMetadata.py +++ /dev/null @@ -1,18 +0,0 @@ -class ResenvMetadata: - def __init__( - self, - name, - port, - security_group_name, - security_group_description, - security_group_ssh, - direction, - protocol, - ): - self.name = name - self.port = port - self.security_group_name = security_group_name - self.security_group_description = security_group_description - self.security_group_ssh = security_group_ssh - self.direction = direction - self.protocol = protocol diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 8bed70f5..b3b36a16 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -1570,7 +1570,6 @@ def get_templates(self): headers={"X-API-KEY": self.FORC_API_KEY}, verify=self.PRODUCTION, ) - print(response.json()) if response.status_code == 401: return [response.json()] else: @@ -2626,7 +2625,6 @@ def create_security_group( port_range_min=22, security_group_id=new_security_group["id"], ) - print("DEBUG " + str(self.loaded_resenv_metadata)) for research_enviroment in resenv: if research_enviroment in self.loaded_resenv_metadata: LOG.info( @@ -2642,7 +2640,6 @@ def create_security_group( port_range_min=resenv_metadata.port, security_group_id=new_security_group["id"], ) - print("Added security group with_: " + str(resenv_metadata.port) + ", " + str(resenv_metadata.direction) + ", " + str(resenv_metadata.protocol)) elif research_enviroment != "user_key_url": # Todo add mail for this logging as this should not happen LOG.error( @@ -2732,7 +2729,6 @@ def update_playbooks(self): + "\n" + str(e) ) - print("DEBUG loaded the following metadata: " + str(self.loaded_resenv_metadata.keys())) def load_resenv_metadata(self): templates_metada = [] From 5cc3584406b7bc4899f7b6e948e05c722261fc23 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 00:56:29 +0000 Subject: [PATCH 14/14] fix(Linting):blacked code --- VirtualMachineService/VirtualMachineHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index b3b36a16..b781f572 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -2768,4 +2768,4 @@ def __init__( self.security_group_description = security_group_description self.security_group_ssh = security_group_ssh self.direction = direction - self.protocol = protocol \ No newline at end of file + self.protocol = protocol