You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sj...@apache.org on 2015/07/30 22:00:18 UTC

[01/11] incubator-brooklyn git commit: Revert the eager loading of the catalog items

Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 906ea254c -> d90a8bf07


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/642035ae/docs/website/learnmore/catalog/catalog-item.html
----------------------------------------------------------------------
diff --git a/docs/website/learnmore/catalog/catalog-item.html b/docs/website/learnmore/catalog/catalog-item.html
index 8eb333f..b7acd5b 100644
--- a/docs/website/learnmore/catalog/catalog-item.html
+++ b/docs/website/learnmore/catalog/catalog-item.html
@@ -57,22 +57,16 @@ under the License.
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
 <script src="{{site.path.style}}/js/catalog/common.js" type="text/javascript"></script>
+<script src="{{site.path.style}}/js/catalog/items.js" type="text/javascript"></script>
+
 <script type="text/javascript">
   $(document).ready(function () {
-    var items_loaded;
-
     $(window).on('hashchange', updateItem);
 
-    $.getJSON( "{{site.path.style}}/js/catalog/items.json", function( data ) {
-      items_loaded = data;
-      updateItem(data);
-    });
+    updateItem(items);
 
     function updateItem(items) {
       var args, catalog_type;
-      if(!items) {
-        items = items_loaded;
-      }
       args = getArgs();
       if(args.length!=2) {
         alert('bad entity format')

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/642035ae/docs/website/learnmore/catalog/index.html
----------------------------------------------------------------------
diff --git a/docs/website/learnmore/catalog/index.html b/docs/website/learnmore/catalog/index.html
index 9911ba6..f987f37 100644
--- a/docs/website/learnmore/catalog/index.html
+++ b/docs/website/learnmore/catalog/index.html
@@ -23,6 +23,7 @@ under the License.
 <head>
 
   {% include base-head.html %}
+  <script type="text/javascript" src="{{site.path.style}}/js/catalog/items.js"></script>
   <link rel="stylesheet" href="{{site.path.style}}/css/catalog_items.css" type="text/css" media="screen"/>
 </head>
 
@@ -128,16 +129,8 @@ under the License.
     });
   };
   
-  var items_loaded;
   $(document).ready(function () {
-    if(!items_loaded) {
-      $.getJSON( "{{site.path.style}}/js/catalog/items.json", function( data ) {
-        items_loaded = data;
-        updateItems(data);
-      });
-    } else {
-      updateItems(items_loaded);
-    }
+    updateItems(items);
 
     function updateItems(items) {
       if (!String.prototype.trim) {


[04/11] incubator-brooklyn git commit: Tidy AbstractApplication

Posted by sj...@apache.org.
Tidy AbstractApplication

* Delete unused fields mgmt, deployed and brooklynProperties.
* Apply setExpectedState and recordApplicationEvent in tandem.
* Make recordApplicationEvent accessible from subclasses.


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

Branch: refs/heads/master
Commit: 9cbe341a663248ab7471798ee35e8416b82487b6
Parents: 69714b9
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Wed Jul 29 16:57:30 2015 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Wed Jul 29 16:58:01 2015 +0100

----------------------------------------------------------------------
 .../entity/basic/AbstractApplication.java       | 41 +++++++-------------
 1 file changed, 15 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/9cbe341a/core/src/main/java/brooklyn/entity/basic/AbstractApplication.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/basic/AbstractApplication.java b/core/src/main/java/brooklyn/entity/basic/AbstractApplication.java
index f796645..10df7a1 100644
--- a/core/src/main/java/brooklyn/entity/basic/AbstractApplication.java
+++ b/core/src/main/java/brooklyn/entity/basic/AbstractApplication.java
@@ -24,18 +24,15 @@ import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import brooklyn.config.BrooklynProperties;
 import brooklyn.config.ConfigKey;
 import brooklyn.entity.Application;
 import brooklyn.entity.Entity;
 import brooklyn.entity.basic.ServiceStateLogic.ServiceProblemsLogic;
 import brooklyn.entity.trait.StartableMethods;
 import brooklyn.location.Location;
-import brooklyn.management.ManagementContext;
 import brooklyn.management.internal.ManagementContextInternal;
 import brooklyn.util.exceptions.Exceptions;
 import brooklyn.util.exceptions.RuntimeInterruptedException;
-import brooklyn.util.flags.SetFromFlag;
 import brooklyn.util.text.Strings;
 import brooklyn.util.time.Time;
 
@@ -60,15 +57,8 @@ public abstract class AbstractApplication extends AbstractEntity implements Star
      */
     public static final ConfigKey<String> DEFAULT_DISPLAY_NAME = ConfigKeys.newStringConfigKey("defaultDisplayName");
 
-    @SetFromFlag("mgmt")
-    private volatile ManagementContext mgmt;
-    
-    private boolean deployed = false;
-
-    BrooklynProperties brooklynProperties = null;
-
     private volatile Application application;
-    
+
     public AbstractApplication() {
     }
 
@@ -156,9 +146,8 @@ public abstract class AbstractApplication extends AbstractEntity implements Star
         this.addLocations(locations);
         Collection<? extends Location> locationsToUse = getLocations();
         ServiceProblemsLogic.clearProblemsIndicator(this, START);
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
         ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL, "Application starting");
-        recordApplicationEvent(Lifecycle.STARTING);
+        setExpectedStateAndRecordLifecycleEvent(Lifecycle.STARTING);
         try {
             preStart(locationsToUse);
             // if there are other items which should block service_up, they should be done in preStart
@@ -176,9 +165,8 @@ public abstract class AbstractApplication extends AbstractEntity implements Star
         } finally {
             ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);
         }
-        
-        deployed = true;
-        recordApplicationEvent(Lifecycle.RUNNING);
+
+        setExpectedStateAndRecordLifecycleEvent(Lifecycle.RUNNING);
 
         logApplicationLifecycle("Started");
     }
@@ -214,23 +202,19 @@ public abstract class AbstractApplication extends AbstractEntity implements Star
 
         ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL, "Application stopping");
         setAttribute(SERVICE_UP, false);
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPING);
-        recordApplicationEvent(Lifecycle.STOPPING);
+        setExpectedStateAndRecordLifecycleEvent(Lifecycle.STOPPING);
         try {
             doStop();
         } catch (Exception e) {
-            ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
-            recordApplicationEvent(Lifecycle.ON_FIRE);
+            setExpectedStateAndRecordLifecycleEvent(Lifecycle.ON_FIRE);
             log.warn("Error stopping application " + this + " (rethrowing): "+e);
             throw Exceptions.propagate(e);
         }
-        ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL, "Application stopping");
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPED);
-        recordApplicationEvent(Lifecycle.STOPPED);
+        ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL, "Application stopped");
+        setExpectedStateAndRecordLifecycleEvent(Lifecycle.STOPPED);
 
         if (getParent()==null) {
             synchronized (this) {
-                deployed = false;
                 //TODO review mgmt destroy lifecycle
                 //  we don't necessarily want to forget all about the app on stop, 
                 //since operator may be interested in things recently stopped;
@@ -261,8 +245,13 @@ public abstract class AbstractApplication extends AbstractEntity implements Star
             recordApplicationEvent(Lifecycle.DESTROYED);
         }
     }
