From: Guillermo Calvino Date: Wed, 26 Jan 2022 16:40:31 +0000 (+0100) Subject: Bug 1837 fix - Helm based KNF cannot be instantiated if values files contains a label... X-Git-Tag: v12.0.0rc1~31 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F11588%2F3;p=osm%2FLCM.git Bug 1837 fix - Helm based KNF cannot be instantiated if values files contains a label with special characters '.' Change-Id: I3c3e806fcc38d18cc4446bb4542dd84c6d0033f9 Signed-off-by: Guillermo Calvino --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 4192625..f868a6e 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -539,7 +539,7 @@ class NsLcm(LcmBase): vdur_copy = deepcopy(vdur) vdur_copy["status"] = "BUILD" vdur_copy["status-detailed"] = None - vdur_copy["ip-address"]: None + vdur_copy["ip-address"] = None vdur_copy["_id"] = str(uuid4()) vdur_copy["count-index"] += count + 1 vdur_copy["id"] = "{}-{}".format( @@ -2276,6 +2276,10 @@ class NsLcm(LcmBase): # read from db: operation stage[1] = "Getting nslcmop={} from db.".format(nslcmop_id) db_nslcmop = self.db.get_one("nslcmops", {"_id": nslcmop_id}) + if db_nslcmop["operationParams"].get("additionalParamsForVnf"): + db_nslcmop["operationParams"]["additionalParamsForVnf"] = json.loads( + db_nslcmop["operationParams"]["additionalParamsForVnf"] + ) ns_params = db_nslcmop.get("operationParams") if ns_params and ns_params.get("timeout_ns_deploy"): timeout_ns_deploy = ns_params["timeout_ns_deploy"] @@ -2305,6 +2309,14 @@ class NsLcm(LcmBase): # for each vnf in ns, read vnfd for vnfr in db_vnfrs_list: + if vnfr.get("kdur"): + kdur_list = [] + for kdur in vnfr["kdur"]: + if kdur.get("additionalParams"): + kdur["additionalParams"] = json.loads(kdur["additionalParams"]) + kdur_list.append(kdur) + vnfr["kdur"] = kdur_list + db_vnfrs[vnfr["member-vnf-index-ref"]] = vnfr vnfd_id = vnfr["vnfd-id"] vnfd_ref = vnfr["vnfd-ref"] @@ -4827,6 +4839,10 @@ class NsLcm(LcmBase): step = "Getting information from database" db_nslcmop = self.db.get_one("nslcmops", {"_id": nslcmop_id}) db_nsr = self.db.get_one("nsrs", {"_id": nsr_id}) + if db_nslcmop["operationParams"].get("primitive_params"): + db_nslcmop["operationParams"]["primitive_params"] = json.loads( + db_nslcmop["operationParams"]["primitive_params"] + ) nsr_deployed = db_nsr["_admin"].get("deployed") vnf_index = db_nslcmop["operationParams"].get("member_vnf_index")