From 20379d580cd91dfb5d7d945dc46a627445c87aa6 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Mon, 4 Jan 2021 13:36:34 +0000 Subject: Changed identifiers to concept identifiers The policy models tosca classes ToscaPolicyIdentifier and ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA concept, not just TOSCA policies so they are renamed to ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion respectively. The class ToscaPolicyTypeIdentifier is redundant and is replaced by ToscaConceptIdentifier. Issue-ID: POLICY-2900 Change-Id: I9ba3deae8eb4a8e51df5a40cdb8be8d9d23c5990 Signed-off-by: liamfallon --- .../onap/policy/api/main/rest/provider/TestPolicyProvider.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'main/src/test/java/org/onap') diff --git a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java index e71cfc54..e0f3375f 100644 --- a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java +++ b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java @@ -3,7 +3,7 @@ * ONAP Policy API * ================================================================================ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019-2020 Nordix Foundation. + * Modifications Copyright (C) 2019-2021 Nordix Foundation. * Modifications Copyright (C) 2020 Bell Canada. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -54,8 +54,7 @@ import org.onap.policy.models.pdp.enums.PdpState; 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.ToscaPolicyIdentifier; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; /** @@ -180,7 +179,7 @@ public class TestPolicyProvider { pdpSubGroup.setPdpType("type"); pdpSubGroup.setDesiredInstanceCount(123); pdpSubGroup.setSupportedPolicyTypes(new ArrayList<>()); - pdpSubGroup.getSupportedPolicyTypes().add(new ToscaPolicyTypeIdentifier(policyTypeId, policyTypeVersion)); + pdpSubGroup.getSupportedPolicyTypes().add(new ToscaConceptIdentifier(policyTypeId, policyTypeVersion)); pdpGroup.getPdpSubgroups().add(pdpSubGroup); Pdp pdp = new Pdp(); @@ -215,7 +214,7 @@ public class TestPolicyProvider { // Update pdpSubGroup pdpSubGroup.setPolicies(new ArrayList<>()); - pdpSubGroup.getPolicies().add(new ToscaPolicyIdentifier(policyId, policyVersion)); + pdpSubGroup.getPolicies().add(new ToscaConceptIdentifier(policyId, policyVersion)); assertEquals(1, databaseProvider.createPdpGroups(groupList).get(0).getPdpSubgroups().get(0).getPolicies().size()); -- cgit 1.2.3-korg