summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--javatoscachecker/checker/pom.xml288
-rw-r--r--javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java86
-rw-r--r--javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Data.java131
-rw-r--r--javatoscachecker/checker/src/main/java/org/onap/tosca/checker/annotations/Checks.java3
-rw-r--r--javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar6
-rw-r--r--javatoscachecker/checker/src/test/java/org/onap/tosca/checker/test/CSAR.java35
-rw-r--r--javatoscachecker/checker/src/test/tosca/dcae_uservice_tosca.yaml653
-rw-r--r--javatoscachecker/checker/src/test/tosca/mini_ceil_tosca.yaml108
-rw-r--r--javatoscachecker/checker/src/test/tosca/ucpe_schema.yml403
-rw-r--r--javatoscachecker/checker/src/test/tosca/workflow_1.yaml46
-rw-r--r--javatoscachecker/kwalify/pom.xml201
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/BaseException.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/CommandOptionException.java27
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/Defaultable.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/DefaultableHashMap.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/InvalidPathException.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/InvalidTypeException.java25
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/KwalifyException.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/KwalifyRuntimeException.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/Main.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/Messages.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/MetaValidator.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/Parser.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/PlainYamlParser.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/Rule.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/SchemaException.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/SyntaxException.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/Types.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/Util.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/ValidationException.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/Validator.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/YamlParser.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/YamlSyntaxException.java26
-rw-r--r--javatoscachecker/kwalify/src/main/java/kwalify/YamlUtil.java26
-rw-r--r--javatoscachecker/pom.xml85
-rw-r--r--javatoscachecker/service/README47
-rw-r--r--javatoscachecker/service/pom.xml269
37 files changed, 1253 insertions, 1706 deletions
diff --git a/javatoscachecker/checker/pom.xml b/javatoscachecker/checker/pom.xml
index a408bc6..f8bbbd3 100644
--- a/javatoscachecker/checker/pom.xml
+++ b/javatoscachecker/checker/pom.xml
@@ -1,152 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Copyright (c) 2017 <AT&T>. All rights reserved.
+ * ===================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
+ * the specific language governing permissions and limitations under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.tosca</groupId>
+ <groupId>org.onap.modeling.toscaparsers</groupId>
<artifactId>checker</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>Checker</artifactId>
<packaging>jar</packaging>
<name>Checker</name>
<build>
- <sourceDirectory>src/main/java</sourceDirectory>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/deps</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>false</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
- <version>1.4</version>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>create</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <doCheck>false</doCheck>
- <doUpdate>false</doUpdate>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- <manifestEntries>
- <Implementation-Build>${buildNumber}</Implementation-Build>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.10</version>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/deps</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <doCheck>false</doCheck>
+ <doUpdate>false</doUpdate>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.2</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-Build>${buildNumber}</Implementation-Build>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- <archive>
- <manifest>
- <mainClass>org.onap.tosca.checker.Checker</mainClass>
- </manifest>
- <manifestEntries>
- <Implementation-Build>${buildNumber}</Implementation-Build>
- </manifestEntries>
- </archive>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id> <!-- this is used for inheritance merges -->
- <phase>package</phase> <!-- bind to the packaging phase -->
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ <archive>
+ <manifest>
+ <mainClass>org.onap.tosca.checker.Checker</mainClass>
+ </manifest>
+ <manifestEntries>
+ <Implementation-Build>${buildNumber}</Implementation-Build>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id> <!-- this is used for inheritance merges -->
+ <phase>package</phase> <!-- bind to the packaging phase -->
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>3.0.0-M1</version>
+ <configuration>
+ <doctitle>API for ${project.name} ${project.version}</doctitle>
+ <windowtitle>API for ${project.name} ${project.version}</windowtitle>
+ </configuration>
+ </plugin>
+
+ <!-- blackduck maven plugin -->
+ <!--
+ <plugin>
+ <groupId>com.blackducksoftware.integration</groupId>
+ <artifactId>hub-maven-plugin</artifactId>
+ <version>2.0.0</version>
+ <inherited>false</inherited>
+ <configuration>
+ <hubProjectName>${project.name}</hubProjectName>
+ <outputDirectory>${project.basedir}</outputDirectory>
+ <deployHubBdio>false</deployHubBdio>
+ </configuration>
+ <executions>
+ <execution>
+ <id>create-bdio-file</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build-bom</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+ </build>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.0.2</version>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.0.0-M1</version>
- <configuration>
- <doctitle>API for ${project.name} ${project.version}</doctitle>
- <windowtitle>API for ${project.name} ${project.version}</windowtitle>
- </configuration>
- </plugin>
- <!-- blackduck maven plugin -->
- <plugin>
- <groupId>com.blackducksoftware.integration</groupId>
- <artifactId>hub-maven-plugin</artifactId>
- <version>2.0.0</version>
- <inherited>false</inherited>
- <configuration>
- <hubProjectName>${project.name}</hubProjectName>
- <outputDirectory>${project.basedir}</outputDirectory>
- <deployHubBdio>false</deployHubBdio>
- </configuration>
- <executions>
- <execution>
- <id>create-bdio-file</id>
- <phase>package</phase>
- <goals>
- <goal>build-bom</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
+ <dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
@@ -193,9 +203,9 @@
<version>[0.9.11,)</version>
</dependency>
<dependency>
- <groupId>org.onap.tosca</groupId>
+ <groupId>org.onap.modeling.toscaparsers</groupId>
<artifactId>kwalify</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
diff --git a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java
index 9991c86..4218b85 100644
--- a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java
+++ b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java
@@ -131,7 +131,7 @@ public class Checker {
private Target target = null; //what we're validating at the moment
private Map<String, Target> grammars = new HashMap<String, Target>(); //grammars for the different tosca versions
- private CheckerConfiguration config = new CheckerConfiguration();
+ private CheckerConfiguration config;
private Catalog catalog;
private TargetLocator locator = new CommonLocator();
@@ -139,22 +139,26 @@ public class Checker {
private Messages messages;
private Logger log = Logger.getLogger(Checker.class.getName());
+
private static String[] EMPTY_STRING_ARRAY = new String[0];
+ private static final String[] grammarFiles = new String[] {"tosca/tosca_simple_yaml_1_0.grammar",
+ "tosca/tosca_simple_yaml_1_1.grammar"};
- public Checker() throws CheckerException {
+ public Checker(CheckerConfiguration theConfig) throws CheckerException {
+ this.config = theConfig;
loadGrammars();
loadAnnotations();
messages = new Messages();
}
- /* Need a proper way to indicate where the grammars are and how they should be identified
- */
- private final String[] grammarFiles = new String[] {"tosca/tosca_simple_yaml_1_0.grammar",
- "tosca/tosca_simple_yaml_1_1.grammar"};
+ public Checker() throws CheckerException {
+ this(new CheckerConfiguration());
+ }
+
private void loadGrammars() throws CheckerException {
- for (String grammarFile: grammarFiles) {
+ for (String grammarFile: this.config.grammars()) {
Target grammarTarget = this.locator.resolve(grammarFile);
if (grammarTarget == null) {
log.warning("Failed to locate grammar " + grammarFile);
@@ -181,7 +185,7 @@ public class Checker {
log.warning("Invalid grammar " + grammarFile + ": cannot locate tosca_definitions_versions");
}
if (versions == null || versions.isEmpty()) {
- log.warning("Invalid grammar " + grammarFile + ": no tosca_definitions_versions specified");
+ log.warning("Invalid grammar " + grammarFile + ": no tosca_definitions_version specified");
continue;
}
@@ -1593,8 +1597,8 @@ available and the available targets won't be re-processed.
//topology_template_definition and sub-rules
/* */
- @Checks(path="/topology_template")
- protected void check_topology_template(
+ @Catalogs(path="/topology_template")
+ protected void catalog_topology_template(
Map<String,Map> theDef, final CheckContext theContext) {
theContext.enter("topology_template");
@@ -1602,22 +1606,32 @@ available and the available targets won't be re-processed.
try {
theDef.entrySet().stream()
.forEach(e -> catalogs(e.getKey(), e.getValue(), theContext));
+ }
+ finally {
+ theContext.exit();
+ }
+ }
+
+ /** */
+ @Checks(path="/topology_template")
+ protected void check_topology_template(
+ Map<String,Map> theDef, final CheckContext theContext) {
+
+ theContext.enter("topology_template");
+
+ try {
+ // theDef.entrySet().stream()
+ // .forEach(e -> catalogs(e.getKey(), e.getValue(), theContext));
theDef.entrySet().stream()
.forEach(e -> checks(e.getKey(), e.getValue(), theContext));
-/*
- for (Iterator<Map.Entry<String,Object>> ri = theDef.entrySet().iterator();
- ri.hasNext(); ) {
- Map.Entry<String,Object> e = ri.next();
- checks(e.getKey(), e.getValue(), theContext);
- }
-*/
}
finally {
theContext.exit();
}
}
+
/*
* Once the syntax of the imports section is validated parse/validate/catalog * all the imported template information
*/
@@ -1806,7 +1820,7 @@ available and the available targets won't be re-processed.
}
}
- @Checks(path="topology_template/outputs")
+ @Checks(path="/topology_template/outputs")
protected void check_outputs(Map<String, Map> theOutputs,
CheckContext theContext) {
theContext.enter("outputs");
@@ -1834,7 +1848,12 @@ available and the available targets won't be re-processed.
!checkDefinition(theName, theDef, theContext)) {
return;
}
- //check the expression
+
+ //check value
+ Object value = theDef.get("value");
+ if (value != null) {
+ checkDataValuation(value, theDef, theContext);
+ }
}
finally {
theContext.exit();
@@ -2802,7 +2821,7 @@ available and the available targets won't be re-processed.
return true;
}
defs = Maps.newHashMap(defs); //
-
+
boolean res = true;
if (theSpecType == null) {
theSpecType = (String)theSpec.get("type");
@@ -2819,8 +2838,6 @@ available and the available targets won't be re-processed.
while (i.hasNext() && !defs.isEmpty()) {
Map.Entry<String,Map> type = i.next();
-//System.out.println(" **** type : " + type.getKey() );
-
Map<String, Map> typeDefs = (Map<String,Map>)type.getValue()
.get(theFacet.name());
if (null == typeDefs) {
@@ -2828,7 +2845,7 @@ available and the available targets won't be re-processed.
}
MapDifference<String, Map> diff = Maps.difference(defs, typeDefs);
-
+
//this are the ones this type and the spec have in common (same key,
//different values)
Map<String, MapDifference.ValueDifference<Map>> facetDefs =
@@ -3444,7 +3461,7 @@ System.out.println(" **** unassigned -> " + unassignedEntry.getKey() + " : " + u
* @return true if any handler returned true (if they returned something at all), false otherwise (even when no
* handlers were found)
*/
- protected boolean handles(String theHandlerKey, Object... theArgs) {
+ protected boolean handles(String theHandlerKey, Object... theArgs) {
boolean handled = false;
Map<Method, Object> entries = handlers.row(theHandlerKey);
@@ -3455,7 +3472,7 @@ System.out.println(" **** unassigned -> " + unassignedEntry.getKey() + " : " + u
res = entry.getKey().invoke(entry.getValue(), theArgs);
}
catch (Exception x) {
- log.log(Level.WARNING, theHandlerKey + " by " + entry.getKey() + " failed", x);
+ log.log(Level.WARNING, theHandlerKey + " by " + entry.getKey() + " failed", x);
}
handled |= res == null ? false : (res instanceof Boolean && ((Boolean)res).booleanValue());
}
@@ -3630,11 +3647,12 @@ System.out.println(" **** unassigned -> " + unassignedEntry.getKey() + " : " + u
public static class CheckerConfiguration {
- private boolean allowAugmentation = true;
- private String defaultImportsPath = null;
- private String defaultCheckerRoots = null;
+ private boolean allowAugmentation = true;
+ private String defaultImportsPath = null;
+ private List<String> grammars = new LinkedList<String>();
protected CheckerConfiguration() {
+ withGrammars(Checker.grammarFiles);
}
public CheckerConfiguration allowAugmentation(boolean doAllow) {
@@ -3646,7 +3664,7 @@ System.out.println(" **** unassigned -> " + unassignedEntry.getKey() + " : " + u
return this.allowAugmentation;
}
- public CheckerConfiguration defaultImportsPath(String thePath) {
+ public CheckerConfiguration withDefaultImportsPath(String thePath) {
this.defaultImportsPath = thePath;
return this;
}
@@ -3655,6 +3673,16 @@ System.out.println(" **** unassigned -> " + unassignedEntry.getKey() + " : " + u
return this.defaultImportsPath;
}
+ public CheckerConfiguration withGrammars(String... theGrammars) {
+ for (String grammar: theGrammars) {
+ this.grammars.add(grammar);
+ }
+ return this;
+ }
+
+ public String[] grammars() {
+ return this.grammars.toArray(new String[0]);
+ }
}
}
diff --git a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Data.java b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Data.java
index fc29dcf..2a75cfd 100644
--- a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Data.java
+++ b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Data.java
@@ -79,6 +79,8 @@ public class Data {
public String name();
+ public boolean isScalar();
+
public Evaluator evaluator();
public Evaluator constraintsEvaluator();
@@ -92,6 +94,10 @@ public class Data {
return null;
}
+ public boolean isScalar() {
+ return false;
+ }
+
public Evaluator evaluator() {
return Data::evalUser;
}
@@ -99,56 +105,65 @@ public class Data {
public Evaluator constraintsEvaluator() {
return Data::evalUserConstraints;
}
+
+ public String toString() {
+ return "UserType(scalar=false)";
+ }
};
public static enum CoreType implements Type {
- String("string",
+ String("string", true,
(expr,def,ctx) -> expr != null && expr instanceof String,
Data::evalScalarConstraints),
- Integer("integer",
+ Integer("integer", true,
(expr,def,ctx) -> Data.valueOf(ctx, expr, Integer.class),
Data::evalScalarConstraints),
- Float("float",
+ Float("float", true,
(expr,def,ctx) -> Data.valueOf(ctx, expr, Double.class, Integer.class),
Data::evalScalarConstraints),
- Boolean("boolean",
+ Boolean("boolean", true,
(expr,def,ctx) -> Data.valueOf(ctx, expr, Boolean.class),
Data::evalScalarConstraints),
- Null("null",
+ Null("null", true,
(expr,def,ctx) -> expr.equals("null"),
null),
- Timestamp("timestamp",
+ Timestamp("timestamp", true,
(expr,def,ctx) -> timestampRegex.matcher(expr.toString()).matches(),
null),
- List("list", Data::evalList, Data::evalListConstraints),
- Map("map", Data::evalMap, Data::evalMapConstraints),
- Version("version",
+ List("list", false, Data::evalList, Data::evalListConstraints),
+ Map("map", false, Data::evalMap, Data::evalMapConstraints),
+ Version("version", true,
(expr,def,ctx) -> versionRegex.matcher(expr.toString()).matches(),
null),
/* use a scanner and check that the upper bound is indeed greater than
- * the lower bound */
- Range("range",
+ * the lower bound. Marked as a scalar because its evaluator does not record a context error */
+ Range("range", true,
(expr,def,ctx) -> { return rangeRegex.matcher(expr.toString()).matches();},
null ),
- Size("scalar-unit.size",
+ Size("scalar-unit.size", true,
(expr,def,ctx) -> sizeRegex.matcher(expr.toString()).matches(),
null),
- Time("scalar-unit.time",
+ Time("scalar-unit.time", true,
(expr,def,ctx) -> timeRegex.matcher(expr.toString()).matches(),
null),
- Frequency("scalar-unit.frequency",
+ Frequency("scalar-unit.frequency", true,
(expr,def,ctx) -> frequencyRegex.matcher(expr.toString()).matches(),
null);
private String toscaName;
+ private boolean isScalar;
private Evaluator valueEvaluator,
constraintsEvaluator;
- private CoreType(String theName, Evaluator theValueEvaluator, Evaluator theConstraintsEvaluator) {
+ private CoreType(String theName,
+ boolean theIsScalar,
+ Evaluator theValueEvaluator,
+ Evaluator theConstraintsEvaluator) {
this.toscaName = theName;
+ this.isScalar = theIsScalar;
this.valueEvaluator = theValueEvaluator;
this.constraintsEvaluator = theConstraintsEvaluator;
@@ -162,6 +177,10 @@ public class Data {
return this.toscaName;
}
+ public boolean isScalar() {
+ return this.isScalar;
+ }
+
public Evaluator evaluator() {
return this.valueEvaluator;
}
@@ -169,6 +188,7 @@ public class Data {
public Evaluator constraintsEvaluator() {
return this.constraintsEvaluator;
}
+
}
private static Pattern timestampRegex = null,
@@ -274,15 +294,11 @@ public class Data {
private static boolean evalCollection(Collection theVals,
Map theDef,
Checker.CheckContext theCtx) {
-
-//System.out.println("evalCollection: " + theDef + ", " + theVals);
-
Data.Type entryType = null;
Map entryTypeDef = (Map)theDef.get("entry_schema");
if (null != entryTypeDef)
entryType = typeByName((String)entryTypeDef.get("type"));
-//System.out.println("evalCollection, entry definition: " + entryTypeDef);
boolean res = true;
for (Object val: theVals) {
//check if the value is not a function call
@@ -316,8 +332,6 @@ public class Data {
private static boolean evalCollectionConstraints(Collection theVals,
Map theDef,
Checker.CheckContext theCtx) {
-//System.out.println("evalCollectionConstraints: " + theDef + ", " + theVals);
-
//should check overall constraints
if (theVals == null)
@@ -330,32 +344,28 @@ public class Data {
String entryTypeName = (String)entryTypeDef.get("type");
Data.Type entryType = typeByName(entryTypeName);
-//System.out.println("evalCollectionConstraints, entry definition: " + entryTypeDef);
-
boolean res = true;
for (Object val: theVals) {
Evaluator entryEvaluator = entryType.constraintsEvaluator();
if (entryEvaluator != null &&
!entryEvaluator.eval(val, entryTypeDef, theCtx)) {
res= false;
- //the constraints evaluator should have already added an error, but it also adds some context
- //theCtx.addError("Value " + val + " failed evaluation", null);
+ if (entryType.isScalar()) {
+ theCtx.addError("Value " + val + " failed constraints evaluation", null);
+ }
}
}
return res;
}
/*
- * All required properties across the hierarchical defintion must be present
- * TODO: The expr cannot contain any entry not specified in the type definition
+ * TODO: check that
*/
public static boolean evalUser(Object theVal,
Map theDef,
Checker.CheckContext theCtx) {
-//System.out.println("evalUser: " + theDef + ", " + theVal);
-
boolean res = true;
- Map val = (Map)theVal;
+ Map val = new HashMap((Map)theVal);
//must be done with respect to the super-type(s) definition
Iterator<Map.Entry> props = theCtx.catalog()
.facets(Construct.Data,
@@ -364,20 +374,25 @@ public class Data {
while (props.hasNext()) {
Map.Entry propEntry = props.next();
Map propDef = (Map)propEntry.getValue();
- Object propVal = val.get(propEntry.getKey());
-
-//System.out.println("evalUser: " + propVal);
+ Object propVal = val.remove(propEntry.getKey());
if (propVal != null) {
Data.Type propType = typeByName((String)propDef.get("type"));
if (!propType.evaluator().eval(propVal, propDef, theCtx)) {
res= false;
- //the constraints evaluator should have already added an error
- //theCtx.addError("Property " + propEntry.getKey() + " failed evaluation for " + propVal, null);
+ if (propType.isScalar()) {
+ theCtx.addError("Property " + propEntry.getKey() + " failed evaluation for " + propVal + " as " + propType.name(), null);
+ }
}
}
}
+
+ if (!val.isEmpty()) {
+ theCtx.addError("Entries " + val + " were not expected for type " + theDef.get("type"), null);
+ res = false;
+ }
+
return res;
}
@@ -528,11 +543,52 @@ public class Data {
private static boolean evalConcat(
Object theVal, Map theDef, Checker.CheckContext theCtx) {
+
+ Map val = (Map)theVal;
+ Map.Entry entry = (Map.Entry)val.entrySet().iterator().next();
+
+ if (!(entry.getValue() instanceof List)) {
+ theCtx.addError("concat: argument expression not a list", null);
+ return false;
+ }
+
+ List args = (List)entry.getValue();
+ if (args.size() < 2) {
+ theCtx.addError("concat: requires a minimum of 2 arguments", null);
+ return false;
+ }
+
+ //TODO: every argument must be or yield a String value
+ //cannot be done in full
+
return true;
}
private static boolean evalToken(
Object theVal, Map theDef, Checker.CheckContext theCtx) {
+
+ Map val = (Map)theVal;
+ Map.Entry entry = (Map.Entry)val.entrySet().iterator().next();
+
+ if (!(entry.getValue() instanceof List)) {
+ theCtx.addError("token: argument expression not a list", null);
+ return false;
+ }
+
+ List args = (List)entry.getValue();
+ if (args.size() != 3) {
+ theCtx.addError("token: requires 3 arguments", null);
+ return false;
+ }
+
+ //the first 2 argument must be String expressions so require more elaborate estimation
+ //but the third one must be an integer
+
+ if (!(args.get(2) instanceof Integer)) {
+ theCtx.addError("token: 3rd argument must be an integer (substring index), found " + args.get(2).getClass(),null);
+ return false;
+ }
+
return true;
}
@@ -542,7 +598,7 @@ public class Data {
Map.Entry entry = (Map.Entry)val.entrySet().iterator().next();
if (!(entry.getValue() instanceof String)) {
- theCtx.addError("get_input: argument must be a String" ,null);
+ theCtx.addError("get_input: argument must be a String", null);
return false;
}
@@ -644,6 +700,8 @@ public class Data {
return false;
}
+ //follow all 'HSOTED_ON' relationships to find a host, if any ..
+
return true;
}
else {
@@ -715,7 +773,6 @@ public class Data {
{
String facetName = (String)args.get(facetNameIndex);
for (Facet facet: theFacets) {
-//System.out.println("get_data: looking at " + facetConstruct + " " + facetConstructType + ", " + facet + " " + facetName);
facetSpec = theCtx.catalog()
.getFacetDefinition(
facetConstruct,
diff --git a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/annotations/Checks.java b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/annotations/Checks.java
index 856ac1b..54e5685 100644
--- a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/annotations/Checks.java
+++ b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/annotations/Checks.java
@@ -38,5 +38,6 @@ import java.lang.annotation.Target;
*/
public @interface Checks {
String path() default "/";
- String[] version() default { "1.0", "1.0.0", "1.1", "1.1.0" };
+ String[] version() default { "tosca_simple_yaml_1_0", "tosca_simple_yaml_1_0_0",
+ "tosca_simple_yaml_1_1", "tosca_simple_yaml_1_1_0" };
}
diff --git a/javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar b/javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar
index e199680..39b11d9 100644
--- a/javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar
+++ b/javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar
@@ -286,8 +286,6 @@ _property_definition: &property_definition
# type: str
# required: no
-#see section A.5.8
-#_property_assignment_definition: &property_assignment_definition
#see 3.5.10
_attribute_definition: &attribute_definition
@@ -1407,7 +1405,7 @@ _topology_template_definition: &topology_template_definition
type: map
mapping:
=:
- *property_definition
+ *parameter_definition
node_templates:
desc: "definition of the node templates of the topology"
name: node_templates
@@ -1431,7 +1429,7 @@ _topology_template_definition: &topology_template_definition
type: map
mapping:
=:
- *attribute_assignment_definition
+ *parameter_definition
groups:
desc: "An optional list of Group definitions whose members are node templates defined within this same Topology Template"
name: groups
diff --git a/javatoscachecker/checker/src/test/java/org/onap/tosca/checker/test/CSAR.java b/javatoscachecker/checker/src/test/java/org/onap/tosca/checker/test/CSAR.java
deleted file mode 100644
index aeeef20..0000000
--- a/javatoscachecker/checker/src/test/java/org/onap/tosca/checker/test/CSAR.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.onap.tosca.checker.test;
-
-import java.net.URI;
-
-import org.onap.tosca.checker.Checker;
-import org.onap.tosca.checker.Target;
-import org.onap.tosca.checker.Catalog;
-import org.onap.tosca.checker.CSARRepository;
-
-public class CSAR {
-
- public static void main(String[] theArgs) {
-
- if (theArgs.length == 0) {
- System.err.println("You need to specify a CSAR archive to process");
- return;
- }
-
- try {
- CSARRepository repo = new CSARRepository(theArgs[0], new URI(theArgs[0]));
- Checker checker = new Checker();
- checker.setTargetLocator(repo.getTargetLocator());
- checker.check(repo.mainTarget());
-
- Catalog cat = checker.catalog();
- for (Target t: cat.targets()) {
- System.err.println(t.getLocation() + "\n" + cat.importString(t) + "\n" + t.getReport());
- }
- }
- catch (Exception x) {
- x.printStackTrace();
- }
- }
-
-}
diff --git a/javatoscachecker/checker/src/test/tosca/dcae_uservice_tosca.yaml b/javatoscachecker/checker/src/test/tosca/dcae_uservice_tosca.yaml
deleted file mode 100644
index 2c5c028..0000000
--- a/javatoscachecker/checker/src/test/tosca/dcae_uservice_tosca.yaml
+++ /dev/null
@@ -1,653 +0,0 @@
-# First attempt at microservice definitions in tosca-yaml.
-# Ted Johnson, Dec. 2015
-## Ralph Knag, config additions , Feb. 2016
-
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-
-metadata:
- template_version: 1.0.2
-
-
-data_types:
-########################################################
-### data types related to schemas
-
- baseFieldDefinition:
- description: base class for field definitions
- properties:
- name:
- required: true
- type: string
- type:
- required: true
- type: string
- constraints:
- - valid_values: [ string, int, float, ipv4, ipv6, date, date_time, list, map, other]
- format:
- required: false
- type: string
- default_value:
- required: false
- type: string
- comment:
- required: false
- type: string
- constraints:
- description: Properties that the field must satisfy
- required: false
- type: list
- entry_schema:
- type: string
- constraints:
- list_delimiter:
- description: delimiter when list data packed into a string type.
- required: false
- type: string
-# subtype can be used for policy override allowed?
- subType:
- required: false
- type : string
- constraints:
- - valid_values: [ policyOveride, noPolicyOverride ]
-
- positionalFieldDefinition:
- derived_from: baseFieldDefinition
- description: fields with a fixed-position schema
- properties:
- position:
- required: true
- type: integer
- constraints:
- - greater_or_equal: 0
-
- pathFieldDefinition:
- derived_from: baseFieldDefinition
- description: fields accessed via navigation
- properties:
- path:
- required: true
- type: string
-
- fieldDefinition:
- derived_from: baseFieldDefinition
- description: positional or path field
- properties:
- path:
- required: false
- type: string
- position:
- required: false
- type: integer
- constraints:
- - greater_or_equal: 0
- comment:
- required: false
- type: string
- length:
- required: false
- type: integer
- constraints:
- - greater_than: 0
-
- fieldList:
- description: fields in a schema
- properties:
- fieldList:
- required: true
- type: list
- entry_schema:
- type: fieldDefinition
-
-
-
-########################################################
-### data types related to data properties
-
- sortedBy:
- description: sorting properties of a data set
- properties:
- fields:
- required: true
- type: list
- entry_schema:
- type: fieldDefinition
- sorting:
- required: true
- type: string
- default: fullySorted
- constraints:
- - valid_values: [ fullySorted, partiallySorted ]
- lag:
- description: maximum disorder in a partially sorted
- required: false
- type: integer
- constraints:
- - greater_or_equal: 0
-
- keyFields:
- description: key fields of a data set
- properties:
- fields:
- required: true
- type: list
- entry_schema:
- type: fieldDefinition
- timestamp:
- required: false
- type: integer
-
-###############################################################
-###############################################################
-
-node_types:
-
- dcaeCatalogNodes:
- derived_from: tosca.nodes.Root
- properties:
- UUID:
- required: true
- type: string
- name:
- required: true
- type: string
- version:
- required: true
- type: string
- constraints:
- - pattern: \d+[.]\d+[.]\d+
- schemaVersion:
- required: false
- type: integer
- default: 1
-
-
-########################################################
-### node types related to schemas
-
-
- baseDataFormat:
- description: base data format
- derived_from: dcaeCatalogNodes
- properties:
- fieldList:
- required: true
- type: list
- entry_schema:
- type: fieldDefinition
- formatType:
- type: string
- required: true
- constraints:
- - valid_values: [ fixed_format, variable_format, json ]
- formatSubType:
- required: true
- type: string
- fullList:
- type: string
- required: true
- constraints:
- - valid_values: [ yes, no ]
- default: yes
- capabilities:
- dataProperties:
- type: dcaeCatalog.capabilities.dataFormat
-
- baseVariableDataFormat:
- derived_from: baseDataFormat
- description: base class for fixed-position data formats
- properties:
- formatType:
- type: string
- required: true
- constraints:
- - equal: variable_format
-
-
-# probably more needed here - not sure baseDataFormat is sufficient...rhk
- jsonDataFormat:
- derived_from: baseVariableDataFormat
- description: JSON format
- properties:
- formatSubType:
- required: true
- type: string
- default: json
- constraints:
- - equal: json
- endOfRecord:
- required: false
- type: string
- numFields:
- required: false
- type: integer
-
- baseFixedDataFormat:
- derived_from: baseDataFormat
- description: base class for fixed-position data formats
- properties:
- formatType:
- type: string
- required: true
- constraints:
- - equal: fixed_format
-
- delimitedAsciiDataFormat:
- derived_from: baseFixedDataFormat
- description: delimited ascii format
- properties:
- formatSubType:
- required: true
- type: string
- default: delimitedAscii
- constraints:
- - equal: delimitedAscii
- delimiter:
- required: true
- type: string
- default: |
- endOfRecord:
- required: false
- type: string
- numFields:
- required: false
- type: integer
-
- fixedWidthAsciiDataFormat:
- derived_from: baseFixedDataFormat
- description: delimited ascii format
- properties:
- formatSubType:
- required: true
- type: string
- default: fixedWidthAscii
- constraints:
- - equal: fixedWidthAscii
- endOfRecord:
- required: false
- type: string
- numFields:
- required: false
- type: integer
-
- fixedBinaryDataFormat:
- derived_from: baseFixedDataFormat
- description: binary data, e.g. thrift messages, protocol buffers
- properties:
- formatSubType:
- required: true
- type: string
- default: fixedBinaryData
- constraints:
- - equal: fixedBinaryData
- binaryFormat:
- required: true
- type: string
-
-
-###############################################
-### Node types related to data properties
-
- dataProperties:
- description: Essential non-schema information about a data set
- derived_from: dcaeCatalogNodes
- properties:
- sort:
- required: false
- type: sortedBy
- keys:
- required: false
- type: keyFields
- timestamp:
- description: the field indicating the time when corresponding event occurred
- required: false
- type: string
- duration:
- description: the field indicating the length of the described measurement
- required: false
- type: string
- period:
- description: how often the data is generated. 0 means continuously.
- required: true
- type: integer
- default: 0
- constraints:
- - greater_or_equal: 0
- capabilities:
- dataProperties:
- type: dcaeCatalog.capabilities.dataProperties
-
-
- keyedDataProperties:
- derived_from: dataProperties
- description: Data sets that are required to hav a key
- properties:
- keys:
- required: true
- type: keyFields
-
- referenceDataProperties:
- derived_from: dataProperties
- description: data set from external source that is joined against streaming data
- properties:
- updateType:
- description: how the reference data is refreshed - snapshots, incremental, or both
- required: true
- type: string
-
- keyedReferenceDataProperties:
- derived_from: referenceDataProperties
- description: reference data that maps a key to a value, generally with a valid time interval
- properties:
- keys:
- required: true
- type: keyFields
- startTimeField:
- description: the time when the key --> value mapping became valid
- required: false
- type: string
- endTimeField:
- description: time when the key --> value mapping ceased to be valid
- required: false
- type: string
-
-
-#######################################################################
-#### Things which describe how a data source can be accessed
-
-
-
- dataDelivery:
- description: the means of connecting to a data source. very incomplete.
- derived_from: dcaeCatalogNodes
- properties:
- deliveryMechanism:
- description: the general method by which data is delivered from a source.
- required: true
- type: string
- constraints:
- - valid_values: [stream, file, database, table ]
- polling:
- description: push vs. pull
- required: true
- type: string
- constraints:
- - valid_values: [ push, pull]
- capabilities:
- dataDelivery:
- type: dcaeCatalog.capabilities.dataDelivery
-
- streamDataDelivery:
- description: a data source that is a streaming source.
- derived_from: dataDelivery
- properties:
- deliveryMechanism:
- description: the general method by which data is delivered from a source.
- required: true
- type: string
- constraints:
- - equal: stream
- polling:
- description: push vs. pull
- required: true
- type: string
- constraints:
- - equal: push
-
-
- genericCDAPDelivery:
- description: a streaming data source delivered via the CDAP generic
- derived_from: streamDataDelivery
-
-
-
-# A UEB stream is kafka plus security TBD
- dmaapMessageDelivery:
- description: a streaming data source delivered via a kafka queue
- derived_from: streamDataDelivery
- properties:
- servers:
- description: the servers to contact to access the kafka queue.
- required: true
- type: list
- entry_schema:
- type: string
- constraints:
- topic:
- description: the stream identifier (topic in kafka terminology)
- required: true
- type: string
- numPartitions:
- description: the number of partitions for the kafka topic
- required: false
- default: 1
- type: integer
- PartitioningMethod:
- description: the mechanism that assigns records to partitions
- required: false
- type: string
- partitionSubscriptions:
- description: if specified, the set of partitions that contain a particular substream
- required: false
- type: list
- entry_schema:
- type: integer
-
-
- dmaapDataRouterDelivery:
- description: a data source that is delivered via files.
- derived_from: dataDelivery
- properties:
- deliveryMechanism:
- description: the general method by which data is delivered from a source.
- required: true
- type: string
- constraints:
- - valid_values: [file]
- fileName:
- description: a name (or naming scheme) of the file
- required: true
- type: string
-
- fileDataDelivery:
- description: a data source that is delivered via files.
- derived_from: dataDelivery
- properties:
- deliveryMechanism:
- description: the general method by which data is delivered from a source.
- required: true
- type: string
- constraints:
- - valid_values: [file]
- fileName:
- description: a name (or naming scheme) of the file
- required: true
- type: string
-
- pulledFileDelivery:
- description: a data source that is delivered via files pulled from an external source
- derived_from: fileDataDelivery
- properties:
- uri:
- description: the thing to access to get a new file
- required: true
- type: string
- trigger:
- description: a description of the thing that triggers pulling a new file.
- required: true
- type: string
-
-
-
-####################################
-### Description of a data source (data output)
-
- dataSource:
- description: a generic data source description, link to schema, properties, delivery
- derived_from: dcaeCatalogNodes
-# properties:
- requirements:
- - dataFormat:
- capability: dcaeCatalog.capabilities.dataFormat
- - dataDelivery:
- capability: dcaeCatalog.capabilities.dataDelivery
- - dataProperties:
- capability: dcaeCatalog.capabilities.dataProperties
- capabilities:
- dataSource:
- type: dcaeCatalog.capabilities.dataSource
- occurrences: [0, UNBOUNDED]
-
-##########################
-### Description of a data requirement (data input)
- dataRequirement:
- description: a generic data source description, link to schema, properties, delivery
- derived_from: dcaeCatalogNodes
-# properties:
- requirements:
- - dataFormat:
- capability: dcaeCatalog.capabilities.dataFormat
- occurrences: [1, UNBOUNDED]
- - dataProperties:
- capability: dcaeCatalog.capabilities.dataProperties
- - dataDelivery:
- capability: dcaeCatalog.capabilities.dataDelivery
- capabilities:
- dataRequirement:
- type: dcaeCatalog.capabilities.dataRequirement
- occurrences: [0, UNBOUNDED]
-
-
-
-
-
-####################################
-### Description of a processingModuleParameters (module parameters excluding input/output descriptions
-### allows any baseDataFormat derived input
- processingModuleParameters:
- description:
- derived_from: baseDataFormat
- properties:
- dataType:
- required: true
- type: string
- capabilities:
- moduleParameters:
- type: dcaeCatalog.capabilities.processingModuleParameters
-
-
-################################
-### Module Dependencies
-
- instantiationDependency:
- description: code dependencies (possible transitive)
- derived_from: dcaeCatalogNodes
- properties:
- dependencyType:
- required: false
- type: string
- constraints:
- - valid_values: [R, Python, CDAP]
- dependencyValue:
- required: true
- type: string
- capabilities:
- dataProperties:
- type: dcaeCatalog.capabilities.instantiationDependency
- occurrences: [0, UNBOUNDED]
- requirements:
- - dependencies:
- capability: dcaeCatalog.capabilities.instantiationDependency
- occurrences: [0, UNBOUNDED]
-
-####################################
-### Description of a processingModuleDeployment - deployment attributes
-
- processingModuleDeployment:
- description: deployment attributes
- derived_from: dcaeCatalogNodes
- properties:
- language:
- required: true
- type: string
- version:
- type: string
- required: true
- deploymentType:
- required: true
- type: string
- capabilities:
- moduleDeployment:
- type: dcaeCatalog.capabilities.processingModuleDeployment
- occurrences: [0, UNBOUNDED]
- requirements:
- - dependencies:
- capability: dcaeCatalog.capabilities.instantiationDependency
- occurrences: [0, UNBOUNDED]
-
-####################################
-### Description of a processingModuleMetaData - search tags
-
- processingModuleMetadata:
- description: metadata tags
- derived_from: dcaeCatalogNodes
- properties:
- metaDataList:
- required: true
- type: list
- entry_schema:
- type: string
- constraints:
- capabilities:
- metadata:
- type: dcaeCatalog.capabilities.processingModuleMetadata
- occurrences: [0, UNBOUNDED]
-
-
-####################################
-### Description of a processingModule
-
- processingModule:
- description: full processing module description
- derived_from: dcaeCatalogNodes
- properties:
- moduleDescription:
- required: true
- type: string
- requirements:
- - processingModuleparameters:
- capability: dcaeCatalog.capabilities.processingModuleParameters
- occurrences: [0, UNBOUNDED]
- - processingModuleDeployment:
- capability: dcaeCatalog.capabilities.processingModuleDeployment
- occurrences: [1, UNBOUNDED]
- - processingModuleMetadata:
- capability: dcaeCatalog.capabilities.processingModuleMetadata
- occurrences: [1, UNBOUNDED]
- - dataRequirementsList:
- capability: dcaeCatalog.capabilities.dataRequirement
- occurrences: [1, UNBOUNDED]
- - dataSourcesList:
- capability: dcaeCatalog.capabilities.dataSource
- occurrences: [1, UNBOUNDED]
-
-capability_types:
- dcaeCatalog.capabilities.dataFormat:
- derived_from: tosca.capabilities.Root
- dcaeCatalog.capabilities.dataProperties:
- derived_from: tosca.capabilities.Root
- dcaeCatalog.capabilities.dataDelivery:
- derived_from: tosca.capabilities.Root
- dcaeCatalog.capabilities.instantiationDependency:
- derived_from: tosca.capabilities.Root
- dcaeCatalog.capabilities.processingModuleMetadata:
- derived_from: tosca.capabilities.Root
- dcaeCatalog.capabilities.processingModuleParameters:
- derived_from: tosca.capabilities.Root
- dcaeCatalog.capabilities.processingModuleDeployment:
- derived_from: tosca.capabilities.Root
- dcaeCatalog.capabilities.dataRequirement:
- derived_from: tosca.capabilities.Root
- dcaeCatalog.capabilities.dataSource:
- derived_from: tosca.capabilities.Root
-
-
diff --git a/javatoscachecker/checker/src/test/tosca/mini_ceil_tosca.yaml b/javatoscachecker/checker/src/test/tosca/mini_ceil_tosca.yaml
deleted file mode 100644
index 9879746..0000000
--- a/javatoscachecker/checker/src/test/tosca/mini_ceil_tosca.yaml
+++ /dev/null
@@ -1,108 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-
-imports:
- - dcae_uservice_tosca.yaml
-
-topology_template:
-
- node_templates:
-
- HostComputeStats_Ceilometer:
- type: delimitedAsciiDataFormat
- properties:
- name: HostComputeStats_Ceilometer
- UUID: HostComputeStats_Ceilometer
- version: 1.0.0
- delimiter: "|"
- fieldList:
- -
- name: DATETIME_FTP_COLLECTION
- type: date_time
-# subType: 1.0
- subType: "yyyymmddhhmmss"
- -
- name: DATETIME_OSS
- type: date_time
- subType: "yyyymmddhhmmss"
- -
- name: DATETIMEUTC
- type: date_time
- subType: "yyyymmddhhmmss"
- -
- name: DATETIMEZONE
- type: date_time
- subType: "yyyymmddhhmmss zzz"
- -
- name: EMS_NAME
- type: string
- comment: "Element Manager System Name?"
- -
- name: NE_VERSION
- type: string
- comment: "Network Element Version????"
- -
- name: PERIOD
- type: int
- comment: "Sample period in seconds"
- -
- name: SUSPECTFLAG
- type: string
- comment: "Data suspect? Null means ok?"
- -
- name: SERVICE
- type: string
- -
- name: resourceid
- type: string
- -
- name: hardware.cpu.load.1min
- type: float
- comment: "CPU load in in the last one minute"
- -
- name: hardware.cpu.load.5min
- type: float
- comment: "CPU load in in the last five minutes"
- -
- name: hardware.cpu.load.15min
- type: float
- comment: "CPU load in in the last fifteen minutes"
- -
- name: hardware.cpu.memory.total
- type: float
- comment: "Total memory size in KB"
- -
- name: hardware.cpu.memory.avail
- type: float
- comment: "Memory available in KB"
- -
- name: hardware.cpu.swap.total
- type: float
- comment: "Total swap size in KB"
- -
- name: hardware.cpu.swap.avail
- type: float
- comment: "Swap available in KB"
- -
- name: hardware.network.ip.incoming.datagrams
- type: float
- comment: "Cumulative incoming datagrams"
- -
- name: hardware.network.ip.outgoing.datagrams
- type: float
- comment: "Cumulative outgoing datagrams"
- -
- name: hardware.network.ip.incoming.blocks
- type: float
- comment: "Cumulative incoming blocks"
- -
- name: hardware.network.ip.outgoing.blocks
- type: float
- comment: "Cumulative outgoing blocks"
- -
- name: hardware.system_states.cpu.idle
- type: float
- comment: "CPU Percent idle"
- formatType: fixed_format
- formatSubType: delimitedAscii
- fullList: true
- numFields: 22
diff --git a/javatoscachecker/checker/src/test/tosca/ucpe_schema.yml b/javatoscachecker/checker/src/test/tosca/ucpe_schema.yml
deleted file mode 100644
index 5c5ac5a..0000000
--- a/javatoscachecker/checker/src/test/tosca/ucpe_schema.yml
+++ /dev/null
@@ -1,403 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-description: CCD uCPE specific data types
-
-metadata:
- template_name: uCPE_schema
- template_version: "0.1"
-
-imports:
- - tosca/tosca-network-types.yaml
-
-data_types:
-
- routing-rule:
- properties:
- logical-interface-name:
- type: string
- ip-version:
- type: string
- mtu:
- type: integer
- is-unnumbered:
- type: boolean
- unnumbered-local-address:
- type: string
- unnumbered-remote-address:
- type: string
- cos-model:
- type: string
- pe-shaping:
- type: string
- bgp-v4-neighbor-address:
- type: string
- bgp-v4-peer-as:
- type: string
- bgp-v4-md5-key:
- type: string
- bgp-v4-my-as:
- type: string
- bgp-v6-neighbor-address:
- type: string
- bgp-v6-peer-as:
- type: string
- bgp-v6-md5-key:
- type: string
- bgp-v6-my-as:
- type: string
- bgp-v4-keep-alive-timer:
- type: string
- bgp-v6-keep-alive-timer:
- type: string
- bgp-v4-hold-timer:
- type: string
- bgp-v6-hold-timer:
- type: string
- v4-isp-lan-ip-blocks:
- type: list
- entry_schema: string
- v6-isp-lan-ip-blocks:
- type: list
- entry_schema: string
-
-node_types:
-
- com.att.d2.resource.ucpe.networkInterface:
- derived_from: tosca.nodes.Root
- properties:
- service_port_name:
- type: string
- physical_port_name:
- type: string
- physical_speed:
- type: integer
- physical_speed_units:
- type: string
- default: "Gbps"
- requirements:
- - host:
- capability: com.att.d2.capabilities.hostedOn
-# node: com.att.d2.resource.uCPE
- capabilities:
- link: tosca.capabilities.network.Linkable
-
-#do not know to what degree we still need the two specalized versions below
- com.att.d2.resource.ucpe.lan_networkInterface:
- derived_from: com.att.d2.resource.ucpe.networkInterface
- requirements:
- - host:
- capability: com.att.d2.capabilities.hostedOn
- node: com.att.d2.resource.uCPE
-
- com.att.d2.resource.ucpe.wan_networkInterface:
- derived_from: com.att.d2.resource.ucpe.networkInterface
- properties:
- internet_connection_type:
- type: string
- default: "AVPN"
- constraints:
- - valid_values: ["AVPN", "AVPNIVLAN", "3RDPARTYINTERNET", "MIS", "GMIS", "ASE", "ASEOD", "3RDPARTYETHERNET", "3RDPARTYMPLS", "HSIA-E"]
- requirements:
- - host:
- capability: com.att.d2.capabilities.hostedOn
- node: com.att.d2.resource.uCPE
-
-
-#the participation of a network interface in a VLAN needs to carry a 'tag' attribute (tagged/untagged values)
-#previously we attached this attribute to the Port
-# com.att.d2.resource.ucpe.lan_port:
-# properties:
-# tag:
-# type: string
-# default: "tagged"
-# constraints:
-# - valid_values: [tagged, untagged]
-#
-# now it has to go in the relationship between the networkInterface and the VLAN, i.e. LinksTo
-#
-
- com.att.d2.resource.ucpe.vlan:
-# can't use as a base type anymore as it has a Linkable capability
-# derived_from: tosca.nodes.network.Network
- properties:
- vlan_id:
- type: string
- requirements:
- - link:
- capability: tosca.capabilities.network.Linkable
- node: com.att.d2.resource.ucpe.networkInterface
- relationship: tosca.relationships.network.LinksTo
- - binding:
- capability: tosca.capabilities.network.Bindable
- node: com.att.d2.resource.ucpe.VNF
- relationship: tosca.relationships.network.BindsTo
-
-
- #virtual network functions to be hosted by a uCPE
- com.att.d2.resource.ucpe.VNF:
- derived_from: tosca.nodes.Root
- properties:
- att-part-number:
- type: string
- constraints:
- - max_length: 255
-
- vendor-name:
- type: string
- constraints:
- - max_length: 255
- vendor-part-number:
- type: string
- constraints:
- - max_length: 255
- vendor-model:
- type: string
- constraints:
- - max_length: 255
- vendor-model-description:
- type: string
- constraints:
- - max_length: 255
-
- vcpu-default:
- type: integer
- constraints:
- - less_or_equal: 16
- vcpu-min:
- type: integer
- constraints:
- - less_or_equal: 16
- vcpu-max:
- type: integer
- constraints:
- - less_or_equal: 16
-
- vmemory-default:
- type: integer
- vmemory-units:
- type: string
- default: "GB"
- vmemory-min:
- type: integer
- constraints:
- - less_or_equal: 16
- vmemory-max:
- type: integer
- constraints:
- - less_or_equal: 16
-
- vdisk-default:
- type: integer
- vdisk-units:
- type: string
- default: "GB"
- vdisk-min:
- type: integer
- constraints:
- - less_or_equal: 16
- vdisk-max:
- type: integer
- constraints:
- - less_or_equal: 128
-
-#what is this guy??
- vnf-type:
- type: string
-
- software-version:
- type: version
- software-version-state:
- type: integer
- software-file-name:
- type: string
- constraints:
- - max_length: 255
-
- vnf-feature:
- type: list
- entry_schema: string
-
- vnf-instance-id:
- type: string
- constraints:
- - max_length: 255
-
- management-option:
- type: string
- default: ATT
- constraints:
- - valid_values: ["CUSTOMER", "ATT"]
-
- requirements:
- - host:
- capability: com.att.d2.capabilities.hostedOn
-
- capabilities:
- binding:
- type: tosca.capabilities.network.Bindable
- occurrences: [1,UNBOUNDED]
-
-
- com.att.d2.resource.uCPE: # base node type for uCPE
- derived_from: tosca.nodes.Root
- properties:
- att-part-number:
- type: string
- vendor-name:
- type: string
- required: true
- vendor-model:
- type: string
- required: true
-
- total-vcpu:
- type: integer
- description: number of vCPUs
- total-memory:
- type: integer
- description: GB
- total-disk:
- type: integer
- description: GB
-
- base-system-image-file-name:
- type: string
- linux-host-vendor:
- type: string
- linux-host-os-version:
- type: version
- base-system-software:
- type: string
- jdm-vcpu:
- type: integer
- jdm-memory:
- type: integer
- description: GB
- jdm-disk:
- type: integer
- description: GB
- jdm-version:
- type: string
- jcp-vcpu:
- type: integer
- jcp-memory:
- type: integer
- description: GB
- jcp-disk:
- type: integer
- description: GB
- jcp-version:
- type: version
-
- capabilities:
- vnf_hosting:
- type: com.att.d2.capabilities.hostedOn
- valid_source_types: [com.att.d2.resource.ucpe.VNF]
- description: Provides hosting capability for VNFs
- WAN_connectivity:
- type: com.att.d2.capabilities.hostedOn
- valid_source_types: [com.att.d2.resource.ucpe.wan_networkInterface]
- description: external WAN1 n/w interface
- occurrences: [1,2]
- LAN_connectivity:
- type: com.att.d2.capabilities.hostedOn
- valid_source_types: [com.att.d2.resource.ucpe.lan_networkInterface]
- description: external LAN n/w interface
- occurrences: [1,8]
-
-# specific VNFs
-
- com.att.d2.resource.vRouter:
- derived_from: com.att.d2.resource.ucpe.VNF
- properties:
- management-v6-address:
- type: string
- nm-lan-v6-address:
- type: string
- nm-lan-v6-prefix-length:
- type: string
- management-v4-address:
- type: string
- nm-lan-v4-address:
- type: string
- nm-lan-v4-prefix-length:
- type: string
-
- routing-instance-name:
- type: string
- routing-instances:
- type: map
- entry_schema:
- type: routing-rule
-
- com.att.d2.resource.vWANx:
- derived_from: com.att.d2.resource.ucpe.VNF
- properties:
-# att-part-number:
-# type: string
-# default: "VCX-SUB-00255-U"
- vendor-name:
- type: string
- default: "VendorX"
- vendor-model:
- type: string
- default: "WANx-VM00"
-
- vcpu-default:
- type: integer
- default: 1
- vcpu-min:
- type: integer
- default: 1
- vcpu-max:
- type: integer
- default: 1
-
- vmemory-default:
- type: integer
- default: 1
- vmemory-min:
- type: integer
- default: 1
- vmemory-max:
- type: integer
- default: 1
-
- vdisk-default:
- type: integer
- default: 20
- vdisk-min:
- type: integer
- default: 2
- vdisk-max:
- type: integer
- default: 20
-
- vnf-type:
- type: string
- default: "Advanced WANx"
- software-version:
- description: "The WANx software version. The value must match the AT&T part number."
- type: version
- default: 9.2.0
-
- software-file-name:
- type: string
- default: "vnfImageFilename"
-
- vnf-instance-id:
- type: string
- description: "The WANx hostname."
-
- com.att.d2.resource.vFW:
- derived_from: com.att.d2.resource.ucpe.VNF
-
-
-
-############################
-# Customized capability types definitions
-############################
-capability_types:
-
- com.att.d2.capabilities.hostedOn:
- derived_from: tosca.capabilities.Root
-
diff --git a/javatoscachecker/checker/src/test/tosca/workflow_1.yaml b/javatoscachecker/checker/src/test/tosca/workflow_1.yaml
deleted file mode 100644
index fda6a27..0000000
--- a/javatoscachecker/checker/src/test/tosca/workflow_1.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_1_0
-
-imports:
- - example: tosca/tosca-examples-types.yaml
-
-topology_template:
-
- inputs:
- software_version:
- type: version
- default: 0.1
- management_option:
- type: string
- default: ATT
- constraints:
- - valid_values: [ ATT, CUSTOMER ]
-
- node_templates:
- my_server:
- type: tosca.nodes.Compute
- mysql:
- type: tosca.nodes.DBMS.MySQL
- requirements:
- - host: my_server
- interfaces:
- tosca.interfaces.nodes.custom.Backup:
-# operations:
- backup: backup.sh
- workflows:
- backup:
- description: Performs a snapshot of the MySQL data.
- preconditions:
- - target: my_server
- condition:
- - assert:
- - state: [{equal: available}]
- - target: mysql
- condition:
- - assert:
- - state: [{valid_values: [started, available]}]
- - my_attribute: [{equal: ready }]
- steps:
- my_step:
- target: mysql
- activities:
- - call_operation: tosca.interfaces.nodes.custom.Backup.backup
diff --git a/javatoscachecker/kwalify/pom.xml b/javatoscachecker/kwalify/pom.xml
index 7acfa80..ac5c776 100644
--- a/javatoscachecker/kwalify/pom.xml
+++ b/javatoscachecker/kwalify/pom.xml
@@ -1,104 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Copyright (c) 2017 <AT&T>. All rights reserved.
+ * ===================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
+ * the specific language governing permissions and limitations under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.tosca</groupId>
+ <groupId>org.onap.modeling.toscaparsers</groupId>
<artifactId>checker</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>kwalify</artifactId>
<packaging>jar</packaging>
<name>kwalify</name>
<build>
- <sourceDirectory>src/main/java</sourceDirectory>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/deps</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>false</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
- <version>1.4</version>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>create</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <doCheck>false</doCheck>
- <doUpdate>false</doUpdate>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- <manifestEntries>
- <Implementation-Build>${buildNumber}</Implementation-Build>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.10</version>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/deps</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <doCheck>false</doCheck>
+ <doUpdate>false</doUpdate>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-Build>${buildNumber}</Implementation-Build>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <!-- blackduck maven plugin -->
+ <!--
+ <plugin>
+ <groupId>com.blackducksoftware.integration</groupId>
+ <artifactId>hub-maven-plugin</artifactId>
+ <version>2.0.0</version>
+ <inherited>false</inherited>
+ <configuration>
+ <hubProjectName>${project.name}</hubProjectName>
+ <outputDirectory>${project.basedir}</outputDirectory>
+ <deployHubBdio>false</deployHubBdio>
+ </configuration>
+ <executions>
+ <execution>
+ <id>create-bdio-file</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build-bom</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+ </build>
- <!-- blackduck maven plugin -->
- <plugin>
- <groupId>com.blackducksoftware.integration</groupId>
- <artifactId>hub-maven-plugin</artifactId>
- <version>2.0.0</version>
- <inherited>false</inherited>
- <configuration>
- <hubProjectName>${project.name}</hubProjectName>
- <outputDirectory>${project.basedir}</outputDirectory>
- <deployHubBdio>false</deployHubBdio>
- </configuration>
- <executions>
- <execution>
- <id>create-bdio-file</id>
- <phase>package</phase>
- <goals>
- <goal>build-bom</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <dependencies>
+ </dependencies>
- <dependencies>
- </dependencies>
</project>
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/BaseException.java b/javatoscachecker/kwalify/src/main/java/kwalify/BaseException.java
index c2cc83b..d26487b 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/BaseException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/BaseException.java
@@ -1,7 +1,31 @@
/*
* @(#)BaseException.java $Rev: 3 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/CommandOptionException.java b/javatoscachecker/kwalify/src/main/java/kwalify/CommandOptionException.java
index e35be85..8250764 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/CommandOptionException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/CommandOptionException.java
@@ -1,7 +1,32 @@
/*
* @(#)CommandOptionException.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
+
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/Defaultable.java b/javatoscachecker/kwalify/src/main/java/kwalify/Defaultable.java
index 7e7c692..4a29609 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/Defaultable.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/Defaultable.java
@@ -1,7 +1,31 @@
/*
* @(#)Defaultable.java $Rev: 3 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/DefaultableHashMap.java b/javatoscachecker/kwalify/src/main/java/kwalify/DefaultableHashMap.java
index 0009205..6c07fe8 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/DefaultableHashMap.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/DefaultableHashMap.java
@@ -1,7 +1,31 @@
/*
* @(#)DefaultableHashMap.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/InvalidPathException.java b/javatoscachecker/kwalify/src/main/java/kwalify/InvalidPathException.java
index 94eeca2..a7abe2a 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/InvalidPathException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/InvalidPathException.java
@@ -1,7 +1,31 @@
/*
* @(#)InvalidPathException.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/InvalidTypeException.java b/javatoscachecker/kwalify/src/main/java/kwalify/InvalidTypeException.java
index fe60ca0..29fa3f7 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/InvalidTypeException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/InvalidTypeException.java
@@ -1,7 +1,30 @@
/*
* @(#)InvalidTypeException.java $Rev: 4 $ $Release: 0.5.1 $
+ * Copyright (c) <2005> <kuwata lab>
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than it it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/KwalifyException.java b/javatoscachecker/kwalify/src/main/java/kwalify/KwalifyException.java
index 976a263..5dfacf0 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/KwalifyException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/KwalifyException.java
@@ -1,7 +1,31 @@
/*
* @(#)KwalifyException.java $Rev: 3 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/KwalifyRuntimeException.java b/javatoscachecker/kwalify/src/main/java/kwalify/KwalifyRuntimeException.java
index 75e4764..7057764 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/KwalifyRuntimeException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/KwalifyRuntimeException.java
@@ -1,7 +1,31 @@
/*
* @(#)KwalifyRuntimeException.java $Rev: 3 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/Main.java b/javatoscachecker/kwalify/src/main/java/kwalify/Main.java
index d2c39e2..836a116 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/Main.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/Main.java
@@ -1,7 +1,31 @@
/*
* @(#)Main.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/Messages.java b/javatoscachecker/kwalify/src/main/java/kwalify/Messages.java
index b77f04b..b33be5c 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/Messages.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/Messages.java
@@ -1,7 +1,31 @@
/*
* @(#)Messages.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/MetaValidator.java b/javatoscachecker/kwalify/src/main/java/kwalify/MetaValidator.java
index 9ce05bd..a3c07b9 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/MetaValidator.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/MetaValidator.java
@@ -1,7 +1,31 @@
/*
* @(#)MetaValidator.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/Parser.java b/javatoscachecker/kwalify/src/main/java/kwalify/Parser.java
index 53c6272..4756c91 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/Parser.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/Parser.java
@@ -1,7 +1,31 @@
/*
* @(#)Parser.java $Rev: 3 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/PlainYamlParser.java b/javatoscachecker/kwalify/src/main/java/kwalify/PlainYamlParser.java
index 6224044..b9b49e2 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/PlainYamlParser.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/PlainYamlParser.java
@@ -1,7 +1,31 @@
/*
* @(#)PlainYamlParser.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/Rule.java b/javatoscachecker/kwalify/src/main/java/kwalify/Rule.java
index 558525d..c3f9176 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/Rule.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/Rule.java
@@ -1,7 +1,31 @@
/*
* @(#)Rule.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/SchemaException.java b/javatoscachecker/kwalify/src/main/java/kwalify/SchemaException.java
index 5d53bd1..cacf24c 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/SchemaException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/SchemaException.java
@@ -1,7 +1,31 @@
/*
* @(#)SchemaException.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/SyntaxException.java b/javatoscachecker/kwalify/src/main/java/kwalify/SyntaxException.java
index 8c36b66..e51846b 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/SyntaxException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/SyntaxException.java
@@ -1,7 +1,31 @@
/*
* @(#)SyntaxException.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/Types.java b/javatoscachecker/kwalify/src/main/java/kwalify/Types.java
index fbe655c..0f3fd3c 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/Types.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/Types.java
@@ -1,7 +1,31 @@
/*
* @(#)Types.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/Util.java b/javatoscachecker/kwalify/src/main/java/kwalify/Util.java
index c27c947..d6e50b6 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/Util.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/Util.java
@@ -1,7 +1,31 @@
/*
* @(#)Util.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/ValidationException.java b/javatoscachecker/kwalify/src/main/java/kwalify/ValidationException.java
index 5723e01..62294fa 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/ValidationException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/ValidationException.java
@@ -1,7 +1,31 @@
/*
* @(#)ValidationException.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/Validator.java b/javatoscachecker/kwalify/src/main/java/kwalify/Validator.java
index 1b3dd53..caf08fd 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/Validator.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/Validator.java
@@ -1,7 +1,31 @@
/*
* @(#)Validator.java $Rev: 3 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/YamlParser.java b/javatoscachecker/kwalify/src/main/java/kwalify/YamlParser.java
index fbe351c..285ffaf 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/YamlParser.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/YamlParser.java
@@ -1,7 +1,31 @@
/*
* @(#)YamlParser.java $Rev: 3 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/YamlSyntaxException.java b/javatoscachecker/kwalify/src/main/java/kwalify/YamlSyntaxException.java
index a8b1011..262ec8e 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/YamlSyntaxException.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/YamlSyntaxException.java
@@ -1,7 +1,31 @@
/*
* @(#)YamlSyntaxException.java $Rev: 4 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/kwalify/src/main/java/kwalify/YamlUtil.java b/javatoscachecker/kwalify/src/main/java/kwalify/YamlUtil.java
index 90dc17c..0c99236 100644
--- a/javatoscachecker/kwalify/src/main/java/kwalify/YamlUtil.java
+++ b/javatoscachecker/kwalify/src/main/java/kwalify/YamlUtil.java
@@ -1,7 +1,31 @@
/*
* @(#)YamlUtil.java $Rev: 3 $ $Release: 0.5.1 $
*
- * copyright(c) 2005 kuwata-lab all rights reserved.
+ * Copyright (c) <2005> <kuwata lab>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Added in order to satisfy onap.org code check constraints:
+ *
+ * This license is deemed more permisive than if it were under the Apache License, Version 2.0,
+ * found at
+ * http://www.apache.org/licenses/LICENSE-2.0
*/
package kwalify;
diff --git a/javatoscachecker/pom.xml b/javatoscachecker/pom.xml
index 10372d7..64d1784 100644
--- a/javatoscachecker/pom.xml
+++ b/javatoscachecker/pom.xml
@@ -1,29 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Copyright (c) 2017 <AT&T>. All rights reserved.
+ * ===================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
+ * the specific language governing permissions and limitations under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.tosca</groupId>
+
+ <parent>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>oparent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.onap.modeling.toscaparsers</groupId>
<artifactId>checker</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>TOSCA Checker tools</name>
+
+ <properties>
+ <nexusproxy>https://nexus.onap.org</nexusproxy>
+ <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
+ <releases.path>content/repositories/releases/</releases.path>
+ <snapshots.path>content/repositories/snapshots/</snapshots.path>
+ <staging.path>content/repositories/staging/</staging.path>
+ </properties>
<modules>
<module>kwalify</module>
<module>checker</module>
<module>service</module>
</modules>
-
- <scm>
- <connection>scm:git:https://</connection>
- <developerConnection>scm:git:https://</developerConnection>
- <tag>HEAD</tag>
- <url>https://</url>
- </scm>
+
+ <distributionManagement>
+ <repository>
+ <id>ecomp-releases</id>
+ <name>ONAP Release Repository</name>
+ <url>${nexusproxy}/${releases.path}</url>
+ </repository>
+ <snapshotRepository>
+ <id>ecomp-snapshots</id>
+ <name>ONAP Snapshot Repository</name>
+ <url>${nexusproxy}/${snapshots.path}</url>
+ </snapshotRepository>
+ <site>
+ <id>ecomp-site</id>
+ <url>dav:${nexusproxy}${sitePath}</url>
+ </site>
+ </distributionManagement>
+
<!-- Black Duck plugin dependencies -->
+<!--
<pluginRepositories>
<pluginRepository>
<id>JCenter</id>
@@ -37,5 +79,30 @@
<url>http://maven.restlet.com</url>
</pluginRepository>
</pluginRepositories>
+-->
+
+ <build>
+ <plugins>
+<!--
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <nexusUrl>${nexusproxy}</nexusUrl>
+ <stagingProfileId>176c31dfe190a</stagingProfileId>
+ <serverId>ecomp-staging</serverId>
+ </configuration>
+ </plugin>
+-->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip />
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/javatoscachecker/service/README b/javatoscachecker/service/README
index 94c5dde..8853dd7 100644
--- a/javatoscachecker/service/README
+++ b/javatoscachecker/service/README
@@ -1,6 +1,45 @@
-checker service usage
+This sub-project exposes the TOSCA yaml checker functionality as a REST based service.
+The service implemetation is based on the spring framework and contains a built-in default configuration that will run the service at port 8080 over plain http.
-A checking request is done with respect to a namespace that a client names. Each such namespace is backed by an
-in-memory catalog.
-A checking request can
+To start the service:
+ java -jar Service-0.0.1-SNAPSHOT.jar
+Sample client usage (windows power shell):
+
+ PS C:\Users\serban> Invoke-WebRequest -Uri http://localhost:8080/check_template/ -Method Post -ContentType application/json -InFile C:\src\asc-tosca\DCAE\v3\Database\Postgres-generic\schema.yaml
+
+
+With stateful 'namespaces':
+
+ PS C:\Users\serban> Invoke-WebRequest -Uri http://localhost:8080/check_template/database/schema.yaml -Method Post -ContentType application/json -InFile C:\src\asc-tosca\DCAE\v3\Database\Postgres-generic\schema.yaml
+ PS C:\Users\serban> Invoke-WebRequest -Uri http://localhost:8080/check_template/database -Method Post -ContentType application/json -InFile C:\src\asc-tosca\DCAE\v3\Database\Postgres-generic\template_postgres.yaml
+
+The first call creates the 'database' namespace and registers the submitted template as 'schema.yaml'. The second call submits a template as part of the same namespace containing an import of schema.yaml (from the first call); this mechanism allows for validation of multiple service templates with the same schema/type system.
+
+
+Details
+
+POST /check_template/
+ - unnamed (isolated/one time) service template checking
+ - return: a json representation of the report produced by the checker (an array with json objects as elements, one per error encoutered)
+
+POST /check_template/{catalog}/{name}
+ - named template submitted as part of the given catalog. A catalog allows a client application to isolate a particular TOSCA schema (type system) against which other templates will be checked. The catalog names are arbitrary (see catalog GET below as a way of checking if a catalog name is in use).
+ - return: a json representation of the report produced by the checker (an array with json objects as elements, one per error encoutered). When using the catalog based api one can use import statements within the templates but .. all import references are towards templates submitted prior hence all the errors in the report are for the submitted template).
+ - note: currently there is no explicit catalog creation API. A new catalog with the given name will be created if not already existing.
+
+GET /check_template/{catalog}/{name}
+ - checks if a template with the given name was submitted/checked as part of the given catalog.
+ - returns HTTP 200OK if a catalog with that name existed and the given name is associated with a previously submitted (named) template, 404 otherwise. No other catalog or template information is returned.
+
+POST /check_template/{catalog}
+ - unnamed template submitted as part of the given catalog. The template is processed but not registered so it cannot be referenced afterwards; it can use import statements refering to named templates within this catalog.
+ - return: a json representation of the report produced by the checker (an array with json objects as elements, one per error encoutered)
+
+GET /check_template/{catalog}
+ - checks if a catalog with the given name exists
+ - returns HTTP 200OK if a catalog with that name existed, 404 otherwise. No other catalog information is returned.
+
+DELETE /check_template/{catalog}
+ - deletes an existing catalog (and all information associated with it)
+ - returns HTTP 200OK if a catalog with that name existed, 404 otherwise
diff --git a/javatoscachecker/service/pom.xml b/javatoscachecker/service/pom.xml
index 7040aec..ea9258d 100644
--- a/javatoscachecker/service/pom.xml
+++ b/javatoscachecker/service/pom.xml
@@ -1,10 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Copyright (c) 2017 <AT&T>. All rights reserved.
+ * ===================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
+ * the specific language governing permissions and limitations under the License.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.tosca</groupId>
+ <groupId>org.onap.modeling.toscaparsers</groupId>
<artifactId>checker</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>Service</artifactId>
<packaging>jar</packaging>
@@ -16,133 +31,137 @@
</properties>
<build>
- <sourceDirectory>src/main/java</sourceDirectory>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+
<!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/deps</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>false</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.10</version>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/deps</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
-->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
- <version>1.4</version>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>create</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <doCheck>false</doCheck>
- <doUpdate>false</doUpdate>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- <manifestEntries>
- <Implementation-Build>${buildNumber}</Implementation-Build>
- <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>1.3.3.RELEASE</version>
- <configuration>
- <mainClass>org.onap.tosca.checker.service.CheckerEngine</mainClass>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <doCheck>false</doCheck>
+ <doUpdate>false</doUpdate>
+ </configuration>
+ </plugin>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>[2.7.8,)</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>[4.3.4.RELEASE,)</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>[4.3.4.RELEASE,)</version>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- <version>[1.3.3.RELEASE,)</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>[4.3.4.RELEASE,)</version>
- </dependency>
- <dependency>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-Build>${buildNumber}</Implementation-Build>
+ <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-autoconfigure</artifactId>
- <version>[1.3.3.RELEASE,)</version>
- </dependency>
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- <version>20160212</version>
- </dependency>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <version>1.3.3.RELEASE</version>
+ <configuration>
+ <mainClass>org.onap.tosca.checker.service.CheckerEngine</mainClass>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>[2.7.8,)</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>[4.3.4.RELEASE,)</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>[4.3.4.RELEASE,)</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <version>[1.3.3.RELEASE,)</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>[4.3.4.RELEASE,)</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ <version>[1.3.3.RELEASE,)</version>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ <version>20160212</version>
+ </dependency>
- <dependency>
- <groupId>org.onap.tosca</groupId>
- <artifactId>Checker</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.onap.modeling.toscaparsers</groupId>
+ <artifactId>Checker</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
</project>