From: Jim Hahn Date: Thu, 11 Apr 2019 14:45:23 +0000 (-0400) Subject: Use policy-id instead of name X-Git-Tag: 3.0.2-ONAP~19^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=fe7053726fbbf5e6c4b0ef2844aceb8a8757117c;p=policy%2Fmodels.git 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 --- 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;