From a2e7d569974b018235e821d7bc0bb7a43d75aa2c Mon Sep 17 00:00:00 2001 From: jhh Date: Tue, 16 Apr 2019 23:09:49 -0500 Subject: Add response section to PAP status message Change-Id: I26bf9f515c8639c030e8beb9e8b37a6a632da686 Issue-ID: POLICY-1655 Signed-off-by: jhh --- .../src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java | 4 ++-- .../java/org/onap/policy/drools/lifecycle/LifecycleStateActive.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'feature-lifecycle/src/main/java') diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java index 8e1e9937..ada29ede 100644 --- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java +++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java @@ -147,7 +147,7 @@ public class LifecycleFsm implements Startable { * Start a controller event. */ public synchronized void start(@NonNull PolicyController controller) { - logger.info("lifecycle event: start controller: {}" + controller.getName()); + logger.info("lifecycle event: start controller: {}", controller.getName()); for (ToscaPolicyTypeIdentifier id : controller.getPolicyTypes()) { policyTypesMap.put(id, controller); } @@ -237,7 +237,7 @@ public class LifecycleFsm implements Startable { status.setResponse(response); } - return client.send(statusPayload(state)); + return client.send(status); } protected void setGroupAction(String group, String subgroup) { diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateActive.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateActive.java index 38ea0917..2dacdd1d 100644 --- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateActive.java +++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateActive.java @@ -20,6 +20,7 @@ package org.onap.policy.drools.lifecycle; +import java.util.Collections; import lombok.NonNull; import lombok.ToString; import org.onap.policy.drools.system.PolicyController; @@ -53,6 +54,7 @@ public class LifecycleStateActive extends LifecycleStateRunning { @Override protected boolean stateChangeToPassive(PdpStateChange change) { + undeployPolicies(Collections.emptyList()); fsm.transitionToAction(new LifecycleStatePassive(fsm)); return fsm.statusAction(response(change.getRequestId(), PdpResponseStatus.SUCCESS, null)); } -- cgit 1.2.3-korg