aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-policy
diff options
context:
space:
mode:
authorSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-07-21 16:45:11 +0100
committerSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-07-21 16:49:31 +0100
commit22a633cd19d236a6e73d849b3198f654ceb0fc48 (patch)
tree1b32304c6531c937696d529613c99e5cfcbc73c6 /participant/participant-impl/participant-impl-policy
parentf854e65fe950ef500215371cc47484147b739a31 (diff)
Rename ParticipantControlLoopUpdate message
This commit has no logical changes considered, except renaming ParticipantControlLoopUpdate message to ControlLoopUpdate message. According to following wiki ParticipantControlLoopUpdate message is renamed to ControlLoopUpdate message. https://wiki.onap.org/display/DW/The+CLAMP+Control+Loop+Participant+Protocol Issue-ID: POLICY-3416 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: I73f2b6797393e3352f98db2234ab63b833d7f212
Diffstat (limited to 'participant/participant-impl/participant-impl-policy')
-rw-r--r--participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/endtoend/ParticipantPolicyTest.java30
-rw-r--r--participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java20
2 files changed, 25 insertions, 25 deletions
diff --git a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/endtoend/ParticipantPolicyTest.java b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/endtoend/ParticipantPolicyTest.java
index 45674f4c8..a66252d2b 100644
--- a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/endtoend/ParticipantPolicyTest.java
+++ b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/endtoend/ParticipantPolicyTest.java
@@ -26,8 +26,8 @@ import static org.junit.Assert.assertNotNull;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
+import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ControlLoopUpdate;
import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantControlLoopStateChange;
-import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantControlLoopUpdate;
import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantUpdate;
import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ControlLoopStateChangeListener;
import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ControlLoopUpdateListener;
@@ -55,16 +55,16 @@ class ParticipantPolicyTest {
@Test
void testUpdatePolicyTypes() {
- ParticipantControlLoopUpdate participantControlLoopUpdateMsg = TestListenerUtils.createControlLoopUpdateMsg();
- participantControlLoopUpdateMsg.getControlLoop().setOrderedState(ControlLoopOrderedState.PASSIVE);
+ ControlLoopUpdate controlLoopUpdateMsg = TestListenerUtils.createControlLoopUpdateMsg();
+ controlLoopUpdateMsg.getControlLoop().setOrderedState(ControlLoopOrderedState.PASSIVE);
// Verify that the ToscaServicetemplate has policy_types
- assertNotNull(participantControlLoopUpdateMsg.getControlLoopDefinition().getPolicyTypes());
+ assertNotNull(controlLoopUpdateMsg.getControlLoopDefinition().getPolicyTypes());
synchronized (lockit) {
ControlLoopUpdateListener clUpdateListener = new ControlLoopUpdateListener(participantHandler);
- clUpdateListener.onTopicEvent(INFRA, TOPIC, null, participantControlLoopUpdateMsg);
+ clUpdateListener.onTopicEvent(INFRA, TOPIC, null, controlLoopUpdateMsg);
}
// Verify the result of GET participants with what is stored
assertEquals("org.onap.PM_Policy", participantHandler.getParticipantId().getName());
@@ -72,20 +72,20 @@ class ParticipantPolicyTest {
@Test
void testUpdatePolicies() throws Exception {
- ParticipantControlLoopUpdate participantControlLoopUpdateMsg = TestListenerUtils.createControlLoopUpdateMsg();
- participantControlLoopUpdateMsg.getControlLoop().setOrderedState(ControlLoopOrderedState.PASSIVE);
+ ControlLoopUpdate controlLoopUpdateMsg = TestListenerUtils.createControlLoopUpdateMsg();
+ controlLoopUpdateMsg.getControlLoop().setOrderedState(ControlLoopOrderedState.PASSIVE);
// Add policies to the toscaServiceTemplate
- TestListenerUtils.addPoliciesToToscaServiceTemplate(participantControlLoopUpdateMsg.getControlLoopDefinition());
+ TestListenerUtils.addPoliciesToToscaServiceTemplate(controlLoopUpdateMsg.getControlLoopDefinition());
// Verify that the ToscaServicetemplate has policies
assertNotNull(
- participantControlLoopUpdateMsg.getControlLoopDefinition().getToscaTopologyTemplate().getPolicies());
+ controlLoopUpdateMsg.getControlLoopDefinition().getToscaTopologyTemplate().getPolicies());
synchronized (lockit) {
ControlLoopUpdateListener clUpdateListener = new ControlLoopUpdateListener(participantHandler);
- clUpdateListener.onTopicEvent(INFRA, TOPIC, null, participantControlLoopUpdateMsg);
+ clUpdateListener.onTopicEvent(INFRA, TOPIC, null, controlLoopUpdateMsg);
}
// Verify the result of GET participants with what is stored
assertEquals("org.onap.PM_Policy", participantHandler.getParticipantId().getName());
@@ -93,20 +93,20 @@ class ParticipantPolicyTest {
@Test
void testDeletePoliciesAndPolicyTypes() throws Exception {
- ParticipantControlLoopUpdate participantControlLoopUpdateMsg = TestListenerUtils.createControlLoopUpdateMsg();
- participantControlLoopUpdateMsg.getControlLoop().setOrderedState(ControlLoopOrderedState.PASSIVE);
+ ControlLoopUpdate controlLoopUpdateMsg = TestListenerUtils.createControlLoopUpdateMsg();
+ controlLoopUpdateMsg.getControlLoop().setOrderedState(ControlLoopOrderedState.PASSIVE);
// Add policies to the toscaServiceTemplate
- TestListenerUtils.addPoliciesToToscaServiceTemplate(participantControlLoopUpdateMsg.getControlLoopDefinition());
+ TestListenerUtils.addPoliciesToToscaServiceTemplate(controlLoopUpdateMsg.getControlLoopDefinition());
// Verify that the ToscaServicetemplate has policies
assertNotNull(
- participantControlLoopUpdateMsg.getControlLoopDefinition().getToscaTopologyTemplate().getPolicies());
+ controlLoopUpdateMsg.getControlLoopDefinition().getToscaTopologyTemplate().getPolicies());
synchronized (lockit) {
ControlLoopUpdateListener clUpdateListener = new ControlLoopUpdateListener(participantHandler);
- clUpdateListener.onTopicEvent(INFRA, TOPIC, null, participantControlLoopUpdateMsg);
+ clUpdateListener.onTopicEvent(INFRA, TOPIC, null, controlLoopUpdateMsg);
}
// Verify the result of GET participants with what is stored
assertEquals("org.onap.PM_Policy", participantHandler.getParticipantId().getName());
diff --git a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java
index d439c9daf..6b1b7e30f 100644
--- a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java
+++ b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java
@@ -35,8 +35,8 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
+import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ControlLoopUpdate;
import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantControlLoopStateChange;
-import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantControlLoopUpdate;
import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantHealthCheck;
import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantStateChange;
import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantUpdate;
@@ -149,10 +149,10 @@ public class TestListenerUtils {
/**
* Method to create ControlLoopUpdateMsg.
*
- * @return ParticipantControlLoopUpdate message
+ * @return ControlLoopUpdate message
*/
- public static ParticipantControlLoopUpdate createControlLoopUpdateMsg() {
- final ParticipantControlLoopUpdate clUpdateMsg = new ParticipantControlLoopUpdate();
+ public static ControlLoopUpdate createControlLoopUpdateMsg() {
+ final ControlLoopUpdate clUpdateMsg = new ControlLoopUpdate();
ToscaConceptIdentifier controlLoopId = new ToscaConceptIdentifier();
controlLoopId.setName("PMSHInstance0");
controlLoopId.setVersion("1.0.0");
@@ -257,18 +257,18 @@ public class TestListenerUtils {
}
/**
- * Method to create ParticipantControlLoopUpdate using the arguments passed.
+ * Method to create ControlLoopUpdate using the arguments passed.
*
* @param jsonFilePath the path of the controlloop content
*
- * @return ParticipantControlLoopUpdate message
+ * @return ControlLoopUpdate message
* @throws CoderException exception while reading the file to object
*/
- public static ParticipantControlLoopUpdate createParticipantClUpdateMsgFromJson(String jsonFilePath)
+ public static ControlLoopUpdate createParticipantClUpdateMsgFromJson(String jsonFilePath)
throws CoderException {
- ParticipantControlLoopUpdate participantControlLoopUpdateMsg =
- CODER.decode(new File(jsonFilePath), ParticipantControlLoopUpdate.class);
- return participantControlLoopUpdateMsg;
+ ControlLoopUpdate controlLoopUpdateMsg =
+ CODER.decode(new File(jsonFilePath), ControlLoopUpdate.class);
+ return controlLoopUpdateMsg;
}
private static ToscaServiceTemplate testControlLoopRead() {