diff options
author | MichaelMorris <michael.morris@est.tech> | 2020-05-12 11:19:47 +0100 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-06-16 05:41:19 +0000 |
commit | 8b53d639026267aef71659fe292a75e47555265f (patch) | |
tree | 43f391246c42907a6de8e5ef20093274d34ce8f1 /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main | |
parent | c74aa44beabc303a5cf709625ee802dcd1bb9f5d (diff) |
Manifest is optional in ETSI SOL004 manifest
SOL004MetaDirectoryValidtor enforces all files contained in an ETSI SOL004 CSAR are included in the manifest file, however the manifest itself is not mandatory to include in the manifest
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-3057
Change-Id: I460071ecbd21578edb0603f600da0ac1ea877539
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main')
1 files changed, 5 insertions, 1 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/csar/validation/SOL004MetaDirectoryValidator.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/csar/validation/SOL004MetaDirectoryValidator.java index 1d1ffdba91..f41b44fd79 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/csar/validation/SOL004MetaDirectoryValidator.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/orchestration/csar/validation/SOL004MetaDirectoryValidator.java @@ -467,12 +467,16 @@ class SOL004MetaDirectoryValidator implements Validator { */ private void verifyFilesBeingReferred(final Set<String> referredFileSet, final Set<String> packageFileSet) { packageFileSet.forEach(filePath -> { - if (!referredFileSet.contains(filePath)) { + if (!isManifestFile(filePath) && !referredFileSet.contains(filePath)) { reportError(ErrorLevel.ERROR, String.format(Messages.MISSING_MANIFEST_REFERENCE.getErrorMessage(), filePath)); } }); } + + private boolean isManifestFile(final String filePath) { + return filePath.equals(toscaMetadata.getMetaEntries().get(ETSI_ENTRY_MANIFEST.getName())); + } private List<String> filterSources(final List<String> source) { return source.stream() |