From 18a6332d4127b708a898e9fcf9875bfac83b61f0 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Wed, 1 Apr 2020 16:14:59 +0200 Subject: [PATCH] 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 --- osm_lcm/ns.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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}) -- 2.25.1