brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [18/29] git commit: remove renderer hint for MASTER_NODE -- it is not needed as type Entity gets this automatically, plus it was broken (it needs a special post processing); and add an enricher to publish at the cluster the url for that node
Date Mon, 03 Nov 2014 15:52:02 GMT
remove renderer hint for MASTER_NODE -- it is not needed as type Entity gets this automatically,
plus it was broken (it needs a special post processing);
and add an enricher to publish at the cluster the url for that node


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/82666ea1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/82666ea1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/82666ea1

Branch: refs/heads/master
Commit: 82666ea148a2ec72e428c64084574af9fd67f0fa
Parents: 294c217
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Sun Oct 26 14:22:11 2014 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Fri Oct 31 09:38:20 2014 -0500

----------------------------------------------------------------------
 .../entity/brooklynnode/BrooklynClusterImpl.java    | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/82666ea1/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynClusterImpl.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynClusterImpl.java
b/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynClusterImpl.java
index 4247ff3..48c9472 100644
--- a/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynClusterImpl.java
+++ b/software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynClusterImpl.java
@@ -24,13 +24,14 @@ import java.util.concurrent.Callable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import brooklyn.config.render.RendererHints;
+import brooklyn.enricher.Enrichers;
 import brooklyn.entity.Entity;
+import brooklyn.entity.basic.EntityFunctions;
 import brooklyn.entity.basic.EntityPredicates;
 import brooklyn.entity.basic.ServiceStateLogic;
 import brooklyn.entity.basic.ServiceStateLogic.ServiceProblemsLogic;
-import brooklyn.entity.brooklynnode.effector.SelectMasterEffectorBody;
 import brooklyn.entity.brooklynnode.effector.BrooklynClusterUpgradeEffectorBody;
+import brooklyn.entity.brooklynnode.effector.SelectMasterEffectorBody;
 import brooklyn.entity.group.DynamicClusterImpl;
 import brooklyn.event.feed.function.FunctionFeed;
 import brooklyn.event.feed.function.FunctionPollConfig;
@@ -47,11 +48,6 @@ public class BrooklynClusterImpl extends DynamicClusterImpl implements
BrooklynC
 
     private static final Logger LOG = LoggerFactory.getLogger(BrooklynClusterImpl.class);
 
-    static {
-        // XXX not needed or wanted
-        RendererHints.register(MASTER_NODE, RendererHints.namedActionWithUrl());
-    }
-
     // TODO should we set a default MEMBER_SPEC ?  difficult though because we'd need to
set a password
 
     @SuppressWarnings("unused")
@@ -70,6 +66,12 @@ public class BrooklynClusterImpl extends DynamicClusterImpl implements
BrooklynC
                         .period(Duration.ONE_SECOND)
                         .callable(new MasterChildFinder()))
                 .build();
+        
+        addEnricher( Enrichers.builder().transforming(MASTER_NODE)
+            .uniqueTag("master-node-web-uri")
+            .publishing(BrooklynNode.WEB_CONSOLE_URI)
+            .computing(EntityFunctions.attribute(BrooklynNode.WEB_CONSOLE_URI))
+            .build() );
     }
 
     private final class MasterChildFinder implements Callable<BrooklynNode> {


Mime
View raw message