diff options
9 files changed, 790 insertions, 93 deletions
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java b/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java index d259fa260..b94900430 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java @@ -322,7 +322,7 @@ public class PfConceptContainer<C extends PfConcept, A extends PfNameVersion> ex * @return conceptKeyVersion */ public Set<C> getAllNamesAndVersions(final String conceptKeyName, final String conceptKeyVersion) { - if (conceptKeyName == null || conceptKeyVersion == null) { + if (conceptKeyName == null || conceptKeyVersion == null || PfKey.NULL_KEY_VERSION.equals(conceptKeyVersion)) { return getAll(conceptKeyName, conceptKeyVersion); } else { final Set<C> returnSet = new TreeSet<>(); diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfUtils.java b/models-base/src/main/java/org/onap/policy/models/base/PfUtils.java index 8f1040bfe..fa7d21f9d 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfUtils.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfUtils.java @@ -26,7 +26,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.function.Function; +import java.util.function.UnaryOperator; import java.util.stream.Collectors; import javax.ws.rs.core.Response; @@ -76,7 +76,7 @@ public final class PfUtils { * @param defaultValue value to be returned if source is {@code null} * @return a new list, containing mappings of all of the items in the original list */ - public static <T> List<T> mapList(List<T> source, Function<T, T> mapFunc, List<T> defaultValue) { + public static <T> List<T> mapList(List<T> source, UnaryOperator<T> mapFunc, List<T> defaultValue) { if (source == null) { return defaultValue; } @@ -93,7 +93,7 @@ public final class PfUtils { * @return a new list, containing mappings of all of the items in the original list, * or {@code null} if the source is {@code null} */ - public static <T> List<T> mapList(List<T> source, Function<T, T> mapFunc) { + public static <T> List<T> mapList(List<T> source, UnaryOperator<T> mapFunc) { return mapList(source, mapFunc, null); } @@ -106,7 +106,7 @@ public final class PfUtils { * @param defaultValue value to be returned if source is {@code null} * @return a new map, containing mappings of all of the items in the original map */ - public static <T> Map<String, T> mapMap(Map<String, T> source, Function<T, T> mapFunc, + public static <T> Map<String, T> mapMap(Map<String, T> source, UnaryOperator<T> mapFunc, Map<String, T> defaultValue) { if (source == null) { return defaultValue; @@ -129,7 +129,7 @@ public final class PfUtils { * @return a new map, containing mappings of all of the items in the original map, * or {@code null} if the source is {@code null} */ - public static <T> Map<String, T> mapMap(Map<String, T> source, Function<T, T> mapFunc) { + public static <T> Map<String, T> mapMap(Map<String, T> source, UnaryOperator<T> mapFunc) { return mapMap(source, mapFunc, null); } diff --git a/models-base/src/main/java/org/onap/policy/models/base/Validated.java b/models-base/src/main/java/org/onap/policy/models/base/Validated.java index 7a0a8377b..26a8a5260 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/Validated.java +++ b/models-base/src/main/java/org/onap/policy/models/base/Validated.java @@ -70,6 +70,7 @@ public class Validated { * @param result where to place the result * @return the result */ + @SuppressWarnings("java:S3252") // squelch sonar warning for using PkConceptKey instead of PfKeyImpl public PfValidationResult validateNotNull(@NonNull PfConceptKey value, @NonNull PfValidationResult result) { if (PfConceptKey.NULL_KEY_NAME.equals(value.getName())) { diff --git a/models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java b/models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java index 600605ae1..e28fa4cdf 100644 --- a/models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java +++ b/models-base/src/test/java/org/onap/policy/models/base/PfConceptContainerTest.java @@ -179,6 +179,8 @@ public class PfConceptContainerTest { assertEquals(conceptKey, returnSet.iterator().next().getKey()); returnSet = container.getAllNamesAndVersions(conceptKey.getName(), null); assertEquals(conceptKey, returnSet.iterator().next().getKey()); + returnSet = container.getAllNamesAndVersions(conceptKey.getName(), "0.0.0"); + assertEquals(conceptKey, returnSet.iterator().next().getKey()); returnSet = container.getAllNamesAndVersions("IDontExist", "1.0.0"); assertTrue(returnSet.isEmpty()); diff --git a/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java b/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java index 6707e70a2..d78172436 100644 --- a/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java +++ b/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java @@ -586,7 +586,7 @@ public class DefaultPfDao implements PfDao { * @return the updated query string */ private <T extends PfConcept> String setQueryTable(final String queryString, final Class<T> tableClass) { - return queryString.replaceAll(TABLE_TOKEN, tableClass.getSimpleName()); + return queryString.replace(TABLE_TOKEN, tableClass.getSimpleName()); } /** diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java index ac700c866..dcb5d1772 100644 --- a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java +++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java @@ -29,10 +29,10 @@ public class ControlLoopTargetTypeTest { @Test public void test() { - assertEquals("VM", ControlLoopTargetType.VM); - assertEquals("VF", ControlLoopTargetType.VF); - assertEquals("VFC", ControlLoopTargetType.VFC); - assertEquals("VNF", ControlLoopTargetType.VNF); - assertEquals("PNF", ControlLoopTargetType.PNF); + assertEquals(ControlLoopTargetType.VM, "VM"); + assertEquals(ControlLoopTargetType.VF, "VF"); + assertEquals(ControlLoopTargetType.VFC, "VFC"); + assertEquals(ControlLoopTargetType.VNF, "VNF"); + assertEquals(ControlLoopTargetType.PNF, "PNF"); } } diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/revisionhierarchy/HierarchyFetchTest.java b/models-provider/src/test/java/org/onap/policy/models/provider/revisionhierarchy/HierarchyFetchTest.java index 2f36f9a3c..043968bc7 100644 --- a/models-provider/src/test/java/org/onap/policy/models/provider/revisionhierarchy/HierarchyFetchTest.java +++ b/models-provider/src/test/java/org/onap/policy/models/provider/revisionhierarchy/HierarchyFetchTest.java @@ -21,8 +21,12 @@ package org.onap.policy.models.provider.revisionhierarchy; import static org.assertj.core.api.Assertions.assertThatCode; +import static org.junit.Assert.assertEquals; import java.util.Base64; +import java.util.Iterator; +import java.util.List; +import java.util.Map; import org.junit.BeforeClass; import org.junit.Test; @@ -31,6 +35,8 @@ import org.onap.policy.common.utils.resources.TextFileUtils; import org.onap.policy.models.provider.PolicyModelsProvider; import org.onap.policy.models.provider.PolicyModelsProviderFactory; import org.onap.policy.models.provider.PolicyModelsProviderParameters; +import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; +import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; public class HierarchyFetchTest { @@ -61,6 +67,269 @@ public class HierarchyFetchTest { databaseProvider.createPolicies(serviceTemplate); }).doesNotThrowAnyException(); + ToscaServiceTemplate fetchedServiceTemplate = databaseProvider.getPolicies(null, null); + + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertLatestPolicyTypesAreReturned(fetchedServiceTemplate); + assertEquals(12, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicyTypes(null, null); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertLatestPolicyTypesAreReturned(fetchedServiceTemplate); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0", null); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(1, fetchedServiceTemplate.getPolicyTypes().size()); + ToscaPolicyType fetchedPolicyType = fetchedServiceTemplate.getPolicyTypes().values().iterator().next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + assertEquals(3, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0", "1.0.0"); + assertOldDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(1, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyType = fetchedServiceTemplate.getPolicyTypes().values().iterator().next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("1.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0", "1.1.0"); + assertOldDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(1, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyType = fetchedServiceTemplate.getPolicyTypes().values().iterator().next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("2.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0", "1.2.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(1, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyType = fetchedServiceTemplate.getPolicyTypes().values().iterator().next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1", null); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(2, fetchedServiceTemplate.getPolicyTypes().size()); + Iterator<ToscaPolicyType> fetchedPolicyTypeIterator = + fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + assertEquals(3, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1", "1.0.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(2, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("1.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1", "1.1.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(2, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("2.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1", "1.2.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(2, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1.2", null); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(3, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + assertEquals(3, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1.2", "1.0.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(3, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2", fetchedPolicyType.getName()); + assertEquals("1.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1.2", "1.1.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(3, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2", fetchedPolicyType.getName()); + assertEquals("2.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1.2", "1.2.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(3, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1.2.3", null); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(4, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2.3", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + assertEquals(3, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1.2.3", "1.0.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(4, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2.3", fetchedPolicyType.getName()); + assertEquals("1.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1.2.3", "1.1.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(4, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2.3", fetchedPolicyType.getName()); + assertEquals("2.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + + fetchedServiceTemplate = databaseProvider.getPolicies("onap.policies.PolicyLevel0.1.2.3", "1.2.0"); + assertLatestDataTypesAreReturned(fetchedServiceTemplate); + assertEquals(4, fetchedServiceTemplate.getPolicyTypes().size()); + fetchedPolicyTypeIterator = fetchedServiceTemplate.getPolicyTypes().values().iterator(); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + fetchedPolicyType = fetchedPolicyTypeIterator.next(); + assertEquals("onap.policies.PolicyTypeLevel0.1.2.3", fetchedPolicyType.getName()); + assertEquals("3.0.0", fetchedPolicyType.getVersion()); + assertEquals(1, countReturnedPolicies(fetchedServiceTemplate)); + databaseProvider.close(); } + + private void assertOldDataTypesAreReturned(final ToscaServiceTemplate fetchedServiceTemplate) { + assertEquals(6, fetchedServiceTemplate.getDataTypes().size()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType0").getVersion()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType1").getVersion()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType2").getVersion()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType3").getVersion()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType4").getVersion()); + assertEquals("3.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType5").getVersion()); + } + + private void assertLatestDataTypesAreReturned(final ToscaServiceTemplate fetchedServiceTemplate) { + assertEquals(7, fetchedServiceTemplate.getDataTypes().size()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType0").getVersion()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType1").getVersion()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType2").getVersion()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType3").getVersion()); + assertEquals("1.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType4").getVersion()); + assertEquals("3.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType5").getVersion()); + assertEquals("2.0.0", fetchedServiceTemplate.getDataTypes().get("policy.data.DataType6").getVersion()); + } + + private void assertLatestPolicyTypesAreReturned(final ToscaServiceTemplate fetchedServiceTemplate) { + assertEquals(4, fetchedServiceTemplate.getPolicyTypes().size()); + + for (ToscaPolicyType policyType : fetchedServiceTemplate.getPolicyTypes().values()) { + assertEquals("3.0.0", policyType.getVersion()); + } + } + + private int countReturnedPolicies(final ToscaServiceTemplate fetchedServiceTemplate) { + List<Map<String, ToscaPolicy>> policyMapList = fetchedServiceTemplate.getToscaTopologyTemplate().getPolicies(); + + int totalPolicies = 0; + for (Map<String, ToscaPolicy> policyMap : policyMapList) { + totalPolicies += policyMap.size(); + } + + return totalPolicies; + } } diff --git a/models-provider/src/test/resources/servicetemplates/MultipleRevisionServiceTemplate.yaml b/models-provider/src/test/resources/servicetemplates/MultipleRevisionServiceTemplate.yaml index 5f250e022..256c68c4e 100644 --- a/models-provider/src/test/resources/servicetemplates/MultipleRevisionServiceTemplate.yaml +++ b/models-provider/src/test/resources/servicetemplates/MultipleRevisionServiceTemplate.yaml @@ -257,35 +257,123 @@ topology_template: - 456 - 789 dataType0Property1: - - dataType3Property0: dataType3Property0 value 0 - - dataType3Property0: dataType3Property0 value 1 - - dataType3Property0: dataType3Property0 value 2 - - dataType3Property0: dataType3Property0 value 3 + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 policyLevel0Property1: - - dataType1Property0: + - dataType1Property0: dataType4Property0: dataType4Property0 value dataType4Property1: - 123 - 456 - 789 - dataType1Property1: - - dataType5Property0: dataType5Property0 value 0 - - dataType5Property0: dataType5Property0 value 1 - - dataType5Property0: dataType5Property0 value 2 - - dataType5Property0: dataType5Property0 value 3 - - dataType1Property0: + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: dataType4Property0: dataType4Property0 value dataType4Property1: - 123 - 456 - 789 - dataType1Property1: - - dataType5Property0: dataType5Property0 value 0 - - dataType5Property0: dataType5Property0 value 1 - - dataType5Property0: dataType5Property0 value 2 - - dataType5Property0: dataType5Property0 value 3 - - onap.policies.PolicyLevel0.1: + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - onap.policies.PolicyLevel0: + type: onap.policies.PolicyTypeLevel0 + version: 1.1.0 + type_version: 2.0.0 + description: Level 0 policy + properties: + policyLevel0Property0: + dataType0Property0: + dataType2Property0: dataType2Property0 value + dataType2Property1: + - 123 + - 456 + - 789 + dataType0Property1: + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 + policyLevel0Property1: + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0V2Property2: + dataType5Property0: policyLevel0V2Property2D5P0 value + - onap.policies.PolicyLevel0: type: onap.policies.PolicyTypeLevel0 + version: 1.2.0 + type_version: 3.0.0 + description: Level 0 policy + properties: + policyLevel0Property0: + dataType0Property0: + dataType2Property0: dataType2Property0 value + dataType2Property1: + - 123 + - 456 + - 789 + dataType0Property1: + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 + policyLevel0Property1: + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0V2Property2: + dataType5Property0: policyLevel0V2Property2D5P0 value + policyLevel0V3Property3: + dataType6Property0: 1223456 + - onap.policies.PolicyLevel0.1: + type: onap.policies.PolicyTypeLevel0.1 version: 1.0.0 type_version: 1.0.0 description: Level 0 policy @@ -298,37 +386,138 @@ topology_template: - 456 - 789 dataType0Property1: - - dataType3Property0: dataType3Property0 value 0 - - dataType3Property0: dataType3Property0 value 1 - - dataType3Property0: dataType3Property0 value 2 - - dataType3Property0: dataType3Property0 value 3 + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 + policyLevel0Property1: + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType5Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + - onap.policies.PolicyLevel0.1: + type: onap.policies.PolicyTypeLevel0.1 + version: 1.1.0 + type_version: 2.0.0 + description: Level 0 policy + properties: + policyLevel0Property0: + dataType0Property0: + dataType2Property0: dataType2Property0 value + dataType2Property1: + - 123 + - 456 + - 789 + dataType0Property1: + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 + policyLevel0Property1: + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType5Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + policyLevel0.1V2Property2: + dataType5Property0: policyLevel0.1V2Property2D5P0 value + dataType5V2Property1: policyLevel0.1V2Property2D5V2P1 value + - onap.policies.PolicyLevel0.1: + type: onap.policies.PolicyTypeLevel0.1 + version: 1.2.0 + type_version: 3.0.0 + description: Level 0 policy + properties: + policyLevel0Property0: + dataType0Property0: + dataType2Property0: dataType2Property0 value + dataType2Property1: + - 123 + - 456 + - 789 + dataType0Property1: + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 policyLevel0Property1: - - dataType1Property0: + - dataType1Property0: dataType4Property0: dataType4Property0 value dataType4Property1: - 123 - 456 - 789 - dataType1Property1: - - dataType5Property0: dataType5Property0 value 0 - - dataType5Property0: dataType5Property0 value 1 - - dataType5Property0: dataType5Property0 value 2 - - dataType5Property0: dataType5Property0 value 3 - - dataType1Property0: + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: dataType4Property0: dataType4Property0 value dataType4Property1: - 123 - 456 - 789 - dataType1Property1: - - dataType5Property0: dataType5Property0 value 0 - - dataType5Property0: dataType5Property0 value 1 - - dataType5Property0: dataType5Property0 value 2 - - dataType5Property0: dataType5Property0 value 3 - policyLevel0.1Property0: policyLevel0.1Property0 value - policyLevel0.1Property1: 123 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType5Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + policyLevel0.1V2Property2: + dataType5Property0: policyLevel0.1V2Property2D5P0 value + dataType5V2Property1: policyLevel0.1V2Property2D5V2P1 value + policyLevel0V3Property3: + dataType6Property0: 1223456 + dataType6V2Property1: 12211 - onap.policies.PolicyLevel0.1.2: - type: onap.policies.PolicyTypeLevel0 + type: onap.policies.PolicyTypeLevel0.1.2 version: 1.0.0 type_version: 1.0.0 description: Level 0 policy @@ -341,39 +530,155 @@ topology_template: - 456 - 789 dataType0Property1: - - dataType3Property0: dataType3Property0 value 0 - - dataType3Property0: dataType3Property0 value 1 - - dataType3Property0: dataType3Property0 value 2 - - dataType3Property0: dataType3Property0 value 3 + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 + policyLevel0Property1: + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType5Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + policyLevel0.1.2V2Property2: + dataType5Property0: policyLevel0.1.2Property2 value + policyLevel0.1.2V3Property3: + dataType6Property0: 456 + - onap.policies.PolicyLevel0.1.2: + type: onap.policies.PolicyTypeLevel0.1.2 + version: 1.1.0 + type_version: 2.0.0 + description: Level 0 policy + properties: + policyLevel0Property0: + dataType0Property0: + dataType2Property0: dataType2Property0 value + dataType2Property1: + - 123 + - 456 + - 789 + dataType0Property1: + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 + policyLevel0Property1: + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType5Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + policyLevel0.1.2Property0: + dataType5Property0: policyLevel0.1.2Property0 value + dataType5V2Property1: policyLevel0.1V2Property0D5V2P1 value + dataType5V3Property2: policyLevel0.1V2Property0D5V3P2 value + policyLevel0.1.2Property1: + dataType6Property0: 456 + dataType6V2Property1: 12211 + policyLevel0.1.2V2Property2: + dataType5Property0: policyLevel0.1.2Property2 value + dataType5V2Property1: policyLevel0.1V2Property2D5V2P1 value + dataType5V3Property2: policyLevel0.1V2Property2D5V3P2 value + - onap.policies.PolicyLevel0.1.2: + type: onap.policies.PolicyTypeLevel0.1.2 + version: 1.2.0 + type_version: 3.0.0 + description: Level 0 policy + properties: + policyLevel0Property0: + dataType0Property0: + dataType2Property0: dataType2Property0 value + dataType2Property1: + - 123 + - 456 + - 789 + dataType0Property1: + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 policyLevel0Property1: - - dataType1Property0: + - dataType1Property0: dataType4Property0: dataType4Property0 value dataType4Property1: - 123 - 456 - 789 - dataType1Property1: - - dataType5Property0: dataType5Property0 value 0 - - dataType5Property0: dataType5Property0 value 1 - - dataType5Property0: dataType5Property0 value 2 - - dataType5Property0: dataType5Property0 value 3 - - dataType1Property0: + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: dataType4Property0: dataType4Property0 value dataType4Property1: - 123 - 456 - 789 - dataType1Property1: - - dataType5Property0: dataType5Property0 value 0 - - dataType5Property0: dataType5Property0 value 1 - - dataType5Property0: dataType5Property0 value 2 - - dataType5Property0: dataType5Property0 value 3 - policyLevel0.1Property0: policyLevel0.1Property0 value - policyLevel0.1Property1: 123 - policyLevel0.1.2Property0: policyLevel0.1.2Property0 value - policyLevel0.1.2Property1: 456 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType5Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + policyLevel0.1.2Property0: + dataType5Property0: policyLevel0.1.2Property0 value + policyLevel0.1.2Property1: + dataType6Property0: 456 + policyLevel0.1.2V2Property2: + dataType5Property0: policyLevel0.1.2Property2 value + dataType5V2Property1: policyLevel0.1V2Property2D5V2P1 value + dataType5V3Property2: policyLevel0.1V2Property2D5V3P2 value + policyLevel0.1.2V3Property3: + dataType6Property0: 456 + dataType6V2Property1: 12211 - onap.policies.PolicyLevel0.1.2.3: - type: onap.policies.PolicyTypeLevel0 + type: onap.policies.PolicyTypeLevel0.1.2.3 version: 1.0.0 type_version: 1.0.0 description: Level 0 policy @@ -386,36 +691,156 @@ topology_template: - 456 - 789 dataType0Property1: - - dataType3Property0: dataType3Property0 value 0 - - dataType3Property0: dataType3Property0 value 1 - - dataType3Property0: dataType3Property0 value 2 - - dataType3Property0: dataType3Property0 value 3 + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 + policyLevel0Property1: + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType5Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + policyLevel0.1.2Property0: + dataType5Property0: policyLevel0.1.2Property0 value + policyLevel0.1.2Property1: + dataType6Property0: 456 + policyLevel0.1.2.3Property0: + dataType5Property0: policyLevel0.1.2.3Property0 value + policyLevel0.1.2.3Property1: + dataType6Property0: 789 + - onap.policies.PolicyLevel0.1.2.3: + type: onap.policies.PolicyTypeLevel0.1.2.3 + version: 1.1.0 + type_version: 2.0.0 + description: Level 0 policy + properties: + policyLevel0Property0: + dataType0Property0: + dataType2Property0: dataType2Property0 value + dataType2Property1: + - 123 + - 456 + - 789 + dataType0Property1: + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 + policyLevel0Property1: + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: + dataType4Property0: dataType4Property0 value + dataType4Property1: + - 123 + - 456 + - 789 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType6Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + policyLevel0.1.2Property0: + dataType5Property0: policyLevel0.1.2Property0 value + policyLevel0.1.2Property1: + dataType6Property0: 456 + policyLevel0.1.2.3Property0: + dataType5Property0: policyLevel0.1.2.3Property0 value + policyLevel0.1.2.3Property1: + dataType6Property0: 789 + policyLevel0.1.2.3V2Property2: + dataType5Property0: policyLevel0.1.2.3Property2 DT5P0 value + dataType5V2Property1: policyLevel0.1.2.3Property2 DT5V2P1 value + - onap.policies.PolicyLevel0.1.2.3: + type: onap.policies.PolicyTypeLevel0.1.2.3 + version: 1.2.0 + type_version: 3.0.0 + description: Level 0 policy + properties: + policyLevel0Property0: + dataType0Property0: + dataType2Property0: dataType2Property0 value + dataType2Property1: + - 123 + - 456 + - 789 + dataType0Property1: + - dataType3Property0: dataType3Property0 value 0 + - dataType3Property0: dataType3Property0 value 1 + - dataType3Property0: dataType3Property0 value 2 + - dataType3Property0: dataType3Property0 value 3 policyLevel0Property1: - - dataType1Property0: + - dataType1Property0: dataType4Property0: dataType4Property0 value dataType4Property1: - 123 - 456 - 789 - dataType1Property1: - - dataType5Property0: dataType5Property0 value 0 - - dataType5Property0: dataType5Property0 value 1 - - dataType5Property0: dataType5Property0 value 2 - - dataType5Property0: dataType5Property0 value 3 - - dataType1Property0: + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + - dataType1Property0: dataType4Property0: dataType4Property0 value dataType4Property1: - 123 - 456 - 789 - dataType1Property1: - - dataType5Property0: dataType5Property0 value 0 - - dataType5Property0: dataType5Property0 value 1 - - dataType5Property0: dataType5Property0 value 2 - - dataType5Property0: dataType5Property0 value 3 - policyLevel0.1Property0: policyLevel0.1Property0 value - policyLevel0.1Property1: 123 - policyLevel0.1.2Property0: policyLevel0.1.2Property0 value - policyLevel0.1.2Property1: 456 - policyLevel0.1.2.3Property0: policyLevel0.1.2.3Property0 value - policyLevel0.1.2.3Property1: 456 + dataType1Property1: + - dataType5Property0: dataType5Property0 value 0 + - dataType5Property0: dataType5Property0 value 1 + - dataType5Property0: dataType5Property0 value 2 + - dataType5Property0: dataType5Property0 value 3 + policyLevel0.1Property0: + dataType6Property0: policyLevel0.1Property0 value + policyLevel0.1Property1: + dataType6Property0: 123 + policyLevel0.1.2Property0: + dataType5Property0: policyLevel0.1.2Property0 value + policyLevel0.1.2Property1: + dataType6Property0: 456 + policyLevel0.1.2.3Property0: + dataType5Property0: policyLevel0.1.2.3Property0 value + policyLevel0.1.2.3V2Property2: + dataType5Property0: policyLevel0.1.2.3Property2 DT5P0 value + dataType5V2Property0: policyLevel0.1.2.3Property2 DT5V2P1 value + dataType5V3Property2: policyLevel0.1.2.3Property2 DT5V3P2 value + policyLevel0.1.2.3Property1: + dataType6Property0: 789 + dataType6V2Property1: 10
\ No newline at end of file @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.parent</groupId> <artifactId>integration</artifactId> - <version>3.1.1-SNAPSHOT</version> + <version>3.1.1</version> <relativePath /> </parent> @@ -41,7 +41,7 @@ <properties> <derby.version>10.13.1.1</derby.version> <javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version> - <policy.common.version>1.6.2-SNAPSHOT</policy.common.version> + <policy.common.version>1.6.2</policy.common.version> </properties> <modules> |