diff options
Diffstat (limited to 'csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001')
-rw-r--r-- | csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35854.java | 11 | ||||
-rw-r--r-- | csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR65486.java | 11 |
2 files changed, 19 insertions, 3 deletions
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35854.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35854.java index 1b442cb..3ab9e78 100644 --- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35854.java +++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35854.java @@ -18,14 +18,21 @@ package org.onap.cvc.csar.cc.sol001; import org.onap.cli.fw.schema.OnapCommandSchema; import org.onap.cvc.csar.CSARArchive; +import org.onap.cvc.csar.CSARArchive.CSARError; +import org.onap.cvc.csar.CSARArchive.CSARErrorEntryMissingToscaDefinitionVersion; +import org.onap.cvc.csar.CSARArchive.CSARErrorInvalidEntryValueToscaDefinitionVersion; import org.onap.cvc.csar.cc.VTPValidateCSARBase; @OnapCommandSchema(schema = "vtp-validate-csar-r35854.yaml") public class VTPValidateCSARR35854 extends VTPValidateCSARBase { - @Override protected void validateCSAR(CSARArchive csar) throws Exception { - + for (CSARError e : csar.getErrors()) { + if (e instanceof CSARErrorEntryMissingToscaDefinitionVersion || + e instanceof CSARErrorInvalidEntryValueToscaDefinitionVersion) { + this.errors.add(e); + } + } } @Override diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR65486.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR65486.java index 0f4f64d..0889589 100644 --- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR65486.java +++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR65486.java @@ -18,6 +18,9 @@ package org.onap.cvc.csar.cc.sol001; import org.onap.cli.fw.schema.OnapCommandSchema; import org.onap.cvc.csar.CSARArchive; +import org.onap.cvc.csar.CSARArchive.CSARError; +import org.onap.cvc.csar.CSARArchive.CSARErrorEntryMissingToscaDefinitionVersion; +import org.onap.cvc.csar.CSARArchive.CSARErrorInvalidEntryValueToscaDefinitionVersion; import org.onap.cvc.csar.cc.VTPValidateCSARBase; @OnapCommandSchema(schema = "vtp-validate-csar-r65486.yaml") @@ -25,7 +28,13 @@ public class VTPValidateCSARR65486 extends VTPValidateCSARBase { @Override protected void validateCSAR(CSARArchive csar) throws Exception { - + //Just check for the version entry for now + for (CSARError e : csar.getErrors()) { + if (e instanceof CSARErrorEntryMissingToscaDefinitionVersion || + e instanceof CSARErrorInvalidEntryValueToscaDefinitionVersion) { + this.errors.add(e); + } + } } @Override |