Fix #1076 slice instantiation without CP in NSD fail 59/8959/2 v7.1.0rc2 v7.1.0rc3
authorFelipe Vicens <felipe.vicens@atos.net>
Fri, 22 May 2020 13:14:31 +0000 (15:14 +0200)
committerFelipe Vicens <felipe.vicens@atos.net>
Fri, 22 May 2020 15:19:17 +0000 (17:19 +0200)
Change-Id: I7a62b7d73fc57fa5c3630475043eb6dd39fc2ef5
Signed-off-by: Felipe Vicens <felipe.vicens@atos.net>
osm_lcm/netslice.py

index fe8a7b9..4d731af 100644 (file)
@@ -248,7 +248,7 @@ class NetsliceLcm(LcmBase):
                                 if nss_cp_item["nss-ref"] == nss["nss-id"]:
                                     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["connection-point"]:
+                                    for cp_nsd in db_nsds.get("connection-point", ()):
                                         if cp_nsd["name"] == nss_cp_item["nsd-connection-point-ref"]:
                                             if nslcmop.get("operationParams"):
                                                 if nslcmop["operationParams"].get("nsName") == nss["nsName"]: