Fix Pre and Post Scale operations
[osm/LCM.git] / osm_lcm / ns.py
index 75db8e5..7f73c19 100644 (file)
@@ -595,7 +595,7 @@ class NsLcm(LcmBase):
             for param in ("vim-network-name", "vim-network-id"):
                 if vld_params.get(param):
                     if isinstance(vld_params[param], dict):
-                        for vim, vim_net in vld_params[param]:
+                        for vim, vim_net in vld_params[param].items():
                             other_target_vim = "vim:" + vim
                             populate_dict(target_vld["vim_info"], (other_target_vim, param.replace("-", "_")), vim_net)
                     else:  # isinstance str
@@ -2195,6 +2195,7 @@ class NsLcm(LcmBase):
             kdu_instance = self.k8scluster_map[k8sclustertype].generate_kdu_instance_name(
                 db_dict=db_dict_install,
                 kdu_model=k8s_instance_info["kdu-model"],
+                kdu_name=k8s_instance_info["kdu-name"],
             )
             self.update_db_2("nsrs", nsr_id, {nsr_db_path + ".kdu-instance": kdu_instance})
             await self.k8scluster_map[k8sclustertype].install(
@@ -3895,7 +3896,7 @@ class NsLcm(LcmBase):
                                                                           vdu_count_index=None,
                                                                           ee_descriptor_id=ee_descriptor_id)
                             result, result_detail = await self._ns_execute_primitive(
-                                ee_id, primitive_name, primitive_params, vca_type)
+                                ee_id, primitive_name, primitive_params, vca_type=vca_type)
                             self.logger.debug(logging_text + "vnf_config_primitive={} Done with result {} {}".format(
                                 vnf_config_primitive, result, result_detail))
                             # Update operationState = COMPLETED | FAILED
@@ -4160,7 +4161,7 @@ class NsLcm(LcmBase):
                                                                           vdu_count_index=None,
                                                                           ee_descriptor_id=ee_descriptor_id)
                             result, result_detail = await self._ns_execute_primitive(
-                                ee_id, primitive_name, primitive_params, vca_type)
+                                ee_id, primitive_name, primitive_params, vca_type=vca_type)
                             self.logger.debug(logging_text + "vnf_config_primitive={} Done with result {} {}".format(
                                 vnf_config_primitive, result, result_detail))
                             # Update operationState = COMPLETED | FAILED