From: 36970 Date: Mon, 1 Apr 2024 15:41:31 +0000 (+0000) Subject: Bug 2367 fixed: Couldn't perform manual scale out for multi-vnf X-Git-Tag: release-v16.0-start~15 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=ef037855d03eed77bbbf7a87aceeaa4f7c6b3340;p=osm%2FLCM.git Bug 2367 fixed: Couldn't perform manual scale out for multi-vnf Change-Id: I2547ef2cb128c84edd6cae380cd6282211658786 Signed-off-by: 36970 --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 8e42ddc..25ae038 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -6333,7 +6333,11 @@ class NsLcm(LcmBase): nsr_id, { "_admin.scaling-group": [ - {"name": scaling_group, "nb-scale-op": 0} + { + "name": scaling_group, + "vnf_index": vnf_index, + "nb-scale-op": 0, + } ] }, ) @@ -6342,7 +6346,10 @@ class NsLcm(LcmBase): for admin_scale_index, admin_scale_info in enumerate( db_nsr["_admin"]["scaling-group"] ): - if admin_scale_info["name"] == scaling_group: + if ( + admin_scale_info["name"] == scaling_group + and admin_scale_info["vnf_index"] == vnf_index + ): nb_scale_op = admin_scale_info.get("nb-scale-op", 0) break else: # not found, set index one plus last element and add new entry with the name @@ -6350,6 +6357,9 @@ class NsLcm(LcmBase): db_nsr_update[ "_admin.scaling-group.{}.name".format(admin_scale_index) ] = scaling_group + db_nsr_update[ + "_admin.scaling-group.{}.vnf_index".format(admin_scale_index) + ] = vnf_index vca_scaling_info = [] scaling_info = {"scaling_group_name": scaling_group, "vdu": [], "kdu": []}