diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2022-02-14 10:08:16 +0000 |
---|---|---|
committer | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2022-02-14 10:08:16 +0000 |
commit | ee04ffd34d67563f1b33a4fbb1eb17e948725d0f (patch) | |
tree | be8f99a5740aea644f3493e96dcbaa5f1765e5b3 | |
parent | a3a72c1a842fa83e4b3163aa6a0a4cde2d797e3a (diff) |
Fix distribution to accommodate object values in policy metadata
Issue-ID: POLICY-3832
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I1cb539156acee3a63c9ffa432ec2371941bf9acd
-rw-r--r-- | plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java | 8 |
1 files changed, 5 insertions, 3 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 4d0a8f70..3a380843 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 @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. + * Copyright (C) 2019,2022 Nordix Foundation. * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2021 Bell Canada. * ================================================================================ @@ -129,9 +129,11 @@ public class LifecycleApiPolicyForwarder implements PolicyForwarder { final var pdpPolicies = new PdpDeployPolicies(); 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 policyId = + String.valueOf(policyMap.entrySet().iterator().next().getValue().getMetadata().get("policy-id")); final String policyVersion = - policyMap.entrySet().iterator().next().getValue().getMetadata().get("policy-version"); + String.valueOf(policyMap.entrySet().iterator().next().getValue().getMetadata() + .get("policy-version")); final var toscaPolicyIdentifier = new ToscaConceptIdentifierOptVersion(policyId, policyVersion); policyIdentifierList.add(toscaPolicyIdentifier); |