summaryrefslogtreecommitdiffstats
path: root/runtime-acm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime-acm')
-rw-r--r--runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java4
-rw-r--r--runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java5
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionScannerTest.java2
3 files changed, 6 insertions, 5 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java
index abcef7a94..855681e69 100644
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java
@@ -42,7 +42,7 @@ public class ParticipantController extends AbstractRestController implements Par
@Override
public ResponseEntity<ParticipantInformation> getParticipant(UUID participantId, UUID requestId) {
ParticipantInformation participantInformation = acmParticipantProvider
- .getParticipantById(participantId.toString());
+ .getParticipantById(participantId);
return ResponseEntity.ok().body(participantInformation);
}
@@ -54,7 +54,7 @@ public class ParticipantController extends AbstractRestController implements Par
@Override
public ResponseEntity<Void> orderParticipantReport(UUID participantId, UUID requestId) {
- acmParticipantProvider.sendParticipantStatusRequest(participantId.toString());
+ acmParticipantProvider.sendParticipantStatusRequest(participantId);
return new ResponseEntity<>(HttpStatus.ACCEPTED);
}
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java
index e1d0423d1..617f75668 100644
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java
@@ -22,6 +22,7 @@ package org.onap.policy.clamp.acm.runtime.participants;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
import org.onap.policy.clamp.acm.runtime.supervision.comm.ParticipantStatusReqPublisher;
import org.onap.policy.clamp.models.acm.concepts.Participant;
import org.onap.policy.clamp.models.acm.concepts.ParticipantInformation;
@@ -70,7 +71,7 @@ public class AcmParticipantProvider {
* @param participantId The UUID of the participant to get
* @return The participant
*/
- public ParticipantInformation getParticipantById(String participantId) {
+ public ParticipantInformation getParticipantById(UUID participantId) {
Participant participant = this.participantProvider.getParticipantById(participantId);
ParticipantInformation participantInformation = new ParticipantInformation();
participantInformation.setParticipant(participant);
@@ -82,7 +83,7 @@ public class AcmParticipantProvider {
*
* @param participantId The UUID of the participant to send request to
*/
- public void sendParticipantStatusRequest(String participantId) {
+ public void sendParticipantStatusRequest(UUID participantId) {
Participant participant = this.participantProvider.getParticipantById(participantId);
ToscaConceptIdentifier id = participant.getKey().asIdentifier();
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionScannerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionScannerTest.java
index 1e07ec9cf..92597b3c3 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionScannerTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionScannerTest.java
@@ -126,7 +126,7 @@ class SupervisionScannerTest {
var participant = new Participant();
participant.setName(PARTICIPANT_NAME);
participant.setVersion(PARTICIPANT_VERSION);
- when(participantProvider.getParticipants(null, null)).thenReturn(List.of(participant));
+ when(participantProvider.getParticipants()).thenReturn(List.of(participant));
var automationCompositionUpdatePublisher = mock(AutomationCompositionUpdatePublisher.class);
var automationCompositionStateChangePublisher = mock(AutomationCompositionStateChangePublisher.class);