brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbouron <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #821: REST API for accessing adjuncts (includin...
Date Thu, 28 Sep 2017 13:12:15 GMT
Github user tbouron commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/821#discussion_r141590904
  
    --- 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 --
    
    Sounds like this method is not in a right class. Would be more meaningful inside an `Adjuncts`
class for example (an since it's static, it is not an issue to move it)


---

Mime
View raw message