aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap
diff options
context:
space:
mode:
authorTufman, Shay (st198j) <st198j@intl.att.com>2018-07-04 16:44:47 +0300
committerTufman, Shay (st198j) <st198j@intl.att.com>2018-07-04 17:27:40 +0300
commit273cc6b1a3be92fbb712f7655d9e6cb9ed66b59a (patch)
tree896dea567158ba686f3d45f3fc59c953879c7972 /src/main/java/org/onap
parent05ce3093351549eb54029f907f15e9ae9273d476 (diff)
remove mac validation
remove max conformance level validation Change-Id: I09672789d6819b52010bc6f1383e0eca25e664e1 Issue-ID: SDC-1465 Signed-off-by: Tufman, Shay (st198j) <st198j@intl.att.com>
Diffstat (limited to 'src/main/java/org/onap')
-rw-r--r--src/main/java/org/onap/sdc/tosca/parser/impl/SdcToscaParserFactory.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/org/onap/sdc/tosca/parser/impl/SdcToscaParserFactory.java b/src/main/java/org/onap/sdc/tosca/parser/impl/SdcToscaParserFactory.java
index bc8d1b1..3293a58 100644
--- a/src/main/java/org/onap/sdc/tosca/parser/impl/SdcToscaParserFactory.java
+++ b/src/main/java/org/onap/sdc/tosca/parser/impl/SdcToscaParserFactory.java
@@ -10,7 +10,6 @@ import org.onap.sdc.tosca.parser.config.JToscaValidationIssueInfo;
import org.onap.sdc.tosca.parser.config.SdcToscaParserErrors;
import org.onap.sdc.tosca.parser.utils.GeneralUtility;
import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
-import org.onap.sdc.tosca.parser.config.*;
import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException;
import org.onap.sdc.toscaparser.api.ToscaTemplate;
import org.onap.sdc.toscaparser.api.common.JToscaValidationIssue;
@@ -170,13 +169,12 @@ public class SdcToscaParserFactory {
private void validateCsarVersion(String cSarVersion) throws SdcToscaParserException {
ConformanceLevel level = configurationManager.getConfiguration().getConformanceLevel();
String minVersion = level.getMinVersion();
- String maxVersion = level.getMaxVersion();
if (cSarVersion != null) {
- if ((GeneralUtility.conformanceLevelCompare(cSarVersion, minVersion) < 0) || (GeneralUtility.conformanceLevelCompare(cSarVersion, maxVersion) > 0)) {
- throwConformanceLevelException(minVersion, maxVersion);
+ if (GeneralUtility.conformanceLevelCompare(cSarVersion, minVersion) < 0) {
+ throwConformanceLevelException(minVersion);
}
} else {
- throwConformanceLevelException(minVersion, maxVersion);
+ throwConformanceLevelException(minVersion);
}
}
@@ -188,9 +186,9 @@ public class SdcToscaParserFactory {
}
return false;
}
- private void throwConformanceLevelException(String minVersion, String maxVersion) throws SdcToscaParserException {
+ private void throwConformanceLevelException(String minVersion) throws SdcToscaParserException {
ErrorInfo errorInfo = configurationManager.getErrorConfiguration().getErrorInfo(SdcToscaParserErrors.CONFORMANCE_LEVEL_ERROR.toString());
- throw new SdcToscaParserException(String.format(errorInfo.getMessage(), minVersion, maxVersion), errorInfo.getCode());
+ throw new SdcToscaParserException(String.format(errorInfo.getMessage(), minVersion), errorInfo.getCode());
}
private void throwSdcToscaParserException(JToscaException e) throws SdcToscaParserException {