X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fns.py;h=bcd675bca44059471bd27bd93da1b7479edbab38;hb=refs%2Fheads%2Fv7.0;hp=489c436026ef51947157839d84ff2b75d36497b4;hpb=1e4456c4faef7fd3b21024c837e17c717a5d7bfc;p=osm%2FLCM.git diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 489c436..bcd675b 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -2067,10 +2067,13 @@ class NsLcm(LcmBase): to_vca_endpoint = None vca_list = deep_get(db_nsr, ('_admin', 'deployed', 'VCA')) for vca in vca_list: - if vca.get('vdu_id') == r.get('entities')[0].get('id') and vca.get('config_sw_installed'): + key_to_check = "vdu_id" + if vca.get("vdu_id") is None: + key_to_check = "vnfd_id" + if vca.get(key_to_check) == r.get('entities')[0].get('id') and vca.get('config_sw_installed'): from_vca_ee_id = vca.get('ee_id') from_vca_endpoint = r.get('entities')[0].get('endpoint') - if vca.get('vdu_id') == r.get('entities')[1].get('id') and vca.get('config_sw_installed'): + if vca.get(key_to_check) == r.get('entities')[1].get('id') and vca.get('config_sw_installed'): to_vca_ee_id = vca.get('ee_id') to_vca_endpoint = r.get('entities')[1].get('endpoint') if from_vca_ee_id and to_vca_ee_id: