From 06a11f2e11c0f4e68f31dc47b90b78a66c03b60c Mon Sep 17 00:00:00 2001 From: David Garcia Date: Wed, 25 Mar 2020 18:21:37 +0100 Subject: [PATCH] Feature 8720: Add scale support for charms Change-Id: Ibbd561bd9ed14d9e3869b5aa369371cc11dab7b2 Signed-off-by: David Garcia --- osm_lcm/ns.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 -- 2.25.1