aboutsummaryrefslogtreecommitdiffstats
path: root/tosca-controlloop/models/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'tosca-controlloop/models/src/test')
-rw-r--r--tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java15
-rw-r--r--tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java2
-rw-r--r--tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java10
-rw-r--r--tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java24
-rw-r--r--tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java5
-rw-r--r--tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java33
-rw-r--r--tosca-controlloop/models/src/test/resources/META-INF/persistence.xml2
-rw-r--r--tosca-controlloop/models/src/test/resources/json/ControlLoopElementNoOrderedState.json4
-rw-r--r--tosca-controlloop/models/src/test/resources/providers/TestControlLoops.json72
-rw-r--r--tosca-controlloop/models/src/test/resources/providers/UpdateControlLoops.json36
10 files changed, 101 insertions, 102 deletions
diff --git a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java
index 2c0a45541..c865b76ab 100644
--- a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java
+++ b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import java.util.ArrayList;
+import java.util.LinkedHashMap;
import java.util.UUID;
import org.junit.Test;
import org.onap.policy.models.base.PfKey;
@@ -51,6 +51,7 @@ public class ControlLoopTest {
public void testControlLoopLombok() {
assertNotNull(new ControlLoop());
ControlLoop cl0 = new ControlLoop();
+ cl0.setElements(new LinkedHashMap<>());
assertThat(cl0.toString()).contains("ControlLoop(");
assertThat(cl0.hashCode()).isNotZero();
@@ -61,7 +62,7 @@ public class ControlLoopTest {
cl1.setDefinition(new ToscaConceptIdentifier("defName", "0.0.1"));
cl1.setDescription("Description");
- cl1.setElements(new ArrayList<>());
+ cl1.setElements(new LinkedHashMap<>());
cl1.setName("Name");
cl1.setOrderedState(ControlLoopOrderedState.UNINITIALISED);
cl1.setState(ControlLoopState.UNINITIALISED);
@@ -75,6 +76,7 @@ public class ControlLoopTest {
assertNotEquals(cl1, cl0);
ControlLoop cl2 = new ControlLoop();
+ cl2.setElements(new LinkedHashMap<>());
// @formatter:off
assertThatThrownBy(() -> cl2.setDefinition(null)). isInstanceOf(NullPointerException.class);
@@ -87,14 +89,13 @@ public class ControlLoopTest {
cl1.setCascadedOrderedState(ControlLoopOrderedState.PASSIVE);
assertEquals(ControlLoopOrderedState.PASSIVE, cl1.getOrderedState());
- cl1.getElements().add(new ControlLoopElement());
+ cl1.getElements().put(UUID.randomUUID(), new ControlLoopElement());
cl1.setCascadedOrderedState(ControlLoopOrderedState.RUNNING);
assertEquals(ControlLoopOrderedState.RUNNING, cl1.getOrderedState());
- assertEquals(ControlLoopOrderedState.RUNNING, cl1.getElements().get(0).getOrderedState());
+ assertEquals(ControlLoopOrderedState.RUNNING, cl1.getElements().values().iterator().next().getOrderedState());
- assertNull(cl0.getElement(UUID.randomUUID()));
- assertNull(cl1.getElement(UUID.randomUUID()));
- assertEquals(cl1.getElements().get(0), cl1.getElement(cl1.getElements().get(0).getId()));
+ assertNull(cl0.getElements().get(UUID.randomUUID()));
+ assertNull(cl1.getElements().get(UUID.randomUUID()));
assertEquals(PfKey.NULL_KEY_NAME, cl0.getDefinition().getName());
}
diff --git a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java
index c82dcf060..16c302f94 100644
--- a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java
+++ b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java
@@ -83,7 +83,7 @@ public class JpaClElementStatisticsTest {
}).hasMessageMatching("clElementStatistics is marked .*ull but is null");
assertThatThrownBy(() -> new JpaClElementStatistics((JpaClElementStatistics) null))
- .isInstanceOf(NullPointerException.class);
+ .isInstanceOf(NullPointerException.class);
JpaClElementStatistics testJpaClElementStatisticsFa = new JpaClElementStatistics();
testJpaClElementStatisticsFa.setKey(null);
diff --git a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java
index cd105a671..032d655e3 100644
--- a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java
+++ b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java
@@ -112,11 +112,11 @@ public class JpaControlLoopElementTest {
assertThatThrownBy(() -> {
new JpaControlLoopElement(new PfReferenceKey(), new PfConceptKey(), null, null);
- }).hasMessageMatching("participantId is marked .*ull but is null");
+ }).hasMessageMatching("participantType is marked .*ull but is null");
assertThatThrownBy(() -> {
new JpaControlLoopElement(new PfReferenceKey(), new PfConceptKey(), null, ControlLoopState.UNINITIALISED);
- }).hasMessageMatching("participantId is marked .*ull but is null");
+ }).hasMessageMatching("participantType is marked .*ull but is null");
assertThatThrownBy(() -> {
new JpaControlLoopElement(new PfReferenceKey(), new PfConceptKey(),
@@ -240,9 +240,9 @@ public class JpaControlLoopElementTest {
testJpaControlLoopElement.setState(ControlLoopState.UNINITIALISED);
assertEquals(0, testJpaControlLoopElement.compareTo(otherJpaControlLoopElement));
- testJpaControlLoopElement.setParticipantId(new PfConceptKey("dummy", "0.0.1"));
+ testJpaControlLoopElement.setParticipantType(new PfConceptKey("dummy", "0.0.1"));
assertNotEquals(0, testJpaControlLoopElement.compareTo(otherJpaControlLoopElement));
- testJpaControlLoopElement.setParticipantId(new PfConceptKey("participant", "0.0.1"));
+ testJpaControlLoopElement.setParticipantType(new PfConceptKey("participantType", "0.0.1"));
assertEquals(0, testJpaControlLoopElement.compareTo(otherJpaControlLoopElement));
assertEquals(testJpaControlLoopElement, new JpaControlLoopElement(testJpaControlLoopElement));
@@ -293,7 +293,7 @@ public class JpaControlLoopElementTest {
ControlLoopElement controlLoopElement = new ControlLoopElement();
controlLoopElement.setId(UUID.fromString("a95757ba-b34a-4049-a2a8-46773abcbe5e"));
controlLoopElement.setDefinition(new ToscaConceptIdentifier("cleDef", "0.0.1"));
- controlLoopElement.setParticipantId(new ToscaConceptIdentifier("participant", "0.0.1"));
+ controlLoopElement.setParticipantType(new ToscaConceptIdentifier("participantType", "0.0.1"));
return controlLoopElement;
}
diff --git a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java
index 7ef7e3276..01062b046 100644
--- a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java
+++ b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java
@@ -30,7 +30,7 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
-import java.util.ArrayList;
+import java.util.LinkedHashMap;
import org.junit.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
@@ -63,7 +63,7 @@ public class JpaControlLoopTest {
}).hasMessageMatching(NULL_KEY_ERROR);
assertThatThrownBy(() -> {
- new JpaControlLoop(null, null, null, new ArrayList<>());
+ new JpaControlLoop(null, null, null, new LinkedHashMap<>());
}).hasMessageMatching(NULL_KEY_ERROR);
assertThatThrownBy(() -> {
@@ -71,7 +71,7 @@ public class JpaControlLoopTest {
}).hasMessageMatching(NULL_KEY_ERROR);
assertThatThrownBy(() -> {
- new JpaControlLoop(null, null, ControlLoopState.UNINITIALISED, new ArrayList<>());
+ new JpaControlLoop(null, null, ControlLoopState.UNINITIALISED, new LinkedHashMap<>());
}).hasMessageMatching(NULL_KEY_ERROR);
assertThatThrownBy(() -> {
@@ -79,7 +79,7 @@ public class JpaControlLoopTest {
}).hasMessageMatching(NULL_KEY_ERROR);
assertThatThrownBy(() -> {
- new JpaControlLoop(null, new PfConceptKey(), null, new ArrayList<>());
+ new JpaControlLoop(null, new PfConceptKey(), null, new LinkedHashMap<>());
}).hasMessageMatching(NULL_KEY_ERROR);
assertThatThrownBy(() -> {
@@ -87,7 +87,7 @@ public class JpaControlLoopTest {
}).hasMessageMatching(NULL_KEY_ERROR);
assertThatThrownBy(() -> {
- new JpaControlLoop(null, new PfConceptKey(), ControlLoopState.UNINITIALISED, new ArrayList<>());
+ new JpaControlLoop(null, new PfConceptKey(), ControlLoopState.UNINITIALISED, new LinkedHashMap<>());
}).hasMessageMatching(NULL_KEY_ERROR);
assertThatThrownBy(() -> {
@@ -95,7 +95,7 @@ public class JpaControlLoopTest {
}).hasMessageMatching("definition is marked .*ull but is null");
assertThatThrownBy(() -> {
- new JpaControlLoop(new PfConceptKey(), null, null, new ArrayList<>());
+ new JpaControlLoop(new PfConceptKey(), null, null, new LinkedHashMap<>());
}).hasMessageMatching("definition is marked .*ull but is null");
assertThatThrownBy(() -> {
@@ -103,7 +103,7 @@ public class JpaControlLoopTest {
}).hasMessageMatching("definition is marked .*ull but is null");
assertThatThrownBy(() -> {
- new JpaControlLoop(new PfConceptKey(), null, ControlLoopState.UNINITIALISED, new ArrayList<>());
+ new JpaControlLoop(new PfConceptKey(), null, ControlLoopState.UNINITIALISED, new LinkedHashMap<>());
}).hasMessageMatching("definition is marked .*ull but is null");
assertThatThrownBy(() -> {
@@ -111,7 +111,7 @@ public class JpaControlLoopTest {
}).hasMessageMatching("state is marked .*ull but is null");
assertThatThrownBy(() -> {
- new JpaControlLoop(new PfConceptKey(), new PfConceptKey(), null, new ArrayList<>());
+ new JpaControlLoop(new PfConceptKey(), new PfConceptKey(), null, new LinkedHashMap<>());
}).hasMessageMatching("state is marked .*ull but is null");
assertThatThrownBy(() -> {
@@ -121,7 +121,7 @@ public class JpaControlLoopTest {
assertNotNull(new JpaControlLoop());
assertNotNull(new JpaControlLoop((new PfConceptKey())));
assertNotNull(new JpaControlLoop(new PfConceptKey(), new PfConceptKey(), ControlLoopState.UNINITIALISED,
- new ArrayList<>()));
+ new LinkedHashMap<>()));
}
@Test
@@ -188,7 +188,7 @@ public class JpaControlLoopTest {
JpaControlLoop jpaControlLoopWithElements =
new JpaControlLoop(controlLoopsWithElements.getControlLoopList().get(0));
assertEquals(4, jpaControlLoopWithElements.getElements().size());
- assertEquals(14, jpaControlLoopWithElements.getKeys().size());
+ assertEquals(18, jpaControlLoopWithElements.getKeys().size());
assertThatCode(() -> jpaControlLoopWithElements.clean()).doesNotThrowAnyException();
assertEquals(controlLoopsWithElements.getControlLoopList().get(0), jpaControlLoopWithElements.toAuthorative());
@@ -258,7 +258,7 @@ public class JpaControlLoopTest {
cl1.setDefinition(new PfConceptKey("defName", "0.0.1"));
cl1.setDescription("Description");
- cl1.setElements(new ArrayList<>());
+ cl1.setElements(new LinkedHashMap<>());
cl1.setKey(new PfConceptKey("participant", "0.0.1"));
cl1.setState(ControlLoopState.UNINITIALISED);
@@ -289,7 +289,7 @@ public class JpaControlLoopTest {
testControlLoop.setName("control-loop");
testControlLoop.setVersion("0.0.1");
testControlLoop.setDefinition(new ToscaConceptIdentifier("controlLoopDefinitionName", "0.0.1"));
- testControlLoop.setElements(new ArrayList<>());
+ testControlLoop.setElements(new LinkedHashMap<>());
return testControlLoop;
}
diff --git a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java
index fb443c82e..96b63a23d 100644
--- a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java
+++ b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java
@@ -91,11 +91,8 @@ public class ControlLoopProviderTest {
ControlLoops createdControlLoops = new ControlLoops();
createdControlLoops
.setControlLoopList(controlLoopProvider.createControlLoops(inputControlLoops.getControlLoopList()));
- String createdJson = CODER.encode(createdControlLoops, true);
- System.err.println(originalJson);
- System.out.println(createdJson);
- assertEquals(originalJson.replaceAll("\\s+", ""), createdJson.replaceAll("\\s+", ""));
+ assertEquals(inputControlLoops, createdControlLoops);
}
@Test
diff --git a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java
index f66c99262..d27d3a22c 100644
--- a/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java
+++ b/tosca-controlloop/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java
@@ -57,9 +57,11 @@ public class ParticipantMessageTest {
public void testAppliesTo_NullParticipantId() {
message = makeMessage();
- assertThatThrownBy(() -> message.appliesTo(null))
- .isInstanceOf(NullPointerException.class);
-
+ assertThatThrownBy(() -> message.appliesTo(null, null)).isInstanceOf(NullPointerException.class);
+ assertThatThrownBy(() -> message.appliesTo(new ToscaConceptIdentifier("PType", "4.5.6"), null))
+ .isInstanceOf(NullPointerException.class);
+ assertThatThrownBy(() -> message.appliesTo(null, new ToscaConceptIdentifier("id", "1.2.3")))
+ .isInstanceOf(NullPointerException.class);
}
@Test
@@ -67,33 +69,32 @@ public class ParticipantMessageTest {
message = makeMessage();
// ParticipantId matches
- ToscaConceptIdentifier id = new ToscaConceptIdentifier();
- id.setName("id");
- id.setVersion("1.2.3");
- assertTrue(message.appliesTo(id));
+ assertTrue(message.appliesTo(new ToscaConceptIdentifier("PType", "4.5.6"),
+ new ToscaConceptIdentifier("id", "1.2.3")));
+ assertFalse(message.appliesTo(new ToscaConceptIdentifier("PType", "4.5.6"),
+ new ToscaConceptIdentifier("id", "1.2.4")));
+ assertFalse(message.appliesTo(new ToscaConceptIdentifier("PType", "4.5.7"),
+ new ToscaConceptIdentifier("id", "1.2.3")));
}
@Test
public void testAppliesTo_ParticipantIdNoMatch() {
message = makeMessage();
- // ParticipantId doesnot match
+ // ParticipantId does not match
ToscaConceptIdentifier id = new ToscaConceptIdentifier();
id.setName("id1111");
id.setVersion("3.2.1");
- assertFalse(message.appliesTo(id));
- message.setParticipantId(null);
- assertTrue(message.appliesTo(id));
+ assertFalse(message.appliesTo(id, id));
+ message.setParticipantType(null);
+ assertTrue(message.appliesTo(id, id));
}
private ParticipantMessage makeMessage() {
ParticipantMessage msg = new ParticipantMessage(ParticipantMessageType.PARTICIPANT_STATE_CHANGE);
- ToscaConceptIdentifier id = new ToscaConceptIdentifier();
- id.setName("id");
- id.setVersion("1.2.3");
- msg.setControlLoopId(id);
- msg.setParticipantId(id);
+ msg.setParticipantType(new ToscaConceptIdentifier("PType", "4.5.6"));
+ msg.setParticipantId(new ToscaConceptIdentifier("id", "1.2.3"));
msg.setMessageId(UUID.randomUUID());
msg.setTimestamp(Instant.ofEpochMilli(3000));
diff --git a/tosca-controlloop/models/src/test/resources/META-INF/persistence.xml b/tosca-controlloop/models/src/test/resources/META-INF/persistence.xml
index 8f0e0648b..078d534be 100644
--- a/tosca-controlloop/models/src/test/resources/META-INF/persistence.xml
+++ b/tosca-controlloop/models/src/test/resources/META-INF/persistence.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (C) 2019-2020 Nordix Foundation.
+ Copyright (C) 2021 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/tosca-controlloop/models/src/test/resources/json/ControlLoopElementNoOrderedState.json b/tosca-controlloop/models/src/test/resources/json/ControlLoopElementNoOrderedState.json
index e9da16aad..33a63e604 100644
--- a/tosca-controlloop/models/src/test/resources/json/ControlLoopElementNoOrderedState.json
+++ b/tosca-controlloop/models/src/test/resources/json/ControlLoopElementNoOrderedState.json
@@ -4,8 +4,8 @@
"name": "cleDef",
"version": "0.0.1"
},
- "participantId": {
- "name": "participant",
+ "participantType": {
+ "name": "participantType",
"version": "0.0.1"
},
"state": "UNINITIALISED",
diff --git a/tosca-controlloop/models/src/test/resources/providers/TestControlLoops.json b/tosca-controlloop/models/src/test/resources/providers/TestControlLoops.json
index 25e36458c..fedda9600 100644
--- a/tosca-controlloop/models/src/test/resources/providers/TestControlLoops.json
+++ b/tosca-controlloop/models/src/test/resources/providers/TestControlLoops.json
@@ -7,64 +7,64 @@
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
- "elements": [
- {
+ "elements": {
+ "709c62b3-8918-41b9-a747-e21eb79c6c20": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c20",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_DCAEMicroservice",
"version": "1.2.3"
},
- "participantId": {
- "name": "DCAEParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.dcae.controlloop.DCAEMicroserviceControlLoopParticipant",
+ "version": "2.3.4"
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
"description": "DCAE Control Loop Element for the PMSH instance 0 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-e21eb79c6c21": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c21",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_MonitoringPolicyControlLoopElement",
"version": "1.2.3"
},
- "participantId": {
- "name": "PolicyParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
+ "version": "2.3.1"
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
"description": "Monitoring Policy Control Loop Element for the PMSH instance 0 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-e21eb79c6c22": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c22",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_OperationalPolicyControlLoopElement",
"version": "1.2.3"
},
- "participantId": {
- "name": "PolicyParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
+ "version": "2.3.1"
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
"description": "Operational Policy Control Loop Element for the PMSH instance 0 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-e21eb79c6c23": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c23",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_CDS_ControlLoopElement",
"version": "1.2.3"
},
- "participantId": {
- "name": "CDSParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.ccsdk.cds.controlloop.CdsControlLoopParticipant",
+ "version": "2.2.1"
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
"description": "CDS Control Loop Element for the PMSH instance 0 control loop"
}
- ],
+ },
"name": "PMSHInstance0",
"version": "1.0.1",
"description": "PMSH control loop instance 0"
@@ -76,64 +76,64 @@
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
- "elements": [
- {
+ "elements": {
+ "709c62b3-8918-41b9-a747-e21eb79c6c24": {
"id": "709c62b3-8918-41b9-a747-e21eb79c6c24",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_DCAEMicroservice",
"version": "1.2.3"
},
- "participantId": {
- "name": "DCAEParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.dcae.controlloop.DCAEMicroserviceControlLoopParticipant",
+ "version": "2.3.4"
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
"description": "DCAE Control Loop Element for the PMSH instance 1 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-e21eb79c6c25": {
"id": "709c62b3-8918-41b9-a747-e21eb79c6c25",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_MonitoringPolicyControlLoopElement",
"version": "1.2.3"
},
- "participantId": {
- "name": "PolicyParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
+ "version": "2.3.1"
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
"description": "Monitoring Policy Control Loop Element for the PMSH instance 1 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-e21eb79c6c26": {
"id": "709c62b3-8918-41b9-a747-e21eb79c6c26",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_OperationalPolicyControlLoopElement",
"version": "1.2.3"
},
- "participantId": {
- "name": "PolicyParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
+ "version": "2.3.1"
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
"description": "Operational Policy Control Loop Element for the PMSH instance 1 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-e21eb79c6c27": {
"id": "709c62b3-8918-41b9-a747-e21eb79c6c27",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_CDS_ControlLoopElement",
"version": "1.2.3"
},
- "participantId": {
- "name": "CDSParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.ccsdk.cds.controlloop.CdsControlLoopParticipant",
+ "version": "2.2.1"
},
"state": "UNINITIALISED",
"orderedState": "UNINITIALISED",
"description": "CDS Control Loop Element for the PMSH instance 1 control loop"
}
- ],
+ },
"name": "PMSHInstance1",
"version": "1.0.1",
"description": "PMSH control loop instance 1"
diff --git a/tosca-controlloop/models/src/test/resources/providers/UpdateControlLoops.json b/tosca-controlloop/models/src/test/resources/providers/UpdateControlLoops.json
index 0ae402629..2d6bd0753 100644
--- a/tosca-controlloop/models/src/test/resources/providers/UpdateControlLoops.json
+++ b/tosca-controlloop/models/src/test/resources/providers/UpdateControlLoops.json
@@ -10,64 +10,64 @@
"state": "RUNNING",
"orderedState": "RUNNING",
"description": "PMSH control loop instance 0",
- "elements": [
- {
+ "elements": {
+ "709c62b3-8918-41b9-a747-d21eb79c6c20": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c20",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_DCAEMicroservice",
"version": "1.2.3"
},
- "participantId": {
- "name": "DCAEParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.dcae.controlloop.DCAEMicroserviceControlLoopParticipant",
+ "version": "2.3.4"
},
"state": "RUNNING",
"orderedState": "RUNNING",
"description": "DCAE Control Loop Element for the PMSH instance 0 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-d21eb79c6c21": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c21",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_MonitoringPolicyControlLoopElement",
"version": "1.2.3"
},
- "participantId": {
- "name": "PolicyParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
+ "version": "2.3.1"
},
"state": "RUNNING",
"orderedState": "RUNNING",
"description": "Monitoring Policy Control Loop Element for the PMSH instance 0 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-d21eb79c6c22": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c22",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_OperationalPolicyControlLoopElement",
- "version": "1.2.3"
+ "version": "2.3.1"
},
- "participantId": {
- "name": "PolicyParticipant0",
+ "participantType": {
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
"version": "1.0.0"
},
"state": "RUNNING",
"orderedState": "RUNNING",
"description": "Operational Policy Control Loop Element for the PMSH instance 0 control loop"
},
- {
+ "709c62b3-8918-41b9-a747-d21eb79c6c23": {
"id": "709c62b3-8918-41b9-a747-d21eb79c6c23",
"definition": {
"name": "org.onap.domain.pmsh.PMSH_CDS_ControlLoopElement",
"version": "1.2.3"
},
- "participantId": {
- "name": "CDSParticipant0",
- "version": "1.0.0"
+ "participantType": {
+ "name": "org.onap.ccsdk.cds.controlloop.CdsControlLoopParticipant",
+ "version": "2.2.1"
},
"state": "RUNNING",
"orderedState": "RUNNING",
"description": "CDS Control Loop Element for the PMSH instance 0 control loop"
}
- ]
+ }
}
]
}