summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/main
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2019-03-21 10:16:55 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2019-03-22 06:42:23 +0530
commit873fbb49dcd3092d2591a4eca13470713ca443ea (patch)
tree7bd7b63e4d9938b580a803e69f35ca4994c76c1f /csarvalidation/src/main
parent0d4544eb82a2ca79d7724e5c1da70d3943db76eb (diff)
Fix the sol004 minor issues
Issue-ID: VNFSDK-352 Change-Id: I13fb8f0bc13d033c93d516e771afcd3440e0949d Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'csarvalidation/src/main')
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/CSARArchive.java4
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR35854.java11
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR65486.java11
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR04298.java2
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR10087.java4
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR13390.java2
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR26881.java2
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR77786.java2
-rw-r--r--csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r35854.yaml2
-rw-r--r--csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r46527.yaml4
10 files changed, 29 insertions, 15 deletions
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/CSARArchive.java b/csarvalidation/src/main/java/org/onap/cvc/csar/CSARArchive.java
index 24cef0e..294522f 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/CSARArchive.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/CSARArchive.java
@@ -97,10 +97,12 @@ public class CSARArchive {
public static final String Entry_Definition__tosca_definitions_version__simple_1_0 = "tosca_simple_yaml_1_0";
public static final String Entry_Definition__tosca_definitions_version__simple_1_1 = "tosca_simple_yaml_1_1";
+ public static final String Entry_Definition__tosca_definitions_version__simple_1_2 = "tosca_simple_yaml_1_2";
protected static final String[] Entry_Definition__tosca_definitions_versions = new String[] {
Entry_Definition__tosca_definitions_version__simple_1_0,
- Entry_Definition__tosca_definitions_version__simple_1_1
+ Entry_Definition__tosca_definitions_version__simple_1_1,
+ Entry_Definition__tosca_definitions_version__simple_1_2
};
public static final String Entry_Definition__metadata = "metadata";
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
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR04298.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR04298.java
index 6503c54..1be9814 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR04298.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR04298.java
@@ -34,7 +34,7 @@ public class VTPValidateCSARR04298 extends VTPValidateCSARBase {
@Override
protected void validateCSAR(CSARArchive csar) throws Exception {
- if (csar.getTestsFolder() == null) {
+ if (csar.getTestsFolder() == null || csar.getTestsFolder().listFiles().length == 0) {
this.errors.add(new CSARErrorEntryMissingTestFolderNotFound());
}
}
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR10087.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR10087.java
index 31298fa..0e80add 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR10087.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR10087.java
@@ -22,6 +22,7 @@ import org.onap.cvc.csar.CSARArchive.CSARError;
import org.onap.cvc.csar.CSARArchive.CSARErrorEntryMissingToscaDefinitionMetadataTemplateName;
import org.onap.cvc.csar.CSARArchive.CSARErrorEntryMissingToscaDefinitionNotFound;
import org.onap.cvc.csar.CSARArchive.CSARErrorEntryMissingToscaMetaDefinition;
+import org.onap.cvc.csar.CSARArchive.CSARErrorInvalidEntryValueManifestNotFound;
import org.onap.cvc.csar.cc.VTPValidateCSARBase;
@OnapCommandSchema(schema = "vtp-validate-csar-r10087.yaml")
@@ -33,7 +34,8 @@ public class VTPValidateCSARR10087 extends VTPValidateCSARBase {
for (CSARError e : csar.getErrors()) {
if (e instanceof CSARErrorEntryMissingToscaMetaDefinition ||
e instanceof CSARErrorEntryMissingToscaDefinitionNotFound ||
- e instanceof CSARErrorEntryMissingToscaDefinitionMetadataTemplateName) {
+ e instanceof CSARErrorEntryMissingToscaDefinitionMetadataTemplateName ||
+ e instanceof CSARErrorInvalidEntryValueManifestNotFound) {
this.errors.add(e);
}
}
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR13390.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR13390.java
index 17c3018..d33ed3f 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR13390.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR13390.java
@@ -26,7 +26,7 @@ public class VTPValidateCSARR13390 extends VTPValidateCSARBase {
public static class CSARErrorEntryMissingAnsiblePlaybookNotFound extends CSARErrorEntryMissing {
public CSARErrorEntryMissingAnsiblePlaybookNotFound() {
- super("cookbooks", CSARArchive.CSAR_Archive);
+ super("playbooks", CSARArchive.CSAR_Archive);
this.setCode("0x1000");
}
}
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR26881.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR26881.java
index e036ce6..f06b84a 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR26881.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR26881.java
@@ -33,7 +33,7 @@ public class VTPValidateCSARR26881 extends VTPValidateCSARBase {
@Override
protected void validateCSAR(CSARArchive csar) throws Exception {
- if (!csar.getFileFromCsar("artifacts").exists()) {
+ if (!csar.getFileFromCsar("Artifacts").exists()) {
errors.add(new CSARErrorEntryMissingArtifactsNotFound());
}
}
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR77786.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR77786.java
index efb258b..bf55530 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR77786.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR77786.java
@@ -26,7 +26,7 @@ public class VTPValidateCSARR77786 extends VTPValidateCSARBase {
public static class CSARErrorEntryMissingAnsiblePlaybookNotFound extends CSARErrorEntryMissing {
public CSARErrorEntryMissingAnsiblePlaybookNotFound() {
- super("cookbooks",
+ super("playbooks",
CSARArchive.CSAR_Archive);
this.setCode("0x1000");
}
diff --git a/csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r35854.yaml b/csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r35854.yaml
index 4a181e8..1a824da 100644
--- a/csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r35854.yaml
+++ b/csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r35854.yaml
@@ -19,8 +19,6 @@ name: csar-validate-r35854
description: |
The VNF Descriptor (VNFD) provided by VNF vendor MUST comply with TOSCA/YAML based Service template
for VNF descriptor specified in ETSI NFV-SOL001.
- Note: As the ETSI NFV-SOL001 is work in progress the below tables summarizes the TOSCA definitions
- agreed to be part of current version of NFV profile and that VNFD MUST comply with in ONAP Release 2+ Requirements.
info:
product: onap-vtp
diff --git a/csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r46527.yaml b/csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r46527.yaml
index 951f562..176fd5f 100644
--- a/csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r46527.yaml
+++ b/csarvalidation/src/main/resources/open-cli-schema/sol001/vtp-validate-csar-r46527.yaml
@@ -29,10 +29,6 @@ description: |
parameters, instantiation levels, placement constraints (affinity / antiaffinity), minimum and maximum
VDU instance numbers. Horizontal scaling is modeled with scaling aspects and the respective scaling levels
in the deployment flavours;
- Note: The deployment aspects (deployment flavour etc.) are postponed for future ONAP releases.
- VNF lifecycle management (LCM) operations: describes the LCM operations supported per deployment flavour,
- and their input parameters; Note, thatthe actual LCM implementation resides in a different layer, namely
- referring to additional template artifacts.
info:
product: onap-vtp