From 142e8876995fd51139fd79cdfa64b6e285f5fb08 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 31 Aug 2018 16:26:05 -0400 Subject: pass VF count to guard for scale-out Also updated license dates. Fixed new checkstyle errors. Change-Id: Ia6153814c4333724185918f76be560aba5a52f96 Issue-ID: POLICY-1084 Signed-off-by: Jim Hahn --- .../src/main/resources/__closedLoopControlName__.drl | 8 ++++++-- .../src/main/resources/__closedLoopControlName__.drl | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'controlloop/templates') diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index b210c79d6..248497292 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -32,6 +32,7 @@ import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager; import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager.NEW_EVENT_STATUS; import org.onap.policy.controlloop.eventmanager.ControlLoopOperationManager; import org.onap.policy.controlloop.actor.so.SOActorServiceProvider; +import org.onap.policy.aai.AaiNqResponseWrapper; import org.onap.policy.appc.Request; import org.onap.policy.appc.Response; import org.onap.policy.appc.CommonHeader; @@ -682,8 +683,11 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED" $operation.policy.getActor().toString(), $operation.policy.getRecipe(), $operation.getTargetEntity(), - $event.getRequestId().toString() - )); + $event.getRequestId().toString(), + () -> { + AaiNqResponseWrapper resp = $manager.getNqVserverFromAai(); + return(resp == null ? null : resp.countVfModules()); + })); t.start(); } else{ diff --git a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index 24cb7f86a..0352dec10 100644 --- a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -33,6 +33,7 @@ import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager; import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager.NEW_EVENT_STATUS; import org.onap.policy.controlloop.eventmanager.ControlLoopOperationManager; import org.onap.policy.controlloop.actor.so.SOActorServiceProvider; +import org.onap.policy.aai.AaiNqResponseWrapper; import org.onap.policy.appc.Request; import org.onap.policy.appc.Response; import org.onap.policy.appc.CommonHeader; @@ -644,8 +645,11 @@ rule "EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED" $operation.policy.getActor().toString(), $operation.policy.getRecipe(), $operation.getTargetEntity(), - $event.getRequestId().toString() - )); + $event.getRequestId().toString(), + () -> { + AaiNqResponseWrapper resp = $manager.getNqVserverFromAai(); + return(resp == null ? null : resp.countVfModules()); + })); t.start(); } else{ -- cgit 1.2.3-korg