From: David Garcia Date: Wed, 25 Mar 2020 17:21:37 +0000 (+0100) Subject: Feature 8720: Add scale support for charms X-Git-Tag: v8.0.0rc2~13 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=06a11f2e11c0f4e68f31dc47b90b78a66c03b60c;p=osm%2FLCM.git Feature 8720: Add scale support for charms Change-Id: Ibbd561bd9ed14d9e3869b5aa369371cc11dab7b2 Signed-off-by: David Garcia --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 489c436..9514768 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -1271,11 +1271,24 @@ class NsLcm(LcmBase): deploy_params ) break + num_units = 1 + if is_proxy_charm: + if element_type == "NS": + num_units = db_nsr.get("config-units") or 1 + elif element_type == "VNF": + num_units = db_vnfr.get("config-units") or 1 + elif element_type == "VDU": + for v in db_vnfr["vdur"]: + if vdu_id == v["vdu-id-ref"]: + num_units = v.get("config-units") or 1 + break + await self.n2vc.install_configuration_sw( ee_id=ee_id, artifact_path=artifact_path, db_dict=db_dict, - config=config + config=config, + num_units=num_units ) # write in db flag of configuration_sw already installed