From: vijay.r Date: Fri, 29 Mar 2019 12:22:26 +0000 (+0530) Subject: Bug 637 NSD-level IP Profiles not working in mgmt-network fix single for loop to... X-Git-Tag: v6.0.0~53^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=8ba4e0552fefc96856942fb524d903d286d1cb65;p=osm%2FNBI.git Bug 637 NSD-level IP Profiles not working in mgmt-network fix single for loop to check for mgmt-network and ip-profiles Change-Id: I9b7e77775aa3c32ce6935d6a6f123ba45025563c Signed-off-by: vijay.r --- diff --git a/osm_nbi/descriptor_topics.py b/osm_nbi/descriptor_topics.py index 94b74a9..eef2ca4 100644 --- a/osm_nbi/descriptor_topics.py +++ b/osm_nbi/descriptor_topics.py @@ -677,6 +677,10 @@ class NsdTopic(DescriptorTopic): # Cross references validation in the descriptor # TODO validata that if contains cloud-init-file or charms, have artifacts _admin.storage."pkg-dir" is not none for vld in get_iterable(indata.get("vld")): + if vld.get("mgmt-network") and vld.get("ip-profile-ref"): + raise EngineException("Error at vld[id='{}']:ip-profile-ref" + " You cannot set an ip-profile when mgmt-network is True" + .format(vld["id"]), http_code=HTTPStatus.UNPROCESSABLE_ENTITY) for vnfd_cp in get_iterable(vld.get("vnfd-connection-point-ref")): for constituent_vnfd in get_iterable(indata.get("constituent-vnfd")): if vnfd_cp["member-vnf-index-ref"] == constituent_vnfd["member-vnf-index"]: