From 19093bbdec52fbe97fa404670aba4af12dc750e0 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 5 Nov 2019 09:35:30 -0500 Subject: Add new Operational Policy Type New operational policy type for Frankfurt. Updating examples. added sample CLAMP metadata. Issue-ID: POLICY-2217 Change-Id: I941c3a4187a4d164bf793ef2d82c34fccc1a2c35 Signed-off-by: Pamela Dragosh --- .../onap/policy/models/provider/impl/PolicyPersistenceTest.java | 9 +++++++++ .../policy/models/provider/impl/PolicyToscaPersistenceTest.java | 8 ++++++++ 2 files changed, 17 insertions(+) (limited to 'models-provider/src/test') diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java index 1f577ae21..8e0dcb31c 100644 --- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java +++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyPersistenceTest.java @@ -208,6 +208,15 @@ public class PolicyPersistenceTest { assertNotNull(toscaServiceTemplatePolicyType); databaseProvider.createPolicyTypes(toscaServiceTemplatePolicyType); + yamlObject = new Yaml().load( + ResourceUtils.getResourceAsString("policytypes/onap.policies.controlloop.operational.Common.yaml")); + yamlAsJsonString = new StandardCoder().encode(yamlObject); + + toscaServiceTemplatePolicyType = standardCoder.decode(yamlAsJsonString, ToscaServiceTemplate.class); + + assertNotNull(toscaServiceTemplatePolicyType); + databaseProvider.createPolicyTypes(toscaServiceTemplatePolicyType); + yamlObject = new Yaml().load( ResourceUtils.getResourceAsString("policytypes/onap.policies.controlloop.guard.FrequencyLimiter.yaml")); yamlAsJsonString = new StandardCoder().encode(yamlObject); diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java index 9012d84b1..1aedcaf83 100644 --- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java +++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/PolicyToscaPersistenceTest.java @@ -176,6 +176,14 @@ public class PolicyToscaPersistenceTest { assertNotNull(toscaServiceTemplatePolicyType); databaseProvider.createPolicyTypes(toscaServiceTemplatePolicyType); + yamlObject = new Yaml().load( + ResourceUtils.getResourceAsString("policytypes/onap.policies.controlloop.operational.Common.yaml")); + yamlAsJsonString = new StandardCoder().encode(yamlObject); + + toscaServiceTemplatePolicyType = standardCoder.decode(yamlAsJsonString, ToscaServiceTemplate.class); + + assertNotNull(toscaServiceTemplatePolicyType); + databaseProvider.createPolicyTypes(toscaServiceTemplatePolicyType); yamlObject = new Yaml().load( ResourceUtils.getResourceAsString("policytypes/onap.policies.controlloop.guard.FrequencyLimiter.yaml")); yamlAsJsonString = new StandardCoder().encode(yamlObject); -- cgit 1.2.3-korg