X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=NG-RO%2Fosm_ng_ro%2Fns_thread.py;h=4a7de944c83aa833135023a1c7ee34c29865ec93;hb=refs%2Fchanges%2F89%2F13989%2F4;hp=42a8a5912c2c849499d6ae465d7896424d42f65b;hpb=a5233f8f1853cc5e8b71865ad4f26715a08b6eed;p=osm%2FRO.git diff --git a/NG-RO/osm_ng_ro/ns_thread.py b/NG-RO/osm_ng_ro/ns_thread.py index 42a8a591..4a7de944 100644 --- a/NG-RO/osm_ng_ro/ns_thread.py +++ b/NG-RO/osm_ng_ro/ns_thread.py @@ -644,7 +644,9 @@ class VimInteractionImage(VimInteractionBase): # FIND vim_image_id = "" if task.get("find_params"): - vim_images = target_vim.get_image_list(**task["find_params"]) + vim_images = target_vim.get_image_list( + task["find_params"].get("filter_dict", {}) + ) if not vim_images: raise NsWorkerExceptionNotFound( @@ -1533,20 +1535,12 @@ class VimInteractionResize(VimInteractionBase): target_vim = self.my_vims[ro_task["target_id"]] try: + params = task["params"] + params_copy = deepcopy(params) + target_flavor_uuid = task_depends[params_copy["flavor_id"]] vim_vm_id = "" if task.get("params"): - vim_vm_id = task["params"].get("vim_vm_id") - flavor_dict = task["params"].get("flavor_dict") - self.logger.info("flavor_dict %s", flavor_dict) - - try: - target_flavor_uuid = target_vim.get_flavor_id_from_data(flavor_dict) - except Exception as e: - self.logger.info("Cannot find any flavor matching %s.", str(e)) - try: - target_flavor_uuid = target_vim.new_flavor(flavor_dict) - except Exception as e: - self.logger.error("Error creating flavor at VIM %s.", str(e)) + self.logger.info("vim_vm_id %s", vim_vm_id) if target_flavor_uuid is not None: resized_status = target_vim.resize_instance(