From: elumalai Date: Thu, 16 Nov 2023 09:06:05 +0000 (+0530) Subject: Bug 2317: Fix for Able to scale-in parent VM after a failed scale-out and NS update... X-Git-Tag: release-v15.0-start^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F14026%2F2;p=osm%2FLCM.git Bug 2317: Fix for Able to scale-in parent VM after a failed scale-out and NS update sequentially Change-Id: I0563ea49c423e38c9c1605204eb073bbb9cd9faa Signed-off-by: elumalai --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index f282b88..71ede28 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -5903,7 +5903,25 @@ class NsLcm(LcmBase): if result == "FAILED": nslcmop_operation_state = result error_description_nslcmop = detailed_status + old_operational_status = "failed" db_nslcmop_update["detailed-status"] = detailed_status + db_nsr_update["detailed-status"] = detailed_status + scaling_aspect = get_scaling_aspect(latest_vnfd) + scaling_group_desc = db_nsr.get("_admin").get( + "scaling-group", None + ) + if scaling_group_desc: + for aspect in scaling_aspect: + scaling_group_id = aspect.get("id") + for scale_index, scaling_group in enumerate( + scaling_group_desc + ): + if scaling_group.get("name") == scaling_group_id: + db_nsr_update[ + "_admin.scaling-group.{}.nb-scale-op".format( + scale_index + ) + ] = 0 self.logger.debug( logging_text + " step {} Done with result {} {}".format(