-    
-    private void recordApplicationEvent(Lifecycle state) {
+
+    protected void setExpectedStateAndRecordLifecycleEvent(Lifecycle state) {
+        ServiceStateLogic.setExpectedState(this, state);
+        recordApplicationEvent(state);
+    }
+
+    protected void recordApplicationEvent(Lifecycle state) {
         try {
             ((ManagementContextInternal)getManagementContext()).getUsageManager().recordApplicationEvent(this, state);
         } catch (RuntimeInterruptedException e) {


[02/11] incubator-brooklyn git commit: Revert the eager loading of the catalog items

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/642035ae/docs/style/js/catalog/items.json
----------------------------------------------------------------------
diff --git a/docs/style/js/catalog/items.json b/docs/style/js/catalog/items.json
deleted file mode 100644
index 8d29f32..0000000
--- a/docs/style/js/catalog/items.json
+++ /dev/null
@@ -1,24674 +0,0 @@
-{
-  "entities" : [ {
-    "type" : "brooklyn.entity.messaging.activemq.ActiveMQBroker",
-    "defaultVersion" : "5.7.0",
-    "name" : "ActiveMQ Broker",
-    "description" : "ActiveMQ is an open source message broker which fully implements the Java Message Service 1.1 (JMS)",
-    "iconUrl" : "classpath:///activemq-logo.png",
-    "config" : [ {
-      "name" : "activemq.install.mirror.url",
-      "type" : "java.lang.String",
-      "defaultValue" : "http://www.mirrorservice.org/sites/ftp.apache.org/activemq/apache-activemq",
-      "description" : "URL of mirror",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "activemq.jetty.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "8161-65535",
-      "description" : "jetty port",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "activemq.templateConfigurationUrl",
-      "type" : "java.lang.String",
-      "defaultValue" : "classpath://brooklyn/entity/messaging/activemq/activemq.xml",
-      "description" : "Template file (in freemarker format) for the conf/activemq.xml file",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "children.startable.mode",
-      "type" : "java.lang.Enum",
-      "defaultValue" : null,
-      "description" : "children.startable.mode",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : [ {
-        "value" : "NONE",
-        "description" : "NONE"
-      }, {
-        "value" : "FOREGROUND",
-        "description" : "FOREGROUND"
-      }, {
-        "value" : "FOREGROUND_LATE",
-        "description" : "FOREGROUND_LATE"
-      }, {
-        "value" : "BACKGROUND",
-        "description" : "BACKGROUND"
-      }, {
-        "value" : "BACKGROUND_LATE",
-        "description" : "BACKGROUND_LATE"
-      } ],
-      "links" : null
-    }, {
-      "name" : "customize.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking customize until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "download.addon.urls",
-      "type" : "java.util.Map",
-      "defaultValue" : null,
-      "description" : "URL patterns for downloading named add-ons (will substitute things like ${version} automatically)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "download.url",
-      "type" : "java.lang.String",
-      "defaultValue" : "${driver.mirrorUrl}/${version}/apache-activemq-${version}-bin.tar.gz",
-      "description" : "URL pattern for downloading the installer (will substitute things like ${version} automatically)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "expandedinstall.dir",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Directory for installed artifacts (e.g. expanded dir after unpacking .tgz)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "files.runtime",
-      "type" : "java.util.Map",
-      "defaultValue" : null,
-      "description" : "Map of files to be copied, keyed by destination name relative to runDir",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.dir",
-      "type" : "java.lang.String",
-      "defaultValue" : "${config['onbox.base.dir']!config['brooklyn.datadir']!'/<ERROR>-ONBOX_BASE_DIR-not-set'}/installs/${(config['install.unique_label']??)?string(config['install.unique_label']!'X',(entity.entityType.simpleName)+((config['install.version']??)?string('_'+(config['install.version']!'X'),'')))}",
-      "description" : "Directory for this software to be installed in",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking install until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.skip",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : false,
-      "description" : "Skip the driver install commands entirely, for pre-installed software",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.unique_label",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Provides a label which uniquely identifies an installation, used in the computation of the install dir; this should include something readable, and must include a hash of all data which differentiates an installation (e.g. version, plugins, etc), but should be the same where install dirs can be shared to allow for re-use",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.version",
-      "type" : "java.lang.String",
-      "defaultValue" : "5.7.0",
-      "description" : "Suggested version",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "java.check.hostname.bug",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : true,
-      "description" : "Check whether hostname is too long and will likely crash Javadue to bug 7089443",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "java.opts",
-      "type" : "java.util.Set",
-      "defaultValue" : [ ],
-      "description" : "Java command line options",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "java.sysprops",
-      "type" : "java.util.Map",
-      "defaultValue" : { },
-      "description" : "Java command line system properties",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.agent.mode",
-      "type" : "java.lang.Enum",
-      "defaultValue" : "AUTODETECT",
-      "description" : "What type of JMX agent to use; defaults to null (autodetect) which means JMXMP_AND_RMI allowing firewall access through a single port as well as local access supporting jconsole (unless JMX_SSL_ENABLED is set, in which case it is JMXMP only)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : [ {
-        "value" : "AUTODETECT",
-        "description" : "AUTODETECT"
-      }, {
-        "value" : "JMXMP",
-        "description" : "JMXMP"
-      }, {
-        "value" : "JMXMP_AND_RMI",
-        "description" : "JMXMP_AND_RMI"
-      }, {
-        "value" : "JMX_RMI_CUSTOM_AGENT",
-        "description" : "JMX_RMI_CUSTOM_AGENT"
-      }, {
-        "value" : "JMX_RMI",
-        "description" : "JMX_RMI"
-      }, {
-        "value" : "NONE",
-        "description" : "NONE"
-      } ],
-      "links" : null
-    }, {
-      "name" : "jmx.context",
-      "type" : "java.lang.String",
-      "defaultValue" : "jmxrmi",
-      "description" : "JMX context path",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.direct.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "31001-65535",
-      "description" : "JMX direct/private port (e.g. JMX RMI server port, or JMXMP port, but not RMI registry port)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.enabled",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : true,
-      "description" : "JMX enabled",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.password",
-      "type" : "java.lang.String",
-      "defaultValue" : "admin",
-      "description" : "JMX password",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.ssl.access.cert",
-      "type" : "java.security.cert.Certificate",
-      "defaultValue" : null,
-      "description" : "certificate of key used to access a JMX agent",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.ssl.access.key",
-      "type" : "java.security.PrivateKey",
-      "defaultValue" : null,
-      "description" : "key used to access a JMX agent (typically per entity, embedded in the managed JVM)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.ssl.enabled",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : false,
-      "description" : "JMX over JMXMP enabled with SSL/TLS",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.user",
-      "type" : "java.lang.String",
-      "defaultValue" : "admin",
-      "description" : "JMX username",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "launch.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking launch until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "openwire.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "61616-65535",
-      "description" : "OpenWire port",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "post.install.command",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Command to be run after the install method being called on the driver",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "post.launch.command",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Command to be run after the launch method being called on the driver",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "pre.install.command",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Command to be run prior to the install method being called on the driver",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "pre.launch.command",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Command to be run prior to the launch method being called on the driver",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "provisioning.properties",
-      "type" : "java.util.Map",
-      "defaultValue" : { },
-      "description" : "Custom properties to be passed in when provisioning a new machine",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "resources.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking resources until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "rmi.registry.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "1099,19099-65535",
-      "description" : "RMI registry port, used for discovering JMX (private) port",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "run.dir",
-      "type" : "java.lang.String",
-      "defaultValue" : "${config['onbox.base.dir']!config['brooklyn.datadir']!'/<ERROR>-ONBOX_BASE_DIR-not-set'}/apps/${entity.applicationId}/entities/${entity.entityType.simpleName}_${entity.id}",
-      "description" : "Directory for this software to be run from",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "setup.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking setup until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "shell.env",
-      "type" : "java.util.Map",
-      "defaultValue" : { },
-      "description" : "Map of environment variables to pass to the runtime shell",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "softwareProcess.maxSensorRebindDelay",
-      "type" : "brooklyn.util.time.Duration",
-      "defaultValue" : "10s",
-      "description" : "The maximum delay to apply when reconnecting sensors when rebinding to this entity. Brooklyn will wait a random amount of time, up to the value of this config key, to avoid a thundering herd problem when the entity shares its machine with several others. Set to null or to 0 to disable any delay.",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "start.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking start until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "start.timeout",
-      "type" : "brooklyn.util.time.Duration",
-      "defaultValue" : "2m",
-      "description" : "Time to wait for process and for SERVICE_UP before failing (in seconds, default 2m)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "templates.runtime",
-      "type" : "java.util.Map",
-      "defaultValue" : null,
-      "description" : "Map of templates to be filled in and copied, keyed by destination name relative to runDir",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    } ],
-    "sensors" : [ {
-      "name" : "activemq.jetty.port",
-      "type" : "java.lang.Integer",
-      "description" : "jetty port",
-      "links" : null
-    }, {
-      "name" : "activemq.templateConfigurationUrl",
-      "type" : "java.lang.String",
-      "description" : "Template file (in freemarker format) for the conf/activemq.xml file",
-      "links" : null
-    }, {
-      "name" : "broker.url",
-      "type" : "java.lang.String",
-      "description" : "Broker Connection URL",
-      "links" : null
-    }, {
-      "name" : "download.addon.urls",
-      "type" : "java.util.Map",
-      "description" : "URL patterns for downloading named add-ons (will substitute things like ${version} automatically)",
-      "links" : null
-    }, {
-      "name" : "download.url",
-      "type" : "java.lang.String",
-      "description" : "URL pattern for downloading the installer (will substitute things like ${version} automatically)",
-      "links" : null
-    }, {
-      "name" : "expandedinstall.dir",
-      "type" : "java.lang.String",
-      "description" : "Directory for installed artifacts (e.g. expanded dir after unpacking .tgz)",
-      "links" : null
-    }, {
-      "name" : "host.address",
-      "type" : "java.lang.String",
-      "description" : "Host IP address",
-      "links" : null
-    }, {
-      "name" : "host.name",
-      "type" : "java.lang.String",
-      "description" : "Host name",
-      "links" : null
-    }, {
-      "name" : "host.subnet.address",
-      "type" : "java.lang.String",
-      "description" : "Host address as known internally in the subnet where it is running (if different to host.name)",
-      "links" : null
-    }, {
-      "name" : "host.subnet.hostname",
-      "type" : "java.lang.String",
-      "description" : "Host name as known internally in the subnet where it is running (if different to host.name)",
-      "links" : null
-    }, {
-      "name" : "install.dir",
-      "type" : "java.lang.String",
-      "description" : "Directory for this software to be installed in",
-      "links" : null
-    }, {
-      "name" : "jmx.context",
-      "type" : "java.lang.String",
-      "description" : "JMX context path",
-      "links" : null
-    }, {
-      "name" : "jmx.direct.port",
-      "type" : "java.lang.Integer",
-      "description" : "JMX direct/private port (e.g. JMX RMI server port, or JMXMP port, but not RMI registry port)",
-      "links" : null
-    }, {
-      "name" : "jmx.password",
-      "type" : "java.lang.String",
-      "description" : "JMX password",
-      "links" : null
-    }, {
-      "name" : "jmx.service.url",
-      "type" : "java.lang.String",
-      "description" : "The URL for connecting to the MBean Server",
-      "links" : null
-    }, {
-      "name" : "jmx.user",
-      "type" : "java.lang.String",
-      "description" : "JMX username",
-      "links" : null
-    }, {
-      "name" : "openwire.port",
-      "type" : "java.lang.Integer",
-      "description" : "OpenWire port",
-      "links" : null
-    }, {
-      "name" : "rmi.registry.port",
-      "type" : "java.lang.Integer",
-      "description" : "RMI registry port, used for discovering JMX (private) port",
-      "links" : null
-    }, {
-      "name" : "run.dir",
-      "type" : "java.lang.String",
-      "description" : "Directory for this software to be run from",
-      "links" : null
-    }, {
-      "name" : "service.isUp",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether the service is active and availability (confirmed and monitored)",
-      "links" : null
-    }, {
-      "name" : "service.process.isRunning",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether the process for the service is confirmed as running",
-      "links" : null
-    }, {
-      "name" : "service.state",
-      "type" : "brooklyn.entity.basic.Lifecycle",
-      "description" : "Actual lifecycle state of the service",
-      "links" : null
-    }, {
-      "name" : "softwareprocess.pid.file",
-      "type" : "java.lang.String",
-      "description" : "PID file",
-      "links" : null
-    }, {
-      "name" : "softwareservice.provisioningLocation",
-      "type" : "brooklyn.location.MachineProvisioningLocation",
-      "description" : "Location used to provision a machine where this is running",
-      "links" : null
-    } ],
-    "effectors" : [ {
-      "name" : "restart",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Restart the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "start",
-      "returnType" : "void",
-      "parameters" : [ {
-        "name" : "locations",
-        "type" : "java.lang.Object",
-        "description" : "The location or locations to start in, as a string, a location object, a list of strings, or a list of location objects",
-        "defaultValue" : null
-      } ],
-      "description" : "Start the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "stop",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Stop the process/service represented by an entity",
-      "links" : null
-    } ]
-  }, {
-    "type" : "brooklyn.entity.nosql.cassandra.CassandraFabric",
-    "name" : "Apache Cassandra Database Fabric",
-    "description" : "Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store which provides a ColumnFamily-based data model richer than typical key/value systems",
-    "iconUrl" : "classpath:///cassandra-logo.jpeg",
-    "config" : [ {
-      "name" : "cassandra.fabric.datacenter.namer",
-      "type" : "com.google.common.base.Function",
-      "defaultValue" : null,
-      "description" : "Function used to provide the cassandra.replication.datacenterName for a given location",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccfabric.memberspec",
-      "type" : "brooklyn.entity.proxying.EntitySpec",
-      "defaultValue" : null,
-      "description" : "entity spec for creating new cluster members",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamicfabric.customChildFlags",
-      "type" : "java.util.Map",
-      "defaultValue" : { },
-      "description" : "Additional flags to be passed to children when they are being created",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamicfabric.displayNamePrefix",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Display name prefix, for created children",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamicfabric.displayNameSuffix",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Display name suffix, for created children",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamicfabric.factory",
-      "type" : "brooklyn.entity.basic.EntityFactory",
-      "defaultValue" : null,
-      "description" : "factory for creating new cluster members",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "enricher.service_state.children_and_members.quorum.running",
-      "type" : "brooklyn.entity.basic.QuorumCheck",
-      "defaultValue" : "QuorumCheck[require=0,100.0%]",
-      "description" : "Problems check from children actual states (lifecycle), applied by default to members and children, not checking upness, but requiring by default that none are on-fire",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "enricher.service_state.children_and_members.quorum.up",
-      "type" : "brooklyn.entity.basic.QuorumCheck",
-      "defaultValue" : "QuorumCheck[require=1,0.0%]",
-      "description" : "Up check, applied by default to members, requiring at least one present and up",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "fabric.initial.quorumSize",
-      "type" : "java.lang.Integer",
-      "defaultValue" : -1,
-      "description" : "Initial fabric quorum size - number of initial nodes that must have been successfully started to report success (if less than 0, then use a value based on INITIAL_SIZE of clusters)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "group.members.delegate",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : false,
-      "description" : "Add delegate child entities for members of the group",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "group.members.delegate.nameFormat",
-      "type" : "java.lang.String",
-      "defaultValue" : "%s",
-      "description" : "Delegate members name format string (Use %s for the original entity display name)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    } ],
-    "sensors" : [ {
-      "name" : "cassandra.cluster.datacenterUsages",
-      "type" : "com.google.common.collect.Multimap",
-      "description" : "Current set of datacenters in use, with nodes in each",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.datacenters",
-      "type" : "java.util.Set",
-      "description" : "Current set of datacenters in use",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.hostname",
-      "type" : "java.lang.String",
-      "description" : "Hostname to connect to cluster with",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.seeds.current",
-      "type" : "java.util.Set",
-      "description" : "Current set of seeds to use to bootstrap the cluster",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.seeds.hasPublished",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether we have published any seeds",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.thrift.port",
-      "type" : "java.lang.Integer",
-      "description" : "Cassandra Thrift RPC port to connect to cluster with",
-      "links" : null
-    }, {
-      "name" : "fabric.size",
-      "type" : "java.lang.Integer",
-      "description" : "Fabric size",
-      "links" : null
-    }, {
-      "name" : "group.members",
-      "type" : "java.util.Collection",
-      "description" : "Members of the group",
-      "links" : null
-    }, {
-      "name" : "group.members.added",
-      "type" : "brooklyn.entity.Entity",
-      "description" : "Entity added to group members",
-      "links" : null
-    }, {
-      "name" : "group.members.count",
-      "type" : "java.lang.Integer",
-      "description" : "Number of members",
-      "links" : null
-    }, {
-      "name" : "group.members.removed",
-      "type" : "brooklyn.entity.Entity",
-      "description" : "Entity removed from group members",
-      "links" : null
-    }, {
-      "name" : "service.isUp",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether the service is active and availability (confirmed and monitored)",
-      "links" : null
-    }, {
-      "name" : "service.state",
-      "type" : "brooklyn.entity.basic.Lifecycle",
-      "description" : "Actual lifecycle state of the service",
-      "links" : null
-    } ],
-    "effectors" : [ {
-      "name" : "restart",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Restart the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "start",
-      "returnType" : "void",
-      "parameters" : [ {
-        "name" : "locations",
-        "type" : "java.lang.Object",
-        "description" : "The location or locations to start in, as a string, a location object, a list of strings, or a list of location objects",
-        "defaultValue" : null
-      } ],
-      "description" : "Start the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "stop",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Stop the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "update",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Updates the cluster members",
-      "links" : null
-    } ]
-  }, {
-    "type" : "brooklyn.entity.nosql.cassandra.CassandraDatacenter",
-    "name" : "Apache Cassandra Datacenter Cluster",
-    "description" : "Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store which provides a ColumnFamily-based data model richer than typical key/value systems",
-    "iconUrl" : "classpath:///cassandra-logo.jpeg",
-    "config" : [ {
-      "name" : "cassandra.cluster.delayBeforeAdvertisingCluster",
-      "type" : "brooklyn.util.time.Duration",
-      "defaultValue" : "10s",
-      "description" : "Delay after cluster is started before checking and advertising its availability",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.name",
-      "type" : "java.lang.String",
-      "defaultValue" : "BrooklynCluster",
-      "description" : "Name of the Cassandra cluster",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.seedSupplier",
-      "type" : "com.google.common.base.Supplier",
-      "defaultValue" : null,
-      "description" : "For determining the seed nodes",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.snitchName",
-      "type" : "java.lang.String",
-      "defaultValue" : "SimpleSnitch",
-      "description" : "Type of the Cassandra snitch",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.tokenGenerator.class",
-      "type" : "java.lang.Class",
-      "defaultValue" : "class brooklyn.entity.nosql.cassandra.TokenGenerators$PosNeg63TokenGenerator",
-      "description" : "For determining the tokens of nodes",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.tokenShift",
-      "type" : "java.math.BigInteger",
-      "defaultValue" : null,
-      "description" : "Delta applied to all tokens generated for this Cassandra datacenter, useful when configuring multiple datacenters which should be shifted; if not set, a random shift is applied. (Pass 0 to prevent any shift.)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.useVnodes",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : false,
-      "description" : "Determines whether to use vnodes; if doing so, tokens will not be explicitly assigned to nodes in the cluster",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.numTokensPerNode",
-      "type" : "java.lang.Integer",
-      "defaultValue" : 256,
-      "description" : "Number of tokens per node; if using vnodes, should set this to a value like 256; will be overridden to 1 if USE_VNODES==false",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cluster.initial.quorumSize",
-      "type" : "java.lang.Integer",
-      "defaultValue" : -1,
-      "description" : "Initial cluster quorum size - number of initial nodes that must have been successfully started to report success (if < 0, then use value of INITIAL_SIZE)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cluster.initial.size",
-      "type" : "java.lang.Integer",
-      "defaultValue" : 1,
-      "description" : "Initial cluster size",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.availabilityZones",
-      "type" : "java.util.Collection",
-      "defaultValue" : null,
-      "description" : "availability zones to use (if non-null, overrides other configuration)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.customChildFlags",
-      "type" : "java.util.Map",
-      "defaultValue" : { },
-      "description" : "Additional flags to be passed to children when they are being created",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.factory",
-      "type" : "brooklyn.entity.basic.EntityFactory",
-      "defaultValue" : null,
-      "description" : "factory for creating new cluster members",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.memberspec",
-      "type" : "brooklyn.entity.proxying.EntitySpec",
-      "defaultValue" : null,
-      "description" : "entity spec for creating new cluster members",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.numAvailabilityZones",
-      "type" : "java.lang.Integer",
-      "defaultValue" : null,
-      "description" : "number of availability zones to use (will attempt to auto-discover this number)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.quarantineFailedEntities",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : true,
-      "description" : "If true, will quarantine entities that fail to start; if false, will get rid of them (i.e. delete them)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.removalstrategy",
-      "type" : "com.google.common.base.Function",
-      "defaultValue" : null,
-      "description" : "strategy for deciding what to remove when down-sizing",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.zone.enable",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : false,
-      "description" : "Whether to use availability zones, or just deploy everything into the generic location",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.zone.failureDetector",
-      "type" : "brooklyn.entity.group.DynamicCluster$ZoneFailureDetector",
-      "defaultValue" : "brooklyn.entity.group.zoneaware.ProportionalZoneFailureDetector@b7193fc",
-      "description" : "Zone failure detector",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.zone.placementStrategy",
-      "type" : "brooklyn.entity.group.DynamicCluster$NodePlacementStrategy",
-      "defaultValue" : "brooklyn.entity.group.zoneaware.BalancingNodePlacementStrategy@37f02eaa",
-      "description" : "Node placement strategy",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "enricher.service_state.children_and_members.quorum.running",
-      "type" : "brooklyn.entity.basic.QuorumCheck",
-      "defaultValue" : "QuorumCheck[require=0,100.0%]",
-      "description" : "Problems check from children actual states (lifecycle), applied by default to members and children, not checking upness, but requiring by default that none are on-fire",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "enricher.service_state.children_and_members.quorum.up",
-      "type" : "brooklyn.entity.basic.QuorumCheck",
-      "defaultValue" : "QuorumCheck[require=1,0.0%]",
-      "description" : "Up check, applied by default to members, requiring at least one present and up",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "group.members.delegate",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : false,
-      "description" : "Add delegate child entities for members of the group",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "group.members.delegate.nameFormat",
-      "type" : "java.lang.String",
-      "defaultValue" : "%s",
-      "description" : "Delegate members name format string (Use %s for the original entity display name)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    } ],
-    "sensors" : [ {
-      "name" : "cassandra.cluster.datacenterUsages",
-      "type" : "com.google.common.collect.Multimap",
-      "description" : "Current set of datacenters in use, with nodes in each",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.datacenters",
-      "type" : "java.util.Set",
-      "description" : "Current set of datacenters in use",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.first.node.started.utc",
-      "type" : "java.lang.Long",
-      "description" : "Time (UTC) when the first node was started",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.hostname",
-      "type" : "java.lang.String",
-      "description" : "Hostname to connect to cluster with",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.metrics.processCpuTime.fraction.perNode",
-      "type" : "java.lang.Double",
-      "description" : "Fraction of CPU time used (percentage reported by JMX), averaged over all nodes",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.metrics.processCpuTime.fraction.windowed",
-      "type" : "java.lang.Double",
-      "description" : "Fraction of CPU time used (percentage, over time window), averaged over all nodes",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.name",
-      "type" : "java.lang.String",
-      "description" : "Name of the Cassandra cluster",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.nodes",
-      "type" : "java.util.List",
-      "description" : "List of host:port of all active nodes in the cluster (thrift port, and public hostname/IP)",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.read.active",
-      "type" : "java.lang.Integer",
-      "description" : "Current active ReadStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.read.pending",
-      "type" : "java.lang.Long",
-      "description" : "Current pending ReadStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.schema.versions.count",
-      "type" : "java.lang.Integer",
-      "description" : "Number of different schema versions in the cluster; should be 1 for a healthy cluster, 0 when off; 2 and above indicats a Schema Disagreement Error (and keyspace access may fail)",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.seeds.current",
-      "type" : "java.util.Set",
-      "description" : "Current set of seeds to use to bootstrap the cluster",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.seeds.hasPublished",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether we have published any seeds",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.start.nodes.queued",
-      "type" : "java.util.List",
-      "description" : "Nodes queued for starting (for sequential start)",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.thrift.latency.perNode",
-      "type" : "java.lang.Long",
-      "description" : "Latency for thrift port connection  averaged over all nodes (ms)",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.thrift.port",
-      "type" : "java.lang.Integer",
-      "description" : "Cassandra Thrift RPC port to connect to cluster with",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.write.active",
-      "type" : "java.lang.Integer",
-      "description" : "Current active MutationStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.write.pending",
-      "type" : "java.lang.Long",
-      "description" : "Current pending MutationStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.reads.perSec.last.perNode",
-      "type" : "java.lang.Double",
-      "description" : "Reads/sec (last datapoint) averaged over all nodes",
-      "links" : null
-    }, {
-      "name" : "cassandra.reads.perSec.windowed.perNode",
-      "type" : "java.lang.Double",
-      "description" : "Reads/sec (over time window) averaged over all nodes",
-      "links" : null
-    }, {
-      "name" : "cassandra.thrift.latency.windowed.perNode",
-      "type" : "java.lang.Double",
-      "description" : "Latency for thrift port (ms, over time window) averaged over all nodes",
-      "links" : null
-    }, {
-      "name" : "cassandra.write.perSec.last.perNode",
-      "type" : "java.lang.Double",
-      "description" : "Writes/sec (last datapoint) averaged over all nodes",
-      "links" : null
-    }, {
-      "name" : "cassandra.writes.perSec.windowed.perNode",
-      "type" : "java.lang.Double",
-      "description" : "Writes/sec (over time window) averaged over all nodes",
-      "links" : null
-    }, {
-      "name" : "cluster.entity",
-      "type" : "brooklyn.entity.Entity",
-      "description" : "The cluster an entity is a member of",
-      "links" : null
-    }, {
-      "name" : "cluster.first",
-      "type" : "java.lang.Boolean",
-      "description" : "Set on an entity if it is the first member of a cluster",
-      "links" : null
-    }, {
-      "name" : "cluster.first.entity",
-      "type" : "brooklyn.entity.Entity",
-      "description" : "The first member of the cluster",
-      "links" : null
-    }, {
-      "name" : "cluster.member",
-      "type" : "java.lang.Boolean",
-      "description" : "Set on an entity if it is a member of a cluster",
-      "links" : null
-    }, {
-      "name" : "datastore.url",
-      "type" : "java.lang.String",
-      "description" : "Primary contact URL for a datastore (e.g. mysql://localhost:3306/)",
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.entityQuarantined",
-      "type" : "brooklyn.entity.Entity",
-      "description" : "Entity failed to start, and has been quarantined",
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.failedSubLocations",
-      "type" : "java.util.Set",
-      "description" : "Sub locations that seem to have failed",
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.quarantineGroup",
-      "type" : "brooklyn.entity.group.QuarantineGroup",
-      "description" : "Group of quarantined entities that failed to start",
-      "links" : null
-    }, {
-      "name" : "dynamiccluster.subLocations",
-      "type" : "java.util.List",
-      "description" : "Locations for each availability zone to use",
-      "links" : null
-    }, {
-      "name" : "group.members",
-      "type" : "java.util.Collection",
-      "description" : "Members of the group",
-      "links" : null
-    }, {
-      "name" : "group.members.added",
-      "type" : "brooklyn.entity.Entity",
-      "description" : "Entity added to group members",
-      "links" : null
-    }, {
-      "name" : "group.members.count",
-      "type" : "java.lang.Integer",
-      "description" : "Number of members",
-      "links" : null
-    }, {
-      "name" : "group.members.removed",
-      "type" : "brooklyn.entity.Entity",
-      "description" : "Entity removed from group members",
-      "links" : null
-    }, {
-      "name" : "service.isUp",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether the service is active and availability (confirmed and monitored)",
-      "links" : null
-    }, {
-      "name" : "service.state",
-      "type" : "brooklyn.entity.basic.Lifecycle",
-      "description" : "Actual lifecycle state of the service",
-      "links" : null
-    } ],
-    "effectors" : [ {
-      "name" : "executeScript",
-      "returnType" : "java.lang.String",
-      "parameters" : [ {
-        "name" : "commands",
-        "type" : "java.lang.String",
-        "description" : null,
-        "defaultValue" : null
-      } ],
-      "description" : "executes the given script contents using cassandra-cli",
-      "links" : null
-    }, {
-      "name" : "replaceMember",
-      "returnType" : "java.lang.String",
-      "parameters" : [ {
-        "name" : "memberId",
-        "type" : "java.lang.String",
-        "description" : "The entity id of a member to be replaced",
-        "defaultValue" : null
-      } ],
-      "description" : "Replaces the entity with the given ID, if it is a member; first adds a new member, then removes this one. Returns id of the new entity; or throws exception if couldn't be replaced.",
-      "links" : null
-    }, {
-      "name" : "resize",
-      "returnType" : "java.lang.Integer",
-      "parameters" : [ {
-        "name" : "desiredSize",
-        "type" : "java.lang.Integer",
-        "description" : "The new size of the cluster",
-        "defaultValue" : null
-      } ],
-      "description" : "Changes the size of the entity (e.g. the number of nodes in a cluster)",
-      "links" : null
-    }, {
-      "name" : "resizeByDelta",
-      "returnType" : "java.util.Collection",
-      "parameters" : [ {
-        "name" : "delta",
-        "type" : "int",
-        "description" : "The change in number of nodes",
-        "defaultValue" : null
-      } ],
-      "description" : "Changes the size of the cluster.",
-      "links" : null
-    }, {
-      "name" : "restart",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Restart the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "start",
-      "returnType" : "void",
-      "parameters" : [ {
-        "name" : "locations",
-        "type" : "java.lang.Object",
-        "description" : "The location or locations to start in, as a string, a location object, a list of strings, or a list of location objects",
-        "defaultValue" : null
-      } ],
-      "description" : "Start the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "stop",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Stop the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "update",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Updates the cluster members",
-      "links" : null
-    } ]
-  }, {
-    "type" : "brooklyn.entity.nosql.cassandra.CassandraNode",
-    "defaultVersion" : "1.2.16",
-    "name" : "Apache Cassandra Node",
-    "description" : "Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store which provides a ColumnFamily-based data model richer than typical key/value systems",
-    "iconUrl" : "classpath:///cassandra-logo.jpeg",
-    "config" : [ {
-      "name" : "cassandra.broadcastAddressSensor",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "sensor name from which to take the broadcast address; default (null) is a smart lookup",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.name",
-      "type" : "java.lang.String",
-      "defaultValue" : "BrooklynCluster",
-      "description" : "Name of the Cassandra cluster",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.seeds.initial",
-      "type" : "java.util.Set",
-      "defaultValue" : null,
-      "description" : "List of cluster nodes to seed this node",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.cluster.snitchName",
-      "type" : "java.lang.String",
-      "defaultValue" : "SimpleSnitch",
-      "description" : "Type of the Cassandra snitch",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.config.customSnitchUrl",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "URL for a jar file to be uploaded (e.g. \"classpath://brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar\"); defaults to null which means nothing to upload",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.config.fileName",
-      "type" : "java.lang.String",
-      "defaultValue" : "cassandra.yaml",
-      "description" : "Name for the copied config file",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.config.rackdc.fileName",
-      "type" : "java.lang.String",
-      "defaultValue" : "cassandra-rackdc.properties",
-      "description" : "Name for the copied rackdc config file (used for configuring replication, when a suitable snitch is used)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.config.rackdc.templateUrl",
-      "type" : "java.lang.String",
-      "defaultValue" : "classpath://brooklyn/entity/nosql/cassandra/cassandra-rackdc.properties",
-      "description" : "Template file (in freemarker format) for the cassandra-rackdc.properties config file",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.config.templateUrl",
-      "type" : "java.lang.String",
-      "defaultValue" : "classpath://brooklyn/entity/nosql/cassandra/cassandra-${entity.majorMinorVersion}.yaml",
-      "description" : "A URL (in freemarker format) for a cassandra.yaml config file (in freemarker format)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.gossip.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "7000-65535",
-      "description" : "Cassandra Gossip communications port",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.install.mirror.url",
-      "type" : "java.lang.String",
-      "defaultValue" : "http://www.mirrorservice.org/sites/ftp.apache.org/cassandra",
-      "description" : "URL of mirror",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.install.tgzUrl",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "URL of TGZ download file",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.listenAddressSensor",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "sensor name from which to take the listen address; default (null) is a smart lookup",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.native.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "9042-65535",
-      "description" : "Cassandra Native Transport port",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.numTokensPerNode",
-      "type" : "java.lang.Integer",
-      "defaultValue" : 1,
-      "description" : "Number of tokens per node; if using vnodes, should set this to a value like 256",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.replication.datacenterName",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Datacenter name (used for configuring replication, when a suitable snitch is used)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.replication.rackName",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Rack name (used for configuring replication, when a suitable snitch is used)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.rpcAddressSensor",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "sensor name from which to take the RPC address; default (null) is 0.0.0.0",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.ssl-gossip.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "7001-65535",
-      "description" : "Cassandra Gossip SSL communications port",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.thrift.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "9160-65535",
-      "description" : "Cassandra Thrift RPC port",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.token",
-      "type" : "java.math.BigInteger",
-      "defaultValue" : null,
-      "description" : "Cassandra Token",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "cassandra.tokens",
-      "type" : "java.util.Set",
-      "defaultValue" : null,
-      "description" : "Cassandra Tokens",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "children.startable.mode",
-      "type" : "java.lang.Enum",
-      "defaultValue" : null,
-      "description" : "children.startable.mode",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : [ {
-        "value" : "NONE",
-        "description" : "NONE"
-      }, {
-        "value" : "FOREGROUND",
-        "description" : "FOREGROUND"
-      }, {
-        "value" : "FOREGROUND_LATE",
-        "description" : "FOREGROUND_LATE"
-      }, {
-        "value" : "BACKGROUND",
-        "description" : "BACKGROUND"
-      }, {
-        "value" : "BACKGROUND_LATE",
-        "description" : "BACKGROUND_LATE"
-      } ],
-      "links" : null
-    }, {
-      "name" : "customize.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking customize until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "datastore.creation.script.contents",
-      "type" : "java.lang.String",
-      "defaultValue" : "",
-      "description" : "Contensts of creation script to initialize the datastore",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "datastore.creation.script.url",
-      "type" : "java.lang.String",
-      "defaultValue" : "",
-      "description" : "URL of creation script to use to initialize the datastore (ignored if contents are specified)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "download.addon.urls",
-      "type" : "java.util.Map",
-      "defaultValue" : null,
-      "description" : "URL patterns for downloading named add-ons (will substitute things like ${version} automatically)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "download.url",
-      "type" : "java.lang.String",
-      "defaultValue" : "${driver.mirrorUrl}/${version}/apache-cassandra-${version}-bin.tar.gz",
-      "description" : "URL pattern for downloading the installer (will substitute things like ${version} automatically)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "expandedinstall.dir",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Directory for installed artifacts (e.g. expanded dir after unpacking .tgz)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "files.runtime",
-      "type" : "java.util.Map",
-      "defaultValue" : null,
-      "description" : "Map of files to be copied, keyed by destination name relative to runDir",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.dir",
-      "type" : "java.lang.String",
-      "defaultValue" : "${config['onbox.base.dir']!config['brooklyn.datadir']!'/<ERROR>-ONBOX_BASE_DIR-not-set'}/installs/${(config['install.unique_label']??)?string(config['install.unique_label']!'X',(entity.entityType.simpleName)+((config['install.version']??)?string('_'+(config['install.version']!'X'),'')))}",
-      "description" : "Directory for this software to be installed in",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking install until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.skip",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : false,
-      "description" : "Skip the driver install commands entirely, for pre-installed software",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.unique_label",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Provides a label which uniquely identifies an installation, used in the computation of the install dir; this should include something readable, and must include a hash of all data which differentiates an installation (e.g. version, plugins, etc), but should be the same where install dirs can be shared to allow for re-use",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.version",
-      "type" : "java.lang.String",
-      "defaultValue" : "1.2.16",
-      "description" : "Suggested version",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "java.check.hostname.bug",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : true,
-      "description" : "Check whether hostname is too long and will likely crash Javadue to bug 7089443",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "java.metrics.mxbeanStatsEnabled",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : true,
-      "description" : "Enables collection of JVM stats from the MXBeans, such as memory and thread usage (default is true)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "java.opts",
-      "type" : "java.util.Set",
-      "defaultValue" : [ ],
-      "description" : "Java command line options",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "java.sysprops",
-      "type" : "java.util.Map",
-      "defaultValue" : { },
-      "description" : "Java command line system properties",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.agent.mode",
-      "type" : "java.lang.Enum",
-      "defaultValue" : "JMXMP_AND_RMI",
-      "description" : "What type of JMX agent to use; defaults to null (autodetect) which means JMXMP_AND_RMI allowing firewall access through a single port as well as local access supporting jconsole (unless JMX_SSL_ENABLED is set, in which case it is JMXMP only)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : [ {
-        "value" : "AUTODETECT",
-        "description" : "AUTODETECT"
-      }, {
-        "value" : "JMXMP",
-        "description" : "JMXMP"
-      }, {
-        "value" : "JMXMP_AND_RMI",
-        "description" : "JMXMP_AND_RMI"
-      }, {
-        "value" : "JMX_RMI_CUSTOM_AGENT",
-        "description" : "JMX_RMI_CUSTOM_AGENT"
-      }, {
-        "value" : "JMX_RMI",
-        "description" : "JMX_RMI"
-      }, {
-        "value" : "NONE",
-        "description" : "NONE"
-      } ],
-      "links" : null
-    }, {
-      "name" : "jmx.context",
-      "type" : "java.lang.String",
-      "defaultValue" : "jmxrmi",
-      "description" : "JMX context path",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.direct.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "31001-65535",
-      "description" : "JMX direct/private port (e.g. JMX RMI server port, or JMXMP port, but not RMI registry port)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.enabled",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : true,
-      "description" : "JMX enabled",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.password",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "JMX password",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.ssl.access.cert",
-      "type" : "java.security.cert.Certificate",
-      "defaultValue" : null,
-      "description" : "certificate of key used to access a JMX agent",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.ssl.access.key",
-      "type" : "java.security.PrivateKey",
-      "defaultValue" : null,
-      "description" : "key used to access a JMX agent (typically per entity, embedded in the managed JVM)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.ssl.enabled",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : false,
-      "description" : "JMX over JMXMP enabled with SSL/TLS",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "jmx.user",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "JMX username",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "launch.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking launch until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "post.install.command",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Command to be run after the install method being called on the driver",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "post.launch.command",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Command to be run after the launch method being called on the driver",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "pre.install.command",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Command to be run prior to the install method being called on the driver",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "pre.launch.command",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Command to be run prior to the launch method being called on the driver",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "provisioning.properties",
-      "type" : "java.util.Map",
-      "defaultValue" : { },
-      "description" : "Custom properties to be passed in when provisioning a new machine",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "resources.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking resources until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "rmi.registry.port",
-      "type" : "brooklyn.location.PortRange",
-      "defaultValue" : "7199",
-      "description" : "RMI registry port, used for discovering JMX (private) port",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "run.dir",
-      "type" : "java.lang.String",
-      "defaultValue" : "${config['onbox.base.dir']!config['brooklyn.datadir']!'/<ERROR>-ONBOX_BASE_DIR-not-set'}/apps/${entity.applicationId}/entities/${entity.entityType.simpleName}_${entity.id}",
-      "description" : "Directory for this software to be run from",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "setup.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking setup until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "shell.env",
-      "type" : "java.util.Map",
-      "defaultValue" : { },
-      "description" : "Map of environment variables to pass to the runtime shell",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "softwareProcess.maxSensorRebindDelay",
-      "type" : "brooklyn.util.time.Duration",
-      "defaultValue" : "10s",
-      "description" : "The maximum delay to apply when reconnecting sensors when rebinding to this entity. Brooklyn will wait a random amount of time, up to the value of this config key, to avoid a thundering herd problem when the entity shares its machine with several others. Set to null or to 0 to disable any delay.",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "start.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking start until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "start.timeout",
-      "type" : "brooklyn.util.time.Duration",
-      "defaultValue" : "5m",
-      "description" : "Time to wait for process and for SERVICE_UP before failing (in seconds, default 2m)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "templates.runtime",
-      "type" : "java.util.Map",
-      "defaultValue" : null,
-      "description" : "Map of templates to be filled in and copied, keyed by destination name relative to runDir",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    } ],
-    "sensors" : [ {
-      "name" : "cassandra.cluster.name",
-      "type" : "java.lang.String",
-      "description" : "Name of the Cassandra cluster",
-      "links" : null
-    }, {
-      "name" : "cassandra.gossip.port",
-      "type" : "java.lang.Integer",
-      "description" : "Cassandra Gossip communications port",
-      "links" : null
-    }, {
-      "name" : "cassandra.liveNodeCount",
-      "type" : "java.lang.Integer",
-      "description" : "Number of live nodes in cluster",
-      "links" : null
-    }, {
-      "name" : "cassandra.native.port",
-      "type" : "java.lang.Integer",
-      "description" : "Cassandra Native Transport port",
-      "links" : null
-    }, {
-      "name" : "cassandra.peers",
-      "type" : "java.lang.Integer",
-      "description" : "Number of peers in cluster",
-      "links" : null
-    }, {
-      "name" : "cassandra.read.active",
-      "type" : "java.lang.Integer",
-      "description" : "Current active ReadStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.read.completed",
-      "type" : "java.lang.Long",
-      "description" : "Total completed ReadStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.read.pending",
-      "type" : "java.lang.Long",
-      "description" : "Current pending ReadStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.reads.perSec.last",
-      "type" : "java.lang.Double",
-      "description" : "Reads/sec (last datapoint)",
-      "links" : null
-    }, {
-      "name" : "cassandra.reads.perSec.windowed",
-      "type" : "java.lang.Double",
-      "description" : "Reads/sec (over time window)",
-      "links" : null
-    }, {
-      "name" : "cassandra.replication.datacenterName",
-      "type" : "java.lang.String",
-      "description" : "Datacenter name (used for configuring replication, when a suitable snitch is used)",
-      "links" : null
-    }, {
-      "name" : "cassandra.replication.rackName",
-      "type" : "java.lang.String",
-      "description" : "Rack name (used for configuring replication, when a suitable snitch is used)",
-      "links" : null
-    }, {
-      "name" : "cassandra.service.jmx.up",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether JMX is up for this service",
-      "links" : null
-    }, {
-      "name" : "cassandra.ssl-gossip.port",
-      "type" : "java.lang.Integer",
-      "description" : "Cassandra Gossip SSL communications port",
-      "links" : null
-    }, {
-      "name" : "cassandra.thrift.latency",
-      "type" : "java.lang.Long",
-      "description" : "Latency for thrift port connection (ms) or null if down",
-      "links" : null
-    }, {
-      "name" : "cassandra.thrift.latency.windowed",
-      "type" : "java.lang.Double",
-      "description" : "Latency for thrift port (ms, averaged over time window)",
-      "links" : null
-    }, {
-      "name" : "cassandra.thrift.port",
-      "type" : "java.lang.Integer",
-      "description" : "Cassandra Thrift RPC port",
-      "links" : null
-    }, {
-      "name" : "cassandra.token",
-      "type" : "java.math.BigInteger",
-      "description" : "Cassandra Token",
-      "links" : null
-    }, {
-      "name" : "cassandra.tokens",
-      "type" : "java.util.Set",
-      "description" : "Cassandra Tokens",
-      "links" : null
-    }, {
-      "name" : "cassandra.write.active",
-      "type" : "java.lang.Integer",
-      "description" : "Current active MutationStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.write.completed",
-      "type" : "java.lang.Long",
-      "description" : "Total completed MutationStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.write.pending",
-      "type" : "java.lang.Long",
-      "description" : "Current pending MutationStage tasks",
-      "links" : null
-    }, {
-      "name" : "cassandra.write.perSec.last",
-      "type" : "java.lang.Double",
-      "description" : "Writes/sec (last datapoint)",
-      "links" : null
-    }, {
-      "name" : "cassandra.writes.perSec.windowed",
-      "type" : "java.lang.Double",
-      "description" : "Writes/sec (over time window)",
-      "links" : null
-    }, {
-      "name" : "datastore.url",
-      "type" : "java.lang.String",
-      "description" : "Primary contact URL for a datastore (e.g. mysql://localhost:3306/)",
-      "links" : null
-    }, {
-      "name" : "download.addon.urls",
-      "type" : "java.util.Map",
-      "description" : "URL patterns for downloading named add-ons (will substitute things like ${version} automatically)",
-      "links" : null
-    }, {
-      "name" : "download.url",
-      "type" : "java.lang.String",
-      "description" : "URL pattern for downloading the installer (will substitute things like ${version} automatically)",
-      "links" : null
-    }, {
-      "name" : "expandedinstall.dir",
-      "type" : "java.lang.String",
-      "description" : "Directory for installed artifacts (e.g. expanded dir after unpacking .tgz)",
-      "links" : null
-    }, {
-      "name" : "host.address",
-      "type" : "java.lang.String",
-      "description" : "Host IP address",
-      "links" : null
-    }, {
-      "name" : "host.name",
-      "type" : "java.lang.String",
-      "description" : "Host name",
-      "links" : null
-    }, {
-      "name" : "host.subnet.address",
-      "type" : "java.lang.String",
-      "description" : "Host address as known internally in the subnet where it is running (if different to host.name)",
-      "links" : null
-    }, {
-      "name" : "host.subnet.hostname",
-      "type" : "java.lang.String",
-      "description" : "Host name as known internally in the subnet where it is running (if different to host.name)",
-      "links" : null
-    }, {
-      "name" : "install.dir",
-      "type" : "java.lang.String",
-      "description" : "Directory for this software to be installed in",
-      "links" : null
-    }, {
-      "name" : "java.metrics.gc.time",
-      "type" : "java.util.Map",
-      "description" : "garbage collection time",
-      "links" : null
-    }, {
-      "name" : "java.metrics.heap.committed",
-      "type" : "java.lang.Long",
-      "description" : "Commited heap size (bytes)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.heap.init",
-      "type" : "java.lang.Long",
-      "description" : "Initial heap size (bytes)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.heap.max",
-      "type" : "java.lang.Long",
-      "description" : "Max heap size (bytes)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.heap.used",
-      "type" : "java.lang.Long",
-      "description" : "Current heap size (bytes)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.nonheap.used",
-      "type" : "java.lang.Long",
-      "description" : "Current non-heap size (bytes)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.physicalmemory.free",
-      "type" : "java.lang.Long",
-      "description" : "The free memory available to the operating system",
-      "links" : null
-    }, {
-      "name" : "java.metrics.physicalmemory.total",
-      "type" : "java.lang.Long",
-      "description" : "The physical memory available to the operating system",
-      "links" : null
-    }, {
-      "name" : "java.metrics.processCpuTime.fraction.last",
-      "type" : "java.lang.Double",
-      "description" : "Fraction of CPU time used, reported by JVM (percentage, last datapoint)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.processCpuTime.fraction.windowed",
-      "type" : "java.lang.Double",
-      "description" : "Fraction of CPU time used, reported by JVM (percentage, over time window)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.processCpuTime.total",
-      "type" : "java.lang.Double",
-      "description" : "Process CPU time (total millis since start)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.processors.available",
-      "type" : "java.lang.Integer",
-      "description" : "number of processors available to the Java virtual machine",
-      "links" : null
-    }, {
-      "name" : "java.metrics.starttime",
-      "type" : "java.lang.Long",
-      "description" : "Start time of Java process (UTC)",
-      "links" : null
-    }, {
-      "name" : "java.metrics.systemload.average",
-      "type" : "java.lang.Double",
-      "description" : "average system load",
-      "links" : null
-    }, {
-      "name" : "java.metrics.threads.current",
-      "type" : "java.lang.Integer",
-      "description" : "Current number of threads",
-      "links" : null
-    }, {
-      "name" : "java.metrics.threads.max",
-      "type" : "java.lang.Integer",
-      "description" : "Peak number of threads",
-      "links" : null
-    }, {
-      "name" : "java.metrics.uptime",
-      "type" : "java.lang.Long",
-      "description" : "Uptime of Java process (millis, elapsed since start)",
-      "links" : null
-    }, {
-      "name" : "jmx.context",
-      "type" : "java.lang.String",
-      "description" : "JMX context path",
-      "links" : null
-    }, {
-      "name" : "jmx.direct.port",
-      "type" : "java.lang.Integer",
-      "description" : "JMX direct/private port (e.g. JMX RMI server port, or JMXMP port, but not RMI registry port)",
-      "links" : null
-    }, {
-      "name" : "jmx.password",
-      "type" : "java.lang.String",
-      "description" : "JMX password",
-      "links" : null
-    }, {
-      "name" : "jmx.service.url",
-      "type" : "java.lang.String",
-      "description" : "The URL for connecting to the MBean Server",
-      "links" : null
-    }, {
-      "name" : "jmx.user",
-      "type" : "java.lang.String",
-      "description" : "JMX username",
-      "links" : null
-    }, {
-      "name" : "rmi.registry.port",
-      "type" : "java.lang.Integer",
-      "description" : "RMI registry port, used for discovering JMX (private) port",
-      "links" : null
-    }, {
-      "name" : "run.dir",
-      "type" : "java.lang.String",
-      "description" : "Directory for this software to be run from",
-      "links" : null
-    }, {
-      "name" : "service.isUp",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether the service is active and availability (confirmed and monitored)",
-      "links" : null
-    }, {
-      "name" : "service.process.isRunning",
-      "type" : "java.lang.Boolean",
-      "description" : "Whether the process for the service is confirmed as running",
-      "links" : null
-    }, {
-      "name" : "service.state",
-      "type" : "brooklyn.entity.basic.Lifecycle",
-      "description" : "Actual lifecycle state of the service",
-      "links" : null
-    }, {
-      "name" : "softwareprocess.pid.file",
-      "type" : "java.lang.String",
-      "description" : "PID file",
-      "links" : null
-    }, {
-      "name" : "softwareservice.provisioningLocation",
-      "type" : "brooklyn.location.MachineProvisioningLocation",
-      "description" : "Location used to provision a machine where this is running",
-      "links" : null
-    } ],
-    "effectors" : [ {
-      "name" : "executeScript",
-      "returnType" : "java.lang.String",
-      "parameters" : [ {
-        "name" : "commands",
-        "type" : "java.lang.String",
-        "description" : null,
-        "defaultValue" : null
-      } ],
-      "description" : "executes the given script contents using cassandra-cli",
-      "links" : null
-    }, {
-      "name" : "restart",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Restart the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "start",
-      "returnType" : "void",
-      "parameters" : [ {
-        "name" : "locations",
-        "type" : "java.lang.Object",
-        "description" : "The location or locations to start in, as a string, a location object, a list of strings, or a list of location objects",
-        "defaultValue" : null
-      } ],
-      "description" : "Start the process/service represented by an entity",
-      "links" : null
-    }, {
-      "name" : "stop",
-      "returnType" : "void",
-      "parameters" : [ ],
-      "description" : "Stop the process/service represented by an entity",
-      "links" : null
-    } ]
-  }, {
-    "type" : "brooklyn.entity.nosql.solr.SolrServer",
-    "defaultVersion" : "4.7.0",
-    "name" : "Apache Solr Node",
-    "description" : "Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project.",
-    "iconUrl" : "classpath:///solr-logo.jpeg",
-    "config" : [ {
-      "name" : "children.startable.mode",
-      "type" : "java.lang.Enum",
-      "defaultValue" : null,
-      "description" : "children.startable.mode",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : [ {
-        "value" : "NONE",
-        "description" : "NONE"
-      }, {
-        "value" : "FOREGROUND",
-        "description" : "FOREGROUND"
-      }, {
-        "value" : "FOREGROUND_LATE",
-        "description" : "FOREGROUND_LATE"
-      }, {
-        "value" : "BACKGROUND",
-        "description" : "BACKGROUND"
-      }, {
-        "value" : "BACKGROUND_LATE",
-        "description" : "BACKGROUND_LATE"
-      } ],
-      "links" : null
-    }, {
-      "name" : "customize.latch",
-      "type" : "java.lang.Boolean",
-      "defaultValue" : null,
-      "description" : "Latch for blocking customize until ready",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "download.addon.urls",
-      "type" : "java.util.Map",
-      "defaultValue" : null,
-      "description" : "URL patterns for downloading named add-ons (will substitute things like ${version} automatically)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "download.url",
-      "type" : "java.lang.String",
-      "defaultValue" : "${driver.mirrorUrl}/${version}/solr-${version}.tgz",
-      "description" : "URL pattern for downloading the installer (will substitute things like ${version} automatically)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "expandedinstall.dir",
-      "type" : "java.lang.String",
-      "defaultValue" : null,
-      "description" : "Directory for installed artifacts (e.g. expanded dir after unpacking .tgz)",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "files.runtime",
-      "type" : "java.util.Map",
-      "defaultValue" : null,
-      "description" : "Map of files to be copied, keyed by destination name relative to runDir",
-      "reconfigurable" : false,
-      "label" : null,
-      "priority" : null,
-      "possibleValues" : null,
-      "links" : null
-    }, {
-      "name" : "install.dir",
-      "type" : "java.lang.String",
-      "defaultValue" : "${config['onbox.base.dir']!config['brooklyn.datadir']!'/<ERROR>-ONBOX_BASE_DIR-not-set'}/installs/${(config['install.unique_label']??)?string(config['install.unique_label']!'X',(entity.entityType.simpleName)+((config['install.version']??)?string('_'+(config['install.version']!'X'),'')))}",
-      "description" : "Directory for this software to be installed i

<TRUNCATED>


[11/11] incubator-brooklyn git commit: Update docs/.gitignore

Posted by sj...@apache.org.
Update docs/.gitignore


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

Branch: refs/heads/master
Commit: d90a8bf07eea50dfac9c30c3cb70f96e3ad5c8a9
Parents: f46643b
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Thu Jul 30 20:59:51 2015 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Jul 30 20:59:51 2015 +0100

----------------------------------------------------------------------
 docs/.gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d90a8bf0/docs/.gitignore
----------------------------------------------------------------------
diff --git a/docs/.gitignore b/docs/.gitignore
index 34ce063..19a2968 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -1,4 +1,4 @@
 _site
 _config_local.yml
 .sass-cache
-./style/js/catalog/items.js
\ No newline at end of file
+style/js/catalog/items.js


[08/11] incubator-brooklyn git commit: This closes #763

Posted by sj...@apache.org.
This closes #763


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

Branch: refs/heads/master
Commit: d63641e1e7bbdc7e2b07c6a3e74536090b4006e4
Parents: 906ea25 fcb1af0
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Thu Jul 30 20:31:41 2015 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Jul 30 20:31:41 2015 +0100

----------------------------------------------------------------------
 .../location/MachineManagementMixins.java       |  45 +-
 .../location/jclouds/JcloudsLocation.java       |  36 +-
 .../SameServerDriverLifecycleEffectorTasks.java |   2 +-
 ...wareProcessDriverLifecycleEffectorTasks.java |  22 +-
 .../software/MachineLifecycleEffectorTasks.java | 450 +++++++++++++------
 5 files changed, 396 insertions(+), 159 deletions(-)
----------------------------------------------------------------------



[10/11] incubator-brooklyn git commit: This closes #622

Posted by sj...@apache.org.
This closes #622


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

Branch: refs/heads/master
Commit: f46643b4524ba2f4acb1ab5733c3c8e13de6b117
Parents: c12bedf 642035a
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Thu Jul 30 20:33:11 2015 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Jul 30 20:33:11 2015 +0100

----------------------------------------------------------------------
 docs/.gitignore                                 |     1 +
 docs/_build/build.sh                            |    12 +
 docs/_build/list-objects-logback.xml            |    42 +
 docs/style/js/catalog/items.json                | 24674 -----------------
 .../website/learnmore/catalog/catalog-item.html |    12 +-
 docs/website/learnmore/catalog/index.html       |    11 +-
 6 files changed, 60 insertions(+), 24692 deletions(-)
----------------------------------------------------------------------



[06/11] incubator-brooklyn git commit: No anonymous inner classes in classes extending MachineLifecycleEffectorTasks

Posted by sj...@apache.org.
No anonymous inner classes in classes extending MachineLifecycleEffectorTasks


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

Branch: refs/heads/master
Commit: fcb1af0cbd7eb9799e48471e37934b046330baf3
Parents: f012c9c
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Tue Jul 28 13:46:32 2015 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Wed Jul 29 17:00:19 2015 +0100

----------------------------------------------------------------------
 .../SameServerDriverLifecycleEffectorTasks.java |   2 +-
 ...wareProcessDriverLifecycleEffectorTasks.java |  22 +-
 .../software/MachineLifecycleEffectorTasks.java | 359 +++++++++++--------
 3 files changed, 233 insertions(+), 150 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/fcb1af0c/software/base/src/main/java/brooklyn/entity/basic/SameServerDriverLifecycleEffectorTasks.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/basic/SameServerDriverLifecycleEffectorTasks.java b/software/base/src/main/java/brooklyn/entity/basic/SameServerDriverLifecycleEffectorTasks.java
index bb3b1fd..8b64ddc 100644
--- a/software/base/src/main/java/brooklyn/entity/basic/SameServerDriverLifecycleEffectorTasks.java
+++ b/software/base/src/main/java/brooklyn/entity/basic/SameServerDriverLifecycleEffectorTasks.java
@@ -84,7 +84,7 @@ public class SameServerDriverLifecycleEffectorTasks extends MachineLifecycleEffe
                 value = maybeValue.isPresent() ? maybeValue.get() : null;
             }
 
-            Maybe<PortRange> maybePortRange = TypeCoercions.tryCoerce(value, new TypeToken<PortRange>() {});
+            Maybe<PortRange> maybePortRange = TypeCoercions.tryCoerce(value, TypeToken.of(PortRange.class));
 
             if (maybePortRange.isPresentAndNonNull()) {
                 PortRange p = maybePortRange.get();

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/fcb1af0c/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessDriverLifecycleEffectorTasks.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessDriverLifecycleEffectorTasks.java b/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessDriverLifecycleEffectorTasks.java
index a315e84..2dcfa7e 100644
--- a/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessDriverLifecycleEffectorTasks.java
+++ b/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessDriverLifecycleEffectorTasks.java
@@ -59,20 +59,30 @@ public class SoftwareProcessDriverLifecycleEffectorTasks extends MachineLifecycl
             return;
         }
         
-        DynamicTasks.queue("pre-restart", new Runnable() { public void run() {
-            preRestartCustom();
-        }});
+        DynamicTasks.queue("pre-restart", new PreRestartTask());
 
         log.debug("restart of "+entity()+" appears to have driver and hostname - doing driver-level restart");
         entity().getDriver().restart();
         
         restartChildren(parameters);
         
-        DynamicTasks.queue("post-restart", new Runnable() { public void run() {
+        DynamicTasks.queue("post-restart", new PostRestartTask());
+    }
+
+    private class PreRestartTask implements Runnable {
+        @Override
+        public void run() {
+            preRestartCustom();
+        }
+    }
+
+    private class PostRestartTask implements Runnable {
+        @Override
+        public void run() {
             postStartCustom();
             postRestartCustom();
             ServiceStateLogic.setExpectedState(entity(), Lifecycle.RUNNING);
-        }});
+        }
     }
     
     @Override
@@ -233,7 +243,7 @@ public class SoftwareProcessDriverLifecycleEffectorTasks extends MachineLifecycl
         
         if (childException!=null)
             throw new IllegalStateException(result+"; but error stopping child: "+childException, childException);
-        
+
         return result;
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/fcb1af0c/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java b/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java
index 920e5b9..48bb6a4 100644
--- a/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java
+++ b/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java
@@ -171,23 +171,26 @@ public abstract class MachineLifecycleEffectorTasks {
      * Calls {@link #start(Collection)} in this class.
      */
     public EffectorBody<Void> newStartEffectorTask() {
-        return new EffectorBody<Void>() {
-            @Override
-            public Void call(ConfigBag parameters) {
-                Collection<? extends Location> locations  = null;
+        return new StartEffectorBody();
+    }
 
-                Object locationsRaw = parameters.getStringKey(LOCATIONS.getName());
-                locations = Locations.coerceToCollection(entity().getManagementContext(), locationsRaw);
+    private class StartEffectorBody extends EffectorBody<Void> {
+        @Override
+        public Void call(ConfigBag parameters) {
+            Collection<? extends Location> locations = null;
 
-                if (locations==null) {
-                    // null/empty will mean to inherit from parent
-                    locations = Collections.emptyList();
-                }
+            Object locationsRaw = parameters.getStringKey(LOCATIONS.getName());
+            locations = Locations.coerceToCollection(entity().getManagementContext(), locationsRaw);
 
-                start(locations);
-                return null;
+            if (locations == null) {
+                // null/empty will mean to inherit from parent
+                locations = Collections.emptyList();
             }
-        };
+
+            start(locations);
+            return null;
+        }
+
     }
 
     /**
@@ -196,13 +199,15 @@ public abstract class MachineLifecycleEffectorTasks {
      * @see {@link #newStartEffectorTask()}
      */
     public EffectorBody<Void> newRestartEffectorTask() {
-        return new EffectorBody<Void>() {
-            @Override
-            public Void call(ConfigBag parameters) {
-                restart(parameters);
-                return null;
-            }
-        };
+        return new RestartEffectorBody();
+    }
+
+    private class RestartEffectorBody extends EffectorBody<Void> {
+        @Override
+        public Void call(ConfigBag parameters) {
+            restart(parameters);
+            return null;
+        }
     }
 
     /**
@@ -211,13 +216,15 @@ public abstract class MachineLifecycleEffectorTasks {
      * @see {@link #newStartEffectorTask()}
      */
     public EffectorBody<Void> newStopEffectorTask() {
-        return new EffectorBody<Void>() {
-            @Override
-            public Void call(ConfigBag parameters) {
-                stop(parameters);
-                return null;
-            }
-        };
+        return new StopEffectorBody();
+    }
+
+    private class StopEffectorBody extends EffectorBody<Void> {
+        @Override
+        public Void call(ConfigBag parameters) {
+            stop(parameters);
+            return null;
+        }
     }
 
     /**
@@ -226,13 +233,15 @@ public abstract class MachineLifecycleEffectorTasks {
      * @see {@link #newStartEffectorTask()}
      */
     public EffectorBody<Void> newSuspendEffectorTask() {
-        return new EffectorBody<Void>() {
-            @Override
-            public Void call(ConfigBag parameters) {
-                suspend(parameters);
-                return null;
-            }
-        };
+        return new SuspendEffectorBody();
+    }
+
+    private class SuspendEffectorBody extends EffectorBody<Void> {
+        @Override
+        public Void call(ConfigBag parameters) {
+            suspend(parameters);
+            return null;
+        }
     }
 
     protected EntityInternal entity() {
@@ -288,11 +297,19 @@ public abstract class MachineLifecycleEffectorTasks {
 
         final Supplier<MachineLocation> locationSF = locationS;
         preStartAtMachineAsync(locationSF);
-        DynamicTasks.queue("start (processes)", new Runnable() { public void run() {
-            startProcessesAtMachine(locationSF);
-        }});
+        DynamicTasks.queue("start (processes)", new StartProcessesAtMachineTask(locationSF));
         postStartAtMachineAsync();
-        return;
+    }
+
+    private class StartProcessesAtMachineTask implements Runnable {
+        private final Supplier<MachineLocation> machineSupplier;
+        private StartProcessesAtMachineTask(Supplier<MachineLocation> machineSupplier) {
+            this.machineSupplier = machineSupplier;
+        }
+        @Override
+        public void run() {
+            startProcessesAtMachine(machineSupplier);
+        }
     }
 
     /**
@@ -300,62 +317,89 @@ public abstract class MachineLifecycleEffectorTasks {
      * and returns that machine. The task can be used as a supplier to subsequent methods.
      */
     protected Task<MachineLocation> provisionAsync(final MachineProvisioningLocation<?> location) {
-        return DynamicTasks.queue(Tasks.<MachineLocation>builder().name("provisioning ("+location.getDisplayName()+")").body(
-                new Callable<MachineLocation>() {
-                    public MachineLocation call() throws Exception {
-                        // Blocks if a latch was configured.
-                        entity().getConfig(BrooklynConfigKeys.PROVISION_LATCH);
-                        final Map<String,Object> flags = obtainProvisioningFlags(location);
-                        if (!(location instanceof LocalhostMachineProvisioningLocation))
-                            log.info("Starting {}, obtaining a new location instance in {} with ports {}", new Object[] {entity(), location, flags.get("inboundPorts")});
-                        entity().setAttribute(SoftwareProcess.PROVISIONING_LOCATION, location);
-                        MachineLocation machine;
-                        try {
-                            machine = Tasks.withBlockingDetails("Provisioning machine in "+location, new Callable<MachineLocation>() {
-                                public MachineLocation call() throws NoMachinesAvailableException {
-                                    return location.obtain(flags);
-                                }});
-                            if (machine == null) throw new NoMachinesAvailableException("Failed to obtain machine in "+location.toString());
-                        } catch (Exception e) {
-                            throw Exceptions.propagate(e);
-                        }
+        return DynamicTasks.queue(Tasks.<MachineLocation>builder().name("provisioning (" + location.getDisplayName() + ")").body(
+                new ProvisionMachineTask(location)).build());
+    }
 
-                        if (log.isDebugEnabled())
-                            log.debug("While starting {}, obtained new location instance {}", entity(),
-                                    (machine instanceof SshMachineLocation ?
-                                            machine+", details "+((SshMachineLocation)machine).getUser()+":"+Sanitizer.sanitize(((SshMachineLocation)machine).config().getLocalBag())
-                                            : machine));
-                        return machine;
-                    }
-                }).build());
+    private class ProvisionMachineTask implements Callable<MachineLocation> {
+        final MachineProvisioningLocation<?> location;
+
+        private ProvisionMachineTask(MachineProvisioningLocation<?> location) {
+            this.location = location;
+        }
+
+        public MachineLocation call() throws Exception {
+            // Blocks if a latch was configured.
+            entity().getConfig(BrooklynConfigKeys.PROVISION_LATCH);
+            final Map<String, Object> flags = obtainProvisioningFlags(location);
+            if (!(location instanceof LocalhostMachineProvisioningLocation))
+                log.info("Starting {}, obtaining a new location instance in {} with ports {}", new Object[]{entity(), location, flags.get("inboundPorts")});
+            entity().setAttribute(SoftwareProcess.PROVISIONING_LOCATION, location);
+            MachineLocation machine;
+            try {
+                machine = Tasks.withBlockingDetails("Provisioning machine in " + location, new ObtainLocationTask(location, flags));
+                if (machine == null)
+                    throw new NoMachinesAvailableException("Failed to obtain machine in " + location.toString());
+            } catch (Exception e) {
+                throw Exceptions.propagate(e);
+            }
+
+            if (log.isDebugEnabled())
+                log.debug("While starting {}, obtained new location instance {}", entity(),
+                        (machine instanceof SshMachineLocation ?
+                         machine + ", details " + ((SshMachineLocation) machine).getUser() + ":" + Sanitizer.sanitize(((SshMachineLocation) machine).config().getLocalBag())
+                                                               : machine));
+            return machine;
+        }
+    }
+
+    private static class ObtainLocationTask implements Callable<MachineLocation> {
+        final MachineProvisioningLocation<?> location;
+        final Map<String, Object> flags;
+
+        private ObtainLocationTask(MachineProvisioningLocation<?> location, Map<String, Object> flags) {
+            this.flags = flags;
+            this.location = location;
+        }
+
+        public MachineLocation call() throws NoMachinesAvailableException {
+            return location.obtain(flags);
+        }
     }
 
     /** Wraps a call to {@link #preStartCustom(MachineLocation)}, after setting the hostname and address. */
     protected void preStartAtMachineAsync(final Supplier<MachineLocation> machineS) {
-        DynamicTasks.queue("pre-start", new Runnable() { public void run() {
-            MachineLocation machine = machineS.get();
+        DynamicTasks.queue("pre-start", new PreStartTask(machineS.get()));
+    }
+
+    private class PreStartTask implements Runnable {
+        final MachineLocation machine;
+        private PreStartTask(MachineLocation machine) {
+            this.machine = machine;
+        }
+        public void run() {
             log.info("Starting {} on machine {}", entity(), machine);
             Collection<Location> oldLocs = entity().getLocations();
             if (!oldLocs.isEmpty()) {
                 List<MachineLocation> oldSshLocs = ImmutableList.copyOf(Iterables.filter(oldLocs, MachineLocation.class));
                 if (!oldSshLocs.isEmpty()) {
                     // check if existing locations are compatible
-                    log.debug("Entity "+entity()+" had machine locations "+oldSshLocs+" when starting at "+machine+"; checking if they are compatible");
-                    for (MachineLocation oldLoc: oldSshLocs) {
+                    log.debug("Entity " + entity() + " had machine locations " + oldSshLocs + " when starting at " + machine + "; checking if they are compatible");
+                    for (MachineLocation oldLoc : oldSshLocs) {
                         // machines are deemed compatible if hostname and address are the same, or they are localhost
                         // this allows a machine create by jclouds to then be defined with an ip-based spec
                         if (!"localhost".equals(machine.getConfig(AbstractLocation.ORIGINAL_SPEC))) {
                             checkLocationParametersCompatible(machine, oldLoc, "hostname",
-                                oldLoc.getAddress().getHostName(), machine.getAddress().getHostName());
+                                    oldLoc.getAddress().getHostName(), machine.getAddress().getHostName());
                             checkLocationParametersCompatible(machine, oldLoc, "address",
-                                oldLoc.getAddress().getHostAddress(), machine.getAddress().getHostAddress());
+                                    oldLoc.getAddress().getHostAddress(), machine.getAddress().getHostAddress());
                         }
                     }
-                    log.debug("Entity "+entity()+" old machine locations "+oldSshLocs+" were compatible, removing them to start at "+machine);
+                    log.debug("Entity " + entity() + " old machine locations " + oldSshLocs + " were compatible, removing them to start at " + machine);
                     entity().removeLocations(oldSshLocs);
                 }
             }
-            entity().addLocations(ImmutableList.of((Location)machine));
+            entity().addLocations(ImmutableList.of((Location) machine));
 
             // elsewhere we rely on (public) hostname being set _after_ subnet_hostname
             // (to prevent the tiny possibility of races resulting in hostname being returned
@@ -397,7 +441,7 @@ public abstract class MachineLifecycleEffectorTasks {
             }
             resolveOnBoxDir(entity(), machine);
             preStartCustom(machine);
-        }});
+        }
     }
 
     /**
@@ -480,9 +524,13 @@ public abstract class MachineLifecycleEffectorTasks {
     protected abstract String startProcessesAtMachine(final Supplier<MachineLocation> machineS);
 
     protected void postStartAtMachineAsync() {
-        DynamicTasks.queue("post-start", new Runnable() { public void run() {
+        DynamicTasks.queue("post-start", new PostStartTask());
+    }
+
+    private class PostStartTask implements Runnable {
+        public void run() {
             postStartCustom();
-        }});
+        }
     }
 
     /**
@@ -515,7 +563,7 @@ public abstract class MachineLifecycleEffectorTasks {
     protected boolean getDefaultRestartStopsMachine() {
         return false;
     }
-    
+
     /**
      * Default restart implementation for an entity.
      * <p>
@@ -523,53 +571,54 @@ public abstract class MachineLifecycleEffectorTasks {
      */
     public void restart(ConfigBag parameters) {
         ServiceStateLogic.setExpectedState(entity(), Lifecycle.STOPPING);
-        
+
         RestartMachineMode isRestartMachine = parameters.get(RestartSoftwareParameters.RESTART_MACHINE_TYPED);
-        if (isRestartMachine==null) 
+        if (isRestartMachine==null)
             isRestartMachine=RestartMachineMode.AUTO;
-        if (isRestartMachine==RestartMachineMode.AUTO) 
-            isRestartMachine = getDefaultRestartStopsMachine() ? RestartMachineMode.TRUE : RestartMachineMode.FALSE; 
+        if (isRestartMachine==RestartMachineMode.AUTO)
+            isRestartMachine = getDefaultRestartStopsMachine() ? RestartMachineMode.TRUE : RestartMachineMode.FALSE;
 
-        DynamicTasks.queue("pre-restart", new Runnable() { public void run() {
-            //Calling preStopCustom without a corresponding postStopCustom invocation
-            //doesn't look right so use a separate callback pair; Also depending on the arguments
-            //stop() could be called which will call the {pre,post}StopCustom on its own.
-            preRestartCustom();
-        }});
+        // Calling preStopCustom without a corresponding postStopCustom invocation
+        // doesn't look right so use a separate callback pair; Also depending on the arguments
+        // stop() could be called which will call the {pre,post}StopCustom on its own.
+        DynamicTasks.queue("pre-restart", new PreRestartTask());
 
         if (isRestartMachine==RestartMachineMode.FALSE) {
-            DynamicTasks.queue("stopping (process)", new Callable<String>() { public String call() {
-                DynamicTasks.markInessential();
-                stopProcessesAtMachine();
-                DynamicTasks.waitForLast();
-                return "Stop of process completed with no errors.";
-            }});
+            DynamicTasks.queue("stopping (process)", new StopProcessesAtMachineTask());
         } else {
-            DynamicTasks.queue("stopping (machine)", new Callable<String>() { public String call() {
-                DynamicTasks.markInessential();
-                stop(ConfigBag.newInstance().configure(StopSoftwareParameters.STOP_MACHINE_MODE, StopMode.IF_NOT_STOPPED));
-                DynamicTasks.waitForLast();
-                return "Stop of machine completed with no errors.";
-            }});
+            DynamicTasks.queue("stopping (machine)", new StopMachineTask());
         }
 
-        DynamicTasks.queue("starting", new Runnable() { public void run() {
-            // startInLocations will look up the location, and provision a machine if necessary
-            // (if it remembered the provisioning location)
-            ServiceStateLogic.setExpectedState(entity(), Lifecycle.STARTING);
-            startInLocations(null);
-        }});
-        
+        DynamicTasks.queue("starting", new StartInLocationsTask());
         restartChildren(parameters);
-
-        DynamicTasks.queue("post-restart", new Runnable() { public void run() {
-            postRestartCustom();
-        }});
+        DynamicTasks.queue("post-restart", new PostRestartTask());
 
         DynamicTasks.waitForLast();
         ServiceStateLogic.setExpectedState(entity(), Lifecycle.RUNNING);
     }
 
+    private class PreRestartTask implements Runnable {
+        @Override
+        public void run() {
+            preRestartCustom();
+        }
+    }
+    private class PostRestartTask implements Runnable {
+        @Override
+        public void run() {
+            postRestartCustom();
+        }
+    }
+    private class StartInLocationsTask implements Runnable {
+        @Override
+        public void run() {
+            // startInLocations will look up the location, and provision a machine if necessary
+            // (if it remembered the provisioning location)
+            ServiceStateLogic.setExpectedState(entity(), Lifecycle.STARTING);
+            startInLocations(null);
+        }
+    }
+
     protected void restartChildren(ConfigBag parameters) {
         // TODO should we consult ChildStartableMode?
 
@@ -577,12 +626,12 @@ public abstract class MachineLifecycleEffectorTasks {
         if (isRestartChildren==null || !isRestartChildren) {
             return;
         }
-        
+
         if (isRestartChildren) {
             DynamicTasks.queue(StartableMethods.restartingChildren(entity(), parameters));
             return;
         }
-        
+
         throw new IllegalArgumentException("Invalid value '"+isRestartChildren+"' for "+RestartSoftwareParameters.RESTART_CHILDREN.getName());
     }
 
@@ -601,11 +650,7 @@ public abstract class MachineLifecycleEffectorTasks {
      * If no errors were encountered call {@link #postStopCustom()} at the end.
      */
     public void stop(ConfigBag parameters) {
-        doStop(parameters, new Callable<StopMachineDetails<Integer>>() {
-            public StopMachineDetails<Integer> call() {
-                return stopAnyProvisionedMachines();
-            }
-        });
+        doStop(parameters, new StopAnyProvisionedMachinesTask());
     }
 
     /**
@@ -613,12 +658,7 @@ public abstract class MachineLifecycleEffectorTasks {
      * {@link #stopAnyProvisionedMachines}.
      */
     public void suspend(ConfigBag parameters) {
-        doStop(parameters, new Callable<StopMachineDetails<Integer>>() {
-            @Override
-            public StopMachineDetails<Integer> call() throws Exception {
-                return suspendAnyProvisionedMachines();
-            }
-        });
+        doStop(parameters, new SuspendAnyProvisionedMachinesTask());
     }
 
     protected void doStop(ConfigBag parameters, Callable<StopMachineDetails<Integer>> stopTask) {
@@ -629,26 +669,12 @@ public abstract class MachineLifecycleEffectorTasks {
         StopMode stopMachineMode = getStopMachineMode(parameters);
         StopMode stopProcessMode = parameters.get(StopSoftwareParameters.STOP_PROCESS_MODE);
 
-        DynamicTasks.queue("pre-stop", new Callable<String>() { public String call() {
-            if (entity().getAttribute(SoftwareProcess.SERVICE_STATE_ACTUAL)==Lifecycle.STOPPED) {
-                log.debug("Skipping stop of entity "+entity()+" when already stopped");
-                return "Already stopped";
-            }
-            ServiceStateLogic.setExpectedState(entity(), Lifecycle.STOPPING);
-            entity().setAttribute(SoftwareProcess.SERVICE_UP, false);
-            preStopCustom();
-            return null;
-        }});
+        DynamicTasks.queue("pre-stop", new PreStopCustomTask());
 
         Maybe<MachineLocation> machine = Machines.findUniqueMachineLocation(entity().getLocations());
         Task<String> stoppingProcess = null;
         if (canStop(stopProcessMode, entity())) {
-            stoppingProcess = DynamicTasks.queue("stopping (process)", new Callable<String>() { public String call() {
-                DynamicTasks.markInessential();
-                stopProcessesAtMachine();
-                DynamicTasks.waitForLast();
-                return "Stop at machine completed with no errors.";
-            }});
+            stoppingProcess = DynamicTasks.queue("stopping (process)", new StopProcessesAtMachineTask());
         }
 
         Task<StopMachineDetails<Integer>> stoppingMachine = null;
@@ -696,14 +722,61 @@ public abstract class MachineLifecycleEffectorTasks {
         entity().setAttribute(SoftwareProcess.SERVICE_UP, false);
         ServiceStateLogic.setExpectedState(entity(), Lifecycle.STOPPED);
 
-        DynamicTasks.queue("post-stop", new Callable<Void>() { public Void call() {
-            postStopCustom();
-            return null;
-        }});
+        DynamicTasks.queue("post-stop", new PostStopCustomTask());
 
         if (log.isDebugEnabled()) log.debug("Stopped software process entity "+entity());
     }
 
+    private class StopAnyProvisionedMachinesTask implements Callable<StopMachineDetails<Integer>> {
+        public StopMachineDetails<Integer> call() {
+            return stopAnyProvisionedMachines();
+        }
+    }
+
+    private class SuspendAnyProvisionedMachinesTask implements Callable<StopMachineDetails<Integer>> {
+        public StopMachineDetails<Integer> call() {
+            return suspendAnyProvisionedMachines();
+        }
+    }
+
+    private class StopProcessesAtMachineTask implements Callable<String> {
+        public String call() {
+            DynamicTasks.markInessential();
+            stopProcessesAtMachine();
+            DynamicTasks.waitForLast();
+            return "Stop processes completed with no errors.";
+        }
+    }
+
+    private class StopMachineTask implements Callable<String> {
+        public String call() {
+            DynamicTasks.markInessential();
+            stop(ConfigBag.newInstance().configure(StopSoftwareParameters.STOP_MACHINE_MODE, StopMode.IF_NOT_STOPPED));
+            DynamicTasks.waitForLast();
+            return "Stop of machine completed with no errors.";
+        }
+    }
+
+    private class PreStopCustomTask implements Callable<String> {
+        public String call() {
+            if (entity().getAttribute(SoftwareProcess.SERVICE_STATE_ACTUAL) == Lifecycle.STOPPED) {
+                log.debug("Skipping stop of entity " + entity() + " when already stopped");
+                return "Already stopped";
+            }
+            ServiceStateLogic.setExpectedState(entity(), Lifecycle.STOPPING);
+            entity().setAttribute(SoftwareProcess.SERVICE_UP, false);
+            preStopCustom();
+            return null;
+        }
+    }
+
+    private class PostStopCustomTask implements Callable<Void> {
+        public Void call() {
+            postStopCustom();
+            return null;
+        }
+    }
+
     public static StopMode getStopMachineMode(ConfigBag parameters) {
         @SuppressWarnings("deprecation")
         final boolean hasStopMachine = parameters.containsKey(StopSoftwareParameters.STOP_MACHINE);


[09/11] incubator-brooklyn git commit: This closes #778

Posted by sj...@apache.org.
This closes #778


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

Branch: refs/heads/master
Commit: c12bedfd8624f2b6458f5956ccb2238da26871ae
Parents: d63641e 9cbe341
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Thu Jul 30 20:32:03 2015 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Jul 30 20:32:03 2015 +0100

----------------------------------------------------------------------
 .../entity/basic/AbstractApplication.java       | 41 +++++++-------------
 1 file changed, 15 insertions(+), 26 deletions(-)
----------------------------------------------------------------------



[03/11] incubator-brooklyn git commit: Revert the eager loading of the catalog items

Posted by sj...@apache.org.
Revert the eager loading of the catalog items

- Include the catalog items generation in the documentation build


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

Branch: refs/heads/master
Commit: 642035ae4e409598f3c47e25d0473a6cfcc1e879
Parents: b2d3f33
Author: Valentin Aitken <va...@cloudsoftcorp.com>
Authored: Fri May 1 03:03:22 2015 +0300
Committer: Valentin Aitken <va...@cloudsoftcorp.com>
Committed: Tue Jul 14 10:28:05 2015 +0100

----------------------------------------------------------------------
 docs/.gitignore                                 |     1 +
 docs/_build/build.sh                            |    12 +
 docs/_build/list-objects-logback.xml            |    42 +
 docs/style/js/catalog/items.json                | 24674 -----------------
 .../website/learnmore/catalog/catalog-item.html |    12 +-
 docs/website/learnmore/catalog/index.html       |    11 +-
 6 files changed, 60 insertions(+), 24692 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/642035ae/docs/.gitignore
----------------------------------------------------------------------
diff --git a/docs/.gitignore b/docs/.gitignore
index 3767b72..34ce063 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -1,3 +1,4 @@
 _site
 _config_local.yml
 .sass-cache
+./style/js/catalog/items.js
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/642035ae/docs/_build/build.sh
----------------------------------------------------------------------
diff --git a/docs/_build/build.sh b/docs/_build/build.sh
index 2f7e395..2cdcffc 100755
--- a/docs/_build/build.sh
+++ b/docs/_build/build.sh
@@ -179,9 +179,21 @@ function test_site() {
 }
 
 function make_jekyll() {
+  BROOKLYN_BIN=../usage/dist/target/brooklyn-dist/brooklyn/bin/brooklyn
+  if [ -f $BROOKLYN_BIN ]; then
+    ITEMS_JS=style/js/catalog/items.js
+    echo "Generating catalog items in $ITEMS_JS"
+    echo -n "var items = " > "$ITEMS_JS"
+    JAVA_OPTS='-Dlogback.configurationFile=_build/list-objects-logback.xml' $BROOKLYN_BIN \
+      list-objects >> "$ITEMS_JS"
+    echo ";" >> "$ITEMS_JS"
+    echo "Generating catalog items completed"
+  fi
+
   echo JEKYLL running with: jekyll build $JEKYLL_CONFIG
   jekyll build --config $JEKYLL_CONFIG || return 1
   echo JEKYLL completed
+
   for DI in "${!DIRS_TO_MOVE[@]}"; do
     D=${DIRS_TO_MOVE[$DI]}
     DT=${DIRS_TO_MOVE_TARGET[$DI]}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/642035ae/docs/_build/list-objects-logback.xml
----------------------------------------------------------------------
diff --git a/docs/_build/list-objects-logback.xml b/docs/_build/list-objects-logback.xml
new file mode 100644
index 0000000..4ce07ae
--- /dev/null
+++ b/docs/_build/list-objects-logback.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<configuration>
+  <property name="logging.basename" scope="context" value="brooklyn" />
+  <property name="logging.dir" scope="context" value="./" />
+
+  <!-- this file defines the default logging configuration for brooklyn projects,
+       in a way which is intended to be friendly to downstream projects.
+
+       downstream projects may be routed to this file in two situations:
+
+       * running tests (via brooklyn-test-support)
+       * dependency on `brooklyn-logback-xml` and running in IDE
+
+       this file may be overridden in downstream projects, as may any of the files incldued here.
+
+       for an _assembly_ (i.e. a redistributable binary) a project must supply
+       a logback.xml.  it can route to this file if they wish, or use some of
+       the files referenced herein, or ignore it altogether.  (the reason for
+       this is that assemblies usually want to declare their own logging anyway.)
+  -->
+
+  <!-- set default root logger threshhold to info; some categories may get debug -->
+  <root level="INFO"/>
+</configuration>
\ No newline at end of file


[05/11] incubator-brooklyn git commit: Adds suspend and resume interfaces to MachineManagementMixins.

Posted by sj...@apache.org.
Adds suspend and resume interfaces to MachineManagementMixins.

And uses them in JcloudsLocation.


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

Branch: refs/heads/master
Commit: 415d08349cfd8ffb2848cf89f97fc693346f4444
Parents: e761f42
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Tue Jul 21 12:00:44 2015 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Wed Jul 29 16:59:17 2015 +0100

----------------------------------------------------------------------
 .../location/MachineManagementMixins.java       | 45 +++++++++++++++++---
 .../location/jclouds/JcloudsLocation.java       | 36 +++++++++++++++-
 2 files changed, 73 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/415d0834/api/src/main/java/brooklyn/location/MachineManagementMixins.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/brooklyn/location/MachineManagementMixins.java b/api/src/main/java/brooklyn/location/MachineManagementMixins.java
index 77ffea5..99038ba 100644
--- a/api/src/main/java/brooklyn/location/MachineManagementMixins.java
+++ b/api/src/main/java/brooklyn/location/MachineManagementMixins.java
@@ -20,18 +20,28 @@ package brooklyn.location;
 
 import java.util.Map;
 
+import com.google.common.annotations.Beta;
+
+/**
+ * Defines mixins for interesting locations.
+ */
 public class MachineManagementMixins {
     
-    public interface RichMachineProvisioningLocation<T extends MachineLocation> extends MachineProvisioningLocation<T>, ListsMachines, GivesMachineMetadata, KillsMachines {}
-    
+    public interface RichMachineProvisioningLocation<T extends MachineLocation> extends
+            MachineProvisioningLocation<T>, ListsMachines, GivesMachineMetadata, KillsMachines {}
+
     public interface ListsMachines {
-        /** returns map of machine ID to metadata record for all machines known in a given cloud location */ 
+        /**
+         * @return A map of machine ID to metadata record for all machines known in a given cloud location.
+         */
         Map<String,MachineMetadata> listMachines();
     }
     
     public interface GivesMachineMetadata {
-        /** returns the MachineMetadata for a given (brooklyn) machine location instance, 
-         * or null if not matched */
+        /**
+         * @return the {@link MachineMetadata} for a given (brooklyn) machine location instance,
+         * or null if not matched.
+         */
         MachineMetadata getMachineMetadata(MachineLocation location);
     }
     
@@ -55,5 +65,28 @@ public class MachineManagementMixins {
         /** original metadata object, if available; e.g. ComputeMetadata when using jclouds */ 
         Object getOriginalMetadata();
     }
-    
+
+    /**
+     * Implement to indicate that a location can suspend and resume machines.
+     */
+    @Beta
+    public interface SuspendResumeLocation extends SuspendsMachines, ResumesMachines {};
+
+
+    @Beta
+    public interface SuspendsMachines {
+        /**
+         * Suspend the indicated machine.
+         */
+        void suspendMachine(MachineLocation location);
+    }
+
+    @Beta
+    public interface ResumesMachines {
+        /**
+         * Resume the indicated machine.
+         */
+        void resumeMachine(MachineLocation location);
+    }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/415d0834/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
index c7d9f95..4916de5 100644
--- a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
+++ b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
@@ -126,6 +126,7 @@ import brooklyn.location.MachineLocation;
 import brooklyn.location.MachineLocationCustomizer;
 import brooklyn.location.MachineManagementMixins.MachineMetadata;
 import brooklyn.location.MachineManagementMixins.RichMachineProvisioningLocation;
+import brooklyn.location.MachineManagementMixins.SuspendsMachines;
 import brooklyn.location.NoMachinesAvailableException;
 import brooklyn.location.access.PortForwardManager;
 import brooklyn.location.access.PortMapping;
@@ -187,7 +188,9 @@ import io.cloudsoft.winrm4j.pywinrm.WinRMFactory;
  * Configuration flags are defined in {@link JcloudsLocationConfig}.
  */
 @SuppressWarnings("serial")
-public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation implements JcloudsLocationConfig, RichMachineProvisioningLocation<MachineLocation>, LocationWithObjectStore {
+public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation implements
+        JcloudsLocationConfig, RichMachineProvisioningLocation<MachineLocation>,
+        LocationWithObjectStore, SuspendsMachines {
 
     // TODO After converting from Groovy to Java, this is now very bad code! It relies entirely on putting
     // things into and taking them out of maps; it's not type-safe, and it's thus very error-prone.
@@ -1023,6 +1026,35 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
         }
     }
 
+    // ------------- suspend and resume ------------------------------------
+
+    /**
+     * Suspends the given location.
+     * <p>
+     * Note that this method does <b>not</b> call the lifecycle methods of any
+     * {@link #getCustomizers(ConfigBag) customizers} attached to this location.
+     */
+    @Override
+    public void suspendMachine(MachineLocation rawLocation) {
+        String instanceId = vmInstanceIds.remove(rawLocation);
+        if (instanceId == null) {
+            LOG.info("Attempt to suspend unknown machine " + rawLocation + " in " + this);
+            throw new IllegalArgumentException("Unknown machine " + rawLocation);
+        }
+        LOG.info("Suspending machine {} in {}, instance id {}", new Object[]{rawLocation, this, instanceId});
+        Exception toThrow = null;
+        try {
+            getComputeService().suspendNode(instanceId);
+        } catch (Exception e) {
+            toThrow = e;
+            LOG.error("Problem suspending machine " + rawLocation + " in " + this + ", instance id " + instanceId, e);
+        }
+        removeChild(rawLocation);
+        if (toThrow != null) {
+            throw Exceptions.propagate(toThrow);
+        }
+    }
+
     // ------------- constructing the template, etc ------------------------
 
     private static interface CustomizeTemplateBuilder {
@@ -2159,7 +2191,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
             throw new IllegalArgumentException("Unknown machine "+rawMachine);
         }
         JcloudsMachineLocation machine = (JcloudsMachineLocation) rawMachine;
-        
+
         LOG.info("Releasing machine {} in {}, instance id {}", new Object[] {machine, this, instanceId});
 
         Exception tothrow = null;


[07/11] incubator-brooklyn git commit: MachineLifecycleEffectorTasks can suspend as well as stop machines.

Posted by sj...@apache.org.
MachineLifecycleEffectorTasks can suspend as well as stop machines.

Leaves it to subclasses to attach the effector to entities.


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

Branch: refs/heads/master
Commit: f012c9c7e879248b08bee6912d2698ff97e2ed9d
Parents: 415d083
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Tue Jul 21 16:56:13 2015 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Wed Jul 29 17:00:19 2015 +0100

----------------------------------------------------------------------
 .../software/MachineLifecycleEffectorTasks.java | 127 ++++++++++++++++---
 1 file changed, 108 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f012c9c7/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java b/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java
index ec3ae1c..920e5b9 100644
--- a/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java
+++ b/software/base/src/main/java/brooklyn/entity/software/MachineLifecycleEffectorTasks.java
@@ -63,6 +63,7 @@ import brooklyn.entity.trait.StartableMethods;
 import brooklyn.event.feed.ConfigToAttributes;
 import brooklyn.location.Location;
 import brooklyn.location.MachineLocation;
+import brooklyn.location.MachineManagementMixins.SuspendsMachines;
 import brooklyn.location.MachineProvisioningLocation;
 import brooklyn.location.NoMachinesAvailableException;
 import brooklyn.location.basic.AbstractLocation;
@@ -72,7 +73,6 @@ import brooklyn.location.basic.Machines;
 import brooklyn.location.basic.SshMachineLocation;
 import brooklyn.location.cloud.CloudLocationConfig;
 import brooklyn.management.Task;
-import brooklyn.management.TaskFactory;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.config.ConfigBag;
 import brooklyn.util.exceptions.Exceptions;
@@ -155,8 +155,18 @@ public abstract class MachineLifecycleEffectorTasks {
                 .build();
     }
 
+    /** @see {@link #newStartEffector()} */
+    public Effector<Void> newSuspendEffector() {
+        return Effectors.effector(Void.class, "suspend")
+                .description("Suspend the process/service represented by an entity")
+                .parameter(StopSoftwareParameters.STOP_PROCESS_MODE)
+                .parameter(StopSoftwareParameters.STOP_MACHINE_MODE)
+                .impl(newSuspendEffectorTask())
+                .build();
+    }
+
     /**
-     * Returns the {@link TaskFactory} which supplies the implementation for the start effector.
+     * Returns the {@link EffectorBody} which supplies the implementation for the start effector.
      * <p>
      * Calls {@link #start(Collection)} in this class.
      */
@@ -196,7 +206,7 @@ public abstract class MachineLifecycleEffectorTasks {
     }
 
     /**
-     * Calls {@link #stop()}.
+     * Calls {@link #stop(ConfigBag)}.
      *
      * @see {@link #newStartEffectorTask()}
      */
@@ -210,6 +220,21 @@ public abstract class MachineLifecycleEffectorTasks {
         };
     }
 
+    /**
+     * Calls {@link #suspend(ConfigBag)}.
+     *
+     * @see {@link #newStartEffectorTask()}
+     */
+    public EffectorBody<Void> newSuspendEffectorTask() {
+        return new EffectorBody<Void>() {
+            @Override
+            public Void call(ConfigBag parameters) {
+                suspend(parameters);
+                return null;
+            }
+        };
+    }
+
     protected EntityInternal entity() {
         return (EntityInternal) BrooklynTaskTags.getTargetOrContextEntity(Tasks.current());
     }
@@ -576,6 +601,27 @@ public abstract class MachineLifecycleEffectorTasks {
      * If no errors were encountered call {@link #postStopCustom()} at the end.
      */
     public void stop(ConfigBag parameters) {
+        doStop(parameters, new Callable<StopMachineDetails<Integer>>() {
+            public StopMachineDetails<Integer> call() {
+                return stopAnyProvisionedMachines();
+            }
+        });
+    }
+
+    /**
+     * As {@link #stop} but calling {@link #suspendAnyProvisionedMachines} rather than
+     * {@link #stopAnyProvisionedMachines}.
+     */
+    public void suspend(ConfigBag parameters) {
+        doStop(parameters, new Callable<StopMachineDetails<Integer>>() {
+            @Override
+            public StopMachineDetails<Integer> call() throws Exception {
+                return suspendAnyProvisionedMachines();
+            }
+        });
+    }
+
+    protected void doStop(ConfigBag parameters, Callable<StopMachineDetails<Integer>> stopTask) {
         preStopConfirmCustom();
 
         log.info("Stopping {} in {}", entity(), entity().getLocations());
@@ -608,11 +654,7 @@ public abstract class MachineLifecycleEffectorTasks {
         Task<StopMachineDetails<Integer>> stoppingMachine = null;
         if (canStop(stopMachineMode, machine.isAbsent())) {
             // Release this machine (even if error trying to stop process - we rethrow that after)
-            stoppingMachine = DynamicTasks.queue("stopping (machine)", new Callable<StopMachineDetails<Integer>>() {
-                public StopMachineDetails<Integer> call() {
-                    return stopAnyProvisionedMachines();
-                }
-            });
+            stoppingMachine = DynamicTasks.queue("stopping (machine)", stopTask);
 
             DynamicTasks.drain(entity().getConfig(STOP_PROCESS_TIMEOUT), false);
 
@@ -750,7 +792,7 @@ public abstract class MachineLifecycleEffectorTasks {
     protected abstract String stopProcessesAtMachine();
 
     /**
-     * Stop the {@link MachineLocation} the entity is provisioned at.
+     * Stop and release the {@link MachineLocation} the entity is provisioned at.
      * <p>
      * Can run synchronously or not, caller will submit/queue as needed, and will block on any submitted tasks.
      */
@@ -775,16 +817,63 @@ public abstract class MachineLifecycleEffectorTasks {
             return new StopMachineDetails<Integer>("No machine decommissioning necessary - not a machine ("+machine+")", 0);
         }
         
-        try {
-            entity().removeLocations(ImmutableList.of(machine));
-            entity().setAttribute(Attributes.HOSTNAME, null);
-            entity().setAttribute(Attributes.ADDRESS, null);
-            entity().setAttribute(Attributes.SUBNET_HOSTNAME, null);
-            entity().setAttribute(Attributes.SUBNET_ADDRESS, null);
-            if (provisioner != null) provisioner.release((MachineLocation)machine);
-        } catch (Throwable t) {
-            throw Exceptions.propagate(t);
-        }
+        clearEntityLocationAttributes(machine);
+        provisioner.release((MachineLocation)machine);
+
         return new StopMachineDetails<Integer>("Decommissioned "+machine, 1);
     }
+
+    /**
+     * Suspend the {@link MachineLocation} the entity is provisioned at.
+     * <p>
+     * Expects the entity's {@link SoftwareProcess#PROVISIONING_LOCATION provisioner} to be capable of
+     * {@link SuspendsMachines suspending machines}.
+     *
+     * @throws java.lang.UnsupportedOperationException if the entity's provisioner cannot suspend machines.
+     * @see brooklyn.location.MachineManagementMixins.SuspendsMachines
+     */
+    protected StopMachineDetails<Integer> suspendAnyProvisionedMachines() {
+        @SuppressWarnings("unchecked")
+        MachineProvisioningLocation<MachineLocation> provisioner = entity().getAttribute(SoftwareProcess.PROVISIONING_LOCATION);
+
+        if (Iterables.isEmpty(entity().getLocations())) {
+            log.debug("No machine decommissioning necessary for " + entity() + " - no locations");
+            return new StopMachineDetails<>("No machine suspend necessary - no locations", 0);
+        }
+
+        // Only release this machine if we ourselves provisioned it (e.g. it might be running other services)
+        if (provisioner == null) {
+            log.debug("No machine decommissioning necessary for " + entity() + " - did not provision");
+            return new StopMachineDetails<>("No machine suspend necessary - did not provision", 0);
+        }
+
+        Location machine = getLocation(null);
+        if (!(machine instanceof MachineLocation)) {
+            log.debug("No decommissioning necessary for " + entity() + " - not a machine location (" + machine + ")");
+            return new StopMachineDetails<>("No machine suspend necessary - not a machine (" + machine + ")", 0);
+        }
+
+        if (!(provisioner instanceof SuspendsMachines)) {
+            log.debug("Location provisioner ({}) cannot suspend machines", provisioner);
+            throw new UnsupportedOperationException("Location provisioner cannot suspend machines: " + provisioner);
+        }
+
+        clearEntityLocationAttributes(machine);
+        SuspendsMachines.class.cast(provisioner).suspendMachine(MachineLocation.class.cast(machine));
+
+        return new StopMachineDetails<>("Suspended " + machine, 1);
+    }
+
+    /**
+     * Nulls the attached entity's hostname, address, subnet hostname and subnet address sensors
+     * and removes the given machine from its locations.
+     */
+    protected void clearEntityLocationAttributes(Location machine) {
+        entity().removeLocations(ImmutableList.of(machine));
+        entity().setAttribute(Attributes.HOSTNAME, null);
+        entity().setAttribute(Attributes.ADDRESS, null);
+        entity().setAttribute(Attributes.SUBNET_HOSTNAME, null);
+        entity().setAttribute(Attributes.SUBNET_ADDRESS, null);
+    }
+
 }