fix(sapd): sapd used to specify exposed connections at NS level. Fixes Bug 1321 03/10103/1
authorbravof <fbravo@whitestack.com>
Fri, 11 Dec 2020 19:37:01 +0000 (16:37 -0300)
committerbravof <fbravo@whitestack.com>
Fri, 11 Dec 2020 19:37:01 +0000 (16:37 -0300)
Change-Id: I61b52f77102cc70da01da7f35bdbf79dedcd6ae9
Signed-off-by: bravof <fbravo@whitestack.com>
osm_lcm/netslice.py

index dc2903d..c3a48e6 100644 (file)
@@ -257,16 +257,16 @@ class NetsliceLcm(LcmBase):
                         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