summaryrefslogtreecommitdiffstats
path: root/models-pdp/src/main/java/org
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-22 12:01:37 -0400
committerJim Hahn <jrh3@att.com>2021-06-23 11:18:31 -0400
commitf2078f5fd455c02f615b33700e1b545e0055e2fe (patch)
tree89e01ab7b4885a4fef62b23d21f12647ee49b593 /models-pdp/src/main/java/org
parent33c54226a0463e8ed234177bc9b894dd6797ab74 (diff)
Add "source" to PAP-PDP messages
Added a "source" field to the PdpStateChange and PdpUpdate messages so that PAP can record a unique name in the message, for logging purposes. In a separate review, planning to add a method in policy-common for creating the unique name. Once that has been created, it will be used by PAP, to populate the "source" field, and all PDPs, to populate the "name" field in the PdpStatus messages. Issue-ID: POLICY-3409 Change-Id: I86c97702abe62a5672720330df50b7b106187661 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-pdp/src/main/java/org')
-rw-r--r--models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStateChange.java8
-rw-r--r--models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpUpdate.java8
2 files changed, 14 insertions, 2 deletions
diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStateChange.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStateChange.java
index fe953cb65..6a7b7d534 100644
--- a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStateChange.java
+++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStateChange.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property.
+ * Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,11 @@ import org.onap.policy.models.pdp.enums.PdpState;
@ToString(callSuper = true)
public class PdpStateChange extends PdpMessage {
+ /**
+ * System from which the message originated.
+ */
+ private String source;
+
private PdpState state;
/**
@@ -56,6 +61,7 @@ public class PdpStateChange extends PdpMessage {
public PdpStateChange(PdpStateChange source) {
super(source);
+ this.source = source.source;
this.state = source.state;
}
}
diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpUpdate.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpUpdate.java
index 19f79ee88..aa2b85d29 100644
--- a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpUpdate.java
+++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpUpdate.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property.
+ * Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -45,6 +45,11 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
public class PdpUpdate extends PdpMessage {
/**
+ * System from which the message originated.
+ */
+ private String source;
+
+ /**
* Description of the PDP group.
*/
private String description;
@@ -77,6 +82,7 @@ public class PdpUpdate extends PdpMessage {
public PdpUpdate(PdpUpdate source) {
super(source);
+ this.source = source.source;
this.description = source.description;
this.pdpHeartbeatIntervalMs = source.pdpHeartbeatIntervalMs;
this.policiesToBeDeployed = (source.policiesToBeDeployed == null ? null