From d39c3f5eb45710f714089792f1e166697e47774c Mon Sep 17 00:00:00 2001 From: Ewgenij Katchko Date: Mon, 6 Jan 2020 14:20:14 +0100 Subject: [PATCH 1/3] feat(images): cross check imagetags with forc --- .../VirtualMachineHandler.py | 65 ++ .../VirtualMachineService-remote | 7 + .../VirtualMachineService.py | 560 ++++++++++++------ VirtualMachineService/config/config.yml | 5 + portal_client.thrift | 6 + 5 files changed, 468 insertions(+), 175 deletions(-) diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 7867bdcf..96e5e09a 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -151,12 +151,15 @@ def __init__(self, config): try: self.RE_BACKEND_URL = cfg["forc"]["forc_url"] self.FORC_API_KEY = os.environ["FORC_API_KEY"] + self.FORC_ALLOWED = cfg["forc"]["forc_allowed"] self.logger.info(msg="Forc-Backend url loaded: {0}".format(self.RE_BACKEND_URL)) + self.logger.info("Client allows following research environments and respective versions: {0}".format(self.FORC_ALLOWED)) except Exception as e: self.logger.exception(e) self.logger.info("Forc-Backend not loaded.") self.RE_BACKEND_URL = None self.FORC_API_KEY = None + self.FORC_ALLOWED = None if self.USE_GATEWAY: self.GATEWAY_IP = cfg["openstack_connection"]["gateway_ip"] self.SSH_FORMULAR = cfg["openstack_connection"]["ssh_port_calc_formular"] @@ -338,6 +341,52 @@ def get_Image_with_Tag(self, id): self.logger.exception("Get Image {0} with Tag Error: {1}".format(id, e)) return None + def get_Images_by_filter(self, filter_list): + """ + Get filtered Images. + + :return: List of image instances. + """ + self.logger.info("Get filtered Images: {0}".format(filter_list)) + images = list() + try: + for img in filter( + lambda x: "tags" in x + and len(x["tags"]) > 0 + and x["status"] == "active", + self.conn.list_images(), + ): + tags = img.get("tags") + if "resenv" in filter_list: + if "resenv" in tags and not self.cross_check_forc_image(tags): + continue + metadata = img["metadata"] + description = metadata.get("description") + image_type = img.get("image_type", "image") + if description is None: + self.logger.warning("No Description for {0}".format(img["name"])) + + image = Image( + name=img["name"], + min_disk=img["min_disk"], + min_ram=img["min_ram"], + status=img["status"], + created_at=img["created_at"], + updated_at=img["updated_at"], + openstack_id=img["id"], + description=description, + tag=tags, + is_snapshot=image_type == "snapshot" + ) + self.logger.info(image) + + images.append(image) + + return images + except Exception as e: + self.logger.exception("Get Images Error: {0}".format(e)) + return () + def delete_keypair(self, key_name): key_pair = self.conn.compute.find_keypair(key_name) if key_pair: @@ -776,6 +825,22 @@ def get_forc_url(self): url = self.RE_BACKEND_URL.split(':5000', 1)[0] return "{0}/".format(url) + def cross_check_forc_image(self, tags): + get_url = "{0}templates/".format(self.RE_BACKEND_URL) + try: + response = req.get(get_url, timeout=(30, 30), headers={"X-API-KEY": self.FORC_API_KEY}) + if response.status_code != 200: + return () + else: + templates = response.json() + except Exception as e: + self.logger.error("Could not get templates from FORC.\n {0}".format(e)) + for template_dict in templates: + if template_dict["name"] in self.FORC_ALLOWED and template_dict["name"] in tags: + if template_dict["version"] in self.FORC_ALLOWED[template_dict["name"]]: + return True + return False + def create_backend(self, elixir_id, user_key_url, template, template_version, upstream_url): try: post_url = "{0}backends/".format(self.RE_BACKEND_URL) diff --git a/VirtualMachineService/VirtualMachineService-remote b/VirtualMachineService/VirtualMachineService-remote index ea83efa6..5a7dcaa8 100755 --- a/VirtualMachineService/VirtualMachineService-remote +++ b/VirtualMachineService/VirtualMachineService-remote @@ -31,6 +31,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' get_Flavors()') print(' get_Images()') print(' Image get_Image_with_Tag(string openstack_id)') + print(' get_Images_by_filter( filter_list)') print(' bool delete_server(string openstack_id)') print(' add_metadata_to_server(string servername, metadata)') print(' delete_metadata_from_server(string servername, keys)') @@ -189,6 +190,12 @@ elif cmd == 'get_Image_with_Tag': sys.exit(1) pp.pprint(client.get_Image_with_Tag(args[0],)) +elif cmd == 'get_Images_by_filter': + if len(args) != 1: + print('get_Images_by_filter requires 1 args') + sys.exit(1) + pp.pprint(client.get_Images_by_filter(eval(args[0]),)) + elif cmd == 'delete_server': if len(args) != 1: print('delete_server requires 1 args') diff --git a/VirtualMachineService/VirtualMachineService.py b/VirtualMachineService/VirtualMachineService.py index 10f71dcc..d4f4008c 100644 --- a/VirtualMachineService/VirtualMachineService.py +++ b/VirtualMachineService/VirtualMachineService.py @@ -89,6 +89,17 @@ def get_Image_with_Tag(self, openstack_id): """ pass + def get_Images_by_filter(self, filter_list): + """ + Get Images and filter by list of strings. + Returns: List of Image instances. + + Parameters: + - filter_list + + """ + pass + def delete_server(self, openstack_id): """ Delete server. @@ -738,6 +749,41 @@ def recv_get_Image_with_Tag(self): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "get_Image_with_Tag failed: unknown result") + def get_Images_by_filter(self, filter_list): + """ + Get Images and filter by list of strings. + Returns: List of Image instances. + + Parameters: + - filter_list + + """ + self.send_get_Images_by_filter(filter_list) + return self.recv_get_Images_by_filter() + + def send_get_Images_by_filter(self, filter_list): + self._oprot.writeMessageBegin('get_Images_by_filter', TMessageType.CALL, self._seqid) + args = get_Images_by_filter_args() + args.filter_list = filter_list + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_Images_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_Images_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_Images_by_filter failed: unknown result") + def delete_server(self, openstack_id): """ Delete server. @@ -2150,6 +2196,7 @@ def __init__(self, handler): 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 + self._processMap["get_Images_by_filter"] = Processor.process_get_Images_by_filter self._processMap["delete_server"] = Processor.process_delete_server self._processMap["add_metadata_to_server"] = Processor.process_add_metadata_to_server self._processMap["delete_metadata_from_server"] = Processor.process_delete_metadata_from_server @@ -2364,6 +2411,29 @@ def process_get_Image_with_Tag(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() + def process_get_Images_by_filter(self, seqid, iprot, oprot): + args = get_Images_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_Images_by_filter_result() + try: + result.success = self._handler.get_Images_by_filter(args.filter_list) + 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_Images_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_delete_server(self, seqid, iprot, oprot): args = delete_server_args() args.read(iprot) @@ -4165,6 +4235,146 @@ def __ne__(self, other): ) +class get_Images_by_filter_args(object): + """ + Attributes: + - filter_list + + """ + + + def __init__(self, filter_list=None,): + self.filter_list = filter_list + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.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) + iprot.readListEnd() + 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_Images_by_filter_args') + 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) + oprot.writeListEnd() + 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_Images_by_filter_args) +get_Images_by_filter_args.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'filter_list', (TType.STRING, 'UTF8', False), None, ), # 1 +) + + +class get_Images_by_filter_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.LIST: + self.success = [] + (_etype56, _size53) = iprot.readListBegin() + for _i57 in range(_size53): + _elem58 = Image() + _elem58.read(iprot) + self.success.append(_elem58) + iprot.readListEnd() + 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_Images_by_filter_result') + 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) + oprot.writeListEnd() + 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_Images_by_filter_result) +get_Images_by_filter_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [Image, None], False), None, ), # 0 +) + + class delete_server_args(object): """ Attributes: @@ -4331,11 +4541,11 @@ def read(self, iprot): elif fid == 2: if ftype == TType.MAP: self.metadata = {} - (_ktype47, _vtype48, _size46) = iprot.readMapBegin() - for _i50 in range(_size46): - _key51 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val52 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key51] = _val52 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -4356,9 +4566,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 kiter53, viter54 in self.metadata.items(): - oprot.writeString(kiter53.encode('utf-8') if sys.version_info[0] == 2 else kiter53) - oprot.writeString(viter54.encode('utf-8') if sys.version_info[0] == 2 else viter54) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4410,11 +4620,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype56, _vtype57, _size55) = iprot.readMapBegin() - for _i59 in range(_size55): - _key60 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val61 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key60] = _val61 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -4437,9 +4647,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 kiter62, viter63 in self.success.items(): - oprot.writeString(kiter62.encode('utf-8') if sys.version_info[0] == 2 else kiter62) - oprot.writeString(viter63.encode('utf-8') if sys.version_info[0] == 2 else viter63) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: @@ -4499,10 +4709,10 @@ def read(self, iprot): elif fid == 2: if ftype == TType.SET: self.keys = set() - (_etype67, _size64) = iprot.readSetBegin() - for _i68 in range(_size64): - _elem69 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.keys.add(_elem69) + (_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) iprot.readSetEnd() else: iprot.skip(ftype) @@ -4523,8 +4733,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 iter70 in self.keys: - oprot.writeString(iter70.encode('utf-8') if sys.version_info[0] == 2 else iter70) + for iter84 in self.keys: + oprot.writeString(iter84.encode('utf-8') if sys.version_info[0] == 2 else iter84) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -4576,10 +4786,10 @@ def read(self, iprot): if fid == 0: if ftype == TType.SET: self.success = set() - (_etype74, _size71) = iprot.readSetBegin() - for _i75 in range(_size71): - _elem76 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success.add(_elem76) + (_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) iprot.readSetEnd() else: iprot.skip(ftype) @@ -4602,8 +4812,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 iter77 in self.success: - oprot.writeString(iter77.encode('utf-8') if sys.version_info[0] == 2 else iter77) + for iter91 in self.success: + oprot.writeString(iter91.encode('utf-8') if sys.version_info[0] == 2 else iter91) oprot.writeSetEnd() oprot.writeFieldEnd() if self.e is not None: @@ -5041,11 +5251,11 @@ def read(self, iprot): elif fid == 5: if ftype == TType.MAP: self.metadata = {} - (_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 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5098,9 +5308,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 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) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() if self.diskspace is not None: @@ -5187,11 +5397,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_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 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5250,9 +5460,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 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) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: @@ -5366,11 +5576,11 @@ def read(self, iprot): elif fid == 4: if ftype == TType.MAP: self.metadata = {} - (_ktype97, _vtype98, _size96) = iprot.readMapBegin() - for _i100 in range(_size96): - _key101 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val102 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key101] = _val102 + (_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) @@ -5397,10 +5607,10 @@ def read(self, iprot): elif fid == 9: if ftype == TType.LIST: self.resenv = [] - (_etype106, _size103) = iprot.readListBegin() - for _i107 in range(_size103): - _elem108 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.resenv.append(_elem108) + (_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) iprot.readListEnd() else: iprot.skip(ftype) @@ -5429,9 +5639,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 kiter109, viter110 in self.metadata.items(): - oprot.writeString(kiter109.encode('utf-8') if sys.version_info[0] == 2 else kiter109) - oprot.writeString(viter110.encode('utf-8') if sys.version_info[0] == 2 else viter110) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() if self.diskspace is not None: @@ -5453,8 +5663,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 iter111 in self.resenv: - oprot.writeString(iter111.encode('utf-8') if sys.version_info[0] == 2 else iter111) + for iter125 in self.resenv: + oprot.writeString(iter125.encode('utf-8') if sys.version_info[0] == 2 else iter125) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5525,11 +5735,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype113, _vtype114, _size112) = iprot.readMapBegin() - for _i116 in range(_size112): - _key117 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val118 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key117] = _val118 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5588,9 +5798,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 kiter119, viter120 in self.success.items(): - oprot.writeString(kiter119.encode('utf-8') if sys.version_info[0] == 2 else kiter119) - oprot.writeString(viter120.encode('utf-8') if sys.version_info[0] == 2 else viter120) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: @@ -5805,17 +6015,17 @@ def read(self, iprot): elif fid == 2: if ftype == TType.MAP: self.playbooks_information = {} - (_ktype122, _vtype123, _size121) = iprot.readMapBegin() - for _i125 in range(_size121): - _key126 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val127 = {} - (_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() - _val127[_key133] = _val134 + (_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 iprot.readMapEnd() - self.playbooks_information[_key126] = _val127 + self.playbooks_information[_key140] = _val141 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5841,12 +6051,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 kiter135, viter136 in self.playbooks_information.items(): - oprot.writeString(kiter135.encode('utf-8') if sys.version_info[0] == 2 else kiter135) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(viter136)) - for kiter137, viter138 in viter136.items(): - oprot.writeString(kiter137.encode('utf-8') if sys.version_info[0] == 2 else kiter137) - oprot.writeString(viter138.encode('utf-8') if sys.version_info[0] == 2 else viter138) + 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) oprot.writeMapEnd() oprot.writeMapEnd() oprot.writeFieldEnd() @@ -6510,11 +6720,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype142, _size139) = iprot.readListBegin() - for _i143 in range(_size139): - _elem144 = Backend() - _elem144.read(iprot) - self.success.append(_elem144) + (_etype156, _size153) = iprot.readListBegin() + for _i157 in range(_size153): + _elem158 = Backend() + _elem158.read(iprot) + self.success.append(_elem158) iprot.readListEnd() else: iprot.skip(ftype) @@ -6531,8 +6741,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 iter145 in self.success: - iter145.write(oprot) + for iter159 in self.success: + iter159.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6642,11 +6852,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype149, _size146) = iprot.readListBegin() - for _i150 in range(_size146): - _elem151 = Backend() - _elem151.read(iprot) - self.success.append(_elem151) + (_etype163, _size160) = iprot.readListBegin() + for _i164 in range(_size160): + _elem165 = Backend() + _elem165.read(iprot) + self.success.append(_elem165) iprot.readListEnd() else: iprot.skip(ftype) @@ -6663,8 +6873,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 iter152 in self.success: - iter152.write(oprot) + for iter166 in self.success: + iter166.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6774,11 +6984,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) + (_etype170, _size167) = iprot.readListBegin() + for _i171 in range(_size167): + _elem172 = Backend() + _elem172.read(iprot) + self.success.append(_elem172) iprot.readListEnd() else: iprot.skip(ftype) @@ -6795,8 +7005,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 iter173 in self.success: + iter173.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7134,16 +7344,16 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype163, _size160) = iprot.readListBegin() - for _i164 in range(_size160): - _elem165 = {} - (_ktype167, _vtype168, _size166) = iprot.readMapBegin() - for _i170 in range(_size166): - _key171 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val172 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _elem165[_key171] = _val172 + (_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 iprot.readMapEnd() - self.success.append(_elem165) + self.success.append(_elem179) iprot.readListEnd() else: iprot.skip(ftype) @@ -7160,11 +7370,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 iter173 in self.success: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter173)) - for kiter174, viter175 in iter173.items(): - oprot.writeString(kiter174.encode('utf-8') if sys.version_info[0] == 2 else kiter174) - oprot.writeString(viter175.encode('utf-8') if sys.version_info[0] == 2 else viter175) + 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) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -7275,16 +7485,16 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype179, _size176) = iprot.readListBegin() - for _i180 in range(_size176): - _elem181 = {} - (_ktype183, _vtype184, _size182) = iprot.readMapBegin() - for _i186 in range(_size182): - _key187 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val188 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _elem181[_key187] = _val188 + (_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 iprot.readMapEnd() - self.success.append(_elem181) + self.success.append(_elem195) iprot.readListEnd() else: iprot.skip(ftype) @@ -7301,11 +7511,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 iter189 in self.success: - oprot.writeMapBegin(TType.STRING, TType.STRING, len(iter189)) - for kiter190, viter191 in iter189.items(): - oprot.writeString(kiter190.encode('utf-8') if sys.version_info[0] == 2 else kiter190) - oprot.writeString(viter191.encode('utf-8') if sys.version_info[0] == 2 else viter191) + 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) oprot.writeMapEnd() oprot.writeListEnd() oprot.writeFieldEnd() @@ -7428,11 +7638,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype193, _vtype194, _size192) = iprot.readMapBegin() - for _i196 in range(_size192): - _key197 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val198 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key197] = _val198 + (_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 iprot.readMapEnd() else: iprot.skip(ftype) @@ -7449,9 +7659,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 kiter199, viter200 in self.success.items(): - oprot.writeString(kiter199.encode('utf-8') if sys.version_info[0] == 2 else kiter199) - oprot.writeString(viter200.encode('utf-8') if sys.version_info[0] == 2 else viter200) + 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) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7727,11 +7937,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype204, _size201) = iprot.readListBegin() - for _i205 in range(_size201): - _elem206 = VM() - _elem206.read(iprot) - self.success.append(_elem206) + (_etype218, _size215) = iprot.readListBegin() + for _i219 in range(_size215): + _elem220 = VM() + _elem220.read(iprot) + self.success.append(_elem220) iprot.readListEnd() else: iprot.skip(ftype) @@ -7748,8 +7958,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 iter207 in self.success: - iter207.write(oprot) + for iter221 in self.success: + iter221.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7797,10 +8007,10 @@ def read(self, iprot): if fid == 1: if ftype == TType.LIST: self.server_ids = [] - (_etype211, _size208) = iprot.readListBegin() - for _i212 in range(_size208): - _elem213 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.server_ids.append(_elem213) + (_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) iprot.readListEnd() else: iprot.skip(ftype) @@ -7817,8 +8027,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 iter214 in self.server_ids: - oprot.writeString(iter214.encode('utf-8') if sys.version_info[0] == 2 else iter214) + for iter228 in self.server_ids: + oprot.writeString(iter228.encode('utf-8') if sys.version_info[0] == 2 else iter228) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7867,11 +8077,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) + (_etype232, _size229) = iprot.readListBegin() + for _i233 in range(_size229): + _elem234 = VM() + _elem234.read(iprot) + self.success.append(_elem234) iprot.readListEnd() else: iprot.skip(ftype) @@ -7888,8 +8098,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 iter235 in self.success: + iter235.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8437,11 +8647,11 @@ def read(self, iprot): if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype223, _vtype224, _size222) = iprot.readMapBegin() - for _i226 in range(_size222): - _key227 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val228 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.success[_key227] = _val228 + (_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() + _val242 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success[_key241] = _val242 iprot.readMapEnd() else: iprot.skip(ftype) @@ -8458,9 +8668,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 kiter229, viter230 in self.success.items(): - oprot.writeString(kiter229.encode('utf-8') if sys.version_info[0] == 2 else kiter229) - oprot.writeString(viter230.encode('utf-8') if sys.version_info[0] == 2 else viter230) + for kiter243, viter244 in self.success.items(): + oprot.writeString(kiter243.encode('utf-8') if sys.version_info[0] == 2 else kiter243) + oprot.writeString(viter244.encode('utf-8') if sys.version_info[0] == 2 else viter244) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9535,11 +9745,11 @@ def read(self, iprot): elif fid == 3: if ftype == TType.MAP: self.metadata = {} - (_ktype232, _vtype233, _size231) = iprot.readMapBegin() - for _i235 in range(_size231): - _key236 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - _val237 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - self.metadata[_key236] = _val237 + (_ktype246, _vtype247, _size245) = iprot.readMapBegin() + for _i249 in range(_size245): + _key250 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val251 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.metadata[_key250] = _val251 iprot.readMapEnd() else: iprot.skip(ftype) @@ -9564,9 +9774,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 kiter238, viter239 in self.metadata.items(): - oprot.writeString(kiter238.encode('utf-8') if sys.version_info[0] == 2 else kiter238) - oprot.writeString(viter239.encode('utf-8') if sys.version_info[0] == 2 else viter239) + for kiter252, viter253 in self.metadata.items(): + oprot.writeString(kiter252.encode('utf-8') if sys.version_info[0] == 2 else kiter252) + oprot.writeString(viter253.encode('utf-8') if sys.version_info[0] == 2 else viter253) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() diff --git a/VirtualMachineService/config/config.yml b/VirtualMachineService/config/config.yml index a0e15f51..873e27e0 100644 --- a/VirtualMachineService/config/config.yml +++ b/VirtualMachineService/config/config.yml @@ -22,3 +22,8 @@ openstack_connection: forc: forc_url: https://proxy-dev.bi.denbi.de:5000/ + forc_allowed: + theiaide: + - v01 + guacamole: + - v01 diff --git a/portal_client.thrift b/portal_client.thrift index f6ee5340..981c87be 100644 --- a/portal_client.thrift +++ b/portal_client.thrift @@ -228,6 +228,12 @@ service VirtualMachineService { */ Image get_Image_with_Tag(1:string openstack_id) + /** + * Get Images and filter by list of strings. + * Returns: List of Image instances. + */ + list get_Images_by_filter(1: list filter_list) + /** * Delete server. From bbd486b9a7e7b74da990f015af7a47a1ca3182c9 Mon Sep 17 00:00:00 2001 From: Ewgenij Katchko Date: Mon, 6 Jan 2020 16:50:52 +0100 Subject: [PATCH 2/3] fix(conda): change user variable --- VirtualMachineService/ancon/playbooks/bioconda.yml | 12 ++++++++++++ .../ancon/playbooks/bioconda_vars_file.yml | 7 +++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/VirtualMachineService/ancon/playbooks/bioconda.yml b/VirtualMachineService/ancon/playbooks/bioconda.yml index ada6f8b8..e9523550 100644 --- a/VirtualMachineService/ancon/playbooks/bioconda.yml +++ b/VirtualMachineService/ancon/playbooks/bioconda.yml @@ -1,4 +1,5 @@ - name: Download miniconda install script + become_user: "{{ bioconda_user.name }}" get_url: args: url: "{{ bioconda_folders.conda_installer_url }}" @@ -8,59 +9,70 @@ force: no - name: Install miniconda + become_user: "{{ bioconda_user.name }}" shell: "timeout 3m {{ bioconda_folders.install_script }} -b" args: executable: /bin/bash creates: "{{ bioconda_folders.conda_dir }}" - name: Check for channels + become_user: "{{ bioconda_user.name }}" shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --get channels'" register: added_channels - name: Add default channel + become_user: "{{ bioconda_user.name }}" shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels default'" args: executable: /bin/bash when: added_channels.stdout.find('default') == -1 - name: Add bioconda channel + become_user: "{{ bioconda_user.name }}" shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels bioconda'" args: executable: /bin/bash when: added_channels.stdout.find('bioconda') == -1 - name: Add conda-forge channel + become_user: "{{ bioconda_user.name }}" shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda config --add channels conda-forge'" args: executable: /bin/bash when: added_channels.stdout.find('conda-forge') == -1 - name: Init .bashrc for conda + become_user: "{{ bioconda_user.name }}" shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda init'" args: executable: /bin/bash - name: Check for environment + become_user: "{{ bioconda_user.name }}" shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda info -e'" register: added_envs - name: Create alias for environment + become_user: "{{ bioconda_user.name }}" shell: "echo $ALIAS_VARIABLE > ~/.bash_aliases" environment: ALIAS_VARIABLE: 'alias {{ bioconda_tools.env | quote }}="conda activate {{ bioconda_tools.env | quote }}"' when: added_envs.stdout.find(bioconda_tools.env) == -1 - name: Create environment + become_user: "{{ bioconda_user.name }}" shell: "timeout 2m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda create --yes -n {{ bioconda_tools.env | quote}}'" args: executable: /bin/bash when: added_envs.stdout.find(bioconda_tools.env) == -1 - name: Check for installed packages + become_user: "{{ bioconda_user.name }}" shell: "timeout 1m bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda activate {{ bioconda_tools.env | quote}} && conda list'" register: added_packages - name: Install chosen packages + become_user: "{{ bioconda_user.name }}" shell: "timeout {{ bioconda_tools.timeout_length }} bash -c 'source {{ bioconda_folders.conda_dir }}/bin/activate && conda activate {{ bioconda_tools.env | quote}} && conda install --yes {{ item.key }}={{ item.value.version }}={{ item.value.build }}'" args: executable: /bin/bash diff --git a/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml b/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml index ad1e7fd7..d759e859 100644 --- a/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml +++ b/VirtualMachineService/ancon/playbooks/bioconda_vars_file.yml @@ -4,6 +4,9 @@ bioconda_tools: timeout_length: "5m" bioconda_folders: - install_script: "/home/{{ ansible_user_id }}/install_miniconda3.sh" - conda_dir: "/home/{{ ansible_user_id }}/miniconda3" + install_script: "/home/{{ bioconda_user.name }}/install_miniconda3.sh" + conda_dir: "/home/{{ bioconda_user.name }}/miniconda3" conda_installer_url: "https://repo.anaconda.com/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh" + +bioconda_user: + name: "ubuntu" From 7e725172c07daf169c1b7f200d82e6fa4e453f38 Mon Sep 17 00:00:00 2001 From: Ewgenij Katchko Date: Mon, 6 Jan 2020 23:55:53 +0100 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d934f3f..7e62f505 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## (2020-01-06) + + +#### Bug Fixes + +* **conda:** change user variable ([bbd486b9](bbd486b9)) + +#### Features + +* **images:** + * cross check imagetags with forc (#196) ([b32190c4](b32190c4)) + * cross check imagetags with forc ([d39c3f5e](d39c3f5e)) + ## (2019-12-19)