From 2ed313e69cfd0a587f072079e23ab8f6499518db Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 7 Jan 2020 18:26:53 +0000 Subject: Store and return data types for policies In this change, the data types of policy types are persisted to the database. All policy types currently in the database are returned on all policy type get requests. This will be made more intelligent in the next review. Issue-ID: POLICY-2315 Change-Id: I10065ab9b90e72114a453494fc706d8aabc50c0a Signed-off-by: liamfallon --- .../src/test/resources/META-INF/persistence.xml | 9 +- models-tosca/pom.xml | 7 ++ .../tosca/simple/provider/SimpleToscaProvider.java | 21 +++- .../onap/policy/models/tosca/utils/ToscaUtils.java | 106 ++++++++++++++++----- .../simple/provider/SimpleToscaProviderTest.java | 98 +++++++++++++++++++ .../policy/models/tosca/utils/ToscaUtilsTest.java | 31 ++++++ 6 files changed, 243 insertions(+), 29 deletions(-) diff --git a/models-provider/src/test/resources/META-INF/persistence.xml b/models-provider/src/test/resources/META-INF/persistence.xml index 48f1b10a7..4306413a5 100644 --- a/models-provider/src/test/resources/META-INF/persistence.xml +++ b/models-provider/src/test/resources/META-INF/persistence.xml @@ -1,20 +1,20 @@ @@ -26,6 +26,7 @@ org.onap.policy.models.dao.converters.CDataConditioner org.onap.policy.models.dao.converters.Uuid2String org.onap.policy.models.base.PfConceptKey + org.onap.policy.models.tosca.simple.concepts.JpaToscaDataType org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicyType org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicy org.onap.policy.models.pdp.persistence.concepts.JpaPdpGroup diff --git a/models-tosca/pom.xml b/models-tosca/pom.xml index b04d2a5ad..eaa1f475d 100644 --- a/models-tosca/pom.xml +++ b/models-tosca/pom.xml @@ -1,6 +1,7 @@