X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fdescriptor_topics.py;h=0939000b2bb6cc970ab0080744a896f70defa916;hp=58efa5504fef1c41287e951d35d120f636d43442;hb=6a92a53b64336df0d93eaf79eb0d53a9d5f9ba33;hpb=b3d0a0e94cc4572d81477754baf56c910e892be3 diff --git a/osm_nbi/descriptor_topics.py b/osm_nbi/descriptor_topics.py index 58efa55..0939000 100644 --- a/osm_nbi/descriptor_topics.py +++ b/osm_nbi/descriptor_topics.py @@ -704,6 +704,19 @@ class NsdTopic(DescriptorTopic): "does not match any constituent-vnfd:member-vnf-index" .format(vld["id"], vnfd_cp["member-vnf-index-ref"]), http_code=HTTPStatus.UNPROCESSABLE_ENTITY) + # Check VNFFGD + for fgd in get_iterable(indata.get("vnffgd")): + for cls in get_iterable(fgd.get("classifier")): + rspref = cls.get("rsp-id-ref") + for rsp in get_iterable(fgd.get("rsp")): + rspid = rsp.get("id") + if rspid and rspref and rspid == rspref: + break + else: + raise EngineException( + "Error at vnffgd[id='{}']:classifier[id='{}']:rsp-id-ref '{}' does not match any rsp:id" + .format(fgd["id"], cls["id"], rspref), + http_code=HTTPStatus.UNPROCESSABLE_ENTITY) return indata def _validate_input_edit(self, indata, force=False):