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
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
if vca.get('vdu_id') == r.get('entities')[0].get('id'):
if vca_status.get('status') == 'BROKEN':
# peer broken: remove relation from list
- ns_relations.remove(r)
+ vnf_relations.remove(r)
if vca.get('vdu_id') == r.get('entities')[1].get('id'):
if vca_status.get('status') == 'BROKEN':
# peer broken: remove relation from list
- ns_relations.remove(r)
+ vnf_relations.remove(r)
except Exception:
# ignore
pass