diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2021-01-06 14:13:45 -0500 |
---|---|---|
committer | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2021-01-06 14:13:51 -0500 |
commit | bd1744d82d6e8d817d81f5ef607a8169c7c7591f (patch) | |
tree | 11489a64e1a9ecb7444ea3b4426ab5ee0f2dd30b | |
parent | 91b2d890d8b868fa0e0047932a89391bd31a16aa (diff) |
Changed identifiers to concept identifiers
The class ToscaPolicyIdentifierOptVersion is replaced by ToscaConceptIdentifierOptVersion in policy/models. Made the corresponding changes in policy/distribution.
Issue-ID: POLICY-2900
Change-Id: I10fb99ecd4f52a811cde49fbc9e35ae2eb28596a
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
-rw-r--r-- | plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java b/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java index 1f580388..242573cc 100644 --- a/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java +++ b/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. * Modifications Copyright (C) 2020 AT&T Inc. + * Modifications Copyright (C) 2021 Bell Canada. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,9 +41,9 @@ import org.onap.policy.common.parameters.ParameterService; import org.onap.policy.distribution.forwarding.PolicyForwarder; import org.onap.policy.distribution.forwarding.PolicyForwardingException; import org.onap.policy.models.pap.concepts.PdpDeployPolicies; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifierOptVersion; import org.onap.policy.models.tosca.authorative.concepts.ToscaEntity; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifierOptVersion; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -124,13 +125,13 @@ public class LifecycleApiPolicyForwarder implements PolicyForwarder { private Response deployPolicy(final ToscaServiceTemplate toscaServiceTemplate) throws PolicyForwardingException { final PdpDeployPolicies pdpPolicies = new PdpDeployPolicies(); - final List<ToscaPolicyIdentifierOptVersion> policyIdentifierList = new ArrayList<>(); + final List<ToscaConceptIdentifierOptVersion> policyIdentifierList = new ArrayList<>(); for (final Map<String, ToscaPolicy> policyMap : toscaServiceTemplate.getToscaTopologyTemplate().getPolicies()) { final String policyId = policyMap.entrySet().iterator().next().getValue().getMetadata().get("policy-id"); final String policyVersion = policyMap.entrySet().iterator().next().getValue().getMetadata().get("policy-version"); - final ToscaPolicyIdentifierOptVersion toscaPolicyIdentifier = - new ToscaPolicyIdentifierOptVersion(policyId, policyVersion); + final ToscaConceptIdentifierOptVersion toscaPolicyIdentifier = + new ToscaConceptIdentifierOptVersion(policyId, policyVersion); policyIdentifierList.add(toscaPolicyIdentifier); } pdpPolicies.setPolicies(policyIdentifierList); |