aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java2
-rw-r--r--models-examples/pom.xml34
-rw-r--r--models-examples/src/main/resources/policies/README.txt (renamed from models-tosca/src/test/resources/policies/README.txt)0
-rw-r--r--models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json (renamed from models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json)0
-rw-r--r--models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vCPE.policy.monitoring.output.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vCPE.policy.operational.input.json (renamed from models-tosca/src/test/resources/policies/vCPE.policy.operational.input.json)0
-rw-r--r--models-examples/src/main/resources/policies/vCPE.policy.operational.input.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vCPE.policy.operational.input.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vCPE.policy.operational.output.json (renamed from models-tosca/src/test/resources/policies/vCPE.policy.operational.output.json)0
-rw-r--r--models-examples/src/main/resources/policies/vCPE.policy.operational.output.tosca.json (renamed from models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.json)0
-rw-r--r--models-examples/src/main/resources/policies/vCPE.policy.operational.output.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.guard.frequency.input.json (renamed from models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.input.json)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.guard.frequency.output.json (renamed from models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.output.json)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.guard.minmax.input.json (renamed from models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.input.json)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.guard.minmax.output.json (renamed from models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.output.json)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.json (renamed from models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.monitoring.output.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.operational.input.json (renamed from models-tosca/src/test/resources/policies/vDNS.policy.operational.input.json)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.operational.input.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vDNS.policy.operational.input.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.operational.output.json (renamed from models-tosca/src/test/resources/policies/vDNS.policy.operational.output.json)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.operational.output.tosca.json (renamed from models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.json)0
-rw-r--r--models-examples/src/main/resources/policies/vDNS.policy.operational.output.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.json (renamed from models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json)0
-rw-r--r--models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vFirewall.policy.operational.input.json (renamed from models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.json)0
-rw-r--r--models-examples/src/main/resources/policies/vFirewall.policy.operational.input.tosca.json (renamed from models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.json)0
-rw-r--r--models-examples/src/main/resources/policies/vFirewall.policy.operational.input.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policies/vFirewall.policy.operational.output.json (renamed from models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.json)0
-rw-r--r--models-examples/src/main/resources/policies/vFirewall.policy.operational.output.tosca.yaml (renamed from models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.tosca.yaml)0
-rw-r--r--models-examples/src/main/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml (renamed from models-tosca/src/test/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml)0
-rw-r--r--models-examples/src/main/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml (renamed from models-tosca/src/test/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml)0
-rw-r--r--models-provider/pom.xml6
-rw-r--r--models-tosca/pom.xml6
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java6
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java1
-rw-r--r--models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java8
-rw-r--r--models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java13
-rw-r--r--pom.xml10
40 files changed, 68 insertions, 18 deletions
diff --git a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java
index 8278cfe20..9b07dfbb1 100644
--- a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java
+++ b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java
@@ -26,7 +26,6 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.ArrayList;
@@ -61,7 +60,6 @@ public class EntityTest {
@After
public void teardown() throws Exception {
connection.close();
- new File("derby.log").delete();
}
@Test
diff --git a/models-examples/pom.xml b/models-examples/pom.xml
new file mode 100644
index 000000000..6eb8dabc1
--- /dev/null
+++ b/models-examples/pom.xml
@@ -0,0 +1,34 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2019 AT&T Intellectual Property. 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+<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.policy.models</groupId>
+ <artifactId>policy-models</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>policy-models-examples</artifactId>
+
+ <name>${project.artifactId}</name>
+ <description>Various examples of policy type and policy models in various formats</description>
+</project>
diff --git a/models-tosca/src/test/resources/policies/README.txt b/models-examples/src/main/resources/policies/README.txt
index 942913d5c..942913d5c 100644
--- a/models-tosca/src/test/resources/policies/README.txt
+++ b/models-examples/src/main/resources/policies/README.txt
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json b/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json
index 0eabb573a..0eabb573a 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json
+++ b/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.json
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml b/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.yaml
index 00afec393..00afec393 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vCPE.policy.monitoring.input.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml b/models-examples/src/main/resources/policies/vCPE.policy.monitoring.output.tosca.yaml
index a8a1cdac1..a8a1cdac1 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.monitoring.output.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vCPE.policy.monitoring.output.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.json b/models-examples/src/main/resources/policies/vCPE.policy.operational.input.json
index 393cb0282..393cb0282 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.json
+++ b/models-examples/src/main/resources/policies/vCPE.policy.operational.input.json
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.tosca.yaml b/models-examples/src/main/resources/policies/vCPE.policy.operational.input.tosca.yaml
index dda0169f1..dda0169f1 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.input.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vCPE.policy.operational.input.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.json b/models-examples/src/main/resources/policies/vCPE.policy.operational.output.json
index 7d26e8e67..7d26e8e67 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.json
+++ b/models-examples/src/main/resources/policies/vCPE.policy.operational.output.json
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.json b/models-examples/src/main/resources/policies/vCPE.policy.operational.output.tosca.json
index d73853735..d73853735 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.json
+++ b/models-examples/src/main/resources/policies/vCPE.policy.operational.output.tosca.json
diff --git a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.yaml b/models-examples/src/main/resources/policies/vCPE.policy.operational.output.tosca.yaml
index e4a06947f..e4a06947f 100644
--- a/models-tosca/src/test/resources/policies/vCPE.policy.operational.output.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vCPE.policy.operational.output.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.input.json b/models-examples/src/main/resources/policies/vDNS.policy.guard.frequency.input.json
index 442f3ec40..442f3ec40 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.input.json
+++ b/models-examples/src/main/resources/policies/vDNS.policy.guard.frequency.input.json
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.output.json b/models-examples/src/main/resources/policies/vDNS.policy.guard.frequency.output.json
index 48c92c3ba..48c92c3ba 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.guard.frequency.output.json
+++ b/models-examples/src/main/resources/policies/vDNS.policy.guard.frequency.output.json
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.input.json b/models-examples/src/main/resources/policies/vDNS.policy.guard.minmax.input.json
index c62a229a6..c62a229a6 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.input.json
+++ b/models-examples/src/main/resources/policies/vDNS.policy.guard.minmax.input.json
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.output.json b/models-examples/src/main/resources/policies/vDNS.policy.guard.minmax.output.json
index 83d2f272f..83d2f272f 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.guard.minmax.output.json
+++ b/models-examples/src/main/resources/policies/vDNS.policy.guard.minmax.output.json
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json b/models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.json
index 2188cb2e8..2188cb2e8 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.json
+++ b/models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.json
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml b/models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.yaml
index 6735c39c2..6735c39c2 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.input.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vDNS.policy.monitoring.input.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml b/models-examples/src/main/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
index 669e8946c..669e8946c 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vDNS.policy.monitoring.output.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.json b/models-examples/src/main/resources/policies/vDNS.policy.operational.input.json
index dabde0114..dabde0114 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.json
+++ b/models-examples/src/main/resources/policies/vDNS.policy.operational.input.json
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.tosca.yaml b/models-examples/src/main/resources/policies/vDNS.policy.operational.input.tosca.yaml
index 0f5498804..0f5498804 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.input.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vDNS.policy.operational.input.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.json b/models-examples/src/main/resources/policies/vDNS.policy.operational.output.json
index 5ce44e0ba..5ce44e0ba 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.json
+++ b/models-examples/src/main/resources/policies/vDNS.policy.operational.output.json
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.json b/models-examples/src/main/resources/policies/vDNS.policy.operational.output.tosca.json
index 2478ff07a..2478ff07a 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.json
+++ b/models-examples/src/main/resources/policies/vDNS.policy.operational.output.tosca.json
diff --git a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.yaml b/models-examples/src/main/resources/policies/vDNS.policy.operational.output.tosca.yaml
index a09a235a4..a09a235a4 100644
--- a/models-tosca/src/test/resources/policies/vDNS.policy.operational.output.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vDNS.policy.operational.output.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json b/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.json
index 93545a0dd..93545a0dd 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.json
+++ b/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.json
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml b/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml
index bce8b366f..bce8b366f 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.input.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml b/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml
index eb3165f6e..eb3165f6e 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vFirewall.policy.monitoring.output.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.json b/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.json
index 623a68992..623a68992 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.json
+++ b/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.json
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.json b/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.tosca.json
index 63c0d8b85..63c0d8b85 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.json
+++ b/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.tosca.json
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.yaml b/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.tosca.yaml
index ca36d5309..ca36d5309 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.input.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vFirewall.policy.operational.input.tosca.yaml
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.json b/models-examples/src/main/resources/policies/vFirewall.policy.operational.output.json
index bb8b907f8..bb8b907f8 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.json
+++ b/models-examples/src/main/resources/policies/vFirewall.policy.operational.output.json
diff --git a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.tosca.yaml b/models-examples/src/main/resources/policies/vFirewall.policy.operational.output.tosca.yaml
index 42ea511d9..42ea511d9 100644
--- a/models-tosca/src/test/resources/policies/vFirewall.policy.operational.output.tosca.yaml
+++ b/models-examples/src/main/resources/policies/vFirewall.policy.operational.output.tosca.yaml
diff --git a/models-tosca/src/test/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml b/models-examples/src/main/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml
index 5a093ddbf..5a093ddbf 100644
--- a/models-tosca/src/test/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml
+++ b/models-examples/src/main/resources/policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml
diff --git a/models-tosca/src/test/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml b/models-examples/src/main/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml
index 699cffd7e..699cffd7e 100644
--- a/models-tosca/src/test/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml
+++ b/models-examples/src/main/resources/policytypes/onap.policy.monitoring.cdap.tca.hi.lo.app.yaml
diff --git a/models-provider/pom.xml b/models-provider/pom.xml
index 755aea7cb..8da16edab 100644
--- a/models-provider/pom.xml
+++ b/models-provider/pom.xml
@@ -34,6 +34,12 @@
<dependencies>
<dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>common-parameters</artifactId>
+ <version>${policy.common.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.onap.policy.models</groupId>
<artifactId>policy-models-base</artifactId>
<version>${project.version}</version>
diff --git a/models-tosca/pom.xml b/models-tosca/pom.xml
index 56c8d7c15..019c5b3fd 100644
--- a/models-tosca/pom.xml
+++ b/models-tosca/pom.xml
@@ -40,6 +40,12 @@
</dependency>
<dependency>
+ <groupId>org.onap.policy.models</groupId>
+ <artifactId>policy-models-examples</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.onap.policy.common</groupId>
<artifactId>gson</artifactId>
<version>${policy.common.version}</version>
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java
index 8b6dd40d6..7eaf58b2e 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/ToscaEntityType.java
@@ -30,11 +30,10 @@ import java.util.TreeMap;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
-import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
+import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
-import javax.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -54,8 +53,7 @@ import org.onap.policy.models.base.PfValidationResult.ValidationResult;
/**
* Class to represent the EntrySchema of list/map property in TOSCA definition.
*/
-@Entity
-@Table(name = "ToscaEntityType")
+@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Data
@EqualsAndHashCode(callSuper = false)
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java
index 424373c3d..3f25b708f 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/serialization/ToscaPoliciesJsonAdapter.java
@@ -30,7 +30,6 @@ import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
import java.util.Iterator;
-import java.util.Map.Entry;
import lombok.NonNull;
import org.onap.policy.models.base.PfConceptKey;
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java
index 76721046e..3c9deb7df 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/serialization/LegacyOperationalPolicySerializationTest.java
@@ -31,7 +31,7 @@ import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.common.utils.resources.TextFileUtils;
+import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.base.PfValidationResult;
import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
import org.onap.policy.models.tosca.legacy.mapping.LegacyOperationalPolicyMapper;
@@ -57,9 +57,9 @@ public class LegacyOperationalPolicySerializationTest {
@Test
public void testJsonDeserialization() throws JsonSyntaxException, IOException {
- LegacyOperationalPolicy legacyOperationalPolicy = gson.fromJson(
- TextFileUtils.getTextFileAsString("src/test/resources/policies/vCPE.policy.operational.input.json"),
- LegacyOperationalPolicy.class);
+ String vcpePolicyJson = ResourceUtils.getResourceAsString("policies/vCPE.policy.operational.input.json");
+
+ LegacyOperationalPolicy legacyOperationalPolicy = gson.fromJson(vcpePolicyJson, LegacyOperationalPolicy.class);
ToscaServiceTemplate serviceTemplate =
new LegacyOperationalPolicyMapper().toToscaServiceTemplate(legacyOperationalPolicy);
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
index 4c3cbc85a..565fd6cb4 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
@@ -31,7 +31,7 @@ import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.common.utils.resources.TextFileUtils;
+import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.base.PfValidationResult;
import org.onap.policy.models.tosca.simple.concepts.ToscaServiceTemplate;
import org.onap.policy.models.tosca.simple.serialization.ToscaServiceTemplateMessageBodyHandler;
@@ -57,11 +57,9 @@ public class MonitoringPolicySerializationTest {
@Test
public void testJsonDeserialization() throws JsonSyntaxException, IOException {
- ToscaServiceTemplate serviceTemplate = gson.fromJson(
- TextFileUtils
- .getTextFileAsString("src/test/resources/policies/vCPE.policy.monitoring.input.tosca.json"),
- ToscaServiceTemplate.class);
+ String vcpePolicyJson = ResourceUtils.getResourceAsString("policies/vCPE.policy.monitoring.input.tosca.json");
+ ToscaServiceTemplate serviceTemplate = gson.fromJson(vcpePolicyJson, ToscaServiceTemplate.class);
assertNotNull(serviceTemplate);
LOGGER.info(serviceTemplate.validate(new PfValidationResult()).toString());
assertTrue(serviceTemplate.validate(new PfValidationResult()).isValid());
@@ -73,8 +71,9 @@ public class MonitoringPolicySerializationTest {
@Test
public void testYamlDeserialization() throws JsonSyntaxException, IOException {
Yaml yaml = new Yaml();
- Object yamlObject = yaml.load(TextFileUtils
- .getTextFileAsString("src/test/resources/policies/vCPE.policy.monitoring.input.tosca.yaml"));
+
+ String vcpePolicyYaml = ResourceUtils.getResourceAsString("policies/vCPE.policy.monitoring.input.tosca.yaml");
+ Object yamlObject = yaml.load(vcpePolicyYaml);
String yamlAsJsonString = new Gson().toJson(yamlObject);
diff --git a/pom.xml b/pom.xml
index c0df3294f..8d80849fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,6 +58,7 @@
<module>models-pap</module>
<module>models-decisions</module>
<module>models-provider</module>
+ <module>models-examples</module>
</modules>
<distributionManagement>
@@ -79,6 +80,15 @@
</dependency>
<dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>