diff options
author | Liam Fallon <liam.fallon@est.tech> | 2022-10-30 20:31:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-10-30 20:31:34 +0000 |
commit | c4a0dae11f166b79969fa2813ce6aba72dbd1560 (patch) | |
tree | 4ac0d4d9afc12e3def3f9f04a04ee9bbf5b24dd6 /participant/participant-impl/participant-impl-kubernetes | |
parent | 9082093f00a3f21b2f824251c5ce60b775ad312c (diff) | |
parent | 6cec34379cf6f1ca1ff69cd2c8973937d896aa62 (diff) |
Merge "Remove old implementation of statistics in ACM participants"
Diffstat (limited to 'participant/participant-impl/participant-impl-kubernetes')
2 files changed, 0 insertions, 30 deletions
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java index 1fb41520f..ba49ff1f9 100644 --- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java +++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java @@ -22,7 +22,6 @@ package org.onap.policy.clamp.acm.participant.kubernetes.handler; import java.io.IOException; import java.lang.invoke.MethodHandles; -import java.time.Instant; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -40,7 +39,6 @@ import org.onap.policy.clamp.acm.participant.kubernetes.exception.ServiceExcepti import org.onap.policy.clamp.acm.participant.kubernetes.helm.PodStatusValidator; import org.onap.policy.clamp.acm.participant.kubernetes.models.ChartInfo; import org.onap.policy.clamp.acm.participant.kubernetes.service.ChartService; -import org.onap.policy.clamp.models.acm.concepts.AcElementStatistics; import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionElement; import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionOrderedState; import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionState; @@ -177,22 +175,4 @@ public class AutomationCompositionElementHandler implements AutomationCompositio ParticipantMessageType.AUTOMATION_COMPOSITION_STATE_CHANGE); } } - - /** - * Overridden method. - * - * @param automationCompositionElementId automationCompositionElement id - * @throws PfModelException in case of error - */ - @Override - public synchronized void handleStatistics(UUID automationCompositionElementId) throws PfModelException { - var acElement = intermediaryApi.getAutomationCompositionElement(automationCompositionElementId); - if (acElement != null) { - var acElementStatistics = new AcElementStatistics(); - acElementStatistics.setState(acElement.getState()); - acElementStatistics.setTimeStamp(Instant.now()); - intermediaryApi.updateAutomationCompositionElementStatistics(automationCompositionElementId, - acElementStatistics); - } - } } diff --git a/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java b/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java index 5b45cf105..fbd18ef67 100644 --- a/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java +++ b/participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java @@ -28,7 +28,6 @@ import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.when; import java.io.File; import java.io.IOException; @@ -160,15 +159,6 @@ class AutomationCompositionElementHandlerTest { } @Test - void test_handleStatistics() { - UUID elementId1 = UUID.randomUUID(); - automationCompositionElementHandler.getChartMap().put(elementId1, charts.get(0)); - when(participantIntermediaryApi.getAutomationCompositionElement(elementId1)) - .thenReturn(new AutomationCompositionElement()); - assertDoesNotThrow(() -> automationCompositionElementHandler.handleStatistics(elementId1)); - } - - @Test void test_checkPodStatus() throws ExecutionException, InterruptedException { doReturn(result).when(executor).submit(any(Runnable.class), any()); doReturn("Done").when(result).get(); |