From: selvi.j Date: Thu, 25 Aug 2022 06:24:49 +0000 (+0000) Subject: Bug 2068 - show_content_artifacts error for zip uploaded packages (sol004 and sol007) X-Git-Tag: v12.0.3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=553332dafe071b596d1b56e9b98d2128c0c13a20;p=osm%2FNBI.git Bug 2068 - show_content_artifacts error for zip uploaded packages (sol004 and sol007) NG-UI throws an error while clicking content button inside action dropdown For zip based onboarded packages (sol004 and sol007), facing issues while retrieving the file contents from NG-UI. API used: /osm/vnfpkgm/v1/vnf_packages//artifacts Error detail: Packages does not contains artifacts Changes made: Zip based packages will check for the folder name, if it doesn't have folder name, then it will raise the exception else it will pass and print the required output. Change-Id: I0e6ea93a37162a646ddf2a08103d2a99791a8777 Signed-off-by: selvi.j --- diff --git a/osm_nbi/descriptor_topics.py b/osm_nbi/descriptor_topics.py index f28fcbf..ddf8ffc 100644 --- a/osm_nbi/descriptor_topics.py +++ b/osm_nbi/descriptor_topics.py @@ -568,7 +568,7 @@ class DescriptorTopic(BaseTopic): ) storage = content["_admin"]["storage"] if path is not None and path != "$DESCRIPTOR": # artifacts - if not storage.get("pkg-dir"): + if not storage.get("pkg-dir") and not storage.get("folder"): raise EngineException( "Packages does not contains artifacts", http_code=HTTPStatus.BAD_REQUEST,