summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorsaul.gill <saul.gill@est.tech>2023-06-27 14:23:26 +0100
committerAdheli Tavares <adheli.tavares@est.tech>2023-06-27 13:58:24 +0000
commit059adbc2c51c79d97aeb19faac81f1128529e4f7 (patch)
tree6631c924b350b7c2e022f9b3c76f407939a158ca /models
parent567a8fd97c6b434f430d38c2d4af5a95b7cdb711 (diff)
Removing old implementation of participant restart
Particpant will be set as offline at deregister No ac states will be altered at deregister Issue-ID: POLICY-4742 Change-Id: Ifb297805ed4b97938b7f92855e30f978d474b648 Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'models')
-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
2 files changed, 0 insertions, 18 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));