From: David Garcia Date: Wed, 1 Apr 2020 14:14:59 +0000 (+0200) Subject: Fix bug 1039: Pass config to native charms in instantiating time X-Git-Tag: v7.1.0rc1~15 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=18a6332d4127b708a898e9fcf9875bfac83b61f0;p=osm%2FLCM.git Fix bug 1039: Pass config to native charms in instantiating time Native charms should be deployed with the config params in the VNFD Change-Id: Id430039c7e8daa04d92408d2050743e4ba3cb399 Signed-off-by: David Garcia --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index b25629d..5d4f34d 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -1230,7 +1230,24 @@ class NsLcm(LcmBase): # TODO check if already done self.logger.debug(logging_text + step) - await self.n2vc.install_configuration_sw(ee_id=ee_id, artifact_path=artifact_path, db_dict=db_dict) + config = None + if not is_proxy_charm: + initial_config_primitive_list = config_descriptor.get('initial-config-primitive') + if initial_config_primitive_list: + for primitive in initial_config_primitive_list: + if primitive["name"] == "config": + config = self._map_primitive_params( + primitive, + {}, + deploy_params + ) + break + await self.n2vc.install_configuration_sw( + ee_id=ee_id, + artifact_path=artifact_path, + db_dict=db_dict, + config=config + ) # write in db flag of configuration_sw already installed self.update_db_2("nsrs", nsr_id, {db_update_entry + "config_sw_installed": True})