diff --git a/.gitignore b/.gitignore index 3b235856..32e21699 100644 --- a/.gitignore +++ b/.gitignore @@ -154,4 +154,4 @@ fabric.properties # additional data *.pem -*.sh +#*.sh diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 925dd627..d5e8743a 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -38,6 +38,7 @@ ) import datetime +import json import logging from distutils.version import LooseVersion import parser @@ -46,6 +47,7 @@ import urllib from contextlib import closing +import os import redis import requests as req import yaml @@ -56,9 +58,6 @@ 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() @@ -729,6 +728,22 @@ def get_network(self): ) return network + def create_add_keys_script(self, keys): + LOG.info(f"create add key script") + fileDir = os.path.dirname(os.path.abspath(__file__)) + key_script = os.path.join(fileDir, "scripts/bash/add_keys_to_authorized.sh") + bash_keys_array = "(" + for key in keys: + bash_keys_array += f'"{key}" ' + bash_keys_array += ")" + + with open(key_script, "r") as file: + text = file.read() + text = text.replace("KEYS_TO_ADD", bash_keys_array) + text = encodeutils.safe_encode(text.encode("utf-8")) + key_script = text + return key_script + def create_mount_init_script( self, volume_ids_path_new=None, volume_ids_path_attach=None ): @@ -977,6 +992,7 @@ def start_server_without_playbook( resenv, volume_ids_path_new=None, volume_ids_path_attach=None, + additional_keys=None, ): """ Start a new Server. @@ -1021,6 +1037,19 @@ def start_server_without_playbook( volume_ids_path_new=volume_ids_path_new, volume_ids_path_attach=volume_ids_path_attach, ) + if additional_keys: + if init_script: + add_key_script = self.create_add_keys_script(keys=additional_keys) + init_script = ( + add_key_script + + encodeutils.safe_encode("\n".encode("utf-8")) + + init_script + ) + + else: + init_script = self.create_add_keys_script(keys=additional_keys) + + LOG.info(init_script) server = self.conn.create_server( name=servername, diff --git a/VirtualMachineService/VirtualMachineService-remote b/VirtualMachineService/VirtualMachineService-remote index 8a0588f1..13a81dd6 100755 --- a/VirtualMachineService/VirtualMachineService-remote +++ b/VirtualMachineService/VirtualMachineService-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.13.0) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -44,7 +44,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' delete_metadata_from_server(string servername, keys)') print(' string add_floating_ip_to_server(string openstack_id, string network)') print(' bool create_connection(string username, string password, string auth_url, string user_domain_name, string project_domain_name)') - print(' start_server_without_playbook(string flavor, string image, string public_key, string servername, metadata, bool https, bool http, resenv, volume_ids_path_new, volume_ids_path_attach)') + print(' start_server_without_playbook(string flavor, string image, string public_key, string servername, metadata, bool https, bool http, resenv, volume_ids_path_new, volume_ids_path_attach, additional_keys)') print(' bool bibigrid_available()') print(' bool detach_ip_from_server(string server_id, string floating_ip)') print(' start_server_with_mounted_volume(string flavor, string image, string public_key, string servername, metadata, bool https, bool http, resenv, volume_ids_path_new, volume_ids_path_attach)') @@ -291,10 +291,10 @@ elif cmd == 'create_connection': pp.pprint(client.create_connection(args[0], args[1], args[2], args[3], args[4],)) elif cmd == 'start_server_without_playbook': - if len(args) != 10: - print('start_server_without_playbook requires 10 args') + if len(args) != 11: + print('start_server_without_playbook requires 11 args') sys.exit(1) - pp.pprint(client.start_server_without_playbook(args[0], args[1], args[2], args[3], eval(args[4]), eval(args[5]), eval(args[6]), eval(args[7]), eval(args[8]), eval(args[9]),)) + pp.pprint(client.start_server_without_playbook(args[0], args[1], args[2], args[3], eval(args[4]), eval(args[5]), eval(args[6]), eval(args[7]), eval(args[8]), eval(args[9]), eval(args[10]),)) elif cmd == 'bibigrid_available': if len(args) != 0: diff --git a/VirtualMachineService/VirtualMachineService.py b/VirtualMachineService/VirtualMachineService.py index 2e1d0a48..f507eb4d 100644 --- a/VirtualMachineService/VirtualMachineService.py +++ b/VirtualMachineService/VirtualMachineService.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.13.0) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -232,6 +232,7 @@ def start_server_without_playbook( resenv, volume_ids_path_new, volume_ids_path_attach, + additional_keys, ): """ Parameters: @@ -245,6 +246,7 @@ def start_server_without_playbook( - resenv - volume_ids_path_new - volume_ids_path_attach + - additional_keys """ pass @@ -1552,6 +1554,7 @@ def start_server_without_playbook( resenv, volume_ids_path_new, volume_ids_path_attach, + additional_keys, ): """ Parameters: @@ -1565,6 +1568,7 @@ def start_server_without_playbook( - resenv - volume_ids_path_new - volume_ids_path_attach + - additional_keys """ self.send_start_server_without_playbook( @@ -1578,6 +1582,7 @@ def start_server_without_playbook( resenv, volume_ids_path_new, volume_ids_path_attach, + additional_keys, ) return self.recv_start_server_without_playbook() @@ -1593,6 +1598,7 @@ def send_start_server_without_playbook( resenv, volume_ids_path_new, volume_ids_path_attach, + additional_keys, ): self._oprot.writeMessageBegin( "start_server_without_playbook", TMessageType.CALL, self._seqid @@ -1608,6 +1614,7 @@ def send_start_server_without_playbook( args.resenv = resenv args.volume_ids_path_new = volume_ids_path_new args.volume_ids_path_attach = volume_ids_path_attach + args.additional_keys = additional_keys args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -3757,15 +3764,9 @@ def __init__(self, handler): 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() @@ -4331,6 +4332,7 @@ def process_start_server_without_playbook(self, seqid, iprot, oprot): args.resenv, args.volume_ids_path_new, args.volume_ids_path_attach, + args.additional_keys, ) msg_type = TMessageType.REPLY except TTransport.TTransportException: @@ -9279,6 +9281,7 @@ class start_server_without_playbook_args(object): - resenv - volume_ids_path_new - volume_ids_path_attach + - additional_keys """ @@ -9294,6 +9297,7 @@ def __init__( resenv=None, volume_ids_path_new=None, volume_ids_path_attach=None, + additional_keys=None, ): self.flavor = flavor self.image = image @@ -9305,6 +9309,7 @@ def __init__( self.resenv = resenv self.volume_ids_path_new = volume_ids_path_new self.volume_ids_path_attach = volume_ids_path_attach + self.additional_keys = additional_keys def read(self, iprot): if ( @@ -9446,6 +9451,20 @@ def read(self, iprot): iprot.readListEnd() else: iprot.skip(ftype) + elif fid == 11: + if ftype == TType.LIST: + self.additional_keys = [] + (_etype182, _size179) = iprot.readListBegin() + for _i183 in range(_size179): + _elem184 = ( + iprot.readString().decode("utf-8") + if sys.version_info[0] == 2 + else iprot.readString() + ) + self.additional_keys.append(_elem184) + iprot.readListEnd() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -9489,12 +9508,12 @@ def write(self, oprot): if self.metadata is not None: oprot.writeFieldBegin("metadata", TType.MAP, 5) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter179, viter180 in self.metadata.items(): + for kiter185, viter186 in self.metadata.items(): oprot.writeString( - kiter179.encode("utf-8") if sys.version_info[0] == 2 else kiter179 + kiter185.encode("utf-8") if sys.version_info[0] == 2 else kiter185 ) oprot.writeString( - viter180.encode("utf-8") if sys.version_info[0] == 2 else viter180 + viter186.encode("utf-8") if sys.version_info[0] == 2 else viter186 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -9509,27 +9528,27 @@ def write(self, oprot): if self.resenv is not None: oprot.writeFieldBegin("resenv", TType.LIST, 8) oprot.writeListBegin(TType.STRING, len(self.resenv)) - for iter181 in self.resenv: + for iter187 in self.resenv: oprot.writeString( - iter181.encode("utf-8") if sys.version_info[0] == 2 else iter181 + iter187.encode("utf-8") if sys.version_info[0] == 2 else iter187 ) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: 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(): + for iter188 in self.volume_ids_path_new: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter188)) + for kiter189, viter190 in iter188.items(): oprot.writeString( - kiter183.encode("utf-8") + kiter189.encode("utf-8") if sys.version_info[0] == 2 - else kiter183 + else kiter189 ) oprot.writeString( - viter184.encode("utf-8") + viter190.encode("utf-8") if sys.version_info[0] == 2 - else viter184 + else viter190 ) oprot.writeMapEnd() oprot.writeListEnd() @@ -9537,22 +9556,31 @@ def write(self, oprot): if self.volume_ids_path_attach is not None: 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(): + for iter191 in self.volume_ids_path_attach: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter191)) + for kiter192, viter193 in iter191.items(): oprot.writeString( - kiter186.encode("utf-8") + kiter192.encode("utf-8") if sys.version_info[0] == 2 - else kiter186 + else kiter192 ) oprot.writeString( - viter187.encode("utf-8") + viter193.encode("utf-8") if sys.version_info[0] == 2 - else viter187 + else viter193 ) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() + if self.additional_keys is not None: + oprot.writeFieldBegin("additional_keys", TType.LIST, 11) + oprot.writeListBegin(TType.STRING, len(self.additional_keys)) + for iter194 in self.additional_keys: + oprot.writeString( + iter194.encode("utf-8") if sys.version_info[0] == 2 else iter194 + ) + oprot.writeListEnd() + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9643,6 +9671,13 @@ def __ne__(self, other): (TType.MAP, (TType.STRING, "UTF8", TType.STRING, "UTF8", False), False), None, ), # 10 + ( + 11, + TType.LIST, + "additional_keys", + (TType.STRING, "UTF8", False), + None, + ), # 11 ) @@ -9696,19 +9731,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype189, _vtype190, _size188) = iprot.readMapBegin() - for _i192 in range(_size188): - _key193 = ( + (_ktype196, _vtype197, _size195) = iprot.readMapBegin() + for _i199 in range(_size195): + _key200 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val194 = ( + _val201 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key193] = _val194 + self.success[_key200] = _val201 iprot.readMapEnd() else: iprot.skip(ftype) @@ -9769,12 +9804,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter195, viter196 in self.success.items(): + for kiter202, viter203 in self.success.items(): oprot.writeString( - kiter195.encode("utf-8") if sys.version_info[0] == 2 else kiter195 + kiter202.encode("utf-8") if sys.version_info[0] == 2 else kiter202 ) oprot.writeString( - viter196.encode("utf-8") if sys.version_info[0] == 2 else viter196 + viter203.encode("utf-8") if sys.version_info[0] == 2 else viter203 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -10287,19 +10322,19 @@ def read(self, iprot): elif fid == 5: if ftype == TType.MAP: self.metadata = {} - (_ktype198, _vtype199, _size197) = iprot.readMapBegin() - for _i201 in range(_size197): - _key202 = ( + (_ktype205, _vtype206, _size204) = iprot.readMapBegin() + for _i208 in range(_size204): + _key209 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val203 = ( + _val210 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.metadata[_key202] = _val203 + self.metadata[_key209] = _val210 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10316,62 +10351,62 @@ def read(self, iprot): elif fid == 8: if ftype == TType.LIST: self.resenv = [] - (_etype207, _size204) = iprot.readListBegin() - for _i208 in range(_size204): - _elem209 = ( + (_etype214, _size211) = iprot.readListBegin() + for _i215 in range(_size211): + _elem216 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.resenv.append(_elem209) + self.resenv.append(_elem216) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.volume_ids_path_new = [] - (_etype213, _size210) = iprot.readListBegin() - for _i214 in range(_size210): - _elem215 = {} - (_ktype217, _vtype218, _size216) = iprot.readMapBegin() - for _i220 in range(_size216): - _key221 = ( + (_etype220, _size217) = iprot.readListBegin() + for _i221 in range(_size217): + _elem222 = {} + (_ktype224, _vtype225, _size223) = iprot.readMapBegin() + for _i227 in range(_size223): + _key228 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val222 = ( + _val229 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _elem215[_key221] = _val222 + _elem222[_key228] = _val229 iprot.readMapEnd() - self.volume_ids_path_new.append(_elem215) + self.volume_ids_path_new.append(_elem222) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.LIST: self.volume_ids_path_attach = [] - (_etype226, _size223) = iprot.readListBegin() - for _i227 in range(_size223): - _elem228 = {} - (_ktype230, _vtype231, _size229) = iprot.readMapBegin() - for _i233 in range(_size229): - _key234 = ( + (_etype233, _size230) = iprot.readListBegin() + for _i234 in range(_size230): + _elem235 = {} + (_ktype237, _vtype238, _size236) = iprot.readMapBegin() + for _i240 in range(_size236): + _key241 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val235 = ( + _val242 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _elem228[_key234] = _val235 + _elem235[_key241] = _val242 iprot.readMapEnd() - self.volume_ids_path_attach.append(_elem228) + self.volume_ids_path_attach.append(_elem235) iprot.readListEnd() else: iprot.skip(ftype) @@ -10418,12 +10453,12 @@ def write(self, oprot): if self.metadata is not None: oprot.writeFieldBegin("metadata", TType.MAP, 5) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter236, viter237 in self.metadata.items(): + for kiter243, viter244 in self.metadata.items(): oprot.writeString( - kiter236.encode("utf-8") if sys.version_info[0] == 2 else kiter236 + kiter243.encode("utf-8") if sys.version_info[0] == 2 else kiter243 ) oprot.writeString( - viter237.encode("utf-8") if sys.version_info[0] == 2 else viter237 + viter244.encode("utf-8") if sys.version_info[0] == 2 else viter244 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -10438,27 +10473,27 @@ def write(self, oprot): if self.resenv is not None: oprot.writeFieldBegin("resenv", TType.LIST, 8) oprot.writeListBegin(TType.STRING, len(self.resenv)) - for iter238 in self.resenv: + for iter245 in self.resenv: oprot.writeString( - iter238.encode("utf-8") if sys.version_info[0] == 2 else iter238 + iter245.encode("utf-8") if sys.version_info[0] == 2 else iter245 ) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: 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(): + for iter246 in self.volume_ids_path_new: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter246)) + for kiter247, viter248 in iter246.items(): oprot.writeString( - kiter240.encode("utf-8") + kiter247.encode("utf-8") if sys.version_info[0] == 2 - else kiter240 + else kiter247 ) oprot.writeString( - viter241.encode("utf-8") + viter248.encode("utf-8") if sys.version_info[0] == 2 - else viter241 + else viter248 ) oprot.writeMapEnd() oprot.writeListEnd() @@ -10466,18 +10501,18 @@ def write(self, oprot): if self.volume_ids_path_attach is not None: 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(): + for iter249 in self.volume_ids_path_attach: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter249)) + for kiter250, viter251 in iter249.items(): oprot.writeString( - kiter243.encode("utf-8") + kiter250.encode("utf-8") if sys.version_info[0] == 2 - else kiter243 + else kiter250 ) oprot.writeString( - viter244.encode("utf-8") + viter251.encode("utf-8") if sys.version_info[0] == 2 - else viter244 + else viter251 ) oprot.writeMapEnd() oprot.writeListEnd() @@ -10625,19 +10660,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype246, _vtype247, _size245) = iprot.readMapBegin() - for _i249 in range(_size245): - _key250 = ( + (_ktype253, _vtype254, _size252) = iprot.readMapBegin() + for _i256 in range(_size252): + _key257 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val251 = ( + _val258 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key250] = _val251 + self.success[_key257] = _val258 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10698,12 +10733,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter252, viter253 in self.success.items(): + for kiter259, viter260 in self.success.items(): oprot.writeString( - kiter252.encode("utf-8") if sys.version_info[0] == 2 else kiter252 + kiter259.encode("utf-8") if sys.version_info[0] == 2 else kiter259 ) oprot.writeString( - viter253.encode("utf-8") if sys.version_info[0] == 2 else viter253 + viter260.encode("utf-8") if sys.version_info[0] == 2 else viter260 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -10905,19 +10940,19 @@ def read(self, iprot): elif fid == 5: if ftype == TType.MAP: self.metadata = {} - (_ktype255, _vtype256, _size254) = iprot.readMapBegin() - for _i258 in range(_size254): - _key259 = ( + (_ktype262, _vtype263, _size261) = iprot.readMapBegin() + for _i265 in range(_size261): + _key266 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val260 = ( + _val267 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.metadata[_key259] = _val260 + self.metadata[_key266] = _val267 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10952,14 +10987,14 @@ def read(self, iprot): elif fid == 10: if ftype == TType.LIST: self.resenv = [] - (_etype264, _size261) = iprot.readListBegin() - for _i265 in range(_size261): - _elem266 = ( + (_etype271, _size268) = iprot.readListBegin() + for _i272 in range(_size268): + _elem273 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.resenv.append(_elem266) + self.resenv.append(_elem273) iprot.readListEnd() else: iprot.skip(ftype) @@ -11006,12 +11041,12 @@ def write(self, oprot): if self.metadata is not None: oprot.writeFieldBegin("metadata", TType.MAP, 5) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter267, viter268 in self.metadata.items(): + for kiter274, viter275 in self.metadata.items(): oprot.writeString( - kiter267.encode("utf-8") if sys.version_info[0] == 2 else kiter267 + kiter274.encode("utf-8") if sys.version_info[0] == 2 else kiter274 ) oprot.writeString( - viter268.encode("utf-8") if sys.version_info[0] == 2 else viter268 + viter275.encode("utf-8") if sys.version_info[0] == 2 else viter275 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -11042,9 +11077,9 @@ def write(self, oprot): if self.resenv is not None: oprot.writeFieldBegin("resenv", TType.LIST, 10) oprot.writeListBegin(TType.STRING, len(self.resenv)) - for iter269 in self.resenv: + for iter276 in self.resenv: oprot.writeString( - iter269.encode("utf-8") if sys.version_info[0] == 2 else iter269 + iter276.encode("utf-8") if sys.version_info[0] == 2 else iter276 ) oprot.writeListEnd() oprot.writeFieldEnd() @@ -11191,19 +11226,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype271, _vtype272, _size270) = iprot.readMapBegin() - for _i274 in range(_size270): - _key275 = ( + (_ktype278, _vtype279, _size277) = iprot.readMapBegin() + for _i281 in range(_size277): + _key282 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val276 = ( + _val283 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key275] = _val276 + self.success[_key282] = _val283 iprot.readMapEnd() else: iprot.skip(ftype) @@ -11264,12 +11299,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter277, viter278 in self.success.items(): + for kiter284, viter285 in self.success.items(): oprot.writeString( - kiter277.encode("utf-8") if sys.version_info[0] == 2 else kiter277 + kiter284.encode("utf-8") if sys.version_info[0] == 2 else kiter284 ) oprot.writeString( - viter278.encode("utf-8") if sys.version_info[0] == 2 else viter278 + viter285.encode("utf-8") if sys.version_info[0] == 2 else viter285 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -11459,19 +11494,19 @@ def read(self, iprot): elif fid == 4: if ftype == TType.MAP: self.metadata = {} - (_ktype280, _vtype281, _size279) = iprot.readMapBegin() - for _i283 in range(_size279): - _key284 = ( + (_ktype287, _vtype288, _size286) = iprot.readMapBegin() + for _i290 in range(_size286): + _key291 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val285 = ( + _val292 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.metadata[_key284] = _val285 + self.metadata[_key291] = _val292 iprot.readMapEnd() else: iprot.skip(ftype) @@ -11488,62 +11523,62 @@ def read(self, iprot): elif fid == 7: if ftype == TType.LIST: self.resenv = [] - (_etype289, _size286) = iprot.readListBegin() - for _i290 in range(_size286): - _elem291 = ( + (_etype296, _size293) = iprot.readListBegin() + for _i297 in range(_size293): + _elem298 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.resenv.append(_elem291) + self.resenv.append(_elem298) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.volume_ids_path_new = [] - (_etype295, _size292) = iprot.readListBegin() - for _i296 in range(_size292): - _elem297 = {} - (_ktype299, _vtype300, _size298) = iprot.readMapBegin() - for _i302 in range(_size298): - _key303 = ( + (_etype302, _size299) = iprot.readListBegin() + for _i303 in range(_size299): + _elem304 = {} + (_ktype306, _vtype307, _size305) = iprot.readMapBegin() + for _i309 in range(_size305): + _key310 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val304 = ( + _val311 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _elem297[_key303] = _val304 + _elem304[_key310] = _val311 iprot.readMapEnd() - self.volume_ids_path_new.append(_elem297) + self.volume_ids_path_new.append(_elem304) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.LIST: self.volume_ids_path_attach = [] - (_etype308, _size305) = iprot.readListBegin() - for _i309 in range(_size305): - _elem310 = {} - (_ktype312, _vtype313, _size311) = iprot.readMapBegin() - for _i315 in range(_size311): - _key316 = ( + (_etype315, _size312) = iprot.readListBegin() + for _i316 in range(_size312): + _elem317 = {} + (_ktype319, _vtype320, _size318) = iprot.readMapBegin() + for _i322 in range(_size318): + _key323 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val317 = ( + _val324 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _elem310[_key316] = _val317 + _elem317[_key323] = _val324 iprot.readMapEnd() - self.volume_ids_path_attach.append(_elem310) + self.volume_ids_path_attach.append(_elem317) iprot.readListEnd() else: iprot.skip(ftype) @@ -11582,12 +11617,12 @@ def write(self, oprot): if self.metadata is not None: oprot.writeFieldBegin("metadata", TType.MAP, 4) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter318, viter319 in self.metadata.items(): + for kiter325, viter326 in self.metadata.items(): oprot.writeString( - kiter318.encode("utf-8") if sys.version_info[0] == 2 else kiter318 + kiter325.encode("utf-8") if sys.version_info[0] == 2 else kiter325 ) oprot.writeString( - viter319.encode("utf-8") if sys.version_info[0] == 2 else viter319 + viter326.encode("utf-8") if sys.version_info[0] == 2 else viter326 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -11602,27 +11637,27 @@ def write(self, oprot): if self.resenv is not None: oprot.writeFieldBegin("resenv", TType.LIST, 7) oprot.writeListBegin(TType.STRING, len(self.resenv)) - for iter320 in self.resenv: + for iter327 in self.resenv: oprot.writeString( - iter320.encode("utf-8") if sys.version_info[0] == 2 else iter320 + iter327.encode("utf-8") if sys.version_info[0] == 2 else iter327 ) oprot.writeListEnd() oprot.writeFieldEnd() if self.volume_ids_path_new is not None: 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(): + for iter328 in self.volume_ids_path_new: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter328)) + for kiter329, viter330 in iter328.items(): oprot.writeString( - kiter322.encode("utf-8") + kiter329.encode("utf-8") if sys.version_info[0] == 2 - else kiter322 + else kiter329 ) oprot.writeString( - viter323.encode("utf-8") + viter330.encode("utf-8") if sys.version_info[0] == 2 - else viter323 + else viter330 ) oprot.writeMapEnd() oprot.writeListEnd() @@ -11630,18 +11665,18 @@ def write(self, oprot): if self.volume_ids_path_attach is not None: 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(): + for iter331 in self.volume_ids_path_attach: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter331)) + for kiter332, viter333 in iter331.items(): oprot.writeString( - kiter325.encode("utf-8") + kiter332.encode("utf-8") if sys.version_info[0] == 2 - else kiter325 + else kiter332 ) oprot.writeString( - viter326.encode("utf-8") + viter333.encode("utf-8") if sys.version_info[0] == 2 - else viter326 + else viter333 ) oprot.writeMapEnd() oprot.writeListEnd() @@ -11783,19 +11818,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype328, _vtype329, _size327) = iprot.readMapBegin() - for _i331 in range(_size327): - _key332 = ( + (_ktype335, _vtype336, _size334) = iprot.readMapBegin() + for _i338 in range(_size334): + _key339 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val333 = ( + _val340 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key332] = _val333 + self.success[_key339] = _val340 iprot.readMapEnd() else: iprot.skip(ftype) @@ -11856,12 +11891,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter334, viter335 in self.success.items(): + for kiter341, viter342 in self.success.items(): oprot.writeString( - kiter334.encode("utf-8") if sys.version_info[0] == 2 else kiter334 + kiter341.encode("utf-8") if sys.version_info[0] == 2 else kiter341 ) oprot.writeString( - viter335.encode("utf-8") if sys.version_info[0] == 2 else viter335 + viter342.encode("utf-8") if sys.version_info[0] == 2 else viter342 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -12174,29 +12209,29 @@ def read(self, iprot): elif fid == 2: if ftype == TType.MAP: self.playbooks_information = {} - (_ktype337, _vtype338, _size336) = iprot.readMapBegin() - for _i340 in range(_size336): - _key341 = ( + (_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() ) - _val342 = {} - (_ktype344, _vtype345, _size343) = iprot.readMapBegin() - for _i347 in range(_size343): - _key348 = ( + _val349 = {} + (_ktype351, _vtype352, _size350) = iprot.readMapBegin() + for _i354 in range(_size350): + _key355 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val349 = ( + _val356 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val342[_key348] = _val349 + _val349[_key355] = _val356 iprot.readMapEnd() - self.playbooks_information[_key341] = _val342 + self.playbooks_information[_key348] = _val349 iprot.readMapEnd() else: iprot.skip(ftype) @@ -12234,21 +12269,21 @@ def write(self, oprot): oprot.writeMapBegin( TType.STRING, TType.MAP, len(self.playbooks_information) ) - for kiter350, viter351 in self.playbooks_information.items(): + for kiter357, viter358 in self.playbooks_information.items(): oprot.writeString( - kiter350.encode("utf-8") if sys.version_info[0] == 2 else kiter350 + kiter357.encode("utf-8") if sys.version_info[0] == 2 else kiter357 ) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(viter351)) - for kiter352, viter353 in viter351.items(): + oprot.writeMapBegin(TType.STRING, TType.STRING, len(viter358)) + for kiter359, viter360 in viter358.items(): oprot.writeString( - kiter352.encode("utf-8") + kiter359.encode("utf-8") if sys.version_info[0] == 2 - else kiter352 + else kiter359 ) oprot.writeString( - viter353.encode("utf-8") + viter360.encode("utf-8") if sys.version_info[0] == 2 - else viter353 + else viter360 ) oprot.writeMapEnd() oprot.writeMapEnd() @@ -13122,11 +13157,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype357, _size354) = iprot.readListBegin() - for _i358 in range(_size354): - _elem359 = Backend() - _elem359.read(iprot) - self.success.append(_elem359) + (_etype364, _size361) = iprot.readListBegin() + for _i365 in range(_size361): + _elem366 = Backend() + _elem366.read(iprot) + self.success.append(_elem366) iprot.readListEnd() else: iprot.skip(ftype) @@ -13145,8 +13180,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter360 in self.success: - iter360.write(oprot) + for iter367 in self.success: + iter367.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13292,11 +13327,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype364, _size361) = iprot.readListBegin() - for _i365 in range(_size361): - _elem366 = Backend() - _elem366.read(iprot) - self.success.append(_elem366) + (_etype371, _size368) = iprot.readListBegin() + for _i372 in range(_size368): + _elem373 = Backend() + _elem373.read(iprot) + self.success.append(_elem373) iprot.readListEnd() else: iprot.skip(ftype) @@ -13315,8 +13350,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter367 in self.success: - iter367.write(oprot) + for iter374 in self.success: + iter374.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13462,11 +13497,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype371, _size368) = iprot.readListBegin() - for _i372 in range(_size368): - _elem373 = Backend() - _elem373.read(iprot) - self.success.append(_elem373) + (_etype378, _size375) = iprot.readListBegin() + for _i379 in range(_size375): + _elem380 = Backend() + _elem380.read(iprot) + self.success.append(_elem380) iprot.readListEnd() else: iprot.skip(ftype) @@ -13485,8 +13520,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter374 in self.success: - iter374.write(oprot) + for iter381 in self.success: + iter381.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -13993,19 +14028,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype376, _vtype377, _size375) = iprot.readMapBegin() - for _i379 in range(_size375): - _key380 = ( + (_ktype383, _vtype384, _size382) = iprot.readMapBegin() + for _i386 in range(_size382): + _key387 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val381 = ( + _val388 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key380] = _val381 + self.success[_key387] = _val388 iprot.readMapEnd() else: iprot.skip(ftype) @@ -14024,12 +14059,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter382, viter383 in self.success.items(): + for kiter389, viter390 in self.success.items(): oprot.writeString( - kiter382.encode("utf-8") if sys.version_info[0] == 2 else kiter382 + kiter389.encode("utf-8") if sys.version_info[0] == 2 else kiter389 ) oprot.writeString( - viter383.encode("utf-8") if sys.version_info[0] == 2 else viter383 + viter390.encode("utf-8") if sys.version_info[0] == 2 else viter390 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -14168,14 +14203,14 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype387, _size384) = iprot.readListBegin() - for _i388 in range(_size384): - _elem389 = ( + (_etype394, _size391) = iprot.readListBegin() + for _i395 in range(_size391): + _elem396 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success.append(_elem389) + self.success.append(_elem396) iprot.readListEnd() else: iprot.skip(ftype) @@ -14194,9 +14229,9 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter390 in self.success: + for iter397 in self.success: oprot.writeString( - iter390.encode("utf-8") if sys.version_info[0] == 2 else iter390 + iter397.encode("utf-8") if sys.version_info[0] == 2 else iter397 ) oprot.writeListEnd() oprot.writeFieldEnd() @@ -14389,19 +14424,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype392, _vtype393, _size391) = iprot.readMapBegin() - for _i395 in range(_size391): - _key396 = ( + (_ktype399, _vtype400, _size398) = iprot.readMapBegin() + for _i402 in range(_size398): + _key403 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val397 = ( + _val404 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key396] = _val397 + self.success[_key403] = _val404 iprot.readMapEnd() else: iprot.skip(ftype) @@ -14420,12 +14455,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter398, viter399 in self.success.items(): + for kiter405, viter406 in self.success.items(): oprot.writeString( - kiter398.encode("utf-8") if sys.version_info[0] == 2 else kiter398 + kiter405.encode("utf-8") if sys.version_info[0] == 2 else kiter405 ) oprot.writeString( - viter399.encode("utf-8") if sys.version_info[0] == 2 else viter399 + viter406.encode("utf-8") if sys.version_info[0] == 2 else viter406 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -14534,24 +14569,24 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype403, _size400) = iprot.readListBegin() - for _i404 in range(_size400): - _elem405 = {} - (_ktype407, _vtype408, _size406) = iprot.readMapBegin() - for _i410 in range(_size406): - _key411 = ( + (_etype410, _size407) = iprot.readListBegin() + for _i411 in range(_size407): + _elem412 = {} + (_ktype414, _vtype415, _size413) = iprot.readMapBegin() + for _i417 in range(_size413): + _key418 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val412 = ( + _val419 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _elem405[_key411] = _val412 + _elem412[_key418] = _val419 iprot.readMapEnd() - self.success.append(_elem405) + self.success.append(_elem412) iprot.readListEnd() else: iprot.skip(ftype) @@ -14570,18 +14605,18 @@ def write(self, oprot): if self.success is not None: 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(): + for iter420 in self.success: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter420)) + for kiter421, viter422 in iter420.items(): oprot.writeString( - kiter414.encode("utf-8") + kiter421.encode("utf-8") if sys.version_info[0] == 2 - else kiter414 + else kiter421 ) oprot.writeString( - viter415.encode("utf-8") + viter422.encode("utf-8") if sys.version_info[0] == 2 - else viter415 + else viter422 ) oprot.writeMapEnd() oprot.writeListEnd() @@ -14691,14 +14726,14 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype419, _size416) = iprot.readListBegin() - for _i420 in range(_size416): - _elem421 = ( + (_etype426, _size423) = iprot.readListBegin() + for _i427 in range(_size423): + _elem428 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success.append(_elem421) + self.success.append(_elem428) iprot.readListEnd() else: iprot.skip(ftype) @@ -14717,9 +14752,9 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter422 in self.success: + for iter429 in self.success: oprot.writeString( - iter422.encode("utf-8") if sys.version_info[0] == 2 else iter422 + iter429.encode("utf-8") if sys.version_info[0] == 2 else iter429 ) oprot.writeListEnd() oprot.writeFieldEnd() @@ -14866,24 +14901,24 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype426, _size423) = iprot.readListBegin() - for _i427 in range(_size423): - _elem428 = {} - (_ktype430, _vtype431, _size429) = iprot.readMapBegin() - for _i433 in range(_size429): - _key434 = ( + (_etype433, _size430) = iprot.readListBegin() + for _i434 in range(_size430): + _elem435 = {} + (_ktype437, _vtype438, _size436) = iprot.readMapBegin() + for _i440 in range(_size436): + _key441 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val435 = ( + _val442 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _elem428[_key434] = _val435 + _elem435[_key441] = _val442 iprot.readMapEnd() - self.success.append(_elem428) + self.success.append(_elem435) iprot.readListEnd() else: iprot.skip(ftype) @@ -14902,18 +14937,18 @@ def write(self, oprot): if self.success is not None: 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(): + for iter443 in self.success: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter443)) + for kiter444, viter445 in iter443.items(): oprot.writeString( - kiter437.encode("utf-8") + kiter444.encode("utf-8") if sys.version_info[0] == 2 - else kiter437 + else kiter444 ) oprot.writeString( - viter438.encode("utf-8") + viter445.encode("utf-8") if sys.version_info[0] == 2 - else viter438 + else viter445 ) oprot.writeMapEnd() oprot.writeListEnd() @@ -15088,19 +15123,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype440, _vtype441, _size439) = iprot.readMapBegin() - for _i443 in range(_size439): - _key444 = ( + (_ktype447, _vtype448, _size446) = iprot.readMapBegin() + for _i450 in range(_size446): + _key451 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val445 = ( + _val452 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key444] = _val445 + self.success[_key451] = _val452 iprot.readMapEnd() else: iprot.skip(ftype) @@ -15119,12 +15154,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter446, viter447 in self.success.items(): + for kiter453, viter454 in self.success.items(): oprot.writeString( - kiter446.encode("utf-8") if sys.version_info[0] == 2 else kiter446 + kiter453.encode("utf-8") if sys.version_info[0] == 2 else kiter453 ) oprot.writeString( - viter447.encode("utf-8") if sys.version_info[0] == 2 else viter447 + viter454.encode("utf-8") if sys.version_info[0] == 2 else viter454 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -15434,11 +15469,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype451, _size448) = iprot.readListBegin() - for _i452 in range(_size448): - _elem453 = VM() - _elem453.read(iprot) - self.success.append(_elem453) + (_etype458, _size455) = iprot.readListBegin() + for _i459 in range(_size455): + _elem460 = VM() + _elem460.read(iprot) + self.success.append(_elem460) iprot.readListEnd() else: iprot.skip(ftype) @@ -15457,8 +15492,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter454 in self.success: - iter454.write(oprot) + for iter461 in self.success: + iter461.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15519,14 +15554,14 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.server_ids = [] - (_etype458, _size455) = iprot.readListBegin() - for _i459 in range(_size455): - _elem460 = ( + (_etype465, _size462) = iprot.readListBegin() + for _i466 in range(_size462): + _elem467 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.server_ids.append(_elem460) + self.server_ids.append(_elem467) iprot.readListEnd() else: iprot.skip(ftype) @@ -15545,9 +15580,9 @@ def write(self, oprot): if self.server_ids is not None: oprot.writeFieldBegin("server_ids", TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.server_ids)) - for iter461 in self.server_ids: + for iter468 in self.server_ids: oprot.writeString( - iter461.encode("utf-8") if sys.version_info[0] == 2 else iter461 + iter468.encode("utf-8") if sys.version_info[0] == 2 else iter468 ) oprot.writeListEnd() oprot.writeFieldEnd() @@ -15610,11 +15645,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype465, _size462) = iprot.readListBegin() - for _i466 in range(_size462): - _elem467 = VM() - _elem467.read(iprot) - self.success.append(_elem467) + (_etype472, _size469) = iprot.readListBegin() + for _i473 in range(_size469): + _elem474 = VM() + _elem474.read(iprot) + self.success.append(_elem474) iprot.readListEnd() else: iprot.skip(ftype) @@ -15633,8 +15668,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter468 in self.success: - iter468.write(oprot) + for iter475 in self.success: + iter475.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15949,11 +15984,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype472, _size469) = iprot.readListBegin() - for _i473 in range(_size469): - _elem474 = VM() - _elem474.read(iprot) - self.success.append(_elem474) + (_etype479, _size476) = iprot.readListBegin() + for _i480 in range(_size476): + _elem481 = VM() + _elem481.read(iprot) + self.success.append(_elem481) iprot.readListEnd() else: iprot.skip(ftype) @@ -15972,8 +16007,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter475 in self.success: - iter475.write(oprot) + for iter482 in self.success: + iter482.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -16084,14 +16119,14 @@ def read(self, iprot): elif fid == 5: if ftype == TType.LIST: self.names = [] - (_etype479, _size476) = iprot.readListBegin() - for _i480 in range(_size476): - _elem481 = ( + (_etype486, _size483) = iprot.readListBegin() + for _i487 in range(_size483): + _elem488 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.names.append(_elem481) + self.names.append(_elem488) iprot.readListEnd() else: iprot.skip(ftype) @@ -16144,9 +16179,9 @@ def write(self, oprot): if self.names is not None: oprot.writeFieldBegin("names", TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.names)) - for iter482 in self.names: + for iter489 in self.names: oprot.writeString( - iter482.encode("utf-8") if sys.version_info[0] == 2 else iter482 + iter489.encode("utf-8") if sys.version_info[0] == 2 else iter489 ) oprot.writeListEnd() oprot.writeFieldEnd() @@ -16259,24 +16294,24 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype484, _vtype485, _size483) = iprot.readMapBegin() - for _i487 in range(_size483): - _key488 = ( + (_ktype491, _vtype492, _size490) = iprot.readMapBegin() + for _i494 in range(_size490): + _key495 = ( 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 = ( + _val496 = [] + (_etype500, _size497) = iprot.readListBegin() + for _i501 in range(_size497): + _elem502 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val489.append(_elem495) + _val496.append(_elem502) iprot.readListEnd() - self.success[_key488] = _val489 + self.success[_key495] = _val496 iprot.readMapEnd() else: iprot.skip(ftype) @@ -16295,14 +16330,14 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.success)) - for kiter496, viter497 in self.success.items(): + for kiter503, viter504 in self.success.items(): oprot.writeString( - kiter496.encode("utf-8") if sys.version_info[0] == 2 else kiter496 + kiter503.encode("utf-8") if sys.version_info[0] == 2 else kiter503 ) - oprot.writeListBegin(TType.STRING, len(viter497)) - for iter498 in viter497: + oprot.writeListBegin(TType.STRING, len(viter504)) + for iter505 in viter504: oprot.writeString( - iter498.encode("utf-8") if sys.version_info[0] == 2 else iter498 + iter505.encode("utf-8") if sys.version_info[0] == 2 else iter505 ) oprot.writeListEnd() oprot.writeMapEnd() @@ -16612,19 +16647,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype500, _vtype501, _size499) = iprot.readMapBegin() - for _i503 in range(_size499): - _key504 = ( + (_ktype507, _vtype508, _size506) = iprot.readMapBegin() + for _i510 in range(_size506): + _key511 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val505 = ( + _val512 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key504] = _val505 + self.success[_key511] = _val512 iprot.readMapEnd() else: iprot.skip(ftype) @@ -16643,12 +16678,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter506, viter507 in self.success.items(): + for kiter513, viter514 in self.success.items(): oprot.writeString( - kiter506.encode("utf-8") if sys.version_info[0] == 2 else kiter506 + kiter513.encode("utf-8") if sys.version_info[0] == 2 else kiter513 ) oprot.writeString( - viter507.encode("utf-8") if sys.version_info[0] == 2 else viter507 + viter514.encode("utf-8") if sys.version_info[0] == 2 else viter514 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -17132,14 +17167,14 @@ def read(self, iprot): elif fid == 4: if ftype == TType.LIST: self.base_tags = [] - (_etype511, _size508) = iprot.readListBegin() - for _i512 in range(_size508): - _elem513 = ( + (_etype518, _size515) = iprot.readListBegin() + for _i519 in range(_size515): + _elem520 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.base_tags.append(_elem513) + self.base_tags.append(_elem520) iprot.readListEnd() else: iprot.skip(ftype) @@ -17189,9 +17224,9 @@ def write(self, oprot): if self.base_tags is not None: oprot.writeFieldBegin("base_tags", TType.LIST, 4) oprot.writeListBegin(TType.STRING, len(self.base_tags)) - for iter514 in self.base_tags: + for iter521 in self.base_tags: oprot.writeString( - iter514.encode("utf-8") if sys.version_info[0] == 2 else iter514 + iter521.encode("utf-8") if sys.version_info[0] == 2 else iter521 ) oprot.writeListEnd() oprot.writeFieldEnd() @@ -17461,19 +17496,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype516, _vtype517, _size515) = iprot.readMapBegin() - for _i519 in range(_size515): - _key520 = ( + (_ktype523, _vtype524, _size522) = iprot.readMapBegin() + for _i526 in range(_size522): + _key527 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val521 = ( + _val528 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key520] = _val521 + self.success[_key527] = _val528 iprot.readMapEnd() else: iprot.skip(ftype) @@ -17492,12 +17527,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter522, viter523 in self.success.items(): + for kiter529, viter530 in self.success.items(): oprot.writeString( - kiter522.encode("utf-8") if sys.version_info[0] == 2 else kiter522 + kiter529.encode("utf-8") if sys.version_info[0] == 2 else kiter529 ) oprot.writeString( - viter523.encode("utf-8") if sys.version_info[0] == 2 else viter523 + viter530.encode("utf-8") if sys.version_info[0] == 2 else viter530 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -17583,11 +17618,11 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.worker_instance = [] - (_etype527, _size524) = iprot.readListBegin() - for _i528 in range(_size524): - _elem529 = ClusterInstance() - _elem529.read(iprot) - self.worker_instance.append(_elem529) + (_etype534, _size531) = iprot.readListBegin() + for _i535 in range(_size531): + _elem536 = ClusterInstance() + _elem536.read(iprot) + self.worker_instance.append(_elem536) iprot.readListEnd() else: iprot.skip(ftype) @@ -17627,8 +17662,8 @@ def write(self, oprot): if self.worker_instance is not None: oprot.writeFieldBegin("worker_instance", TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.worker_instance)) - for iter530 in self.worker_instance: - iter530.write(oprot) + for iter537 in self.worker_instance: + iter537.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.user is not None: @@ -17717,19 +17752,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype532, _vtype533, _size531) = iprot.readMapBegin() - for _i535 in range(_size531): - _key536 = ( + (_ktype539, _vtype540, _size538) = iprot.readMapBegin() + for _i542 in range(_size538): + _key543 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val537 = ( + _val544 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key536] = _val537 + self.success[_key543] = _val544 iprot.readMapEnd() else: iprot.skip(ftype) @@ -17748,12 +17783,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter538, viter539 in self.success.items(): + for kiter545, viter546 in self.success.items(): oprot.writeString( - kiter538.encode("utf-8") if sys.version_info[0] == 2 else kiter538 + kiter545.encode("utf-8") if sys.version_info[0] == 2 else kiter545 ) oprot.writeString( - viter539.encode("utf-8") if sys.version_info[0] == 2 else viter539 + viter546.encode("utf-8") if sys.version_info[0] == 2 else viter546 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -17900,19 +17935,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype541, _vtype542, _size540) = iprot.readMapBegin() - for _i544 in range(_size540): - _key545 = ( + (_ktype548, _vtype549, _size547) = iprot.readMapBegin() + for _i551 in range(_size547): + _key552 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val546 = ( + _val553 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key545] = _val546 + self.success[_key552] = _val553 iprot.readMapEnd() else: iprot.skip(ftype) @@ -17931,12 +17966,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter547, viter548 in self.success.items(): + for kiter554, viter555 in self.success.items(): oprot.writeString( - kiter547.encode("utf-8") if sys.version_info[0] == 2 else kiter547 + kiter554.encode("utf-8") if sys.version_info[0] == 2 else kiter554 ) oprot.writeString( - viter548.encode("utf-8") if sys.version_info[0] == 2 else viter548 + viter555.encode("utf-8") if sys.version_info[0] == 2 else viter555 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -18706,19 +18741,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype550, _vtype551, _size549) = iprot.readMapBegin() - for _i553 in range(_size549): - _key554 = ( + (_ktype557, _vtype558, _size556) = iprot.readMapBegin() + for _i560 in range(_size556): + _key561 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val555 = ( + _val562 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key554] = _val555 + self.success[_key561] = _val562 iprot.readMapEnd() else: iprot.skip(ftype) @@ -18749,12 +18784,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter556, viter557 in self.success.items(): + for kiter563, viter564 in self.success.items(): oprot.writeString( - kiter556.encode("utf-8") if sys.version_info[0] == 2 else kiter556 + kiter563.encode("utf-8") if sys.version_info[0] == 2 else kiter563 ) oprot.writeString( - viter557.encode("utf-8") if sys.version_info[0] == 2 else viter557 + viter564.encode("utf-8") if sys.version_info[0] == 2 else viter564 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -19475,19 +19510,19 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.metadata = {} - (_ktype559, _vtype560, _size558) = iprot.readMapBegin() - for _i562 in range(_size558): - _key563 = ( + (_ktype566, _vtype567, _size565) = iprot.readMapBegin() + for _i569 in range(_size565): + _key570 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val564 = ( + _val571 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.metadata[_key563] = _val564 + self.metadata[_key570] = _val571 iprot.readMapEnd() else: iprot.skip(ftype) @@ -19518,12 +19553,12 @@ def write(self, oprot): if self.metadata is not None: oprot.writeFieldBegin("metadata", TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter565, viter566 in self.metadata.items(): + for kiter572, viter573 in self.metadata.items(): oprot.writeString( - kiter565.encode("utf-8") if sys.version_info[0] == 2 else kiter565 + kiter572.encode("utf-8") if sys.version_info[0] == 2 else kiter572 ) oprot.writeString( - viter566.encode("utf-8") if sys.version_info[0] == 2 else viter566 + viter573.encode("utf-8") if sys.version_info[0] == 2 else viter573 ) oprot.writeMapEnd() oprot.writeFieldEnd() @@ -19603,19 +19638,19 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype568, _vtype569, _size567) = iprot.readMapBegin() - for _i571 in range(_size567): - _key572 = ( + (_ktype575, _vtype576, _size574) = iprot.readMapBegin() + for _i578 in range(_size574): + _key579 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - _val573 = ( + _val580 = ( iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString() ) - self.success[_key572] = _val573 + self.success[_key579] = _val580 iprot.readMapEnd() else: iprot.skip(ftype) @@ -19640,12 +19675,12 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin("success", TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter574, viter575 in self.success.items(): + for kiter581, viter582 in self.success.items(): oprot.writeString( - kiter574.encode("utf-8") if sys.version_info[0] == 2 else kiter574 + kiter581.encode("utf-8") if sys.version_info[0] == 2 else kiter581 ) oprot.writeString( - viter575.encode("utf-8") if sys.version_info[0] == 2 else viter575 + viter582.encode("utf-8") if sys.version_info[0] == 2 else viter582 ) oprot.writeMapEnd() oprot.writeFieldEnd() diff --git a/VirtualMachineService/constants.py b/VirtualMachineService/constants.py index 4324a467..b182601b 100644 --- a/VirtualMachineService/constants.py +++ b/VirtualMachineService/constants.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.13.0) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # diff --git a/VirtualMachineService/scripts/bash/add_keys_to_authorized.sh b/VirtualMachineService/scripts/bash/add_keys_to_authorized.sh new file mode 100644 index 00000000..df6d9943 --- /dev/null +++ b/VirtualMachineService/scripts/bash/add_keys_to_authorized.sh @@ -0,0 +1,8 @@ +#!/bin/bash +declare -a keys_to_add=KEYS_TO_ADD +echo "Found keys: ${#keys_to_add[*]}" +for ix in ${!keys_to_add[*]} +do + printf "\n%s" "${keys_to_add[$ix]}" >> /home/ubuntu/.ssh/authorized_keys + +done diff --git a/VirtualMachineService/scripts/bash/deactive_auto_update.sh b/VirtualMachineService/scripts/bash/deactive_auto_update.sh new file mode 100644 index 00000000..b6faefd2 --- /dev/null +++ b/VirtualMachineService/scripts/bash/deactive_auto_update.sh @@ -0,0 +1,5 @@ +#!/bin/bash +echo > /etc/apt/apt.conf.d/20auto-upgrades << "END" +APT::Periodic::Update-Package-Lists "0" +APT::Periodic::Unattended-Upgrade "0" +END diff --git a/VirtualMachineService/scripts/bash/mount.sh b/VirtualMachineService/scripts/bash/mount.sh index 685c53c1..dc23ac0f 100644 --- a/VirtualMachineService/scripts/bash/mount.sh +++ b/VirtualMachineService/scripts/bash/mount.sh @@ -1,5 +1,4 @@ #!/bin/bash -sudo touch test declare -a volumes_new=VOLUME_IDS_NEW declare -a paths_new=VOLUME_PATHS_NEW declare -a volumes_attach=VOLUME_IDS_ATTACH diff --git a/VirtualMachineService/ttypes.py b/VirtualMachineService/ttypes.py index 80130652..16057a07 100644 --- a/VirtualMachineService/ttypes.py +++ b/VirtualMachineService/ttypes.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.13.0) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # diff --git a/portal_client.thrift b/portal_client.thrift index 9919941c..07b922ac 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -382,7 +382,8 @@ service VirtualMachineService { 7:bool http, 8:list resenv, 9:list> volume_ids_path_new, - 10:list> volume_ids_path_attach + 10:list> volume_ids_path_attach, + 11:list additional_keys ) throws (1:nameException e,2:ressourceException r,3:serverNotFoundException s,4: networkNotFoundException n,5:imageNotFoundException i,6:flavorNotFoundException f,7:otherException o)