aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
diff options
context:
space:
mode:
authordaniel <dc443y@att.com>2017-10-24 06:33:31 -0500
committerdaniel <dc443y@att.com>2017-10-24 13:16:10 -0500
commit1480d327ff8559c1d912108f7d3353fed03fcd2c (patch)
tree8745bec65ea2ee8962f42048ed0362961d0dfc60 /controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
parentbaea880ddf0564d81d61bf87ae7f124229bf08f0 (diff)
Change vnf-id to vnf-name
These changes now allow a lookup of the source vnf-id based on the onset's vnf-name. Issue-Id: POLICY-366 Change-Id: I6f6bd500b892dddbbb9e12156b4486208309e21d Signed-off-by: Daniel Cruz <dc443y@att.com>
Diffstat (limited to 'controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java')
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
index bae7a5155..f18b440d7 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
@@ -276,7 +276,7 @@ public class VCPEControlLoopTest implements TopicListener {
String policyName = notification.policyName;
if (policyName.endsWith("EVENT")) {
logger.debug("Rule Fired: " + notification.policyName);
- if ("getFail".equals(notification.AAI.get("generic-vnf.vnf-id"))) {
+ if ("getFail".equals(notification.AAI.get("generic-vnf.vnf-name"))) {
assertEquals(ControlLoopNotificationType.REJECTED, notification.notification);
kieSession.halt();
}
@@ -364,22 +364,22 @@ public class VCPEControlLoopTest implements TopicListener {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "generic-vnf.vnf-id";
+ event.target = "generic-vnf.vnf-name";
event.closedLoopAlarmStart = Instant.now();
event.AAI = new HashMap<>();
- event.AAI.put("generic-vnf.vnf-id", "testGenericVnfID");
+ event.AAI.put("generic-vnf.vnf-name", "testGenericVnfName");
event.closedLoopEventStatus = status;
kieSession.insert(event);
}
- protected void sendEvent(ControlLoopPolicy policy, UUID requestID, ControlLoopEventStatus status, String vnfId) {
+ protected void sendEvent(ControlLoopPolicy policy, UUID requestID, ControlLoopEventStatus status, String vnfName) {
VirtualControlLoopEvent event = new VirtualControlLoopEvent();
event.closedLoopControlName = policy.getControlLoop().getControlLoopName();
event.requestID = requestID;
- event.target = "generic-vnf.vnf-id";
+ event.target = "generic-vnf.vnf-name";
event.closedLoopAlarmStart = Instant.now();
event.AAI = new HashMap<>();
- event.AAI.put("generic-vnf.vnf-id", vnfId);
+ event.AAI.put("generic-vnf.vnf-name", vnfName);
event.closedLoopEventStatus = status;
kieSession.insert(event);
}