diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2022-10-26 16:29:50 +0100 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2022-10-28 07:51:45 +0000 |
commit | 6cec34379cf6f1ca1ff69cd2c8973937d896aa62 (patch) | |
tree | 5b6f1de4da2e5f974757a74ecd351dfd657d85c6 /participant/participant-impl/participant-impl-policy | |
parent | 75a69e67d03a55d3961d0f6a9f7925868dd39aa6 (diff) |
Remove old implementation of statistics in ACM participants
The old implementation of statistics in ACM-participants
can be removed due the Prometheus metrics support.
Issue-ID: POLICY-4420
Change-Id: I0785b269614aba51f94e71a3fe931541c1918b0c
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-impl/participant-impl-policy')
2 files changed, 0 insertions, 23 deletions
diff --git a/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java b/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java index e3679229d..bdf4f8fcf 100644 --- a/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java +++ b/participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java @@ -22,19 +22,16 @@ package org.onap.policy.clamp.acm.participant.policy.main.handler; -import java.time.Instant; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import java.util.UUID; -import javax.ws.rs.core.Response; import lombok.Setter; import org.apache.http.HttpStatus; import org.onap.policy.clamp.acm.participant.intermediary.api.AutomationCompositionElementListener; import org.onap.policy.clamp.acm.participant.intermediary.api.ParticipantIntermediaryApi; import org.onap.policy.clamp.acm.participant.policy.client.PolicyApiHttpClient; import org.onap.policy.clamp.acm.participant.policy.client.PolicyPapHttpClient; -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; @@ -219,21 +216,4 @@ public class AutomationCompositionElementHandler implements AutomationCompositio } } } - - /** - * Handle automationCompositionElement statistics. - * - * @param automationCompositionElementId automation composition element id - */ - @Override - public void handleStatistics(UUID automationCompositionElementId) { - var acElement = intermediaryApi.getAutomationCompositionElement(automationCompositionElementId); - if (acElement != null) { - var acElementStatistics = new AcElementStatistics(); - acElementStatistics.setState(acElement.getState()); - acElementStatistics.setTimeStamp(Instant.now()); - intermediaryApi.updateAutomationCompositionElementStatistics(automationCompositionElementId, - acElementStatistics); - } - } }
\ No newline at end of file diff --git a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java index 454864fd7..34162a29b 100644 --- a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java +++ b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java @@ -78,9 +78,6 @@ class AutomationCompositionElementHandlerTest { automationCompositionElementId, AutomationCompositionState.PASSIVE, AutomationCompositionOrderedState.RUNNING)); - - assertDoesNotThrow(() -> handler - .handleStatistics(automationCompositionElementId)); } private AutomationCompositionElementHandler getTestingHandler() { |