aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl
diff options
context:
space:
mode:
Diffstat (limited to 'participant/participant-impl')
-rw-r--r--participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/handler/AutomationCompositionElementHandler.java11
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java20
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/test/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandlerTest.java10
-rw-r--r--participant/participant-impl/participant-impl-policy/src/main/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandler.java20
-rw-r--r--participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java3
5 files changed, 0 insertions, 64 deletions
diff --git a/participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/handler/AutomationCompositionElementHandler.java b/participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/handler/AutomationCompositionElementHandler.java
index 89c98400e..6b723750a 100644
--- a/participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/handler/AutomationCompositionElementHandler.java
+++ b/participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/handler/AutomationCompositionElementHandler.java
@@ -75,17 +75,6 @@ public class AutomationCompositionElementHandler implements AutomationCompositio
private ParticipantIntermediaryApi intermediaryApi;
/**
- * Handle automationCompositionElement statistics.
- *
- * @param automationCompositionElementId automation composition element id
- */
- @Override
- public void handleStatistics(UUID automationCompositionElementId) {
- // Implementation not needed for http participant
-
- }
-
- /**
* Handle a automation composition element state change.
*
* @param automationCompositionElementId the ID of the automation composition element
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();
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() {