X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fns.py;h=fc2c9f6eb25bd11a6f2bbddad494fa2224ec9880;hb=refs%2Fchanges%2F85%2F11285%2F1;hp=1c18ec751aeb8ec738c77e2c6dddd1e1f4a5a95f;hpb=98488edea54d619415d18c72a3b213ac2b75e5aa;p=osm%2FLCM.git diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 1c18ec7..fc2c9f6 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -1557,9 +1557,13 @@ class NsLcm(LcmBase): raise LcmException("Configuration aborted because dependent charm/s timeout") def get_vca_id(self, db_vnfr: dict, db_nsr: dict): - return deep_get(db_vnfr, ("vca-id",)) or deep_get( - db_nsr, ("instantiate_params", "vcaId") - ) + vca_id = None + if db_vnfr: + vca_id = deep_get(db_vnfr, ("vca-id",)) + elif db_nsr: + vim_account_id = deep_get(db_nsr, ("instantiate_params", "vimAccountId")) + vca_id = VimAccountDB.get_vim_account_with_id(vim_account_id).get("vca") + return vca_id async def instantiate_N2VC( self,