aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-intermediary/src
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2021-08-31 15:55:59 +0100
committerFrancesco Fiora <francesco.fiora@est.tech>2021-09-01 12:03:42 +0000
commit466783f7638c9173f08a63d51af2c799c0a63598 (patch)
tree9a17bdd1b3d4895bb771bdcd29222c50c405c9a7 /participant/participant-intermediary/src
parentbd376e1dd5e8ccb1893ef244dcd9e4b1a0686150 (diff)
Verify alignment with Definition of TOSCA Control Loop Types
Issue-ID: POLICY-3612 Change-Id: I818f80cdc1db98752a7791ef4aba7377add66516 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-intermediary/src')
-rw-r--r--participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java
index 49ad6dab1..134bda6bb 100644
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java
@@ -296,7 +296,7 @@ public class ParticipantHandler {
if (toscaServiceTemplate != null) {
// This message is to commission the controlloop
for (ParticipantDefinition participantDefinition : participantUpdateMsg.getParticipantDefinitionUpdates()) {
- if (participantDefinition.getParticipantId().equals(participantType)) {
+ if (participantDefinition.getParticipantType().equals(participantType)) {
clElementDefsOnThisParticipant.clear();
clElementDefsOnThisParticipant.addAll(participantDefinition.getControlLoopElementDefinitionList());
break;
@@ -347,12 +347,11 @@ public class ParticipantHandler {
heartbeat.setControlLoopInfoList(getControlLoopInfoList());
if (responseToParticipantStatusReq) {
- List<ParticipantDefinition> participantDefinitionUpdates = new ArrayList<>();
ParticipantDefinition participantDefinition = new ParticipantDefinition();
participantDefinition.setParticipantId(participantId);
+ participantDefinition.setParticipantType(participantType);
participantDefinition.setControlLoopElementDefinitionList(clElementDefsOnThisParticipant);
- participantDefinitionUpdates.add(participantDefinition);
- heartbeat.setParticipantDefinitionUpdates(participantDefinitionUpdates);
+ heartbeat.setParticipantDefinitionUpdates(List.of(participantDefinition));
}
return heartbeat;