summaryrefslogtreecommitdiffstats
path: root/participant
diff options
context:
space:
mode:
Diffstat (limited to 'participant')
-rwxr-xr-xparticipant/participant-impl/participant-impl-a1pms/src/main/resources/config/application.yaml11
-rwxr-xr-xparticipant/participant-impl/participant-impl-a1pms/src/test/resources/application-test.yaml7
-rw-r--r--participant/participant-impl/participant-impl-http/src/main/resources/config/application.yaml3
-rw-r--r--participant/participant-impl/participant-impl-http/src/test/resources/application-test.yaml3
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/main/resources/config/application.yaml3
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/test/resources/application-test.yaml3
-rw-r--r--participant/participant-impl/participant-impl-policy/src/main/resources/config/application.yaml4
-rw-r--r--participant/participant-impl/participant-impl-policy/src/test/resources/application-test.yaml3
-rw-r--r--participant/participant-impl/participant-impl-policy/src/test/resources/parameters/TestACParams.yaml15
-rw-r--r--participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java5
-rw-r--r--participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandlerTest.java16
11 files changed, 27 insertions, 46 deletions
diff --git a/participant/participant-impl/participant-impl-a1pms/src/main/resources/config/application.yaml b/participant/participant-impl/participant-impl-a1pms/src/main/resources/config/application.yaml
index 9c4e4370a..417159671 100755
--- a/participant/participant-impl/participant-impl-a1pms/src/main/resources/config/application.yaml
+++ b/participant/participant-impl/participant-impl-a1pms/src/main/resources/config/application.yaml
@@ -26,9 +26,6 @@ participant:
reportingTimeIntervalMs: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c00
- participantType:
- name: org.onap.policy.clamp.acm.A1PMSParticipant
- version: 2.3.4
clampAutomationCompositionTopics:
topicSources:
- topic: POLICY-ACRUNTIME-PARTICIPANT
@@ -41,7 +38,13 @@ participant:
servers:
- ${topicServer:localhost}
topicCommInfrastructure: dmaap
-
+ participantSupportedElementTypes:
+ -
+ typeName: org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement
+ typeVersion: 1.0.1
+ -
+ typeName: org.onap.policy.clamp.acm.AutomationCompositionElement
+ typeVersion: 1.0.0
management:
endpoints:
diff --git a/participant/participant-impl/participant-impl-a1pms/src/test/resources/application-test.yaml b/participant/participant-impl/participant-impl-a1pms/src/test/resources/application-test.yaml
index ced319cfc..cd3a54e78 100755
--- a/participant/participant-impl/participant-impl-a1pms/src/test/resources/application-test.yaml
+++ b/participant/participant-impl/participant-impl-a1pms/src/test/resources/application-test.yaml
@@ -3,9 +3,6 @@ participant:
reportingTimeInterval: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c00
- participantType:
- name: org.onap.policy.clamp.acm.A1PMSParticipant
- version: 2.3.4
clampAutomationCompositionTopics:
topicSources:
-
@@ -22,8 +19,8 @@ participant:
topic: POLICY-ACRUNTIME-PARTICIPANT
participantSupportedElementTypes:
-
- typeName: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
- typeVersion: 1.0.0
+ typeName: org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement
+ typeVersion: 1.0.1
-
typeName: org.onap.policy.clamp.acm.AutomationCompositionElement
typeVersion: 1.0.0
diff --git a/participant/participant-impl/participant-impl-http/src/main/resources/config/application.yaml b/participant/participant-impl/participant-impl-http/src/main/resources/config/application.yaml
index a7015d95c..68905c36d 100644
--- a/participant/participant-impl/participant-impl-http/src/main/resources/config/application.yaml
+++ b/participant/participant-impl/participant-impl-http/src/main/resources/config/application.yaml
@@ -17,9 +17,6 @@ participant:
reportingTimeIntervalMs: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c01
- participantType:
- name: org.onap.policy.clamp.acm.HttpParticipant
- version: 2.3.4
clampAutomationCompositionTopics:
topicSources:
- topic: POLICY-ACRUNTIME-PARTICIPANT
diff --git a/participant/participant-impl/participant-impl-http/src/test/resources/application-test.yaml b/participant/participant-impl/participant-impl-http/src/test/resources/application-test.yaml
index bf429df02..000ebc7a6 100644
--- a/participant/participant-impl/participant-impl-http/src/test/resources/application-test.yaml
+++ b/participant/participant-impl/participant-impl-http/src/test/resources/application-test.yaml
@@ -3,9 +3,6 @@ participant:
reportingTimeInterval: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c01
- participantType:
- version: 2.3.4
- name: org.onap.clamp.acm.HttpParticipant
clampAutomationCompositionTopics:
topicSources:
-
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/resources/config/application.yaml b/participant/participant-impl/participant-impl-kubernetes/src/main/resources/config/application.yaml
index de9794d3c..9642b40e6 100644
--- a/participant/participant-impl/participant-impl-kubernetes/src/main/resources/config/application.yaml
+++ b/participant/participant-impl/participant-impl-kubernetes/src/main/resources/config/application.yaml
@@ -20,9 +20,6 @@ participant:
reportingTimeIntervalMs: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c02
- participantType:
- name: org.onap.policy.clamp.acm.KubernetesParticipant
- version: 2.3.4
clampAutomationCompositionTopics:
topicSources:
-
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/test/resources/application-test.yaml b/participant/participant-impl/participant-impl-kubernetes/src/test/resources/application-test.yaml
index 62cef60c4..d8e4cb075 100644
--- a/participant/participant-impl/participant-impl-kubernetes/src/test/resources/application-test.yaml
+++ b/participant/participant-impl/participant-impl-kubernetes/src/test/resources/application-test.yaml
@@ -9,9 +9,6 @@ participant:
description: Participant Description
reportingTimeInterval: 120000
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c02
- participantType:
- version: 2.3.4
- name: org.onap.k8s.acm.K8SAutomationCompositionParticipant
clampAutomationCompositionTopics:
topicSources:
-
diff --git a/participant/participant-impl/participant-impl-policy/src/main/resources/config/application.yaml b/participant/participant-impl/participant-impl-policy/src/main/resources/config/application.yaml
index e7b59bef4..37391f116 100644
--- a/participant/participant-impl/participant-impl-policy/src/main/resources/config/application.yaml
+++ b/participant/participant-impl/participant-impl-policy/src/main/resources/config/application.yaml
@@ -33,9 +33,6 @@ participant:
reportingTimeIntervalMs: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c03
- participantType:
- name: org.onap.policy.clamp.acm.PolicyParticipant
- version: 2.3.1
clampAutomationCompositionTopics:
topicSources:
-
@@ -57,6 +54,7 @@ participant:
-
typeName: org.onap.policy.clamp.acm.AutomationCompositionElement
typeVersion: 1.0.0
+
management:
endpoints:
web:
diff --git a/participant/participant-impl/participant-impl-policy/src/test/resources/application-test.yaml b/participant/participant-impl/participant-impl-policy/src/test/resources/application-test.yaml
index 7a366f611..d9051c2cf 100644
--- a/participant/participant-impl/participant-impl-policy/src/test/resources/application-test.yaml
+++ b/participant/participant-impl/participant-impl-policy/src/test/resources/application-test.yaml
@@ -3,9 +3,6 @@ participant:
reportingTimeInterval: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c03
- participantType:
- version: 1.0.0
- name: org.onap.PM_CDS_Blueprint
clampAutomationCompositionTopics:
topicSources:
-
diff --git a/participant/participant-impl/participant-impl-policy/src/test/resources/parameters/TestACParams.yaml b/participant/participant-impl/participant-impl-policy/src/test/resources/parameters/TestACParams.yaml
index ef0e67c44..f568b9cd4 100644
--- a/participant/participant-impl/participant-impl-policy/src/test/resources/parameters/TestACParams.yaml
+++ b/participant/participant-impl/participant-impl-policy/src/test/resources/parameters/TestACParams.yaml
@@ -24,9 +24,6 @@ node_types:
provider:
type: string
required: false
- participantType:
- type: onap.datatypes.ToscaConceptIdentifier
- required: true
startPhase:
type: integer
required: false
@@ -108,9 +105,6 @@ topology_template:
description: Automation composition element, DCAE microservice for Performance Management Subscription Handling
properties:
provider: Ericsson
- participantType:
- name: org.onap.dcae.acm.DCAEMicroserviceAutomationCompositionParticipant
- version: 2.3.4
dcae_blueprint_id:
name: org.onap.dcae.blueprints.PMSHBlueprint
version: 1.0.0
@@ -121,9 +115,6 @@ topology_template:
description: Automation composition element, monitoring policy for Performance Management Subscription Handling
properties:
provider: Ericsson
- participantType:
- name: org.onap.policy.acm.MonitoringPolicyAutomationCompositionParticipant
- version: 2.3.1
policy_type_id:
name: onap.policies.monitoring.pm-subscription-handler
version: 1.0.0
@@ -134,9 +125,6 @@ topology_template:
description: Automation composition element, operational policy for Performance Management Subscription Handling
properties:
provider: Ericsson
- participantType:
- name: org.onap.policy.acm.OperationalPolicyAutomationCompositionParticipant
- version: 2.2.1
policy_type_id:
name: onap.policies.operational.pm-subscription-handler
version: 1.0.0
@@ -147,9 +135,6 @@ topology_template:
description: Automation composition element for CDS for Performance Management Subscription Handling
properties:
provider: Ericsson
- participantType:
- name: org.onap.ccsdk.cds.acm.CdsAutomationCompositionParticipant
- version: 3.2.1
cds_blueprint_id:
name: org.onap.ccsdk.cds.PMSHCdsBlueprint
version: 1.0.0
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java
index f324cea0c..75f2d81ab 100644
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java
@@ -209,15 +209,16 @@ public class ParticipantHandler {
// This message is to decommission the automation composition
acElementDefsMap.get(participantUpdateMsg.getCompositionId()).clear();
}
- sendParticipantUpdateAck(participantUpdateMsg.getMessageId());
+ sendParticipantUpdateAck(participantUpdateMsg.getMessageId(), participantUpdateMsg.getCompositionId());
}
/**
* Method to send ParticipantUpdateAck message to automation composition runtime.
*/
- public void sendParticipantUpdateAck(UUID messageId) {
+ public void sendParticipantUpdateAck(UUID messageId, UUID compositionId) {
var participantUpdateAck = new ParticipantUpdateAck();
participantUpdateAck.setResponseTo(messageId);
+ participantUpdateAck.setCompositionId(compositionId);
participantUpdateAck.setMessage("Participant Update Ack message");
participantUpdateAck.setResult(true);
participantUpdateAck.setParticipantId(participantId);
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandlerTest.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandlerTest.java
index c538a0248..dc04440ca 100644
--- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandlerTest.java
+++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandlerTest.java
@@ -25,6 +25,9 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
import java.time.Instant;
import java.util.List;
@@ -36,14 +39,13 @@ import org.onap.policy.clamp.models.acm.concepts.ParticipantDefinition;
import org.onap.policy.clamp.models.acm.messages.dmaap.participant.ParticipantAckMessage;
import org.onap.policy.clamp.models.acm.messages.dmaap.participant.ParticipantMessage;
import org.onap.policy.clamp.models.acm.messages.dmaap.participant.ParticipantMessageType;
+import org.onap.policy.clamp.models.acm.messages.dmaap.participant.ParticipantRegisterAck;
import org.onap.policy.clamp.models.acm.messages.dmaap.participant.ParticipantUpdate;
import org.onap.policy.common.utils.coder.CoderException;
class ParticipantHandlerTest {
private final CommonTestData commonTestData = new CommonTestData();
- private static final String ID_NAME = "org.onap.PM_CDS_Blueprint";
- private static final String ID_VERSION = "1.0.1";
@Test
void handleUpdateTest() {
@@ -119,4 +121,14 @@ class ParticipantHandlerTest {
}
+ @Test
+ void testHandleParticipantRegisterAck() {
+ var parameters = CommonTestData.getParticipantParameters();
+ var automationCompositionHandler = commonTestData.getMockAutomationCompositionHandler();
+ var publisher = mock(ParticipantMessagePublisher.class);
+ var participantHandler = new ParticipantHandler(parameters, publisher, automationCompositionHandler);
+
+ participantHandler.handleParticipantRegisterAck(new ParticipantRegisterAck());
+ verify(publisher).sendParticipantStatus(any());
+ }
}