diff options
author | Liam Fallon <liam.fallon@est.tech> | 2021-09-08 09:00:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-09-08 09:00:36 +0000 |
commit | 22b02a0536c4cad7fb6d1a838df197415682fef2 (patch) | |
tree | 936b7454011a17f8d20fc26a281996b5b0a19b23 /models/src | |
parent | b35be71f283c75d937619651ef086047349e93f4 (diff) | |
parent | 1df4475d60d9c6d46087f8284dd2e0697d59c071 (diff) |
Merge "Fix parsing of type heirarchy for nodetypes"
Diffstat (limited to 'models/src')
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); |