diff options
author | talio <tali.orenbach@amdocs.com> | 2017-11-15 16:18:32 +0200 |
---|---|---|
committer | talio <tali.orenbach@amdocs.com> | 2017-11-15 16:52:40 +0200 |
commit | 0872b963f2b2c0db594cea153efd09ad43c48888 (patch) | |
tree | c3d01067364c324e357432882fdcf7664cb51cbf /openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java | |
parent | 68ca07bdc8b0aa86e31d06c083d73a140798f04d (diff) |
import tosca
added exception when recognizing an invalid substitution mappings section inside imported csar
Issue-Id : SDC-661
Change-Id: Id608b066d5e440ff5462ec3ba5742d3cff50bf5a
Signed-off-by: talio <tali.orenbach@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java')
-rw-r--r-- | openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java new file mode 100644 index 0000000000..9ae66dd91c --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/errors/SubstitutionMappingsConverterErrorBuilder.java @@ -0,0 +1,20 @@ +package org.openecomp.core.converter.errors; + +import org.openecomp.sdc.common.errors.BaseErrorBuilder; +import org.openecomp.sdc.common.errors.ErrorCategory; + +public class SubstitutionMappingsConverterErrorBuilder extends BaseErrorBuilder { + private static final String SUB_MAPPINGS_CAPABILITY_REQUIREMENT_ENTRY_VALUE_ILLEGAL = "%s value" + + " in substitution mappings is invalid, expected it to be %s"; + private static final String IMPORT_TOSCA = "IMPORT_TOSCA"; + + + public SubstitutionMappingsConverterErrorBuilder(String section, + String expectedType) { + getErrorCodeBuilder() + .withId(IMPORT_TOSCA) + .withCategory(ErrorCategory.APPLICATION) + .withMessage(String.format(SUB_MAPPINGS_CAPABILITY_REQUIREMENT_ENTRY_VALUE_ILLEGAL, section, expectedType)); + + } +} |