X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fns.py;fp=osm_lcm%2Fns.py;h=35d80a0f42adfcb8ec2c303e3ba567c3115f7905;hb=ea0cc0a31db1de8fe518c421cc80d54214b23ece;hp=630c80ae30f8e68301900bb204422d3f7cd95ca5;hpb=63de62e6af661d28705ad2a5a31273b36e746542;p=osm%2FLCM.git diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 630c80ae..35d80a0f 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -687,7 +687,7 @@ class NsLcm(LcmBase): nsd_RO["id"] = RO_osm_nsd_id nsd_RO.pop("_id", None) nsd_RO.pop("_admin", None) - for c_vnf in nsd_RO["constituent-vnfd"]: + for c_vnf in nsd_RO.get("constituent-vnfd", ()): vnfd_id = c_vnf["vnfd-id-ref"] c_vnf["vnfd-id-ref"] = descriptor_id_2_RO[vnfd_id] desc = await RO.create("nsd", descriptor=nsd_RO) @@ -875,7 +875,7 @@ class NsLcm(LcmBase): step = "Looking for needed vnfd to configure" self.logger.debug(logging_text + step) - for c_vnf in nsd["constituent-vnfd"]: + for c_vnf in nsd.get("constituent-vnfd", ()): vnfd_id = c_vnf["vnfd-id-ref"] vnf_index = str(c_vnf["member-vnf-index"]) vnfd = db_vnfds_ref[vnfd_id]