fix vnf_relations issue when there are more than one 07/9707/2
authortierno <alfonso.tiernosepulveda@telefonica.com>
Mon, 14 Sep 2020 12:11:32 +0000 (12:11 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Wed, 23 Sep 2020 13:42:03 +0000 (13:42 +0000)
Change-Id: I6e8e6d6301562a64eec78c73335fb46568306e6c
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_lcm/ns.py

index 1f97761..fb1478e 100644 (file)
@@ -2297,7 +2297,7 @@ class NsLcm(LcmBase):
                 db_nsr = self.db.get_one("nsrs", {"_id": nsr_id})
 
                 # for each defined NS relation, find the VCA's related
-                for r in ns_relations:
+                for r in ns_relations.copy():
                     from_vca_ee_id = None
                     to_vca_ee_id = None
                     from_vca_endpoint = None
@@ -2342,7 +2342,7 @@ class NsLcm(LcmBase):
                             pass
 
                 # for each defined VNF relation, find the VCA's related
-                for r in vnf_relations:
+                for r in vnf_relations.copy():
                     from_vca_ee_id = None
                     to_vca_ee_id = None
                     from_vca_endpoint = None