+ vnfd = self.db.get_one("vnfds", {"_id": vnfr["vnfd-id"]}, fail_on_empty=False)
+ if not vnfd:
+ raise EngineException("vnfd id={} has been deleted!. Operation cannot be performed".
+ format(vnfr["vnfd-id"]))
+ vnf_member_index_to_vnfd[member_vnf_index] = vnfd # add to cache, avoiding a later look for
+ return vnfd
+
+ def check_valid_vdu(vnfd, vdu_id):
+ for vdud in get_iterable(vnfd.get("vdu")):
+ if vdud["id"] == vdu_id:
+ return vdud
+ else:
+ raise EngineException("Invalid parameter vdu_id='{}' not present at vnfd:vdu:id".format(vdu_id))