Enable types validation feature 53/60553/1
authorYuli Shlosberg <ys9693@att.com>
Tue, 14 Aug 2018 13:52:58 +0000 (16:52 +0300)
committerYuli Shlosberg <ys9693@att.com>
Tue, 14 Aug 2018 13:52:58 +0000 (16:52 +0300)
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>
14 files changed:
README.md
pom.xml
src/main/resources/config/jtosca-validation-issue-configuration.yaml
src/test/resources/config/jtosca-validation-issue-configuration.yaml
src/test/resources/csars/resource-Vdbe-csar.csar
src/test/resources/csars/service-AlService-csar.csar
src/test/resources/csars/service-Ipassignservice-csar.csar
src/test/resources/csars/service-PortMirroring.csar
src/test/resources/csars/service-ServiceForToscaParserTests-csar.csar
src/test/resources/csars/service-VdbeSrv-csar.csar
src/test/resources/csars/service-VlanD2dSrv-csar.csar
src/test/resources/csars/service-resolve-get-input-csar.csar
src/test/resources/csars/service-resolve-get-input-csar_QA.csar
src/test/resources/log4j.properties [new file with mode: 0644]

index ce3e3fb..7eb522e 100644 (file)
--- 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 (file)
--- a/pom.xml
+++ b/pom.xml
        </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>
                <dependency>
                        <groupId>org.onap.sdc.jtosca</groupId>
                        <artifactId>jtosca</artifactId>
-                       <version>1.4.1</version>
+                       <version>1.4.2-SNAPSHOT</version>
                </dependency>
 
 
index f4bb949..3f62953 100644 (file)
@@ -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
index f4bb949..3f62953 100644 (file)
@@ -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
index 32a11b9..0705852 100644 (file)
Binary files a/src/test/resources/csars/resource-Vdbe-csar.csar and b/src/test/resources/csars/resource-Vdbe-csar.csar differ
index c02097d..653b80d 100644 (file)
Binary files a/src/test/resources/csars/service-AlService-csar.csar and b/src/test/resources/csars/service-AlService-csar.csar differ
index c065fea..007b96a 100644 (file)
Binary files a/src/test/resources/csars/service-Ipassignservice-csar.csar and b/src/test/resources/csars/service-Ipassignservice-csar.csar differ
index b90f3b1..c3a44a0 100644 (file)
Binary files a/src/test/resources/csars/service-PortMirroring.csar and b/src/test/resources/csars/service-PortMirroring.csar differ
index a3e6f70..9afc278 100644 (file)
Binary files a/src/test/resources/csars/service-ServiceForToscaParserTests-csar.csar and b/src/test/resources/csars/service-ServiceForToscaParserTests-csar.csar differ
index b0e5131..f911753 100644 (file)
Binary files a/src/test/resources/csars/service-VdbeSrv-csar.csar and b/src/test/resources/csars/service-VdbeSrv-csar.csar differ
index 9cc3b13..efec4c0 100644 (file)
Binary files a/src/test/resources/csars/service-VlanD2dSrv-csar.csar and b/src/test/resources/csars/service-VlanD2dSrv-csar.csar differ
index 7c14159..d793229 100644 (file)
Binary files a/src/test/resources/csars/service-resolve-get-input-csar.csar and b/src/test/resources/csars/service-resolve-get-input-csar.csar differ
index 7206139..a290ff1 100644 (file)
Binary files a/src/test/resources/csars/service-resolve-get-input-csar_QA.csar and b/src/test/resources/csars/service-resolve-get-input-csar_QA.csar differ
diff --git a/src/test/resources/log4j.properties b/src/test/resources/log4j.properties
new file mode 100644 (file)
index 0000000..c18c3da
--- /dev/null
@@ -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