summaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/main
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2019-04-16 23:09:49 -0500
committerjhh <jorge.hernandez-herrero@att.com>2019-04-16 23:10:46 -0500
commita2e7d569974b018235e821d7bc0bb7a43d75aa2c (patch)
treee9d669efdc6af9796e0865d95b1b263a1f9edfb1 /feature-lifecycle/src/main
parentfde980c4377e237eec08be75bdb7d6ae8fa33b78 (diff)
Add response section to PAP status message
Change-Id: I26bf9f515c8639c030e8beb9e8b37a6a632da686 Issue-ID: POLICY-1655 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'feature-lifecycle/src/main')
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java4
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateActive.java2
2 files changed, 4 insertions, 2 deletions
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));
}