Github user tbouron commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/821#discussion_r141600481
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/policy/Policies.java 
---
    @@ -81,11 +85,27 @@ public void setEntity(EntityLocal entity) {
         }
     
         public static Lifecycle getPolicyStatus(Policy p) {
    -        if (p.isRunning()) return Lifecycle.RUNNING;
    -        if (p.isDestroyed()) return Lifecycle.DESTROYED;
    -        if (p.isSuspended()) return Lifecycle.STOPPED;
    -        // TODO could policy be in an error state?
    -        return Lifecycle.CREATED;        
    +        return inferAdjunctStatus(p);
    +    }
    +    
    +    @Beta
    +    public static Lifecycle inferAdjunctStatus(EntityAdjunct a) {
    --- End diff --
    
    I would also deprecate the entire `Policies` class as all methods are 
already deprecated


---

Reply via email to