X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fns.py;h=ed8112bb425217e50ecfa4b898c4fd5fb851b404;hb=6be140022fbe24cb162bd6b508dfed1174402d5b;hp=102d01f5d971acdfc4fca9cc7c6a9cdf677584ba;hpb=a77ced77979b7776f6758d14b8d9b54cbd028c19;p=osm%2FLCM.git diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 102d01f..ed8112b 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -645,10 +645,13 @@ class NsLcm(LcmBase): } # check if this network needs SDN assist if vld.get("pci-interfaces"): - db_vim = VimAccountDB.get_vim_account_with_id(target_vld["vim_info"][0]["vim_account_id"]) + db_vim = get_vim_account(ns_params["vimAccountId"]) sdnc_id = db_vim["config"].get("sdn-controller") if sdnc_id: - target_vld["vim_info"].append({"sdnc_id": sdnc_id}) + sdn_vld = "nsrs:{}:vld.{}".format(nsr_id, vld["id"]) + target_sdn = "sdn:{}".format(sdnc_id) + target_vld["vim_info"][target_sdn] = { + "sdn": True, "target_vim": target_vim, "vlds": [sdn_vld], "type": vld.get("type")} nsd_vnf_profiles = get_vnf_profiles(nsd) for nsd_vnf_profile in nsd_vnf_profiles: