Bug 1950 fixed to update the deploy_params_kdu dict instead of overwriting it 04/11804/2
authorPedro Escaleira <escaleira@av.it.pt>
Wed, 30 Mar 2022 23:08:05 +0000 (00:08 +0100)
committerescaleira <escaleira@av.it.pt>
Thu, 31 Mar 2022 10:22:09 +0000 (12:22 +0200)
Change-Id: I47ffa741679a6942bd3f4e46ec0a382e8a55422c
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
osm_lcm/ns.py

index 17a892d..852cc54 100644 (file)
@@ -2344,7 +2344,9 @@ class NsLcm(LcmBase):
                     kdur_list = []
                     for kdur in vnfr["kdur"]:
                         if kdur.get("additionalParams"):
-                            kdur["additionalParams"] = json.loads(kdur["additionalParams"])
+                            kdur["additionalParams"] = json.loads(
+                                kdur["additionalParams"]
+                            )
                         kdur_list.append(kdur)
                     vnfr["kdur"] = kdur_list
 
@@ -2542,8 +2544,8 @@ class NsLcm(LcmBase):
                         )
                         deploy_params_kdu = {"OSM": get_osm_params(db_vnfr)}
                         if kdur.get("additionalParams"):
-                            deploy_params_kdu = parse_yaml_strings(
-                                kdur["additionalParams"]
+                            deploy_params_kdu.update(
+                                parse_yaml_strings(kdur["additionalParams"].copy())
                             )
 
                         self._deploy_n2vc(
@@ -4895,7 +4897,9 @@ class NsLcm(LcmBase):
                     kdur_list = []
                     for kdur in db_vnfr["kdur"]:
                         if kdur.get("additionalParams"):
-                            kdur["additionalParams"] = json.loads(kdur["additionalParams"])
+                            kdur["additionalParams"] = json.loads(
+                                kdur["additionalParams"]
+                            )
                         kdur_list.append(kdur)
                     db_vnfr["kdur"] = kdur_list
                 step = "Getting vnfd from database"