diff options
Diffstat (limited to 'controlloop/templates/template.demo/src/test')
5 files changed, 17 insertions, 0 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java index 1647fa0e1..e3409146f 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java @@ -39,6 +39,7 @@ import org.onap.policy.common.endpoints.event.comm.TopicListener; import org.onap.policy.common.endpoints.event.comm.TopicSink; import org.onap.policy.controlloop.ControlLoopEventStatus; import org.onap.policy.controlloop.ControlLoopNotificationType; +import org.onap.policy.controlloop.ControlLoopTargetType; import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; @@ -267,6 +268,7 @@ public class ControlLoopFailureTest extends ControlLoopBase implements TopicList event.setClosedLoopControlName(policy.getControlLoop().getControlLoopName()); event.setRequestId(requestId); event.setTarget("generic-vnf.vnf-id"); + event.setTargetType(ControlLoopTargetType.VNF); event.setClosedLoopAlarmStart(Instant.now()); event.setAai(new HashMap<>()); event.getAai().put("generic-vnf.vnf-id", target); diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopCqTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopCqTest.java index e69e507f4..1a5bf3982 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopCqTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopCqTest.java @@ -35,6 +35,7 @@ import org.onap.policy.common.endpoints.event.comm.TopicListener; import org.onap.policy.common.endpoints.event.comm.TopicSink; import org.onap.policy.controlloop.ControlLoopEventStatus; import org.onap.policy.controlloop.ControlLoopNotificationType; +import org.onap.policy.controlloop.ControlLoopTargetType; import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; @@ -231,6 +232,7 @@ public class VdnsControlLoopCqTest extends ControlLoopBase implements TopicListe event.setClosedLoopControlName(policy.getControlLoop().getControlLoopName()); event.setRequestId(requestId); event.setTarget("vserver.vserver-name"); + event.setTargetType(ControlLoopTargetType.VNF); event.setClosedLoopAlarmStart(Instant.now()); event.setAai(new HashMap<>()); event.getAai().put("vserver.vserver-name", "Ete_vFWCLvFWSNK_7ba1fbde_0"); @@ -246,6 +248,7 @@ public class VdnsControlLoopCqTest extends ControlLoopBase implements TopicListe event.setClosedLoopControlName(policy.getControlLoop().getControlLoopName()); event.setRequestId(requestId); event.setTarget("vserver.vserver-name"); + event.setTargetType(ControlLoopTargetType.VNF); event.setClosedLoopAlarmStart(Instant.now()); event.setAai(new HashMap<>()); event.getAai().put("vserver.vserver-name", vserverName); diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java index d1453f7b1..3c658c1fd 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java @@ -35,6 +35,7 @@ import org.onap.policy.common.endpoints.event.comm.TopicListener; import org.onap.policy.common.endpoints.event.comm.TopicSink; import org.onap.policy.controlloop.ControlLoopEventStatus; import org.onap.policy.controlloop.ControlLoopNotificationType; +import org.onap.policy.controlloop.ControlLoopTargetType; import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; @@ -263,6 +264,7 @@ public class VdnsControlLoopTest extends ControlLoopBase implements TopicListene event.setClosedLoopControlName(policy.getControlLoop().getControlLoopName()); event.setRequestId(requestId); event.setTarget("vserver.vserver-name"); + event.setTargetType(ControlLoopTargetType.VNF); event.setClosedLoopAlarmStart(Instant.now()); event.setAai(new HashMap<>()); event.getAai().put("vserver.vserver-name", "dfw1lb01lb01"); @@ -278,6 +280,7 @@ public class VdnsControlLoopTest extends ControlLoopBase implements TopicListene event.setClosedLoopControlName(policy.getControlLoop().getControlLoopName()); event.setRequestId(requestId); event.setTarget("vserver.vserver-name"); + event.setTargetType(ControlLoopTargetType.VNF); event.setClosedLoopAlarmStart(Instant.now()); event.setAai(new HashMap<>()); event.getAai().put("vserver.vserver-name", vserverName); diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopCdsTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopCdsTest.java index 435faf25d..a86f97d05 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopCdsTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopCdsTest.java @@ -30,6 +30,7 @@ import io.grpc.stub.StreamObserver; import java.io.IOException; import java.time.Instant; import java.util.HashMap; +import java.util.Map; import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; @@ -48,6 +49,7 @@ import org.onap.policy.common.endpoints.event.comm.TopicListener; import org.onap.policy.common.endpoints.event.comm.TopicSink; import org.onap.policy.controlloop.ControlLoopEventStatus; import org.onap.policy.controlloop.ControlLoopNotificationType; +import org.onap.policy.controlloop.ControlLoopTargetType; import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; @@ -254,12 +256,16 @@ public class VfwControlLoopCdsTest extends ControlLoopBase implements TopicListe VirtualControlLoopEvent event = new VirtualControlLoopEvent(); event.setClosedLoopControlName(policy.getControlLoop().getControlLoopName()); event.setRequestId(requestId); + event.setTargetType(ControlLoopTargetType.VNF); event.setTarget("generic-vnf.vnf-name"); event.setClosedLoopAlarmStart(Instant.now()); event.setAai(new HashMap<>()); event.getAai().put("generic-vnf.vnf-name", "testGenericVnfID"); event.getAai().put("vserver.vserver-name", "OzVServer"); event.setClosedLoopEventStatus(status); + Map<String, String> map = new HashMap<>(); + map.put("my-key", "my-value"); + event.setAdditionalEventParams(map); kieSession.insert(event); } diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java index 221ef5e6b..c326da145 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java @@ -38,6 +38,7 @@ import org.onap.policy.common.endpoints.event.comm.TopicListener; import org.onap.policy.common.endpoints.event.comm.TopicSink; import org.onap.policy.controlloop.ControlLoopEventStatus; import org.onap.policy.controlloop.ControlLoopNotificationType; +import org.onap.policy.controlloop.ControlLoopTargetType; import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; @@ -280,6 +281,7 @@ public class VfwControlLoopTest extends ControlLoopBase implements TopicListener event.setClosedLoopControlName(policy.getControlLoop().getControlLoopName()); event.setRequestId(requestId); event.setTarget("generic-vnf.vnf-name"); + event.setTargetType(ControlLoopTargetType.VNF); event.setClosedLoopAlarmStart(Instant.now()); event.setAai(new HashMap<>()); event.getAai().put("generic-vnf.vnf-name", "testGenericVnfID"); @@ -300,6 +302,7 @@ public class VfwControlLoopTest extends ControlLoopBase implements TopicListener event.setClosedLoopControlName(policy.getControlLoop().getControlLoopName()); event.setRequestId(requestId); event.setTarget("generic-vnf.vnf-name"); + event.setTargetType(ControlLoopTargetType.VNF); event.setClosedLoopAlarmStart(Instant.now()); event.setAai(new HashMap<>()); event.getAai().put("generic-vnf.vnf-name", vnfId); |