aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2020-03-05 08:14:58 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-05 08:14:58 +0000
commit6926aa36f0167efb4d6b25c6e3fd76846379150f (patch)
tree6db094b0e241549c9585980bb2c3734f076cd6b9
parent4eeea438faf24af9d21c3167806734a65d0ae6c6 (diff)
parent34197ebfa853c7e8b501203f02174901624e761e (diff)
Merge "Fix tca monitoring tca_policy type"
-rw-r--r--models-examples/src/main/resources/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml4
-rw-r--r--models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java6
2 files changed, 2 insertions, 8 deletions
diff --git a/models-examples/src/main/resources/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml b/models-examples/src/main/resources/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml
index 5fa4308db..dc16da224 100644
--- a/models-examples/src/main/resources/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml
+++ b/models-examples/src/main/resources/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml
@@ -9,10 +9,8 @@ policy_types:
version: 1.0.0
properties:
tca_policy:
- type: map
+ type: onap.datatypes.monitoring.tca_policy
description: TCA Policy JSON
- entry_schema:
- type: onap.datatypes.monitoring.tca_policy
data_types:
onap.datatypes.monitoring.metricsPerEventName:
derived_from: tosca.datatypes.Root
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java
index 270bc6c77..ef4123084 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java
@@ -40,7 +40,6 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
import org.onap.policy.models.tosca.simple.concepts.JpaToscaConstraintLogical;
import org.onap.policy.models.tosca.simple.concepts.JpaToscaConstraintValidValues;
import org.onap.policy.models.tosca.simple.concepts.JpaToscaDataType;
-import org.onap.policy.models.tosca.simple.concepts.JpaToscaEntrySchema;
import org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicyType;
import org.onap.policy.models.tosca.simple.concepts.JpaToscaProperty;
import org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate;
@@ -170,12 +169,9 @@ public class MonitoringPolicyTypeSerializationTest {
assertEquals("onap.policies.monitoring.cdap.tca.hi.lo.app", property.getKey().getParentKeyName());
assertEquals(VERSION_100, property.getKey().getParentKeyVersion());
assertEquals("tca_policy", property.getKey().getLocalName());
- assertEquals("map", property.getType().getName());
+ assertEquals(TCA, property.getType().getName());
assertEquals("TCA Policy JSON", property.getDescription());
- JpaToscaEntrySchema entrySchema = property.getEntrySchema();
- assertEquals(TCA, entrySchema.getType().getName());
-
// Check data_types
Map<PfConceptKey, JpaToscaDataType> dataTypesConceptMap = serviceTemplate.getDataTypes().getConceptMap();
assertTrue(dataTypesConceptMap.size() == 3);