From fe7053726fbbf5e6c4b0ef2844aceb8a8757117c Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 11 Apr 2019 10:45:23 -0400 Subject: Use policy-id instead of name When CLAMP deploys a policy to the PDPs, it uses field names found in the meta-data, which are "policy-id" and "policy-version". Modified the class used by that particular to use those field names when encoded/decoded via gson. Change-Id: Ib67bd2cd05a906cc809dc6078efdabbd7aa1fa37 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn --- .../tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java index 9350d1738..9296780d5 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java @@ -20,6 +20,7 @@ package org.onap.policy.models.tosca.authorative.concepts; +import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import lombok.NonNull; @@ -32,8 +33,10 @@ import lombok.NonNull; public class ToscaPolicyIdentifierOptVersion { @NonNull + @SerializedName("policy-id") private String name; + @SerializedName("policy-version") private String version; -- cgit