diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2019-11-05 09:35:30 -0500 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2019-12-05 13:38:37 -0500 |
commit | 19093bbdec52fbe97fa404670aba4af12dc750e0 (patch) | |
tree | ab56ffffea579650f56d3f6e388d201639adbc9c /models-provider/src/test/java | |
parent | e81da8dac30b0525dd0f84e3518bcc452695e224 (diff) |
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 <pdragosh@research.att.com>
Diffstat (limited to 'models-provider/src/test/java')
2 files changed, 17 insertions, 0 deletions
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 @@ -209,6 +209,15 @@ public class PolicyPersistenceTest { 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 @@ -177,6 +177,14 @@ public class PolicyToscaPersistenceTest { 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); |