aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2018-08-14 16:52:58 +0300
committerYuli Shlosberg <ys9693@att.com>2018-08-14 16:52:58 +0300
commita2705637c17beb663c47f82b03279e479ed2f8ca (patch)
tree32e25f1692c718f068ed54657489a5b86a206302
parent9cc8dff8223e03b6a5bc5cfc2c23d31989de2c61 (diff)
Enable types validation feature
InvalidTypeError added to conf This conf addition will case to parser throw exception in case that invalid type found during parsing process Change-Id: I6497d32862e64abaeec20d30da50fff4c5964d4e Issue-ID: SDC-1646 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
-rw-r--r--README.md4
-rw-r--r--pom.xml12
-rw-r--r--src/main/resources/config/jtosca-validation-issue-configuration.yaml8
-rw-r--r--src/test/resources/config/jtosca-validation-issue-configuration.yaml8
-rw-r--r--src/test/resources/csars/resource-Vdbe-csar.csarbin67692 -> 68234 bytes
-rw-r--r--src/test/resources/csars/service-AlService-csar.csarbin37564 -> 37560 bytes
-rw-r--r--src/test/resources/csars/service-Ipassignservice-csar.csarbin49044 -> 52208 bytes
-rw-r--r--src/test/resources/csars/service-PortMirroring.csarbin55678 -> 55584 bytes
-rw-r--r--src/test/resources/csars/service-ServiceForToscaParserTests-csar.csarbin77413 -> 77409 bytes
-rw-r--r--src/test/resources/csars/service-VdbeSrv-csar.csarbin73851 -> 74393 bytes
-rw-r--r--src/test/resources/csars/service-VlanD2dSrv-csar.csarbin73963 -> 74505 bytes
-rw-r--r--src/test/resources/csars/service-resolve-get-input-csar.csarbin49461 -> 52513 bytes
-rw-r--r--src/test/resources/csars/service-resolve-get-input-csar_QA.csarbin49407 -> 52459 bytes
-rw-r--r--src/test/resources/log4j.properties8
14 files changed, 36 insertions, 4 deletions
diff --git a/README.md b/README.md
index ce3e3fb..7eb522e 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,8 @@ to use add the folowing depandency to your POM file:
from this version the max version will no longer be checked by the parser.
2. **Operations support**: add support for parsing the Operations in the tosca models.
+## 1.4.2
-
+### Features:
+1. **enable types validation** from this version all types in CSAR will be verified, all used types should be properly declared in "base" yml files e.g. node.yml , data.yml etc.
diff --git a/pom.xml b/pom.xml
index 1b561be..2992055 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,14 +44,20 @@
</properties>
<dependencies>
-
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.7.10</version>
<scope>compile</scope>
+ <version>1.7.10</version>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ <version>1.7.10</version>
+ </dependency>
+
+ <dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
@@ -112,7 +118,7 @@
<dependency>
<groupId>org.onap.sdc.jtosca</groupId>
<artifactId>jtosca</artifactId>
- <version>1.4.1</version>
+ <version>1.4.2-SNAPSHOT</version>
</dependency>
diff --git a/src/main/resources/config/jtosca-validation-issue-configuration.yaml b/src/main/resources/config/jtosca-validation-issue-configuration.yaml
index f4bb949..3f62953 100644
--- a/src/main/resources/config/jtosca-validation-issue-configuration.yaml
+++ b/src/main/resources/config/jtosca-validation-issue-configuration.yaml
@@ -46,4 +46,12 @@ validationIssues:
#MissingRequiredFieldError3
JE010:
- issueType: WARNING
+ sinceCsarConformanceLevel: 3.0
+ #InvalidTypeError
+ JE136:
+ - issueType: CRITICAL
+ sinceCsarConformanceLevel: 3.0
+ #Exception from SnakeYAML
+ JE198:
+ - issueType: CRITICAL
sinceCsarConformanceLevel: 3.0 \ No newline at end of file
diff --git a/src/test/resources/config/jtosca-validation-issue-configuration.yaml b/src/test/resources/config/jtosca-validation-issue-configuration.yaml
index f4bb949..3f62953 100644
--- a/src/test/resources/config/jtosca-validation-issue-configuration.yaml
+++ b/src/test/resources/config/jtosca-validation-issue-configuration.yaml
@@ -46,4 +46,12 @@ validationIssues:
#MissingRequiredFieldError3
JE010:
- issueType: WARNING
+ sinceCsarConformanceLevel: 3.0
+ #InvalidTypeError
+ JE136:
+ - issueType: CRITICAL
+ sinceCsarConformanceLevel: 3.0
+ #Exception from SnakeYAML
+ JE198:
+ - issueType: CRITICAL
sinceCsarConformanceLevel: 3.0 \ No newline at end of file
diff --git a/src/test/resources/csars/resource-Vdbe-csar.csar b/src/test/resources/csars/resource-Vdbe-csar.csar
index 32a11b9..0705852 100644
--- a/src/test/resources/csars/resource-Vdbe-csar.csar
+++ b/src/test/resources/csars/resource-Vdbe-csar.csar
Binary files differ
diff --git a/src/test/resources/csars/service-AlService-csar.csar b/src/test/resources/csars/service-AlService-csar.csar
index c02097d..653b80d 100644
--- a/src/test/resources/csars/service-AlService-csar.csar
+++ b/src/test/resources/csars/service-AlService-csar.csar
Binary files differ
diff --git a/src/test/resources/csars/service-Ipassignservice-csar.csar b/src/test/resources/csars/service-Ipassignservice-csar.csar
index c065fea..007b96a 100644
--- a/src/test/resources/csars/service-Ipassignservice-csar.csar
+++ b/src/test/resources/csars/service-Ipassignservice-csar.csar
Binary files differ
diff --git a/src/test/resources/csars/service-PortMirroring.csar b/src/test/resources/csars/service-PortMirroring.csar
index b90f3b1..c3a44a0 100644
--- a/src/test/resources/csars/service-PortMirroring.csar
+++ b/src/test/resources/csars/service-PortMirroring.csar
Binary files differ
diff --git a/src/test/resources/csars/service-ServiceForToscaParserTests-csar.csar b/src/test/resources/csars/service-ServiceForToscaParserTests-csar.csar
index a3e6f70..9afc278 100644
--- a/src/test/resources/csars/service-ServiceForToscaParserTests-csar.csar
+++ b/src/test/resources/csars/service-ServiceForToscaParserTests-csar.csar
Binary files differ
diff --git a/src/test/resources/csars/service-VdbeSrv-csar.csar b/src/test/resources/csars/service-VdbeSrv-csar.csar
index b0e5131..f911753 100644
--- a/src/test/resources/csars/service-VdbeSrv-csar.csar
+++ b/src/test/resources/csars/service-VdbeSrv-csar.csar
Binary files differ
diff --git a/src/test/resources/csars/service-VlanD2dSrv-csar.csar b/src/test/resources/csars/service-VlanD2dSrv-csar.csar
index 9cc3b13..efec4c0 100644
--- a/src/test/resources/csars/service-VlanD2dSrv-csar.csar
+++ b/src/test/resources/csars/service-VlanD2dSrv-csar.csar
Binary files differ
diff --git a/src/test/resources/csars/service-resolve-get-input-csar.csar b/src/test/resources/csars/service-resolve-get-input-csar.csar
index 7c14159..d793229 100644
--- a/src/test/resources/csars/service-resolve-get-input-csar.csar
+++ b/src/test/resources/csars/service-resolve-get-input-csar.csar
Binary files differ
diff --git a/src/test/resources/csars/service-resolve-get-input-csar_QA.csar b/src/test/resources/csars/service-resolve-get-input-csar_QA.csar
index 7206139..a290ff1 100644
--- a/src/test/resources/csars/service-resolve-get-input-csar_QA.csar
+++ b/src/test/resources/csars/service-resolve-get-input-csar_QA.csar
Binary files differ
diff --git a/src/test/resources/log4j.properties b/src/test/resources/log4j.properties
new file mode 100644
index 0000000..c18c3da
--- /dev/null
+++ b/src/test/resources/log4j.properties
@@ -0,0 +1,8 @@
+# Root logger option
+log4j.rootLogger=info, stdout
+
+# Direct log messages to stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n