From 73e3ea2f9183fc7ed6ba8c0f221e41a804fbe2c7 Mon Sep 17 00:00:00 2001 From: Rashmi Pujar Date: Tue, 29 Oct 2019 16:13:05 -0400 Subject: PNF support changes in policy/models AAI Enrichment method for PNF target-type and unit tests. Addition of a hashmap field to ControlLoopEvent class to hold event specific parameters. Update CDS actor to include additional event parameters Issue-ID: POLICY-1187 Signed-off-by: Rashmi Pujar Change-Id: Ie0ceb320943531de6e6bc8675844b29a358dfb7e --- .../onap/policy/controlloop/ControlLoopEvent.java | 31 ++++++---------------- .../policy/controlloop/ControlLoopTargetType.java | 1 + 2 files changed, 9 insertions(+), 23 deletions(-) (limited to 'models-interactions/model-impl/events/src/main/java') diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java index 534e843f2..3ff7aa256 100644 --- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java +++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java @@ -23,6 +23,7 @@ package org.onap.policy.controlloop; import com.google.gson.annotations.SerializedName; import java.io.Serializable; +import java.util.Map; import java.util.UUID; import lombok.Getter; import lombok.Setter; @@ -33,45 +34,27 @@ public abstract class ControlLoopEvent implements Serializable { private static final long serialVersionUID = 2391252138583119195L; - @SerializedName("closedLoopControlName") - private String closedLoopControlName; - - @SerializedName("version") - private String version = "1.0.2"; - @SerializedName("requestID") private UUID requestId; - - @SerializedName("closedLoopEventClient") - private String closedLoopEventClient; - @SerializedName("target_type") private String targetType; - - @SerializedName("target") + private String closedLoopControlName; + private String version = "1.0.2"; + private String closedLoopEventClient; private String target; - - @SerializedName("from") private String from; - - @SerializedName("policyScope") private String policyScope; - - @SerializedName("policyName") private String policyName; - - @SerializedName("policyVersion") private String policyVersion; - - @SerializedName("closedLoopEventStatus") private ControlLoopEventStatus closedLoopEventStatus; + private Map additionalEventParams; public ControlLoopEvent() { } /** - * Construct an instace from an existing instance. + * Construct an instance from an existing instance. * * @param event the existing instance */ @@ -79,6 +62,7 @@ public abstract class ControlLoopEvent implements Serializable { if (event == null) { return; } + this.version = event.version; this.closedLoopControlName = event.closedLoopControlName; this.requestId = event.requestId; this.closedLoopEventClient = event.closedLoopEventClient; @@ -89,6 +73,7 @@ public abstract class ControlLoopEvent implements Serializable { this.policyName = event.policyName; this.policyVersion = event.policyVersion; this.closedLoopEventStatus = event.closedLoopEventStatus; + this.additionalEventParams = event.additionalEventParams; } public boolean isEventStatusValid() { diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java index 1ca182563..b79140a12 100644 --- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java +++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java @@ -26,4 +26,5 @@ public class ControlLoopTargetType { public static final String VF = "VF"; public static final String VFC = "VFC"; public static final String VNF = "VNF"; + public static final String PNF = "PNF"; } -- cgit 1.2.3-korg