aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementAck.java4
-rw-r--r--models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantAckMessage.java7
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopAckTest.java4
3 files changed, 13 insertions, 2 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementAck.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementAck.java
index a5918fe94..61b90c9e9 100644
--- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementAck.java
+++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementAck.java
@@ -31,10 +31,12 @@ import lombok.ToString;
@ToString
public class ControlLoopElementAck {
+ // State of the controlLoopElement
+ private ControlLoopState state;
+
// Result: Success/Fail.
private Boolean result;
// Message indicating reason for failure
private String message;
-
}
diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantAckMessage.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantAckMessage.java
index c6f5c61b9..8a1be69bd 100644
--- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantAckMessage.java
+++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantAckMessage.java
@@ -25,6 +25,7 @@ import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;
+import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
@@ -57,6 +58,11 @@ public class ParticipantAckMessage {
private ToscaConceptIdentifier participantId;
/**
+ * Participant State, or {@code null} for messages from participants.
+ */
+ private ParticipantState state;
+
+ /**
* Constructor for instantiating a participant ack message class.
*
* @param messageType the message type
@@ -77,6 +83,7 @@ public class ParticipantAckMessage {
this.messageType = source.messageType;
this.participantType = source.participantType;
this.participantId = source.participantId;
+ this.state = source.state;
}
/**
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopAckTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopAckTest.java
index 5fded7341..f312c4863 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopAckTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopAckTest.java
@@ -29,6 +29,7 @@ import java.util.Map;
import java.util.UUID;
import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopElementAck;
+import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
@@ -50,7 +51,8 @@ class ControlLoopAckTest {
orig.setControlLoopId(id);
orig.setParticipantId(id);
orig.setParticipantType(id);
- var clElementResult = new ControlLoopElementAck(true, "ControlLoopElement result");
+ var clElementResult = new ControlLoopElementAck(ControlLoopState.UNINITIALISED,
+ true, "ControlLoopElement result");
final var controlLoopResultMap = Map.of(UUID.randomUUID(), clElementResult);
orig.setControlLoopResultMap(controlLoopResultMap);