fix(sapd): sapd used to specify exposed connections at NS level. Fixes Bug 1321
Change-Id: I61b52f77102cc70da01da7f35bdbf79dedcd6ae9
Signed-off-by: bravof <fbravo@whitestack.com>
diff --git a/osm_lcm/netslice.py b/osm_lcm/netslice.py
index dc2903d..c3a48e6 100644
--- a/osm_lcm/netslice.py
+++ b/osm_lcm/netslice.py
@@ -257,16 +257,16 @@
continue
db_nsds = self.db.get_one("nsds", {"_id": nss["nsdId"]})
# Go for nsd, and search the CP that match with nst:CP to get vld-id-ref
- for cp_nsd in db_nsds.get("connection-point", ()):
- if cp_nsd["name"] == nss_cp_item["nsd-connection-point-ref"]:
+ for cp_nsd in db_nsds.get("sapd", ()):
+ if cp_nsd["id"] == nss_cp_item["nsd-connection-point-ref"]:
if nslcmop.get("operationParams"):
if nslcmop["operationParams"].get("nsName") == nss["nsName"]:
vld_id = RO_item["vld_id"]
netslice_scenario_id = RO_item["netslice_scenario_id"]
nslcmop_vld = {}
- nslcmop_vld["name"] = cp_nsd["vld-id-ref"]
+ nslcmop_vld["name"] = cp_nsd["virtual-link-desc"]
for vld in get_iterable(nslcmop["operationParams"], "vld"):
- if vld["name"] == cp_nsd["vld-id-ref"]:
+ if vld["name"] == cp_nsd["virtual-link-desc"]:
nslcmop_vld.update(vld)
if self.ro_config["ng"]:
nslcmop_vld["common_id"] = netslice_scenario_id