diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da03b5e..a243b869 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## (2020-01-15) + + +#### Features + +* **Modi:** added more Methods ([f1f357b5](f1f357b5)) + ## (2020-01-09) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index b9f7453b..7e8d6f42 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -1227,7 +1227,7 @@ def get_servers(self): # self.logger.info(server_list) return server_list - def add_security_group_to_server(self, http, https, udp, server_id): + def add_udp_security_group(self, server_id): """ Adds the default simple vm security group to the vm. Also adds a security group which can open http,https and udp ports. @@ -1242,6 +1242,15 @@ def add_security_group_to_server(self, http, https, udp, server_id): if server is None: self.logger.exception("Instance {0} not found".format(server_id)) raise serverNotFoundException + sec = self.conn.get_security_group(name_or_id=server.name + "_udp") + if sec: + self.logger.info( + "Security group with name {} already exists.".format(server.name + "_udp")) + self.conn.compute.add_security_group_to_server( + server=server_id, security_group=sec + ) + + return True ip_base = \ list(self.conn.compute.server_ips(server=server_id))[0].to_dict()['address'].split(".")[ @@ -1252,10 +1261,10 @@ def add_security_group_to_server(self, http, https, udp, server_id): security_group = self.create_security_group( name=server.name + "_udp", udp_port_start=udp_port_start, - udp=udp, + udp=True, ssh=False, - https=https, - http=http, description="UDP" + https=False, + http=False, description="UDP" ) self.logger.info(security_group) self.logger.info("Add security group {} to server {} ".format(security_group.id, server_id)) @@ -1273,34 +1282,21 @@ def get_servers_by_bibigrid_id(self, bibigrid_id): thrift_servers.append(self.openstack_server_to_thrift_server(server)) return thrift_servers - def get_ip_ports(self, openstack_id): + def get_vm_ports(self, openstack_id): """ - Get Ip and Port of the sever. + Get Ports of the sever. - :param openstack_id: Id of the server - :return: {'IP': ip, 'PORT': port, 'UDP':start_port} - """ + :param openstack_id: Id of the server + :return: {'PORT': port, 'UDP':start_port} + """ self.logger.info("Get IP and PORT for server {0}".format(openstack_id)) + server = self.get_server(openstack_id) + server_base = server.fixed_ip.split(".")[-1] + x = int(server_base) + port = eval(self.SSH_PORT_CALCULATION) + udp_port_start = eval(self.UDP_PORT_CALCULATION) + return {"port": str(port), "udp": str(udp_port_start)} - # check if gateway is active - try: - if self.USE_GATEWAY: - server = self.get_server(openstack_id) - server_base = server.fixed_ip.split(".")[-1] - x = int(server_base) - port = eval(self.SSH_PORT_CALCULATION) - udp_port_start = eval(self.UDP_PORT_CALCULATION) - return {"IP": str(self.GATEWAY_IP), "PORT": str(port), "UDP": str(udp_port_start)} - - else: - # todo security groups floating ips - floating_ip = self.get_server(openstack_id) - return {"IP": str(floating_ip)} - except Exception as e: - self.logger.exception( - "Get IP and PORT for server {0} error:".format(openstack_id, e) - ) - return {} def get_cluster_info(self, cluster_id): headers = {"content-Type": "application/json"} @@ -1332,6 +1328,12 @@ def get_cluster_info(self, cluster_id): return None + def get_calculation_formulars(self): + return {"ssh_port_calculation": self.SSH_FORMULAR, + "udp_port_calculation": self.UDP_FORMULAR} + + def get_gateway_ip(self): + return {"gateway_ip": self.GATEWAY_IP} def start_cluster(self, public_key, master_instance, worker_instances, user): master_instance = master_instance.__dict__ @@ -1356,7 +1358,7 @@ def terminate_cluster(self, cluster_id): self.logger.info(response.json()) return response.json() - def create_snapshot(self, openstack_id, name, elixir_id, base_tag, description): + def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description): """ Create an Snapshot from an server. @@ -1389,10 +1391,11 @@ def create_snapshot(self, openstack_id, name, elixir_id, base_tag, description): self.conn.update_image_properties( image=image, meta={'description': description}) - - self.conn.image.add_tag( - image=snapshot_id, tag="snapshot_image:{0}".format(base_tag) - ) + + for tag in base_tags: + self.conn.image.add_tag( + image=snapshot_id, tag=tag + ) except Exception: self.logger.exception("Tag error catched") pass diff --git a/VirtualMachineService/VirtualMachineService-remote b/VirtualMachineService/VirtualMachineService-remote index 2741a6ca..3d841bb9 100755 --- a/VirtualMachineService/VirtualMachineService-remote +++ b/VirtualMachineService/VirtualMachineService-remote @@ -26,8 +26,10 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print('Functions:') print(' bool check_Version(double version)') print(' string get_client_version()') + print(' get_gateway_ip()') + print(' get_calculation_formulars()') print(' string import_keypair(string keyname, string public_key)') - print(' get_ip_ports(string openstack_id)') + print(' get_vm_ports(string openstack_id)') print(' get_Flavors()') print(' get_Images()') print(' Image get_Image_with_Tag(string openstack_id)') @@ -53,14 +55,14 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' get_templates()') print(' get_templates_by_template(string template_name)') print(' check_template(string template_name, string template_version)') - print(' bool add_security_group_to_server(bool http, bool https, bool udp, string server_id)') + print(' bool add_udp_security_group(string server_id)') print(' get_servers()') print(' get_servers_by_ids( server_ids)') print(' get_servers_by_bibigrid_id(string bibigrid_id)') print(' ClusterInfo get_cluster_info(string cluster_id)') print(' VM get_server(string openstack_id)') print(' bool stop_server(string openstack_id)') - print(' string create_snapshot(string openstack_id, string name, string elixir_id, string base_tag, string description)') + print(' string create_snapshot(string openstack_id, string name, string elixir_id, base_tags, string description)') print(' get_limits()') print(' start_cluster(string public_key, ClusterInstance master_instance, worker_instance, string user)') print(' terminate_cluster(string cluster_id)') @@ -164,17 +166,29 @@ elif cmd == 'get_client_version': sys.exit(1) pp.pprint(client.get_client_version()) +elif cmd == 'get_gateway_ip': + if len(args) != 0: + print('get_gateway_ip requires 0 args') + sys.exit(1) + pp.pprint(client.get_gateway_ip()) + +elif cmd == 'get_calculation_formulars': + if len(args) != 0: + print('get_calculation_formulars requires 0 args') + sys.exit(1) + pp.pprint(client.get_calculation_formulars()) + elif cmd == 'import_keypair': if len(args) != 2: print('import_keypair requires 2 args') sys.exit(1) pp.pprint(client.import_keypair(args[0], args[1],)) -elif cmd == 'get_ip_ports': +elif cmd == 'get_vm_ports': if len(args) != 1: - print('get_ip_ports requires 1 args') + print('get_vm_ports requires 1 args') sys.exit(1) - pp.pprint(client.get_ip_ports(args[0],)) + pp.pprint(client.get_vm_ports(args[0],)) elif cmd == 'get_Flavors': if len(args) != 0: @@ -326,11 +340,11 @@ elif cmd == 'check_template': sys.exit(1) pp.pprint(client.check_template(args[0], args[1],)) -elif cmd == 'add_security_group_to_server': - if len(args) != 4: - print('add_security_group_to_server requires 4 args') +elif cmd == 'add_udp_security_group': + if len(args) != 1: + print('add_udp_security_group requires 1 args') sys.exit(1) - pp.pprint(client.add_security_group_to_server(eval(args[0]), eval(args[1]), eval(args[2]), args[3],)) + pp.pprint(client.add_udp_security_group(args[0],)) elif cmd == 'get_servers': if len(args) != 0: @@ -372,7 +386,7 @@ elif cmd == 'create_snapshot': if len(args) != 5: print('create_snapshot requires 5 args') sys.exit(1) - pp.pprint(client.create_snapshot(args[0], args[1], args[2], args[3], args[4],)) + pp.pprint(client.create_snapshot(args[0], args[1], args[2], eval(args[3]), args[4],)) elif cmd == 'get_limits': if len(args) != 0: diff --git a/VirtualMachineService/VirtualMachineService.py b/VirtualMachineService/VirtualMachineService.py index 5a58e0a5..c25684b5 100644 --- a/VirtualMachineService/VirtualMachineService.py +++ b/VirtualMachineService/VirtualMachineService.py @@ -39,6 +39,16 @@ def get_client_version(self): """ pass + def get_gateway_ip(self): + """ + Gets the gateway ip. + + """ + pass + + def get_calculation_formulars(self): + pass + def import_keypair(self, keyname, public_key): """ Import Key to openstack. @@ -51,7 +61,7 @@ def import_keypair(self, keyname, public_key): """ pass - def get_ip_ports(self, openstack_id): + def get_vm_ports(self, openstack_id): """ Get Ip and Port of server Returns: {'IP': ip, 'PORT': port,'UDP':udp} @@ -318,14 +328,11 @@ def check_template(self, template_name, template_version): """ pass - def add_security_group_to_server(self, http, https, udp, server_id): + def add_udp_security_group(self, server_id): """ Adds a security group to a server Parameters: - - http: If http ports are open - - https: If https ports are open - - udp: If udp ports are open - server_id: OpenStack id of the server """ @@ -391,7 +398,7 @@ def stop_server(self, openstack_id): """ pass - def create_snapshot(self, openstack_id, name, elixir_id, base_tag, description): + def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description): """ Create Snapshot. Returns: Id of new Snapshot @@ -401,7 +408,7 @@ def create_snapshot(self, openstack_id, name, elixir_id, base_tag, description): - openstack_id: Id of the server - name: Name of new Snapshot - elixir_id: Elixir-Id of the user who requested creation of Snapshot - - base_tag: Tag with which the servers image is also tagged ( for connection information at the webapp) + - base_tags: Tags with which the servers image is also tagged ( for connection information at the webapp) - description: Description of the new snapshot """ @@ -618,6 +625,62 @@ def recv_get_client_version(self): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "get_client_version failed: unknown result") + def get_gateway_ip(self): + """ + Gets the gateway ip. + + """ + self.send_get_gateway_ip() + return self.recv_get_gateway_ip() + + def send_get_gateway_ip(self): + self._oprot.writeMessageBegin('get_gateway_ip', TMessageType.CALL, self._seqid) + args = get_gateway_ip_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_gateway_ip(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_gateway_ip_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + 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) + args = get_calculation_formulars_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_calculation_formulars(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_calculation_formulars_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_calculation_formulars failed: unknown result") + def import_keypair(self, keyname, public_key): """ Import Key to openstack. @@ -655,7 +718,7 @@ def recv_import_keypair(self): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "import_keypair failed: unknown result") - def get_ip_ports(self, openstack_id): + def get_vm_ports(self, openstack_id): """ Get Ip and Port of server Returns: {'IP': ip, 'PORT': port,'UDP':udp} @@ -664,18 +727,18 @@ def get_ip_ports(self, openstack_id): - openstack_id: Id of server """ - self.send_get_ip_ports(openstack_id) - return self.recv_get_ip_ports() + self.send_get_vm_ports(openstack_id) + return self.recv_get_vm_ports() - def send_get_ip_ports(self, openstack_id): - self._oprot.writeMessageBegin('get_ip_ports', TMessageType.CALL, self._seqid) - args = get_ip_ports_args() + def send_get_vm_ports(self, openstack_id): + self._oprot.writeMessageBegin('get_vm_ports', TMessageType.CALL, self._seqid) + args = get_vm_ports_args() args.openstack_id = openstack_id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_get_ip_ports(self): + def recv_get_vm_ports(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: @@ -683,12 +746,12 @@ def recv_get_ip_ports(self): x.read(iprot) iprot.readMessageEnd() raise x - result = get_ip_ports_result() + result = get_vm_ports_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_ip_ports failed: unknown result") + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_vm_ports failed: unknown result") def get_Flavors(self): """ @@ -1610,32 +1673,26 @@ def recv_check_template(self): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "check_template failed: unknown result") - def add_security_group_to_server(self, http, https, udp, server_id): + def add_udp_security_group(self, server_id): """ Adds a security group to a server Parameters: - - http: If http ports are open - - https: If https ports are open - - udp: If udp ports are open - server_id: OpenStack id of the server """ - self.send_add_security_group_to_server(http, https, udp, server_id) - return self.recv_add_security_group_to_server() + self.send_add_udp_security_group(server_id) + return self.recv_add_udp_security_group() - def send_add_security_group_to_server(self, http, https, udp, server_id): - self._oprot.writeMessageBegin('add_security_group_to_server', TMessageType.CALL, self._seqid) - args = add_security_group_to_server_args() - args.http = http - args.https = https - args.udp = udp + def send_add_udp_security_group(self, server_id): + 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) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_add_security_group_to_server(self): + def recv_add_udp_security_group(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: @@ -1643,7 +1700,7 @@ def recv_add_security_group_to_server(self): x.read(iprot) iprot.readMessageEnd() raise x - result = add_security_group_to_server_result() + result = add_udp_security_group_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: @@ -1652,7 +1709,7 @@ def recv_add_security_group_to_server(self): raise result.r if result.s is not None: raise result.s - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_security_group_to_server failed: unknown result") + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_udp_security_group failed: unknown result") def get_servers(self): """ @@ -1861,7 +1918,7 @@ def recv_stop_server(self): raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "stop_server failed: unknown result") - def create_snapshot(self, openstack_id, name, elixir_id, base_tag, description): + def create_snapshot(self, openstack_id, name, elixir_id, base_tags, description): """ Create Snapshot. Returns: Id of new Snapshot @@ -1871,20 +1928,20 @@ def create_snapshot(self, openstack_id, name, elixir_id, base_tag, description): - openstack_id: Id of the server - name: Name of new Snapshot - elixir_id: Elixir-Id of the user who requested creation of Snapshot - - base_tag: Tag with which the servers image is also tagged ( for connection information at the webapp) + - base_tags: Tags with which the servers image is also tagged ( for connection information at the webapp) - description: Description of the new snapshot """ - self.send_create_snapshot(openstack_id, name, elixir_id, base_tag, 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_tag, description): + 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 args.elixir_id = elixir_id - args.base_tag = base_tag + args.base_tags = base_tags args.description = description args.write(self._oprot) self._oprot.writeMessageEnd() @@ -2366,8 +2423,10 @@ def __init__(self, handler): self._processMap = {} 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["import_keypair"] = Processor.process_import_keypair - self._processMap["get_ip_ports"] = Processor.process_get_ip_ports + self._processMap["get_vm_ports"] = Processor.process_get_vm_ports self._processMap["get_Flavors"] = Processor.process_get_Flavors self._processMap["get_Images"] = Processor.process_get_Images self._processMap["get_Image_with_Tag"] = Processor.process_get_Image_with_Tag @@ -2393,7 +2452,7 @@ def __init__(self, handler): self._processMap["get_templates"] = Processor.process_get_templates self._processMap["get_templates_by_template"] = Processor.process_get_templates_by_template self._processMap["check_template"] = Processor.process_check_template - self._processMap["add_security_group_to_server"] = Processor.process_add_security_group_to_server + 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["get_servers_by_bibigrid_id"] = Processor.process_get_servers_by_bibigrid_id @@ -2475,6 +2534,52 @@ def process_get_client_version(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() + def process_get_gateway_ip(self, seqid, iprot, oprot): + args = get_gateway_ip_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_gateway_ip_result() + try: + result.success = self._handler.get_gateway_ip() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_gateway_ip", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_calculation_formulars(self, seqid, iprot, oprot): + args = get_calculation_formulars_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_calculation_formulars_result() + try: + result.success = self._handler.get_calculation_formulars() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_calculation_formulars", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_import_keypair(self, seqid, iprot, oprot): args = import_keypair_args() args.read(iprot) @@ -2498,13 +2603,13 @@ def process_import_keypair(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() - def process_get_ip_ports(self, seqid, iprot, oprot): - args = get_ip_ports_args() + def process_get_vm_ports(self, seqid, iprot, oprot): + args = get_vm_ports_args() args.read(iprot) iprot.readMessageEnd() - result = get_ip_ports_result() + result = get_vm_ports_result() try: - result.success = self._handler.get_ip_ports(args.openstack_id) + result.success = self._handler.get_vm_ports(args.openstack_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -2516,7 +2621,7 @@ def process_get_ip_ports(self, seqid, iprot, oprot): logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_ip_ports", msg_type, seqid) + oprot.writeMessageBegin("get_vm_ports", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -3156,13 +3261,13 @@ def process_check_template(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() - def process_add_security_group_to_server(self, seqid, iprot, oprot): - args = add_security_group_to_server_args() + def process_add_udp_security_group(self, seqid, iprot, oprot): + args = add_udp_security_group_args() args.read(iprot) iprot.readMessageEnd() - result = add_security_group_to_server_result() + result = add_udp_security_group_result() try: - result.success = self._handler.add_security_group_to_server(args.http, args.https, args.udp, args.server_id) + result.success = self._handler.add_udp_security_group(args.server_id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise @@ -3180,7 +3285,7 @@ def process_add_security_group_to_server(self, seqid, iprot, oprot): logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_security_group_to_server", msg_type, seqid) + oprot.writeMessageBegin("add_udp_security_group", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -3335,7 +3440,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_tag, 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 @@ -3888,6 +3993,234 @@ def __ne__(self, other): ) +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: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_gateway_ip_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(get_gateway_ip_args) +get_gateway_ip_args.thrift_spec = ( +) + + +class get_gateway_ip_result(object): + """ + Attributes: + - success + + """ + + + 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: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + 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() + self.success[_key28] = _val29 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_gateway_ip_result') + if self.success is not None: + 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.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(get_gateway_ip_result) +get_gateway_ip_result.thrift_spec = ( + (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: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_calculation_formulars_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(get_calculation_formulars_args) +get_calculation_formulars_args.thrift_spec = ( +) + + +class get_calculation_formulars_result(object): + """ + Attributes: + - success + + """ + + + 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: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + 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() + self.success[_key37] = _val38 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_calculation_formulars_result') + if self.success is not None: + 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.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(get_calculation_formulars_result) +get_calculation_formulars_result.thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 +) + + class import_keypair_args(object): """ Attributes: @@ -4023,7 +4356,7 @@ def __ne__(self, other): ) -class get_ip_ports_args(object): +class get_vm_ports_args(object): """ Attributes: - openstack_id: Id of server @@ -4057,7 +4390,7 @@ def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin('get_ip_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) @@ -4078,14 +4411,14 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -all_structs.append(get_ip_ports_args) -get_ip_ports_args.thrift_spec = ( +all_structs.append(get_vm_ports_args) +get_vm_ports_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'openstack_id', 'UTF8', None, ), # 1 ) -class get_ip_ports_result(object): +class get_vm_ports_result(object): """ Attributes: - success @@ -4108,11 +4441,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: 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() - self.success[_key28] = _val29 + (_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() + self.success[_key46] = _val47 iprot.readMapEnd() else: iprot.skip(ftype) @@ -4125,13 +4458,13 @@ def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin('get_ip_ports_result') + oprot.writeStructBegin('get_vm_ports_result') if self.success is not None: 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) + 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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4150,8 +4483,8 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -all_structs.append(get_ip_ports_result) -get_ip_ports_result.thrift_spec = ( +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 ) @@ -4222,11 +4555,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype35, _size32) = iprot.readListBegin() - for _i36 in range(_size32): - _elem37 = Flavor() - _elem37.read(iprot) - self.success.append(_elem37) + (_etype53, _size50) = iprot.readListBegin() + for _i54 in range(_size50): + _elem55 = Flavor() + _elem55.read(iprot) + self.success.append(_elem55) iprot.readListEnd() else: iprot.skip(ftype) @@ -4243,8 +4576,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 iter38 in self.success: - iter38.write(oprot) + for iter56 in self.success: + iter56.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4335,11 +4668,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype42, _size39) = iprot.readListBegin() - for _i43 in range(_size39): - _elem44 = Image() - _elem44.read(iprot) - self.success.append(_elem44) + (_etype60, _size57) = iprot.readListBegin() + for _i61 in range(_size57): + _elem62 = Image() + _elem62.read(iprot) + self.success.append(_elem62) iprot.readListEnd() else: iprot.skip(ftype) @@ -4356,8 +4689,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 iter45 in self.success: - iter45.write(oprot) + for iter63 in self.success: + iter63.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4529,10 +4862,10 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.filter_list = [] - (_etype49, _size46) = iprot.readListBegin() - for _i50 in range(_size46): - _elem51 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.filter_list.append(_elem51) + (_etype67, _size64) = iprot.readListBegin() + for _i68 in range(_size64): + _elem69 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.filter_list.append(_elem69) iprot.readListEnd() else: iprot.skip(ftype) @@ -4549,8 +4882,8 @@ def write(self, oprot): if self.filter_list is not None: oprot.writeFieldBegin('filter_list', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.filter_list)) - for iter52 in self.filter_list: - oprot.writeString(iter52.encode('utf-8') if sys.version_info[0] == 2 else iter52) + for iter70 in self.filter_list: + oprot.writeString(iter70.encode('utf-8') if sys.version_info[0] == 2 else iter70) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4599,11 +4932,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype56, _size53) = iprot.readListBegin() - for _i57 in range(_size53): - _elem58 = Image() - _elem58.read(iprot) - self.success.append(_elem58) + (_etype74, _size71) = iprot.readListBegin() + for _i75 in range(_size71): + _elem76 = Image() + _elem76.read(iprot) + self.success.append(_elem76) iprot.readListEnd() else: iprot.skip(ftype) @@ -4620,8 +4953,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 iter59 in self.success: - iter59.write(oprot) + for iter77 in self.success: + iter77.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4812,11 +5145,11 @@ def read(self, iprot): elif fid == 2: if ftype == TType.MAP: self.metadata = {} - (_ktype61, _vtype62, _size60) = iprot.readMapBegin() - for _i64 in range(_size60): - _key65 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val66 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key65] = _val66 + (_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() + self.metadata[_key83] = _val84 iprot.readMapEnd() else: iprot.skip(ftype) @@ -4837,9 +5170,9 @@ def write(self, oprot): if self.metadata is not None: oprot.writeFieldBegin('metadata', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.metadata)) - for kiter67, viter68 in self.metadata.items(): - oprot.writeString(kiter67.encode('utf-8') if sys.version_info[0] == 2 else kiter67) - oprot.writeString(viter68.encode('utf-8') if sys.version_info[0] == 2 else viter68) + for kiter85, viter86 in self.metadata.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.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4891,11 +5224,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype70, _vtype71, _size69) = iprot.readMapBegin() - for _i73 in range(_size69): - _key74 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val75 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key74] = _val75 + (_ktype88, _vtype89, _size87) = iprot.readMapBegin() + for _i91 in range(_size87): + _key92 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val93 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success[_key92] = _val93 iprot.readMapEnd() else: iprot.skip(ftype) @@ -4918,9 +5251,9 @@ 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 kiter76, viter77 in self.success.items(): - oprot.writeString(kiter76.encode('utf-8') if sys.version_info[0] == 2 else kiter76) - oprot.writeString(viter77.encode('utf-8') if sys.version_info[0] == 2 else viter77) + for kiter94, viter95 in self.success.items(): + oprot.writeString(kiter94.encode('utf-8') if sys.version_info[0] == 2 else kiter94) + oprot.writeString(viter95.encode('utf-8') if sys.version_info[0] == 2 else viter95) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: @@ -4980,10 +5313,10 @@ def read(self, iprot): elif fid == 2: if ftype == TType.SET: self.keys = set() - (_etype81, _size78) = iprot.readSetBegin() - for _i82 in range(_size78): - _elem83 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.keys.add(_elem83) + (_etype99, _size96) = iprot.readSetBegin() + for _i100 in range(_size96): + _elem101 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.keys.add(_elem101) iprot.readSetEnd() else: iprot.skip(ftype) @@ -5004,8 +5337,8 @@ def write(self, oprot): if self.keys is not None: oprot.writeFieldBegin('keys', TType.SET, 2) oprot.writeSetBegin(TType.STRING, len(self.keys)) - for iter84 in self.keys: - oprot.writeString(iter84.encode('utf-8') if sys.version_info[0] == 2 else iter84) + for iter102 in self.keys: + oprot.writeString(iter102.encode('utf-8') if sys.version_info[0] == 2 else iter102) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5057,10 +5390,10 @@ def read(self, iprot): if fid == 0: if ftype == TType.SET: self.success = set() - (_etype88, _size85) = iprot.readSetBegin() - for _i89 in range(_size85): - _elem90 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success.add(_elem90) + (_etype106, _size103) = iprot.readSetBegin() + for _i107 in range(_size103): + _elem108 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success.add(_elem108) iprot.readSetEnd() else: iprot.skip(ftype) @@ -5083,8 +5416,8 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.SET, 0) oprot.writeSetBegin(TType.STRING, len(self.success)) - for iter91 in self.success: - oprot.writeString(iter91.encode('utf-8') if sys.version_info[0] == 2 else iter91) + for iter109 in self.success: + oprot.writeString(iter109.encode('utf-8') if sys.version_info[0] == 2 else iter109) oprot.writeSetEnd() oprot.writeFieldEnd() if self.e is not None: @@ -5522,11 +5855,11 @@ def read(self, iprot): elif fid == 5: if ftype == TType.MAP: self.metadata = {} - (_ktype93, _vtype94, _size92) = iprot.readMapBegin() - for _i96 in range(_size92): - _key97 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val98 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key97] = _val98 + (_ktype111, _vtype112, _size110) = iprot.readMapBegin() + for _i114 in range(_size110): + _key115 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val116 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.metadata[_key115] = _val116 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5579,9 +5912,9 @@ 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 kiter99, viter100 in self.metadata.items(): - oprot.writeString(kiter99.encode('utf-8') if sys.version_info[0] == 2 else kiter99) - oprot.writeString(viter100.encode('utf-8') if sys.version_info[0] == 2 else viter100) + for kiter117, viter118 in self.metadata.items(): + oprot.writeString(kiter117.encode('utf-8') if sys.version_info[0] == 2 else kiter117) + oprot.writeString(viter118.encode('utf-8') if sys.version_info[0] == 2 else viter118) oprot.writeMapEnd() oprot.writeFieldEnd() if self.diskspace is not None: @@ -5668,11 +6001,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype102, _vtype103, _size101) = iprot.readMapBegin() - for _i105 in range(_size101): - _key106 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val107 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key106] = _val107 + (_ktype120, _vtype121, _size119) = iprot.readMapBegin() + for _i123 in range(_size119): + _key124 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val125 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success[_key124] = _val125 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5731,9 +6064,9 @@ 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 kiter108, viter109 in self.success.items(): - oprot.writeString(kiter108.encode('utf-8') if sys.version_info[0] == 2 else kiter108) - oprot.writeString(viter109.encode('utf-8') if sys.version_info[0] == 2 else viter109) + for kiter126, viter127 in self.success.items(): + oprot.writeString(kiter126.encode('utf-8') if sys.version_info[0] == 2 else kiter126) + oprot.writeString(viter127.encode('utf-8') if sys.version_info[0] == 2 else viter127) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: @@ -5847,11 +6180,11 @@ def read(self, iprot): elif fid == 4: if ftype == TType.MAP: self.metadata = {} - (_ktype111, _vtype112, _size110) = iprot.readMapBegin() - for _i114 in range(_size110): - _key115 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val116 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key115] = _val116 + (_ktype129, _vtype130, _size128) = iprot.readMapBegin() + for _i132 in range(_size128): + _key133 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val134 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.metadata[_key133] = _val134 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5878,10 +6211,10 @@ def read(self, iprot): elif fid == 9: if ftype == TType.LIST: self.resenv = [] - (_etype120, _size117) = iprot.readListBegin() - for _i121 in range(_size117): - _elem122 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.resenv.append(_elem122) + (_etype138, _size135) = iprot.readListBegin() + for _i139 in range(_size135): + _elem140 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.resenv.append(_elem140) iprot.readListEnd() else: iprot.skip(ftype) @@ -5910,9 +6243,9 @@ 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 kiter123, viter124 in self.metadata.items(): - oprot.writeString(kiter123.encode('utf-8') if sys.version_info[0] == 2 else kiter123) - oprot.writeString(viter124.encode('utf-8') if sys.version_info[0] == 2 else viter124) + for kiter141, viter142 in self.metadata.items(): + oprot.writeString(kiter141.encode('utf-8') if sys.version_info[0] == 2 else kiter141) + oprot.writeString(viter142.encode('utf-8') if sys.version_info[0] == 2 else viter142) oprot.writeMapEnd() oprot.writeFieldEnd() if self.diskspace is not None: @@ -5934,8 +6267,8 @@ def write(self, oprot): if self.resenv is not None: oprot.writeFieldBegin('resenv', TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.resenv)) - for iter125 in self.resenv: - oprot.writeString(iter125.encode('utf-8') if sys.version_info[0] == 2 else iter125) + for iter143 in self.resenv: + oprot.writeString(iter143.encode('utf-8') if sys.version_info[0] == 2 else iter143) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6006,11 +6339,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype127, _vtype128, _size126) = iprot.readMapBegin() - for _i130 in range(_size126): - _key131 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val132 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key131] = _val132 + (_ktype145, _vtype146, _size144) = iprot.readMapBegin() + for _i148 in range(_size144): + _key149 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val150 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success[_key149] = _val150 iprot.readMapEnd() else: iprot.skip(ftype) @@ -6069,9 +6402,9 @@ 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 kiter133, viter134 in self.success.items(): - oprot.writeString(kiter133.encode('utf-8') if sys.version_info[0] == 2 else kiter133) - oprot.writeString(viter134.encode('utf-8') if sys.version_info[0] == 2 else viter134) + for kiter151, viter152 in self.success.items(): + oprot.writeString(kiter151.encode('utf-8') if sys.version_info[0] == 2 else kiter151) + oprot.writeString(viter152.encode('utf-8') if sys.version_info[0] == 2 else viter152) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: @@ -6286,17 +6619,17 @@ def read(self, iprot): elif fid == 2: if ftype == TType.MAP: self.playbooks_information = {} - (_ktype136, _vtype137, _size135) = iprot.readMapBegin() - for _i139 in range(_size135): - _key140 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val141 = {} - (_ktype143, _vtype144, _size142) = iprot.readMapBegin() - for _i146 in range(_size142): - _key147 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val148 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val141[_key147] = _val148 + (_ktype154, _vtype155, _size153) = iprot.readMapBegin() + for _i157 in range(_size153): + _key158 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val159 = {} + (_ktype161, _vtype162, _size160) = iprot.readMapBegin() + for _i164 in range(_size160): + _key165 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val166 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val159[_key165] = _val166 iprot.readMapEnd() - self.playbooks_information[_key140] = _val141 + self.playbooks_information[_key158] = _val159 iprot.readMapEnd() else: iprot.skip(ftype) @@ -6322,12 +6655,12 @@ def write(self, oprot): if self.playbooks_information is not None: oprot.writeFieldBegin('playbooks_information', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.playbooks_information)) - for kiter149, viter150 in self.playbooks_information.items(): - oprot.writeString(kiter149.encode('utf-8') if sys.version_info[0] == 2 else kiter149) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(viter150)) - for kiter151, viter152 in viter150.items(): - oprot.writeString(kiter151.encode('utf-8') if sys.version_info[0] == 2 else kiter151) - oprot.writeString(viter152.encode('utf-8') if sys.version_info[0] == 2 else viter152) + for kiter167, viter168 in self.playbooks_information.items(): + oprot.writeString(kiter167.encode('utf-8') if sys.version_info[0] == 2 else kiter167) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(viter168)) + for kiter169, viter170 in viter168.items(): + oprot.writeString(kiter169.encode('utf-8') if sys.version_info[0] == 2 else kiter169) + oprot.writeString(viter170.encode('utf-8') if sys.version_info[0] == 2 else viter170) oprot.writeMapEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -6991,11 +7324,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype156, _size153) = iprot.readListBegin() - for _i157 in range(_size153): - _elem158 = Backend() - _elem158.read(iprot) - self.success.append(_elem158) + (_etype174, _size171) = iprot.readListBegin() + for _i175 in range(_size171): + _elem176 = Backend() + _elem176.read(iprot) + self.success.append(_elem176) iprot.readListEnd() else: iprot.skip(ftype) @@ -7012,8 +7345,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 iter159 in self.success: - iter159.write(oprot) + for iter177 in self.success: + iter177.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7123,11 +7456,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype163, _size160) = iprot.readListBegin() - for _i164 in range(_size160): - _elem165 = Backend() - _elem165.read(iprot) - self.success.append(_elem165) + (_etype181, _size178) = iprot.readListBegin() + for _i182 in range(_size178): + _elem183 = Backend() + _elem183.read(iprot) + self.success.append(_elem183) iprot.readListEnd() else: iprot.skip(ftype) @@ -7144,8 +7477,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 iter166 in self.success: - iter166.write(oprot) + for iter184 in self.success: + iter184.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7255,11 +7588,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype170, _size167) = iprot.readListBegin() - for _i171 in range(_size167): - _elem172 = Backend() - _elem172.read(iprot) - self.success.append(_elem172) + (_etype188, _size185) = iprot.readListBegin() + for _i189 in range(_size185): + _elem190 = Backend() + _elem190.read(iprot) + self.success.append(_elem190) iprot.readListEnd() else: iprot.skip(ftype) @@ -7276,8 +7609,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 iter173 in self.success: - iter173.write(oprot) + for iter191 in self.success: + iter191.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7615,16 +7948,16 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype177, _size174) = iprot.readListBegin() - for _i178 in range(_size174): - _elem179 = {} - (_ktype181, _vtype182, _size180) = iprot.readMapBegin() - for _i184 in range(_size180): - _key185 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val186 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _elem179[_key185] = _val186 + (_etype195, _size192) = iprot.readListBegin() + for _i196 in range(_size192): + _elem197 = {} + (_ktype199, _vtype200, _size198) = iprot.readMapBegin() + for _i202 in range(_size198): + _key203 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val204 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem197[_key203] = _val204 iprot.readMapEnd() - self.success.append(_elem179) + self.success.append(_elem197) iprot.readListEnd() else: iprot.skip(ftype) @@ -7641,11 +7974,11 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.MAP, len(self.success)) - for iter187 in self.success: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter187)) - for kiter188, viter189 in iter187.items(): - oprot.writeString(kiter188.encode('utf-8') if sys.version_info[0] == 2 else kiter188) - oprot.writeString(viter189.encode('utf-8') if sys.version_info[0] == 2 else viter189) + for iter205 in self.success: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter205)) + for kiter206, viter207 in iter205.items(): + oprot.writeString(kiter206.encode('utf-8') if sys.version_info[0] == 2 else kiter206) + oprot.writeString(viter207.encode('utf-8') if sys.version_info[0] == 2 else viter207) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -7756,16 +8089,16 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype193, _size190) = iprot.readListBegin() - for _i194 in range(_size190): - _elem195 = {} - (_ktype197, _vtype198, _size196) = iprot.readMapBegin() - for _i200 in range(_size196): - _key201 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val202 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _elem195[_key201] = _val202 + (_etype211, _size208) = iprot.readListBegin() + for _i212 in range(_size208): + _elem213 = {} + (_ktype215, _vtype216, _size214) = iprot.readMapBegin() + for _i218 in range(_size214): + _key219 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val220 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _elem213[_key219] = _val220 iprot.readMapEnd() - self.success.append(_elem195) + self.success.append(_elem213) iprot.readListEnd() else: iprot.skip(ftype) @@ -7782,11 +8115,11 @@ def write(self, oprot): if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.MAP, len(self.success)) - for iter203 in self.success: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter203)) - for kiter204, viter205 in iter203.items(): - oprot.writeString(kiter204.encode('utf-8') if sys.version_info[0] == 2 else kiter204) - oprot.writeString(viter205.encode('utf-8') if sys.version_info[0] == 2 else viter205) + for iter221 in self.success: + oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter221)) + for kiter222, viter223 in iter221.items(): + oprot.writeString(kiter222.encode('utf-8') if sys.version_info[0] == 2 else kiter222) + oprot.writeString(viter223.encode('utf-8') if sys.version_info[0] == 2 else viter223) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -7909,11 +8242,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype207, _vtype208, _size206) = iprot.readMapBegin() - for _i210 in range(_size206): - _key211 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val212 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key211] = _val212 + (_ktype225, _vtype226, _size224) = iprot.readMapBegin() + for _i228 in range(_size224): + _key229 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val230 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success[_key229] = _val230 iprot.readMapEnd() else: iprot.skip(ftype) @@ -7930,9 +8263,9 @@ 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 kiter213, viter214 in self.success.items(): - oprot.writeString(kiter213.encode('utf-8') if sys.version_info[0] == 2 else kiter213) - oprot.writeString(viter214.encode('utf-8') if sys.version_info[0] == 2 else viter214) + for kiter231, viter232 in self.success.items(): + oprot.writeString(kiter231.encode('utf-8') if sys.version_info[0] == 2 else kiter231) + oprot.writeString(viter232.encode('utf-8') if sys.version_info[0] == 2 else viter232) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7957,21 +8290,15 @@ def __ne__(self, other): ) -class add_security_group_to_server_args(object): +class add_udp_security_group_args(object): """ Attributes: - - http: If http ports are open - - https: If https ports are open - - udp: If udp ports are open - server_id: OpenStack id of the server """ - def __init__(self, http=None, https=None, udp=None, server_id=None,): - self.http = http - self.https = https - self.udp = udp + def __init__(self, server_id=None,): self.server_id = server_id def read(self, iprot): @@ -7984,21 +8311,6 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.BOOL: - self.http = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.https = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.udp = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 4: if ftype == TType.STRING: self.server_id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: @@ -8012,21 +8324,9 @@ def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin('add_security_group_to_server_args') - if self.http is not None: - oprot.writeFieldBegin('http', TType.BOOL, 1) - oprot.writeBool(self.http) - oprot.writeFieldEnd() - if self.https is not None: - oprot.writeFieldBegin('https', TType.BOOL, 2) - oprot.writeBool(self.https) - oprot.writeFieldEnd() - if self.udp is not None: - oprot.writeFieldBegin('udp', TType.BOOL, 3) - oprot.writeBool(self.udp) - oprot.writeFieldEnd() + oprot.writeStructBegin('add_udp_security_group_args') if self.server_id is not None: - oprot.writeFieldBegin('server_id', TType.STRING, 4) + 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() @@ -8045,17 +8345,14 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -all_structs.append(add_security_group_to_server_args) -add_security_group_to_server_args.thrift_spec = ( +all_structs.append(add_udp_security_group_args) +add_udp_security_group_args.thrift_spec = ( None, # 0 - (1, TType.BOOL, 'http', None, None, ), # 1 - (2, TType.BOOL, 'https', None, None, ), # 2 - (3, TType.BOOL, 'udp', None, None, ), # 3 - (4, TType.STRING, 'server_id', 'UTF8', None, ), # 4 + (1, TType.STRING, 'server_id', 'UTF8', None, ), # 1 ) -class add_security_group_to_server_result(object): +class add_udp_security_group_result(object): """ Attributes: - success @@ -8105,7 +8402,7 @@ def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return - oprot.writeStructBegin('add_security_group_to_server_result') + oprot.writeStructBegin('add_udp_security_group_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) @@ -8134,8 +8431,8 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) -all_structs.append(add_security_group_to_server_result) -add_security_group_to_server_result.thrift_spec = ( +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 @@ -8208,11 +8505,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype218, _size215) = iprot.readListBegin() - for _i219 in range(_size215): - _elem220 = VM() - _elem220.read(iprot) - self.success.append(_elem220) + (_etype236, _size233) = iprot.readListBegin() + for _i237 in range(_size233): + _elem238 = VM() + _elem238.read(iprot) + self.success.append(_elem238) iprot.readListEnd() else: iprot.skip(ftype) @@ -8229,8 +8526,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 iter221 in self.success: - iter221.write(oprot) + for iter239 in self.success: + iter239.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8278,10 +8575,10 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.server_ids = [] - (_etype225, _size222) = iprot.readListBegin() - for _i226 in range(_size222): - _elem227 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.server_ids.append(_elem227) + (_etype243, _size240) = iprot.readListBegin() + for _i244 in range(_size240): + _elem245 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.server_ids.append(_elem245) iprot.readListEnd() else: iprot.skip(ftype) @@ -8298,8 +8595,8 @@ 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 iter228 in self.server_ids: - oprot.writeString(iter228.encode('utf-8') if sys.version_info[0] == 2 else iter228) + for iter246 in self.server_ids: + oprot.writeString(iter246.encode('utf-8') if sys.version_info[0] == 2 else iter246) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8348,11 +8645,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype232, _size229) = iprot.readListBegin() - for _i233 in range(_size229): - _elem234 = VM() - _elem234.read(iprot) - self.success.append(_elem234) + (_etype250, _size247) = iprot.readListBegin() + for _i251 in range(_size247): + _elem252 = VM() + _elem252.read(iprot) + self.success.append(_elem252) iprot.readListEnd() else: iprot.skip(ftype) @@ -8369,8 +8666,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 iter235 in self.success: - iter235.write(oprot) + for iter253 in self.success: + iter253.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8480,11 +8777,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype239, _size236) = iprot.readListBegin() - for _i240 in range(_size236): - _elem241 = VM() - _elem241.read(iprot) - self.success.append(_elem241) + (_etype257, _size254) = iprot.readListBegin() + for _i258 in range(_size254): + _elem259 = VM() + _elem259.read(iprot) + self.success.append(_elem259) iprot.readListEnd() else: iprot.skip(ftype) @@ -8501,8 +8798,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 iter242 in self.success: - iter242.write(oprot) + for iter260 in self.success: + iter260.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8930,17 +9227,17 @@ class create_snapshot_args(object): - openstack_id: Id of the server - name: Name of new Snapshot - elixir_id: Elixir-Id of the user who requested creation of Snapshot - - base_tag: Tag with which the servers image is also tagged ( for connection information at the webapp) + - base_tags: Tags with which the servers image is also tagged ( for connection information at the webapp) - description: Description of the new snapshot """ - def __init__(self, openstack_id=None, name=None, elixir_id=None, base_tag=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 - self.base_tag = base_tag + self.base_tags = base_tags self.description = description def read(self, iprot): @@ -8968,8 +9265,13 @@ def read(self, iprot): else: iprot.skip(ftype) elif fid == 4: - if ftype == TType.STRING: - self.base_tag = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + if ftype == TType.LIST: + self.base_tags = [] + (_etype264, _size261) = iprot.readListBegin() + for _i265 in range(_size261): + _elem266 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.base_tags.append(_elem266) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: @@ -8999,9 +9301,12 @@ def write(self, oprot): 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_tag is not None: - oprot.writeFieldBegin('base_tag', TType.STRING, 4) - oprot.writeString(self.base_tag.encode('utf-8') if sys.version_info[0] == 2 else self.base_tag) + if self.base_tags is not None: + oprot.writeFieldBegin('base_tags', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.base_tags)) + for iter267 in self.base_tags: + oprot.writeString(iter267.encode('utf-8') if sys.version_info[0] == 2 else iter267) + oprot.writeListEnd() oprot.writeFieldEnd() if self.description is not None: oprot.writeFieldBegin('description', TType.STRING, 5) @@ -9029,7 +9334,7 @@ def __ne__(self, other): (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.STRING, 'base_tag', 'UTF8', None, ), # 4 + (4, TType.LIST, 'base_tags', (TType.STRING, 'UTF8', False), None, ), # 4 (5, TType.STRING, 'description', 'UTF8', None, ), # 5 ) @@ -9174,11 +9479,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype244, _vtype245, _size243) = iprot.readMapBegin() - for _i247 in range(_size243): - _key248 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val249 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key248] = _val249 + (_ktype269, _vtype270, _size268) = iprot.readMapBegin() + for _i272 in range(_size268): + _key273 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val274 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success[_key273] = _val274 iprot.readMapEnd() else: iprot.skip(ftype) @@ -9195,9 +9500,9 @@ 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 kiter250, viter251 in self.success.items(): - oprot.writeString(kiter250.encode('utf-8') if sys.version_info[0] == 2 else kiter250) - oprot.writeString(viter251.encode('utf-8') if sys.version_info[0] == 2 else viter251) + for kiter275, viter276 in self.success.items(): + oprot.writeString(kiter275.encode('utf-8') if sys.version_info[0] == 2 else kiter275) + oprot.writeString(viter276.encode('utf-8') if sys.version_info[0] == 2 else viter276) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9262,11 +9567,11 @@ def read(self, iprot): elif fid == 3: if ftype == TType.LIST: self.worker_instance = [] - (_etype255, _size252) = iprot.readListBegin() - for _i256 in range(_size252): - _elem257 = ClusterInstance() - _elem257.read(iprot) - self.worker_instance.append(_elem257) + (_etype280, _size277) = iprot.readListBegin() + for _i281 in range(_size277): + _elem282 = ClusterInstance() + _elem282.read(iprot) + self.worker_instance.append(_elem282) iprot.readListEnd() else: iprot.skip(ftype) @@ -9296,8 +9601,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 iter258 in self.worker_instance: - iter258.write(oprot) + for iter283 in self.worker_instance: + iter283.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.user is not None: @@ -9353,11 +9658,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype260, _vtype261, _size259) = iprot.readMapBegin() - for _i263 in range(_size259): - _key264 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val265 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key264] = _val265 + (_ktype285, _vtype286, _size284) = iprot.readMapBegin() + for _i288 in range(_size284): + _key289 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val290 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success[_key289] = _val290 iprot.readMapEnd() else: iprot.skip(ftype) @@ -9374,9 +9679,9 @@ 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 kiter266, viter267 in self.success.items(): - oprot.writeString(kiter266.encode('utf-8') if sys.version_info[0] == 2 else kiter266) - oprot.writeString(viter267.encode('utf-8') if sys.version_info[0] == 2 else viter267) + for kiter291, viter292 in self.success.items(): + oprot.writeString(kiter291.encode('utf-8') if sys.version_info[0] == 2 else kiter291) + oprot.writeString(viter292.encode('utf-8') if sys.version_info[0] == 2 else viter292) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9486,11 +9791,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype269, _vtype270, _size268) = iprot.readMapBegin() - for _i272 in range(_size268): - _key273 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val274 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key273] = _val274 + (_ktype294, _vtype295, _size293) = iprot.readMapBegin() + for _i297 in range(_size293): + _key298 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val299 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success[_key298] = _val299 iprot.readMapEnd() else: iprot.skip(ftype) @@ -9507,9 +9812,9 @@ 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 kiter275, viter276 in self.success.items(): - oprot.writeString(kiter275.encode('utf-8') if sys.version_info[0] == 2 else kiter275) - oprot.writeString(viter276.encode('utf-8') if sys.version_info[0] == 2 else viter276) + for kiter300, viter301 in self.success.items(): + oprot.writeString(kiter300.encode('utf-8') if sys.version_info[0] == 2 else kiter300) + oprot.writeString(viter301.encode('utf-8') if sys.version_info[0] == 2 else viter301) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10584,11 +10889,11 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.metadata = {} - (_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() - _val283 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key282] = _val283 + (_ktype303, _vtype304, _size302) = iprot.readMapBegin() + for _i306 in range(_size302): + _key307 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val308 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.metadata[_key307] = _val308 iprot.readMapEnd() else: iprot.skip(ftype) @@ -10613,9 +10918,9 @@ 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 kiter284, viter285 in self.metadata.items(): - oprot.writeString(kiter284.encode('utf-8') if sys.version_info[0] == 2 else kiter284) - oprot.writeString(viter285.encode('utf-8') if sys.version_info[0] == 2 else viter285) + for kiter309, viter310 in self.metadata.items(): + oprot.writeString(kiter309.encode('utf-8') if sys.version_info[0] == 2 else kiter309) + oprot.writeString(viter310.encode('utf-8') if sys.version_info[0] == 2 else viter310) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() diff --git a/portal_client.thrift b/portal_client.thrift index 7e003b7c..07b59739 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -205,6 +205,13 @@ service VirtualMachineService { */ string get_client_version() + /** + * Gets the gateway ip. + */ + map get_gateway_ip() + + map get_calculation_formulars() + /** * Import Key to openstack. * Returns : keypair @@ -221,7 +228,7 @@ service VirtualMachineService { * Get Ip and Port of server * Returns: {'IP': ip, 'PORT': port,'UDP':udp} */ - map get_ip_ports( + map get_vm_ports( /** Id of server */ 1: string openstack_id) @@ -289,6 +296,7 @@ service VirtualMachineService { */ bool create_connection( + /** Name of the OpenStack user. */ 1:string username, @@ -442,18 +450,9 @@ service VirtualMachineService { /** * Adds a security group to a server */ - bool add_security_group_to_server( - /** If http ports are open*/ - 1:bool http, - - /** If https ports are open*/ - 2:bool https, - - /** If udp ports are open*/ - 3:bool udp, - + bool add_udp_security_group( /** OpenStack id of the server*/ - 4:string server_id) + 1:string server_id) throws (1:ressourceException r,2:serverNotFoundException s @@ -520,8 +519,8 @@ service VirtualMachineService { /** Elixir-Id of the user who requested creation of Snapshot */ 3: string elixir_id, - /** Tag with which the servers image is also tagged ( for connection information at the webapp) */ - 4:string base_tag, + /** Tags with which the servers image is also tagged ( for connection information at the webapp) */ + 4: list base_tags, /** Description of the new snapshot*/ 5:string description)