summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProvider.java15
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java3
-rw-r--r--runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java1
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java1
4 files changed, 0 insertions, 20 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProvider.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProvider.java
index 25d72cb06..597606e17 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProvider.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProvider.java
@@ -182,19 +182,4 @@ public class ParticipantProvider {
return ProviderUtils.asEntityList(nodeTemplateStateRepository
.findByParticipantId(participantId.toString()));
}
-
- /**
- * Reset the Deploy and Lock states of all the ac elements associated with a participant.
- *
- * @param participantId the participant id associated with the automation composition elements
- */
- public void resetParticipantAcElementState(@NonNull final UUID participantId) {
- var participantAcElementList = automationCompositionElementRepository
- .findByParticipantId(participantId.toString());
- participantAcElementList.forEach(e -> {
- e.setDeployState(DeployState.UNDEPLOYED);
- e.setLockState(LockState.NONE);
- });
- automationCompositionElementRepository.saveAll(participantAcElementList);
- }
}
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java
index 968ad31bb..22523e2a7 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java
@@ -252,7 +252,6 @@ class ParticipantProviderTest {
assertThrows(NullPointerException.class, () -> participantProvider.deleteParticipant(null));
assertThrows(NullPointerException.class, () -> participantProvider.getAutomationCompositionElements(null));
assertThrows(NullPointerException.class, () -> participantProvider.getAcNodeTemplateStates(null));
- assertThrows(NullPointerException.class, () -> participantProvider.resetParticipantAcElementState(null));
}
@Test
@@ -287,8 +286,6 @@ class ParticipantProviderTest {
assertThat(e.getLockState().equals(LockState.LOCKED));
});
- participantProvider.resetParticipantAcElementState(UUID.randomUUID());
-
acElementList.get(0).stream().forEach(e -> {
assertThat(e.getDeployState().equals(DeployState.UNDEPLOYED));
assertThat(e.getLockState().equals(LockState.NONE));
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
index 564fa8d0e..6d438038d 100644
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
@@ -86,7 +86,6 @@ public class SupervisionParticipantHandler {
var participant = participantOpt.get();
participant.setParticipantState(ParticipantState.OFF_LINE);
participantProvider.updateParticipant(participant);
- participantProvider.resetParticipantAcElementState(participant.getParticipantId());
}
participantDeregisterAckPublisher.send(participantDeregisterMsg.getMessageId());
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
index f00747c6b..e441befb2 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
@@ -61,7 +61,6 @@ class SupervisionParticipantHandlerTest {
handler.handleParticipantMessage(participantDeregisterMessage);
verify(participantProvider).updateParticipant(any());
- verify(participantProvider).resetParticipantAcElementState(any());
verify(participantDeregisterAckPublisher).send(participantDeregisterMessage.getMessageId());
}