Bug 1951 fixed to update the deploy_params_kdu dict instead of overwriting it 05/11805/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:21:14 +0000 (12:21 +0200)
Change-Id: I47ffa741679a6942bd3f4e46ec0a382e8a55422c
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
osm_lcm/ns.py

index ab1ee3b..28e5005 100644 (file)
@@ -2293,7 +2293,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
 
@@ -2491,8 +2493,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(
@@ -4687,7 +4689,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"